Abstract
Named Entity Recognition (NER) has traditionally been approached as a sequential labeling or sequence-to-sequence (seq2seq) task. However, these methods often struggle with complex entity structures and introduce artificial ordering biases. We present SetGNER, a framework that reimagines NER as a parallel entity set generation problem. By identifying entity "heads" and generating full mentions concurrently, SetGNER eliminates sequential bottlenecks, improves performance on discontinuous entities, and operates three times faster than standard generative models.
Introduction
Named Entity Recognition (NER) is a fundamental task in natural language processing, involving the identification and categorization of entities such as people, locations, or medical conditions. While "flat" NER is well-established, real-world applications frequently encounter more complex structures: nested entities (where one entity is contained within another) and discontinuous entities (where an entity mention is split by intervening words).
Current state-of-the-art models often utilize seq2seq frameworks, treating the set of entities as a single concatenated string. This approach suffers from three primary limitations:
- Entity-Order Confounder: Entities are inherently unordered, yet seq2seq forces a specific sequence, introducing training bias.
- Error Propagation: Early mistakes in the sequence can degrade the context for all subsequent entity predictions.
- Decoding Inefficiency: Sequential generation is inherently slow for sentences with multiple entities.
Methodology
SetGNER addresses these issues by breaking the sequential bottleneck through a three-stage parallel pipeline.
Architecture Overview
The model architecture consists of a word-level encoder, a mention detector, and a parallel decoder.
- Word-level Encoding: A pre-trained BART encoder generates contextual representations for each word in the input sentence.
- Mention Detection: Instead of generating the entire entity set from scratch, the model first identifies "entity heads"—the starting words of potential entities. It predicts the number of entities originating from each specific word.
- Parallel Generation: For every detected head, the model initiates an independent decoding process. A copying mechanism is employed to reconstruct the full entity sequence, which naturally accommodates gaps in discontinuous mentions.
Key Innovations
To optimize this parallel approach, the authors introduced two specific techniques:
- Adaptive Position Embeddings: These embeddings guide the decoder to focus on the relevant regions of the sentence for the specific entity being generated.
- Inverse Generation Training (IGT): To counteract the standard left-to-right bias, an auxiliary task requires the model to generate entities from tail-to-head. This forces the encoder to capture more robust bidirectional semantic structures.
Experiments and Results
The model was evaluated across five benchmark datasets: CADEC and ShARe13 for discontinuous NER; ACE04 and ACE05 for nested NER; and CoNLL03 for flat NER.
Performance and Efficiency
SetGNER demonstrated superior accuracy, outperforming previous state-of-the-art generative models by +0.75 F1 on CADEC and +0.33 F1 on ShARe13. The inclusion of the IGT task was shown to provide a consistent performance boost.
Beyond accuracy, the parallel nature of the model provides a 3x speedup during inference compared to leading seq2seq models. Furthermore, SetGNER showed significant improvements in recall for overlapped entities, suggesting that its set-based logic is better suited for complex linguistic structures than sequential alternatives.
Discussion and Limitations
While SetGNER offers significant advantages in speed and handling complex entities, it has certain limitations:
- Pre-tokenization Requirements: The model operates at the word level, making it less directly applicable to languages without clear word boundaries (e.g., Chinese) without additional preprocessing.
- Inter-Entity Interaction: Because entities are generated in parallel, the model lacks an explicit mechanism for entities to interact during the generation process.
- Resource Intensity: The parallel decoding branches increase the memory footprint during training by approximately 2x compared to sequential models.
Conclusion
SetGNER shifts the paradigm of NER from sequence generation to set generation. By leveraging parallel decoding and head-based mention detection, it achieves a superior balance of accuracy and efficiency, particularly for the challenging cases of nested and discontinuous entities.
Summary updated