Introduction
In languages like English, word boundaries are explicitly marked by spaces. Chinese, however, is written as a continuous stream of characters, making sequence labeling tasks—such as Named Entity Recognition (NER), Chinese Word Segmentation (CWS), and Part-of-Speech (POS) tagging—particularly challenging.
While pre-trained models like BERT have significantly advanced the field, they are typically trained at the character level for Chinese. To improve performance, researchers often incorporate "lexicon" information from pre-defined dictionaries. However, most existing models rely on shallow fusion, where BERT features and lexicon features are extracted separately and combined only at the final output layer. This prevents the deep layers of the model from interacting with word-level knowledge during the encoding process.
Methodology: From Model-level to BERT-level Fusion
To address the limitations of shallow fusion, the authors introduce LEBERT (Lexicon Enhanced BERT). The fundamental shift in this architecture is moving from "model-level fusion" to "BERT-level fusion," allowing lexicon information to be injected directly into the internal Transformer layers of BERT.
The LEBERT Architecture
The LEBERT model consists of three primary components designed to facilitate deep integration of word-level knowledge:
- Char-Words Pair Sequence: For every character in an input sentence, the model queries an external dictionary to identify all potential words it could belong to.
- Lexicon Adapter (LA): This is the core innovation. A Lexicon Adapter is inserted between Transformer layers (optimally between the 1st and 2nd layers). It utilizes a char-to-word bilinear attention mechanism to weight matched words, helping the model determine which dictionary entry is most relevant to the current context.
- Deep Integration: The weighted lexicon information is injected back into the character vectors. Unlike standard adapters that freeze the base model, LEBERT fine-tunes both BERT and the Lexicon Adapter to ensure neural and discrete information are perfectly aligned.
Experimental Setup and Datasets
The authors evaluated LEBERT across ten diverse Chinese datasets covering three major NLP tasks:
- NER: Weibo, OntoNotes 4.0, MSRA, and Resume.
- CWS: PKU, MSR, and CTB6.
- POS Tagging: CTB5, CTB6, and UD (Universal Dependencies).
These datasets represent a wide range of domains, from social media and news to professional resumes.
Key Insights and Results
LEBERT achieved State-of-the-Art (SOTA) performance on all ten datasets. Key findings include:
- The Lower-Layer Advantage: Injecting lexicon knowledge into the lower layers of BERT (specifically layer 1) proved significantly more effective than top-layer injection. This suggests that early access to word boundaries helps BERT build superior structural representations.
- Noise Reduction: The bilinear attention mechanism effectively filters "noisy" dictionary matches that do not fit the context, allowing the model to focus on relevant word-level information.
- Performance Gains: On the Weibo NER dataset, LEBERT reached an F1-score of 70.75, compared to 67.27 for vanilla BERT. In Word Segmentation (MSR dataset), it achieved a relative error reduction of 36.41%.
- Efficiency: LEBERT outperformed specialized models like ZEN and ERNIE, demonstrating that targeted adapters can be more effective than broad pre-training for incorporating specific types of knowledge.
Conclusion and Future Work
LEBERT demonstrates that deep, early-stage integration of lexicon knowledge significantly enhances Chinese sequence labeling. While the model is currently dependent on the quality of the external dictionary and adds some computational complexity, it provides a powerful framework for combining neural patterns with explicit linguistic knowledge. Future research may focus on optimizing the selection of injection layers and pruning lexicon matches to improve inference speed.
Summary updated