[Paper Review] NFLAT: Non-Flat-Lattice Transformer for Chinese Named Entity Recognition
This paper proposes NFLAT, a non-flat-lattice Transformer architecture for Chinese Named Entity Recognition that reduces computational and memory costs by decoupling lexicon fusion from context encoding using an InterFormer module. By employing relative position encoding and auxiliary <non_word> tags, NFLAT achieves state-of-the-art performance with 50% lower memory usage than FLAT, enabling efficient use of large lexicons and pre-trained models like BERT.
Recently, Flat-LAttice Transformer (FLAT) has achieved great success in Chinese Named Entity Recognition (NER). FLAT performs lexical enhancement by constructing flat lattices, which mitigates the difficulties posed by blurred word boundaries and the lack of word semantics. In FLAT, the positions of starting and ending characters are used to connect a matching word. However, this method is likely to match more words when dealing with long texts, resulting in long input sequences. Therefore, it significantly increases the memory and computational costs of the self-attention module. To deal with this issue, we advocate a novel lexical enhancement method, InterFormer, that effectively reduces the amount of computational and memory costs by constructing non-flat lattices. Furthermore, with InterFormer as the backbone, we implement NFLAT for Chinese NER. NFLAT decouples lexicon fusion and context feature encoding. Compared with FLAT, it reduces unnecessary attention calculations in "word-character" and "word-word". This reduces the memory usage by about 50% and can use more extensive lexicons or higher batches for network training. The experimental results obtained on several well-known benchmarks demonstrate the superiority of the proposed method over the state-of-the-art hybrid (character-word) models.
Motivation & Objective
- To address the high memory and computational cost of flat-lattice methods like FLAT in Chinese NER.
- To reduce sequence length expansion caused by word-level tokenization in lexical enhancement.
- To decouple lexicon fusion from context encoding for improved efficiency and scalability.
- To enable effective use of large-scale lexicons and pre-trained models like BERT in Chinese NER.
- To develop a flexible, modular attention mechanism (InterFormer) for joint modeling of character and word sequences.
Proposed method
- Proposes InterFormer, a novel attention mechanism that models relationships between two sequences of different lengths using relative position encoding.
- Introduces a non-flat-lattice structure that avoids the sequence length explosion seen in FLAT by not expanding all character-word pairs.
- Uses an auxiliary <non_word> token to suppress noisy attention by guiding the model to focus on valid word-character pairs.
- Decouples the NER pipeline into two stages: lexicon fusion via InterFormer and context encoding via standard Transformer layers.
- Employs relative position encoding in inter-attention to preserve word boundary information and improve alignment between characters and words.
- Integrates with pre-trained models like BERT-wwm by replacing the embedding layer, enabling joint use of contextual and lexical features.
Experimental results
Research questions
- RQ1Can a non-flat-lattice architecture reduce the memory and computational cost of lexical enhancement in Chinese NER without sacrificing performance?
- RQ2How does inter-attention with relative position encoding improve word boundary detection compared to standard cross-attention?
- RQ3To what extent does the <non_word> auxiliary tag reduce noise in attention mechanisms during word-character alignment?
- RQ4Can NFLAT effectively scale with larger lexicons and pre-trained models like BERT?
- RQ5How does the decoupling of lexicon fusion and context encoding improve training efficiency and model performance?
Key findings
- NFLAT reduces memory usage by approximately 50% compared to FLAT by avoiding full sequence expansion in the lattice.
- On the MSRA benchmark, NFLAT achieves 96.40% F1 with BERT+CRF, outperforming BERT+CRF (80.14% F1) and FLAT (94.12% F1).
- With the TX lexicon, NFLAT achieves 82.78% F1 on the MSRA dataset, surpassing Lattice-LSTM and CGN.
- Ablation studies show that removing relative position encoding reduces performance to 93.03% F1 on MSRA, indicating its importance for boundary awareness.
- Removing the <non_word> tag degrades performance to 93.66% F1 on MSRA, confirming its role in suppressing noisy attention.
- NFLAT maintains strong performance across multiple benchmarks (Weibo, Resume, Ontonotes, MSRA), demonstrating robustness and generalization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.