Perception and Semantic Aware Regularization for Sequential Confidence Calibration

Zhenghua Peng, Yu Luo, Tianshui Chen, Keke Xu, Shuangping Huang

Introduction

Deep Sequence Recognition (DSR) models, essential for tasks such as Optical Character Recognition (OCR) and Automatic Speech Recognition (ASR), frequently exhibit a significant flaw: overconfidence. While these models achieve high accuracy, their predicted probabilities often fail to reflect their actual likelihood of being correct. For instance, a model might assign a 99% confidence score to a misidentified character. This lack of calibration limits the reliability of DSR systems in safety-critical applications and downstream tasks like active learning.

The Calibration Challenge in Sequence Recognition

The standard approach to mitigating overconfidence is Label Smoothing (LS), which redistributes probability mass from the target label to all other classes. However, LS is "blind" to the inherent structure of sequential data. It treats all incorrect predictions as equally likely, ignoring the fact that models are more prone to specific types of errors.

In DSR, errors typically stem from two primary sources:

  1. Perception Similarity: Visual or auditory resemblance between sequences (e.g., confusing '0' with 'O' or 'E' with 'f').
  2. Semantic Correlation: Linguistic plausibility within a given context (e.g., predicting a word that fits the sentence structure but doesn't match the visual input).
Figure 3: Examples of semantic-based (left, orange) and perception-based (right, blue) confusion in sequence recognition.

PSSR: A Multi-Faceted Regularization Approach

To address these limitations, the authors propose Perception and Semantic aware Sequence Regularization (PSSR). Unlike token-level smoothing, PSSR operates at the sequence level, focusing regularization on the most "confusable" candidates through three key components:

1. Perception Similarity Mining

PSSR identifies visually or auditorily similar sequences using a "context-free" model, such as a Connectionist Temporal Classification (CTC)-based CRNN. By stripping away language components, this model's errors highlight purely perceptual similarities. The top $N$ candidates from this model form a perception similarity set.

2. Semantic Correlation Mining

To capture linguistic overconfidence, PSSR utilizes a pre-trained Bi-directional Context Network (BCN). This component identifies sequences that are semantically plausible given the surrounding context, ensuring the model learns to distinguish between similar-sounding or similar-looking words that may or may not make sense in a sentence.

3. Adaptive Calibration Intensity

Recognizing that not all samples are equally difficult, PSSR introduces a hardness-aware modulating factor. For "hard" samples—such as blurry or noisy images—the model should naturally be less confident. PSSR applies stronger regularization to these samples, preventing the model from over-fitting to ambiguous data and forcing high-confidence predictions on low-quality inputs.

Figure 5: (a) Examples of easy vs. hard samples. (b) Expected Calibration Error (ECE) increases with sample hardness, a trend PSSR aims to mitigate through adaptive intensity.

Experimental Validation and Results

The PSSR framework was evaluated across English and Chinese Scene Text Recognition (STR) and Mandarin Speech Recognition (SR). The results demonstrate a substantial improvement in calibration:

  • State-of-the-Art Calibration: In English STR, PSSR reduced the Expected Calibration Error (ECE) of the TRBA model from 3.88% (standard training) to a mere 0.36%.
  • Robustness: PSSR maintained superior calibration even under severe data degradation (e.g., heavy Gaussian blur and noise), significantly outperforming standard Label Smoothing and Focal Loss.
  • Active Learning Gains: By providing reliable confidence scores, PSSR-calibrated models improved active learning efficiency. Using these scores to select training data led to a ~1% accuracy boost over random sampling or uncalibrated confidence-based sampling.

Conclusion

PSSR represents a significant step forward in building trustworthy sequence recognition models. By moving beyond "blind" label smoothing and incorporating perception and semantic awareness, PSSR produces models that are not only accurate but also "know what they don't know." This improved calibration has direct benefits for model robustness and the efficiency of human-in-the-loop training pipelines.

Summary updated

BibTeX
@inproceedings{peng2023perception,
  author = {Zhenghua Peng and Yu Luo and Tianshui Chen and Keke Xu and Shuangping Huang},
  title = {{Perception and Semantic Aware Regularization for Sequential Confidence Calibration}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure