Introduction
Most Named Entity Recognition (NER) systems are designed for "flat" tasks, where each token is assigned a single label. However, natural language often contains nested structures where one entity resides inside another. For instance, in the phrase "the western Canadian province of British Columbia," a human identifies "British Columbia" as a location nested within a larger geopolitical entity (GPE).
Traditional NER systems typically treat this as a flat task, leading to information loss: extracting only the outermost entity misses fine-grained details, while extracting only the innermost misses broader context. Previous attempts to solve this relied on complex, hand-crafted features or difficult-to-scale hyper-graphs. This paper introduces a Neural Layered Model that identifies these nested structures by dynamically stacking flat NER layers, recognizing entities from the inside out.
The Neural Layered Architecture
The authors propose a Layered BiLSTM-CRF architecture. Unlike standard models that process a sequence once, this model iterates through multiple layers to build a hierarchical understanding of the text.
Step-by-Step Breakdown
- The Base Layer: The model starts with a standard flat NER layer (a Bidirectional LSTM to capture context, followed by a CRF layer to predict labels). It identifies the "innermost" entities from the raw text.
- Inside-to-Outside Stacking: Once entities are detected in the first layer, the model merges their LSTM hidden representations to create a single "token" representation for that entity in the subsequent level.
- Dynamic Iteration: This new representation is fed into a second flat NER layer. This layer now sees the original words augmented by the "knowledge" of the entities found in the previous step.
- Termination: The model continues stacking layers dynamically until a layer predicts no new entities. This allows the model to handle varying depths of nesting—from simple phrases to structures five levels deep—without a fixed architecture.
The "secret sauce" of this approach is that the model doesn't just pass the predicted label to the next layer; it passes the contextual hidden states from the LSTM. This ensures that the semantic "flavor" of the inner entity informs the detection of the outer one.
Experimental Setup and Datasets
The model was evaluated on three primary datasets:
- GENIA: A biomedical dataset containing 36 fine-grained entity categories with significant nesting (e.g., proteins inside DNA sequences).
- ACE2005: A general-purpose dataset (news, weblogs) known for deep nesting—up to five levels deep in some cases.
- JNLPBA: Used as a control to demonstrate that the model remains competitive on traditional "flat" NER tasks.
Key Results and Insights
The Neural Layered Model set new state-of-the-art benchmarks for nested NER at the time of publication. On the GENIA dataset, the model achieved an F1-score of 74.7%, a 3.9 percentage point improvement over previous feature-based models. On ACE2005, it achieved an F1-score of 72.2%, representing a massive 9.1 percentage point jump over the previous best.
Crucially, on the JNLPBA dataset, the model achieved a 75.55% F1-score, proving that the layered architecture does not compromise performance on simpler, non-nested tasks.
Why Inside-Out is Effective
By starting with the smallest units and building upward, the model mimics the hierarchical nature of language. It is often easier to identify a core component (like a city name) first and then use that boundary to determine the extent of a larger organization. Ablation studies revealed that passing the LSTM's hidden states is far more effective than just passing word embeddings; skipping these intermediate layers causes performance to drop significantly.
Limitations and Future Work
Despite its success, the model faces specific challenges:
- Error Propagation: Because the model works from the inside out, if the first layer fails to detect an inner entity, subsequent layers are unlikely to find the outer entity containing it.
- Sparse Data at Depth: While the model can stack up to five layers, training data for 4th or 5th-level nesting is rare, making it difficult for the model to achieve high accuracy at extreme depths.
- Discontinuous Entities: The current model assumes entities are continuous spans. It cannot yet handle "discontinuous" entities (e.g., "lung and colon cancer," where "lung cancer" is one entity split by other words), which remains a primary direction for future research.
Summary updated