[Paper Review] FLAT: Chinese NER Using Flat-Lattice Transformer
FLAT proposes a flat-lattice Transformer architecture for Chinese NER that converts the dynamic lattice structure into a set of spans with head and tail position encoding, enabling full parallelization and efficient modeling of both character and word-level information. It achieves state-of-the-art performance and faster inference than prior lexicon-based models on four benchmark datasets.
Recently, the character-word lattice structure has been proved to be effective for Chinese named entity recognition (NER) by incorporating the word information. However, since the lattice structure is complex and dynamic, most existing lattice-based models are hard to fully utilize the parallel computation of GPUs and usually have a low inference-speed. In this paper, we propose FLAT: Flat-LAttice Transformer for Chinese NER, which converts the lattice structure into a flat structure consisting of spans. Each span corresponds to a character or latent word and its position in the original lattice. With the power of Transformer and well-designed position encoding, FLAT can fully leverage the lattice information and has an excellent parallelization ability. Experiments on four datasets show FLAT outperforms other lexicon-based models in performance and efficiency.
Motivation & Objective
- To address the inefficiency and limited long-range modeling in existing lattice-based Chinese NER models that rely on RNNs or dynamic structures.
- To enable full parallelization of Transformer models on lattice-structured inputs by flattening the lattice into spans with positional encoding.
- To incorporate both character and word-level information effectively without error propagation from word segmentation.
- To outperform existing lexicon-based models in both accuracy and inference speed on Chinese NER benchmarks.
Proposed method
- Convert the character-word lattice into a flat structure composed of spans, where each span represents a character or a latent word with its start (head) and end (tail) positions.
- Introduce a novel position encoding scheme using head and tail positions to preserve lattice structure information in the Transformer self-attention mechanism.
- Use standard multi-head self-attention in the Transformer encoder to allow direct interaction between characters and all potential words, including self-matched words.
- Leverage pre-trained BERT embeddings as input features to enhance contextual representation and entity classification.
- Apply residual connections and layer normalization after each sublayer, following the standard Transformer architecture.
- Train the model with cross-entropy loss and CRF decoding for sequence labeling, using end-to-end optimization.
Experimental results
Research questions
- RQ1Can a flat-lattice representation enable efficient, fully parallelizable training of Transformers for Chinese NER?
- RQ2Does the proposed head-tail position encoding effectively preserve lattice structure information for better entity recognition?
- RQ3Can the model outperform lattice-LSTM and graph-based models in both accuracy and inference speed?
- RQ4How does the integration of pre-trained BERT embeddings affect performance in the FLAT framework?
Key findings
- FLAT achieves state-of-the-art performance on four Chinese NER datasets, outperforming both BERT+CRF and other lexicon-based models in F1 and accuracy metrics.
- On the Ontonotes dataset, FLAT improves Span F by 1.68 points and Type Acc by 1.68 points over the baseline BERT+CRF model.
- On the MSRA dataset, FLAT achieves a Span F of 96.09 and Type Acc of 95.86, significantly outperforming the BERT baseline of 94.95 and 95.53.
- FLAT demonstrates superior inference speed due to full GPU parallelization, unlike lattice-LSTM which suffers from dynamic structure and sequential processing.
- The ablation study confirms that the head-tail position encoding is critical, as removing it leads to performance degradation, especially in Span F.
- The model shows marginal improvement on small datasets like Resume and Weibo, indicating that the benefit of lattice integration is more pronounced on larger, richer datasets.
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.