Pyramid: A Layered Model for Nested Named Entity Recognition

Jue Wang, Lidan Shou, Ke Chen, Gang Chen

Abstract

Nested Named Entity Recognition (NER) presents a significant challenge for traditional sequence labeling models due to overlapping entity spans. We present the Pyramid model, a novel layered architecture designed specifically for nested NER. By assigning entity predictions to layers based on token length, the model effectively addresses common pitfalls such as layer disorientation and error propagation. The architecture utilizes a bottom-up "pyramid" to reduce sequence length and a top-down "inverse pyramid" for bidirectional communication between layers. Experimental results demonstrate that Pyramid achieves state-of-the-art performance across multiple standard benchmarks, including ACE-2004, ACE-2005, and GENIA.

Introduction

Standard NER typically assumes that entities are non-overlapping, flat sequences. However, natural language frequently contains nested structures where one entity is contained within another. For instance, in the phrase "U.N. Ambassador Jeane Kirkpatrick," "U.N." identifies an organization, "U.N. Ambassador" denotes a role, and the entire span refers to a person.

Illustration of nested entities and the layered pyramid approach where higher layers represent longer spans.

Existing layered models often struggle with two primary issues: layer disorientation, where the model fails to determine the correct layer for a specific entity, and error propagation, where mistakes in lower layers negatively impact higher-level predictions. The Pyramid model addresses these by introducing a length-aware inductive bias.

Methodology

The Pyramid architecture is built upon two complementary structures that facilitate structured information flow across different span lengths.

The Pyramid (Bottom-Up)

The model consists of $L$ decoding layers. Between each layer, a Convolutional Neural Network (CNN) with a kernel size of 2 and a stride of 1 is applied. This operation reduces the sequence length by exactly one at each step. Consequently, at layer $l$, each hidden state corresponds to an $l$-gram (a span of $l$ tokens). By design, layer $l$ is responsible only for predicting entities of length $l$, effectively eliminating layer disorientation.

The Inverse Pyramid (Top-Down)

To mitigate information loss and allow global context to refine local predictions, the authors introduce an inverse pyramid. This component enables top-down communication, allowing higher-level features (representing longer entities) to inform the predictions of lower-level layers. This bidirectional interaction is crucial for resolving ambiguities in shorter spans using the context of the larger phrases they inhabit.

The complete Pyramid network architecture, showing the encoder, the bottom-up pyramid, and the top-down inverse pyramid.

The Remedy Solution

For entities exceeding the fixed depth $L$, a "remedy" strategy is employed. The topmost layer is designated to handle exceptionally long entities using standard IOB2 tagging, ensuring the model maintains full coverage of the input text.

Datasets and Evaluation

The model's effectiveness was validated on four major nested NER benchmarks:

  • ACE-2004 & ACE-2005: Standard datasets for entity detection.
  • GENIA: A specialized dataset for biological entities.
  • NNE: A large-scale dataset for fine-grained nested NER.

Additionally, a custom Overlapping NER dataset was used to test the model's performance on non-nested overlapping entities.

Results and Discussion

The Pyramid model achieved state-of-the-art (SOTA) F1 scores across all benchmarks. When combined with contextualized embeddings like ALBERT and BERT, it reached scores of 87.74 on ACE-2004 and 86.34 on ACE-2005. On the GENIA dataset, it achieved 79.31 using BERT and Flair embeddings.

A key finding was the model's superior recall compared to previous layered or hypergraph-based approaches. This suggests that the pyramid structure is particularly adept at identifying nested entities that are often overlooked by flatter architectures. Furthermore, while $L=16$ provides maximum coverage, the model remains highly competitive at lower depths (e.g., $L=4$ or $L=8$), offering a path for inference speed optimization.

Conclusion

The Pyramid model introduces a robust, length-aware framework for nested NER. By leveraging the natural relationship between layer depth and span length, it provides a strong inductive bias that simplifies the recognition of complex, overlapping entities. Future work may explore applying this pyramid structure to other span-based NLP tasks, such as coreference resolution or sentiment analysis.

Summary updated

BibTeX
@inproceedings{wang2020pyramid,
  author = {Jue Wang and Lidan Shou and Ke Chen and Gang Chen},
  title = {{Pyramid: A Layered Model for Nested Named Entity Recognition}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.525},
}
Figure