Abstract
Named Entity Recognition (NER) has recently seen significant improvements by adopting a Machine Reading Comprehension (MRC) formulation. However, existing MRC-based models suffer from high inference latency due to sequential processing of entity types and require substantial labeled data. This paper introduces QPMRC-NER, a framework that treats NER as a parallel machine reading task. By processing multiple entity queries simultaneously and employing parameter-efficient tuning (PET), QPMRC-NER achieves state-of-the-art performance in low-resource settings while providing up to a 2x speedup in inference compared to traditional sequential reading models.
Introduction
Named Entity Recognition (NER) involves identifying and categorizing spans of text into predefined categories such as names, dates, or locations. Modern approaches often frame this as a Machine Reading Comprehension (MRC) task, where the model is prompted with a question like "Which spans in this text refer to a Person?" to extract relevant entities.
Despite their effectiveness, current MRC-based NER models face two primary challenges:
- Efficiency Bottlenecks: Most models process only one entity type per inference pass. For datasets with numerous entity types, this leads to significant computational overhead.
- Data Dependency: These models typically require large-scale labeled datasets, making them difficult to adapt to low-resource domains where only a few examples are available.
To address these issues, the authors propose QPMRC-NER, which enables parallel query processing and leverages semantic information to improve generalization in data-scarce environments.
Methodology
The QPMRC-NER framework introduces several architectural innovations to enable efficient and robust entity extraction.
Query-Parallel Encoder
Unlike standard MRC models that pair a single query with the context, the Query-Parallel Encoder takes the context sentence and all relevant entity queries as a single concatenated input. This allows the model to process multiple entity types in a single forward pass, significantly reducing the number of required inference cycles.
Query-Segmented Attention
To prevent semantic interference between different queries within the same input sequence, a specialized attention mechanism is employed. This mechanism allows queries to attend to the context sentence but restricts them from attending to other queries. This unidirectional flow ensures that the representation of each query remains focused on its specific entity definition, which the authors found is key for robust generalization.
Query-Conditioned Biaffine Predictor
The model utilizes a biaffine predictor to identify the start and end positions of entities. By incorporating the semantic meaning of entity type names (e.g., "Organization" or "Location") directly into the queries, the model can leverage pre-trained linguistic knowledge to identify new entity types with minimal supervision.
Parameter-Efficient Tuning (PET)
To mitigate the risk of catastrophic forgetting when training on small datasets, QPMRC-NER utilizes the UNIPELT framework. This approach combines Adapters, Prefix-tuning, and LoRA, updating only a small fraction of the parameters while keeping the backbone BERT model frozen. This ensures the model retains its general language knowledge while adapting to specific domain tasks.
Evaluation and Results
The framework was evaluated across standard resource-rich benchmarks (CoNLL03, MSRA, GENIA) and various low-resource and cross-domain settings (MIT Restaurant, MIT Movie, ATIS, and CrossNER).
Performance in Low-Resource Settings
In 10-shot scenarios (only 10 examples per type), QPMRC-NER demonstrated substantial improvements over existing baselines. For example, on the MIT Movie dataset, the model achieved an F1 score of 61.8, significantly outperforming the previous best MRC-based model, which scored 18.7. This highlights the effectiveness of using semantic queries and PET for few-shot learning.
Inference Efficiency
The parallel architecture provides a significant speedup. On the ATIS dataset, which includes 79 entity types, QPMRC-NER achieved a 2.16x speedup compared to the sequential BERT-MRC approach. This makes the model suitable for real-time applications where low latency is critical.
Cross-Domain Generalization
The model also set a new state-of-the-art on the CrossNER dataset, achieving an average F1 of 73.61 across five diverse domains. The ability to leverage the semantic meaning of entity types allows the model to transfer knowledge effectively from resource-rich source domains to target domains with different entity distributions.
Conclusion
QPMRC-NER successfully addresses the efficiency and data-scarcity challenges of MRC-based NER. By parallelizing queries and utilizing parameter-efficient tuning, it provides a fast and highly adaptable solution for modern information extraction tasks. Future work may focus on addressing input length constraints for datasets with hundreds of entity types and improving the handling of semantically ambiguous category names.
Summary updated