Abstract
Deep learning models for intent detection are frequently "overconfident," often predicting incorrect answers with near-certainty. This paper introduces HS-RAU, a novel framework designed to align a model's confidence with its actual accuracy. By projecting labels onto a dense hyperspherical space and employing a rebalanced accuracy-uncertainty loss function, HS-RAU significantly reduces calibration error while simultaneously improving classification performance.
Introduction: The Overconfidence Problem
In critical NLP applications such as virtual assistants or financial search engines, model reliability is paramount. It is not enough for a model to be accurate; it must also be calibrated. A well-calibrated model produces confidence scores that reflect its true likelihood of being correct—for instance, an 80% confidence score should ideally correspond to an 80% success rate.
However, modern state-of-the-art models, particularly those based on the BERT architecture, suffer from extreme overconfidence. These models tend to overfit to sparse "one-hot" label matrices, leading to a significant disparity between predicted probabilities and actual performance. This disparity is measured by the Expected Calibration Error (ECE).
As shown in the reliability diagrams above, even when confidence levels are near 1.0, the misclassification rate can remain high, creating a visible "Gap" between the diagonal (perfect calibration) and the model's actual outputs.
The HS-RAU Framework
To address these issues, the authors propose the HS-RAU framework, which consists of two primary components: Hyperspherical Space Calibration and Rebalanced Accuracy-Uncertainty Loss.
1. Hyperspherical Space Calibration (HS)
Standard classification models typically use Euclidean space with one-hot vectors, where labels are sparse and "spiky." HS-RAU instead projects labels uniformly onto a hypersphere, creating a dense label representation. By spreading labels across the entire output space, the model is less prone to the logic-collapsing overfitting that drives overconfidence. This hyperspherical projection acts as a natural regularizer.
2. Rebalanced Accuracy-Uncertainty Loss (RAU)
Traditional loss functions, like Cross-Entropy, treat all training samples uniformly. The RAU loss introduces a more nuanced approach by partitioning samples into four categories based on their accuracy and uncertainty:
- Accurate-Certain (AC)
- Accurate-Uncertain (AU)
- Inaccurate-Certain (IC)
- Inaccurate-Uncertain (IU)
The RAU loss specifically targets the "problematic" groups—AU and IC. It incentivizes the model to increase certainty for correct predictions (AU) and decrease certainty (increase "honesty") for its mistakes (IC).
Experimental Evaluation
The framework was tested on three major intent detection benchmarks: TNEWS (Chinese news classification), HWU64 (home robot interaction), and BANKING77 (fine-grained online banking queries).
Key Results
HS-RAU demonstrated superior performance compared to standard calibration methods like Temperature Scaling or Label Smoothing:
- Significant ECE Reduction: On the TNEWS dataset, the ECE dropped from 69.66% to 39.99%, indicating a much more "honest" model.
- Improved Accuracy: Unlike many calibration techniques that sacrifice accuracy for better calibration, HS-RAU improved F1 scores across all datasets (e.g., a 1.21% absolute increase on TNEWS).
- Robustness and Long-Tail Performance: The model remained stable under high label noise (30-50%) and showed a 5.94% absolute increase in F1 for rare, "long-tail" labels, which are traditionally difficult to calibrate.
Conclusion and Future Work
HS-RAU effectively bridges the gap between accuracy and confidence in intent detection. By leveraging the geometric properties of hyperspherical space and a targeted rebalancing loss, it creates models that are both more accurate and more trustworthy. Future research may explore automated methods for determining the uncertainty thresholds used in the RAU loss and investigate how these hyperspherical calibration techniques scale to generative models.
Summary updated