Simplify the Usage of Lexicon in Chinese NER

Ruotian Ma, Minlong Peng, Qi Zhang, Zhongyu Wei, Xuanjing Huang

Introduction

Named Entity Recognition (NER) is a fundamental task in Natural Language Processing, involving the identification of entities such as names, locations, and organizations. In Chinese, this task is uniquely challenging because the language lacks explicit word boundaries. Traditionally, researchers have used two main approaches: word-based models, which are prone to segmentation errors, and character-based models, which often miss rich word-level semantic information.

The previous state-of-the-art, Lattice-LSTM, attempted to integrate lexicon information by creating a complex graph structure. However, this approach is computationally expensive, difficult to parallelize, and hard to integrate with modern architectures like Transformers or BERT.

Methods: The SoftLexicon Approach

Researchers from Fudan University proposed SoftLexicon, a method that simplifies the integration of word-level information by shifting complexity from the modeling layer to the representation layer. Instead of modifying the neural network architecture, SoftLexicon augments the input embeddings.

The SoftLexicon architecture integrates lexicon features directly into the character representation layer.

The process consists of three key steps:

  1. Categorization (BMES): For each character, the model identifies all matching words in a lexicon and categorizes them into four sets based on the character's position: Begin, Middle, End, or Single-character.
  2. Weighted Pooling: These word sets are converted into vectors using a weighting strategy based on word frequency from a general corpus. This calculation is performed offline, ensuring high inference speed.
  3. Concatenation: The resulting four vectors are concatenated with the original character embedding, creating a "soft" lexicon feature that can be used with any backbone model, such as BiLSTM, CNN, or BERT.

Datasets and Evaluation

The model was evaluated on four benchmark datasets: OntoNotes, MSRA, Weibo (social media), and Resume. A large-scale lexicon containing over 700,000 words was used to ensure comprehensive coverage and fair comparison with existing methods.

Key Insights

  • Architecture Simplicity: By moving lexicon logic to the embedding layer, the model supports batching and parallel processing, leading to significant speed gains.
  • The Importance of "Middle" Characters: Unlike previous methods, SoftLexicon explicitly includes information about characters in the middle of words, which was found to significantly boost performance.
  • Universal Compatibility: As a "plug-and-play" module, SoftLexicon is easily integrated with pre-trained models like BERT, which previously struggled with complex lattice structures.

Key Results

SoftLexicon achieved state-of-the-art performance across all datasets while providing a massive boost in efficiency.

Inference speed comparison: SoftLexicon maintains high throughput even as sentence length increases, significantly outperforming Lattice-LSTM and LR_CNN.
  • Speedup: The LSTM-based SoftLexicon is 6.15 times faster than Lattice-LSTM.
  • Accuracy: It outperformed Lattice-LSTM by 1.76 percentage points on the OntoNotes dataset.
  • BERT Integration: Adding SoftLexicon to BERT-based models consistently improved F1 scores, demonstrating its value even for powerful pre-trained representations.

Limitations and Future Work

The effectiveness of SoftLexicon depends on the quality of the external lexicon. Future research could explore more dynamic weighting mechanisms beyond static word frequency and investigate domain-specific frequency data to further refine performance in specialized contexts.

Summary updated

BibTeX
@inproceedings{ma2020simplify,
  author = {Ruotian Ma and Minlong Peng and Qi Zhang and Zhongyu Wei and Xuanjing Huang},
  title = {{Simplify the Usage of Lexicon in Chinese NER}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.528},
}
Figure