Abstract
Recently, many works have tried to augment the performance of Chinese named entity recognition (NER) using word lexicons. As a representative, Lattice-LSTM (Zhang and Yang, 2018) has achieved new benchmark results on several public Chinese NER datasets. However, Lattice-LSTM has a complex model architecture. This limits its application in many industrial areas where real-time NER responses are needed. In this work, we propose a simple but effective method for incorporating the word lexicon into the character representations. This method avoids designing a complicated sequence modeling architecture, and for any neural NER model, it requires only subtle adjustment of the character representation layer to introduce the lexicon information. Experimental studies on four benchmark Chinese NER datasets show that our method achieves an inference speed up to 6.15 times faster than those of state-of-the-art methods, along with a better performance. The experimental results also show that the proposed method can be easily incorporated with pre-trained models like BERT.
Introduction
Unlike English, Chinese text lacks explicit word boundaries, such as spaces. This presents a fundamental challenge for Named Entity Recognition (NER): whether to operate on characters or words. Character-based models are robust against segmentation errors but often miss out on rich word-level semantic information. Conversely, word-based models depend on Chinese Word Segmentation (CWS); if the segmenter fails, the error propagates, degrading NER performance.
To bridge this gap, previous state-of-the-art approaches like Lattice-LSTM allowed character-level models to "look ahead" at potential words in a lexicon. However, these models are computationally expensive, difficult to parallelize (often requiring a batch size of 1), and hard to adapt to modern architectures like Transformers or CNNs. This paper introduces SoftLexicon, a method that provides the benefits of a lexicon without the architectural complexity.
Methodology
The core innovation of this work is the SoftLexicon feature. Rather than altering the internal structure of the sequence model (e.g., the LSTM cell), the authors modify the input representation layer. This makes the method architecture-agnostic.
The process involves three primary steps:
- Categorizing Matched Words: For every character in a sentence, the model identifies all matching words in a lexicon. These words are categorized into four sets based on the character's position within the word: Begin, Middle, End, or Single.
- Frequency-Weighted Pooling: To condense these word sets into fixed-size vectors, the model uses frequency-weighted pooling. Words that appear more frequently in general corpora are given higher weights. These weights are pre-calculated offline, ensuring no additional overhead during inference.
- Combining Representations: These four "BMES" vectors are concatenated and appended to the original character embedding, creating a lexicon-enhanced representation that can be fed into any standard encoder (Bi-LSTM, CNN, or Transformer).
Experimental Setup
The method was evaluated on four widely recognized Chinese NER benchmarks: OntoNotes, MSRA, Weibo, and Resume. To ensure a fair comparison, the researchers used the same lexicon as Lattice-LSTM, containing approximately 700,000 entries.
Key Results and Insights
Superior Inference Speed
A major advantage of SoftLexicon is its efficiency. Because it avoids the complex graph-like structure of Lattice-LSTM, it is highly compatible with batch processing. Experimental results demonstrate that SoftLexicon achieves an inference speed up to 6.15 times faster than previous state-of-the-art lexicon-based methods.
State-of-the-Art Accuracy
Despite its simplicity, SoftLexicon outperformed Lattice-LSTM across all four datasets. For instance, on the OntoNotes dataset, it improved the F1 score from 73.88 to 75.64. Furthermore, when combined with pre-trained BERT embeddings, the model reached a new peak performance of 95.42 F1 on the MSRA dataset, proving that lexicon information and contextual embeddings are complementary.
The Importance of "Middle" Information
A key insight from the ablation studies was the importance of the "Middle" (M) category. While previous models often focused only on word boundaries, SoftLexicon shows that knowing a character is inside a word is just as critical for accurate entity recognition.
Conclusion
SoftLexicon simplifies the integration of lexicon information into Chinese NER. By treating lexicon data as an embedding feature rather than an architectural constraint, it achieves significant gains in both speed and accuracy. While the method remains dependent on the quality of the underlying lexicon, its compatibility with modern architectures like BERT and its high inference speed make it a highly practical solution for industrial applications.
Summary updated