NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Merge and Label: A Novel Neural Network Architecture for Nested NER

Joseph Fisher, Andreas VlachosACL 2019

Introduction

Standard Named Entity Recognition (NER) typically assumes a "flat" structure where entities do not overlap. However, real-world language often contains Nested NER scenarios. For instance, in the phrase "The Prime Minister of the United Kingdom," a standard model might identify "United Kingdom" as a location, but fail to recognize that the entire phrase "The Prime Minister of the United Kingdom" is a single person-type entity.

Traditional sequence labeling approaches, such as BIO tagging, struggle with nesting because a single token can belong to multiple entities at different levels. Previous solutions involving complex hypergraphs or exhaustive span-scoring are often computationally prohibitive. "Merge and Label" addresses these challenges with a fully differentiable architecture that recursively merges tokens into higher-level entities.

Hierarchical merging of tokens into nested entities across multiple levels.

Methods

The proposed architecture decomposes the NER problem into two stages: identifying boundaries through merging and then classifying the resulting spans. The model consists of several key components organized in a recursive pipeline.

The overall Merge and Label architecture showing the flow from Static to Output layers.

1. The Structure Layer

The core innovation is the Structure Layer. Instead of making hard binary choices about whether to merge adjacent words, the model predicts a real-valued "merge tensor" $M$ with values between 0 and 1. A value approaching 0 suggests that two adjacent tokens should be merged into a single entity at that level. This continuous approach allows the model to remain fully differentiable, enabling end-to-end training via backpropagation.

2. Directional Vectors and Update Layers

Rather than relying solely on standard positional encodings, the model learns "directional vectors" to represent relationships between entities. The Update Layer then uses the predicted structure to refine token embeddings. If the model identifies a group of words as a likely entity, it updates the individual word vectors to reflect this shared context, ensuring that word embeddings are aware of their specific entity membership.

3. Greedy Inference

Efficiency is a primary goal of this architecture. Unlike models that require expensive global decoding (such as Viterbi or hypergraph search), this model utilizes greedy inference. It performs a forward pass and applies thresholds to the merge values, resulting in significantly faster processing speeds without sacrificing accuracy.

Experimental Evaluation

The model was evaluated on two major benchmarks to test both its nesting capabilities and its generalizability:

  • ACE 2005: The standard corpus for nested NER, containing approximately 180k tokens and 7 distinct entity labels.
  • OntoNotes v5.0: A large-scale corpus (1.3M tokens) primarily used for flat NER. This was used to ensure that the nested-capable architecture maintains high performance on simpler, non-nested tasks.

Key Results

  • State-of-the-Art Accuracy: On the ACE 2005 dataset, the model achieved an F1 score of 74.6 (without language models) and 82.4 when integrated with BERT. This represents an improvement of nearly 8 F1 points over previous benchmarks.
  • Massive Speedup: The architecture is approximately 60 times faster than previous hypergraph-based competitors, processing 9,468 words per second on a single GPU.
  • Versatility: On flat NER tasks (OntoNotes), the model performed comparably to dominant BiLSTM-CRF models, proving that the ability to handle nesting does not come at the cost of performance on standard tasks.

Conclusion

"Merge and Label" demonstrates that global decoding is not a prerequisite for high-accuracy nested NER. By treating segmentation as a continuous, differentiable process, the authors achieved a model that is both more accurate and orders of magnitude faster than previous state-of-the-art methods. Future work may explore the utility of the resulting entity embeddings for downstream tasks such as Entity Linking and Coreference Resolution.

Summary updated

BibTeX
@inproceedings{fisher2019merge,
  author = {Joseph Fisher and Andreas Vlachos},
  title = {{Merge and Label: A Novel Neural Network Architecture for Nested NER}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1585},
}
Figure