Hierarchical Contextualized Representation for Named Entity Recognition

Ying Luo, Fengshun Xiao, Hai Zhao

Introduction

Named Entity Recognition (NER) is a fundamental task in natural language processing, traditionally addressed using Bi-directional Long Short-Term Memory (BiLSTM) networks combined with Conditional Random Fields (CRF). Despite their success, standard BiLSTM-CRF models often suffer from "tunnel vision." Specifically, they struggle with sentence-level focus—failing to prioritize the most informative tokens—and document-level isolation—processing sentences independently and ignoring global consistency across the dataset. This paper proposes a hierarchical framework to address these limitations by capturing context at both the sentence and document levels.

Methodology

The proposed architecture augments the standard BiLSTM-CRF with two specialized modules designed to provide a more holistic view of the text.

The overall architecture of the proposed hierarchical model, featuring sentence-level and document-level encoders.

Sentence-level Representation: Label-Embedding Attention

To improve sentence-level focus, the authors introduce a label-embedding attention mechanism. Instead of treating entity labels (e.g., PER, LOC, ORG) as abstract categories, they are embedded into the same vector space as the words themselves. An attention mechanism then calculates the similarity between word embeddings and these label embeddings. This allows the model to assign higher weights to words that semantically resemble potential entity types, ensuring the sentence-level representation is driven by the most informative tokens.

Document-level Representation: Key-Value Memory Network

To overcome document-level isolation, the model utilizes a key-value memory network that serves as a dynamic knowledge base. The memory stores word embeddings as "keys" and their corresponding BiLSTM hidden states as "values." When processing a token, the model queries the memory for all previous occurrences of that token across the training set. This "global look-up" enables the model to leverage diverse historical contexts, ensuring global consistency and aiding in the disambiguation of complex entities. For instance, if a word like "Italy" appears in multiple contexts across the training set, the memory network allows the model to "remember" these instances during inference to better classify the current occurrence.

Experimental Results

The model was evaluated on three major NER benchmarks: CoNLL-2003 (English), OntoNotes 5.0 (English), and CoNLL-2002 (Spanish).

Performance comparison on the CoNLL-2003 dataset, showing the proposed model achieving state-of-the-art results.

As shown in the results, the proposed model established new state-of-the-art (SOTA) performance across all datasets. On CoNLL-2003, it achieved an F1 score of 91.96, which increased to 93.37 when integrated with BERT. On the larger OntoNotes 5.0 dataset, the model reached an F1 of 87.98 (90.30 with BERT). Notably, the model also performed exceptionally well on the Spanish CoNLL-2002 dataset without requiring external knowledge, surpassing the previous best by 0.4 points.

Efficiency and Analysis

Despite the added complexity of the memory network, the model remains computationally efficient. Empirical tests showed only a 19% increase in training and inference time compared to the baseline BiLSTM-CRF. Ablation studies further confirmed that the sentence-level and document-level modules provide synergistic benefits. The authors noted that while both modules independently improve performance, their combination yields the best results, suggesting they capture complementary types of contextual information. Furthermore, the model's performance was found to be sensitive to the size of the queried subset in the memory network; if the subset is too large, irrelevant contexts or "stop words" might introduce noise, leading to a slight performance degradation.

Conclusion

By integrating label-embedding attention and a key-value memory network, this hierarchical framework effectively addresses the inherent limitations of sequential NER models. The ability to leverage both fine-grained sentence importance and broad document-level consistency leads to significant performance gains across multiple languages and datasets, setting a new standard for the task.

Summary updated

BibTeX
@inproceedings{luo2020hierarchical,
  author = {Ying Luo and Fengshun Xiao and Hai Zhao},
  title = {{Hierarchical Contextualized Representation for Named Entity Recognition}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i05.6363},
}
Figure