Abstract
Modern neural networks, particularly in class-imbalanced tasks like Named Entity Recognition (NER), often exhibit overconfidence that standard calibration metrics fail to capture. This paper introduces Region-balanced ECE (RBECE) to expose hidden calibration errors in mid-certainty regions and proposes Region-dependent Temperature Scaling (RD-TS). RD-TS is a zero-cost modification that adjusts model confidence based on the initial certainty level, significantly improving reliability across diverse imbalanced scenarios.
Introduction: The Invisible Calibration Error
When a model predicts a label with 80% confidence, it should ideally be correct 80% of the time—a property known as certainty calibration. However, standard metrics like Expected Calibration Error (ECE) can be misleading in imbalanced datasets. In tasks like NER, the "non-entity" class often dominates, leading to a massive number of samples in the 99%+ confidence bin. This high "bin support" masks significant errors in the 70-80% confidence range, which are critical for human-in-the-loop systems.
Methodology
The authors propose two primary innovations to address these issues:
1. Region-balanced ECE (RBECE)
Standard ECE weights bins by sample count, allowing dominant classes to hide poor performance elsewhere. RBECE weights all certainty regions (bins) equally, ensuring that calibration errors in the mid-range are properly scrutinized.
2. Region-dependent Temperature Scaling (RD-TS)
Traditional Temperature Scaling (TS) applies a single constant $T$ to all outputs. The authors argue for a more nuanced approach: highly confident predictions require more "cooling" (higher $T$) than less confident ones. They propose a linear relationship: $T(h) = mh + 1$, where $h$ represents the uncalibrated confidence. Notably, the slope $m$ can be derived from a standard temperature $T_0$, allowing for easy integration into existing pipelines without retraining.
Experimental Setup
The effectiveness of RD-TS was evaluated on Named Entity Recognition (NER) across several challenging scenarios:
- Classic: OntoNotes 5.0 (plentiful, robust data).
- Rare & Emerging: W-NUT 17 (noisy social media text).
- Fine-grained: Few-nerd (66 distinct entity types).
- Specialized: BC2GM (scientific/biomedical text).
- Sparse/Differing Sources: Subsets of OntoNotes simulating low-data and domain-shift environments.
Results
RD-TS demonstrated superior performance across all tested scenarios. It consistently produced the lowest RBECE, often by a substantial margin compared to standard TS and more complex scaling methods.
Even when measured by traditional ECE, RD-TS outperformed standard TS in the majority of cases, proving its robustness as a general-purpose calibration tool.
Discussion and Key Insights
- Scrutinizing the Mid-Range: By using RBECE, the researchers revealed that calibration errors are typically much larger than previously reported when low and mid-certainty estimates are examined.
- Simplicity and Stability: Unlike more complex methods (e.g., Matrix scaling), RD-TS is a constrained generalization that improves calibration without altering the model's underlying predictions or risking overfitting.
- Intuitive Correction: The logic that "the more certain a model is, the more it should be double-checked" is mathematically formalized by setting the intercept at $T(0)=1$, ensuring no modulation for zero-confidence predictions.
Limitations and Future Work
While effective, RD-TS currently focuses on single-label settings. Future research should extend this to multi-label problems. Additionally, while RD-TS addresses confidence regions, it does not explicitly account for variance between different classes. Combining RD-TS with class-weighted scaling could further refine performance. Finally, more extensive testing is needed to evaluate out-of-domain reliability in entirely unseen environments.
Summary updated