Gaussian Prior Reinforcement Learning for Nested Named Entity Recognition

Yawen Yang, Xuming Hu, Fukun Ma, Shu'ang Li, Aiwei Liu, Lijie Wen, Philip S. Yu

Introduction

Named Entity Recognition (NER) is a fundamental task in Natural Language Processing, typically focused on identifying "flat" entities like locations or names. However, real-world data frequently contains nested entities, where one entity is contained within another. For instance, in the phrase "South African scientists," the entity "South African" (Geopolitical Entity) is nested within the larger entity "South African scientists" (Person).

Traditional sequence labeling methods, such as BIO tagging, are insufficient for this task because they assume each token can only belong to a single label. Existing approaches to nested NER—including span-based models, hypergraph models, and sequence-to-sequence models—often suffer from high computational complexity ($O(n^2)$), exposure bias, or the inability to capture the structural dependencies between overlapping entities. This paper introduces Gaussian Prior Reinforcement Learning (GPRL), a framework that treats nested NER as a triplet generation task, leveraging spatial priors and reinforcement learning to optimize entity extraction.

Methodology

The GPRL framework consists of three primary components designed to address the limitations of previous sequence-based and span-based models.

1. Entity Triplet Generator (ETG)

The core of the model is a BART-based sequence-to-sequence architecture. Unlike standard text generation, the ETG generates a sequence of triplets: (start_index, end_index, entity_type). To ensure the model remains grounded in the source text, it employs a pointer mechanism that selects indices directly from the input sentence rather than generating them from a fixed vocabulary.

2. Gaussian Prior Adjustment (GPA)

A key observation of this research is that the spatial distance between the boundaries of nested entities is not random. For example, the start of an inner entity often aligns with the start of its parent entity. By analyzing existing corpora, the authors found that these boundary distances follow a Gaussian distribution. The GPA component uses this statistical distribution as a "prior" to adjust the probability distribution of the pointer network. This nudge encourages the model to predict boundaries that align with the known spatial characteristics of nested structures.

3. Entity Order Reinforcement Learning (EORL)

In traditional seq2seq models, entities are predicted in a fixed left-to-right order, which can lead to exposure bias where an early error cascades through the sequence. GPRL treats the recognition order as a latent variable. Using the REINFORCE algorithm, the model is rewarded for identifying correct and unique triplets. This allows the model to discover an optimal extraction order—for example, learning that identifying a specific inner entity first makes the boundaries of the outer entity more predictable.

Experimental Setup and Results

Datasets

The model was evaluated on three benchmark datasets for nested NER:

  • ACE 2004 & ACE 2005: General-purpose datasets with diverse entity types and significant nesting.
  • GENIA: A specialized biomedical dataset characterized by highly technical, deeply layered entity structures.

Performance

GPRL achieved new state-of-the-art (SOTA) results across all benchmarks, demonstrating the effectiveness of combining spatial priors with reinforcement learning:

Dataset F1 Score Improvement over previous SOTA
ACE 2004 88.49% +0.59%
ACE 2005 87.52% +0.47%
GENIA 81.45% +0.06%

Ablation Study

Ablation experiments highlighted the necessity of both the GPA and EORL components. Removing the Gaussian Prior Adjustment resulted in a nearly 1% drop in F1 score on the GENIA dataset, suggesting that spatial heuristics are particularly valuable in dense, technical domains where entity boundaries are complex.

Discussion and Insights

The Importance of Spatial Relationships

The success of the Gaussian Prior Adjustment suggests that boundary locations in nested NER are highly structured. By incorporating this statistical reality into the model's architecture, GPRL reduces the search space and helps the pointer network focus on more probable candidates, effectively acting as a regularizer for the generation process.

Order as a Latent Variable

By moving away from fixed-order teacher forcing, the model avoids the pitfalls of exposure bias. The reinforcement learning phase allows the model to explore different extraction sequences, eventually settling on orders that maximize the probability of identifying all entities correctly. This suggests that for complex structural tasks, the order of discovery is as important as the discovery itself.

Hybrid Training Strategy

To maintain training stability, the authors utilized a hybrid approach: pre-training the model with standard cross-entropy loss to reach a baseline level of performance (~90% of potential), followed by RL fine-tuning to optimize the extraction order and boundary precision.

Conclusion and Future Work

GPRL provides a robust framework for nested NER by treating entity extraction as an ordered triplet generation task informed by spatial priors. While the model achieves SOTA performance, future research could address the computational overhead associated with reinforcement learning and investigate whether the Gaussian distribution of boundaries holds true for less structured text, such as social media content. Furthermore, the authors suggest that the GPRL logic could be extended to other complex tasks like overlapping relation extraction or discontinuous NER.

Summary updated

BibTeX
@inproceedings{yang2023gaussian,
  author = {Yawen Yang and Xuming Hu and Fukun Ma and Shu'ang Li and Aiwei Liu and Lijie Wen and Philip S. Yu},
  title = {{Gaussian Prior Reinforcement Learning for Nested Named Entity Recognition}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10097163},
}
Figure