Confidence Estimation for Attention-Based Sequence-to-Sequence Models for Speech Recognition

Qiujia Li, David Qiu, Yu Zhang, Bo Li, Yanzhang He, Philip C. Woodland, Liangliang Cao, Trevor Strohman

TL;DR

While end-to-end (E2E) speech recognition models are highly accurate, they are notoriously "overconfident," often assigning high probability to incorrect transcriptions. This paper introduces a lightweight Confidence Estimation Module (CEM) that sits on top of existing models to produce reliable confidence scores. By using internal decoder states rather than just raw output probabilities, CEM significantly improves data filtering for downstream tasks like semi-supervised learning.

What Problem Does This Paper Address?

In traditional speech recognition (ASR) systems, we could estimate how "sure" a model was by looking at "lattices"—complex graphs of alternative word sequences. Modern E2E models, specifically attention-based sequence-to-sequence models, don't produce these lattices easily.

Researchers usually fall back on the softmax probability (the raw output of the neural network) as a proxy for confidence. However, these models are often poorly calibrated; they tend to be overconfident even when they are wrong. This is exacerbated by modern training tricks like "label smoothing," which intentionally distorts output probabilities. Without reliable confidence scores, it is difficult to use ASR outputs for critical downstream tasks like active learning or automatically labeling new data (semi-supervised learning).

Methods

The authors propose the Confidence Estimation Module (CEM), a lightweight neural network added to a pre-trained, fixed ASR model.

  1. Architecture: The CEM takes three inputs from the ASR decoder at each time step:
  2. The attention context vector ($a_t$).
  3. The decoder state ($d_t$).
  4. The embedding of the current token ($EMB(y_t)$).
  5. Processing: These inputs are fed into a small fully connected (FC) layer followed by a Sigmoid activation to produce a score between 0 and 1.
  6. Training: The CEM is trained using the $n$-best hypotheses generated by the ASR model. These hypotheses are aligned with the ground truth using edit distance. If a predicted token matches the truth, its target is 1; if it's a substitution or insertion, the target is 0.
  7. Efficiency: The CEM is tiny—adding only about 0.4% more parameters to the base model—and is trained while the main ASR model remains frozen.

Datasets

  • LibriSpeech: The primary training and evaluation were done on the 100-hour "train-clean" subset. Testing was performed on the standard "test-clean" and "test-other" sets.
  • Wall Street Journal (WSJ): Used specifically to test generalization. The authors wanted to see if a CEM trained on LibriSpeech would still provide accurate confidence scores on a different dataset (mismatched domain).

Key Insights and Ideas

  • The "Overconfidence Spike": The paper highlights a specific failure mode in E2E models where increasing the confidence threshold for filtering data actually increases the error rate at the very high end. This "spike" (see Fig. 1 in the paper) proves that the model's highest-confidence guesses are often wrong.
  • Regularization is a Double-Edged Sword: Techniques like label smoothing and SpecAugment improve Word Error Rate (WER) but wreak havoc on confidence calibration. Label smoothing, in particular, makes raw softmax probabilities almost useless as confidence metrics.
  • Internal State Matters: By looking at the internal hidden states of the decoder ($a_t$ and $d_t$) rather than just the final output, the CEM can "see" the uncertainty that the final softmax layer hides.

Key Results

  • Better Calibration: CEM significantly outperformed raw softmax probabilities. In terms of Normalized Cross Entropy (NCE)—a measure of how well the scores represent actual probabilities—softmax scores were often negative (worse than a random guess based on average error rates), while CEM scores were consistently positive.
  • Improved Precision-Recall: The Area Under the Curve (AUC) for token-level confidence improved from ~0.976 to 0.990 on clean speech.
  • Robustness to LM Fusion: When a Language Model (LM) is added to the ASR system (shallow fusion), raw softmax scores become even less reliable. CEM, however, can incorporate LM probabilities as an extra input, maintaining high-quality confidence estimates.
  • Domain Generalization: Even when tested on the mismatched WSJ dataset, the CEM trained on LibriSpeech remained effective, proving it learns general features of "uncertainty" rather than just memorizing the training set.

Limitations and Future Work

  • Deletion Errors: The current CEM only estimates confidence for tokens that the model actually produces. It cannot predict "deletion errors" (words the model missed entirely), as there is no token to attach a score to.
  • Architecture Scope: While tested on attention-based models, the authors note that the CEM approach could be adapted for other architectures like RNN-Transducers (RNN-T), though that was not the focus of this specific study.
  • Downstream Impact: While the paper shows better filtering curves, the next step is to demonstrate exactly how much this improves the final WER in a full semi-supervised learning pipeline.

Summary updated

BibTeX
@inproceedings{li2021confidence,
  author = {Qiujia Li and David Qiu and Yu Zhang and Bo Li and Yanzhang He and Philip C. Woodland and Liangliang Cao and Trevor Strohman},
  title = {{Confidence Estimation for Attention-Based Sequence-to-Sequence Models for Speech Recognition}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  doi = {10.1109/icassp39728.2021.9414920},
}
Figure