Abstract
Generative Named Entity Recognition (NER) models often suffer from training bias due to the deterministic nature of Maximum Likelihood Estimation (MLE), which forces the model to favor a single "gold" sequence even when other valid orderings exist. This paper proposes RerankNER, a calibration method that aligns a model's internal confidence with its actual task performance (F1 score) using contrastive learning. By fine-tuning the generator with a ranking loss, RerankNER achieves state-of-the-art results across flat, nested, and discontinuous NER benchmarks, effectively bridging the "likelihood-performance gap."
Introduction
Named Entity Recognition (NER) has evolved to handle complex structures, including flat, nested (e.g., "University of Washington" containing both an Organization and a Location), and discontinuous entities. Sequence-to-sequence (Seq2Seq) models are popular for these tasks due to their flexibility in generating arbitrary entity structures. However, standard training via Maximum Likelihood Estimation (MLE) creates a deterministic bias: the model learns to over-rely on a specific sequence order rather than the underlying information.
The authors identify a significant "likelihood-performance gap," where the most likely sequence produced during beam search is often not the most accurate. Oracle analysis shows that the best candidate in the top-5 list typically has an F1 score 8.1 points higher than the top-ranked candidate.
Methodology: The RerankNER Approach
RerankNER is a two-stage approach designed to calibrate model likelihoods so that the most accurate sequences become the most probable. After initial training with standard MLE, the model (BART-large) undergoes a calibration stage using a novel contrastive loss.
The calibration objective consists of three parts:
- $\mathcal{L}_{MLE}$: Maintains the model's fundamental text generation capabilities.
- $\mathcal{L}_{Rank}$: A margin ranking loss that forces the model to assign higher likelihoods to candidate sequences with higher F1 scores.
- $\mathcal{L}_{Gold}$: Ensures that the ground-truth (gold) sequence remains the most probable, preventing generated candidates from accidentally overtaking it.
Unlike traditional rerankers that use a separate "judge" model, RerankNER fine-tunes the original generator, allowing it to learn to generate higher-quality candidates directly.
Experimental Setup
The researchers evaluated RerankNER on eight widely used benchmarks covering three distinct NER subtasks:
- Flat NER: CoNLL03, OntoNotes 5.0.
- Overlapped (Nested) NER: ACE 2004, ACE 2005, GENIA.
- Discontinuous NER: CADEC, ShARe13, ShARe14.
Key Results and Insights
RerankNER consistently outperformed the baseline (BARTNER) across all datasets. It achieved 93.48 F1 on CoNLL03 and 86.22 F1 on ACE 2005, narrowing the gap with specialized discriminative models.
A core insight is that calibration provides the most significant boost to "hard" cases where the model was initially uncertain. By aligning likelihood with F1 performance, the model's "judgment" improves, pushing better answers to the top of the results.
The "Hit@top-k" rate also improved across the board, demonstrating that the calibration effectively reorders the search space to favor high-quality outputs.
Conclusion
RerankNER demonstrates that the performance of generative NER models can be significantly enhanced by addressing the deterministic bias inherent in MLE training. While the calibration stage introduces some computational overhead due to beam search during training, the gains in accuracy and the ability to bridge the "oracle gap" make it a compelling approach. Future work will explore scaling these calibration techniques to massive Large Language Models (LLMs).
Summary updated