Source-linked AI summary

Uncertainty Estimation in Autoregressive Structured Prediction

Andrey Malinin, Mark Gales

arXiv:2002.07650v5stat.MLcs.AIcs.LG

TL;DR

The paper addresses the limited treatment of uncertainty estimation for structured prediction, especially within general unsupervised and probabilistically interpretable frameworks. It develops an ensemble-based framework for autoregressive tasks with token- and sequence-level measures, Monte-Carlo approximations, and ensemble-combination choices. It introduces reverse mutual information and provides uncertainty-based detection baselines across translation and speech recognition, while noting important evaluation and scope limitations.

  • Problem

    General unsupervised, probabilistically interpretable uncertainty estimation for structured prediction has received limited attention compared with unstructured tasks.

  • Method

    The paper develops a Bayesian ensemble framework for autoregressive structured prediction, covering token- and sequence-level measures, Monte-Carlo approximations, and ensemble combination.

  • Results

    The work introduces reverse mutual information and provides baselines for token- and sequence-level error detection and sequence-level out-of-domain detection across translation and speech-recognition datasets.

  • Takeaways & Limitations

    The framework provides a unified and interpretable basis for studying uncertainty measures and practical detection tasks in autoregressive structured prediction.

  • Takeaways & Limitations

    Uncertainty-based rejection works better for ASR than NMT because BLEU is only a proxy for translation quality, making bad translations difficult to define objectively.

Abstract

from arXiv · show

Uncertainty estimation is important for ensuring safety and robustness of AI systems. While most research in the area has focused on un-structured prediction tasks, limited work has investigated general uncertainty estimation approaches for structured prediction. Thus, this work aims to investigate uncertainty estimation for autoregressive structured prediction tasks within a single unified and interpretable probabilistic ensemble-based framework. We consider: uncertainty estimation for sequence data at the token-level and complete sequence-level; interpretations for, and applications of, various measures of uncertainty; and discuss both the theoretical and practical challenges associated with obtaining them. This work also provides baselines for token-level and sequence-level error detection, and sequence-level out-of-domain input detection on the WMT'14 English-French and WMT'17 English-German translation and LibriSpeech speech recognition datasets.

1 INTRODUCTION

Uncertainty estimation has become important for deployed neural networks, but general unsupervised and probabilistically interpretable approaches for structured prediction remain limited. This work addresses that gap with a unified ensemble-based framework spanning uncertainty measures, approximations, and detection tasks.

  • Motivation: Ensemble uncertainty methods support safety-related applications including misclassification, out-of-distribution, adversarial-attack, and active-learning scenarios.They also decompose total uncertainty into data uncertainty and knowledge uncertainty.
  • Research gap: Structured-prediction uncertainty estimation remains underexplored compared with unstructured tasks, especially within general unsupervised ensemble-based frameworks.Existing task-specific supervised confidence models require additional error-detection models and inherit limitations from the original system.
  • Related work: Prior structured-prediction work examined data uncertainty and Monte-Carlo Dropout estimates, but focused mainly on machine translation and offered limited measures and theoretical analysis.These studies also did not provide the broader framework targeted here.
  • Contributions: The paper derives token- and sequence-level information-theoretic measures, introduces reverse mutual information, and studies Monte-Carlo approximations and ensemble combination.It also provides baselines for token-level and sequence-level error detection and out-of-domain input detection on translation and speech-recognition datasets.

2 UNCERTAINTY FOR STRUCTURED PREDICTION

The framework treats ensemble parameters as approximate Bayesian posterior samples and defines interpretable uncertainty measures for autoregressive structured predictions at token and sequence levels. It introduces reverse mutual information while clarifying how the measures differ in decomposition properties and how autoregressive factorization enables tractable modeling.

  • Bayesian ensemble framework: The Bayesian ensemble framework approximates the neural-network parameter posterior q(θ) and obtains predictive uncertainty by averaging model predictions.Monte-Carlo Dropout and Deep Ensembles are examples of ensemble-generation approaches within this framework.
  • Uncertainty measures: Total uncertainty is the predictive-posterior entropy, while mutual information measures ensemble disagreement and knowledge uncertainty.The formulation also separates expected data uncertainty from knowledge uncertainty through the mutual-information decomposition.
  • Novel measure: Reverse mutual information (RMI) is a novel reverse-KL counterpart to mutual information and equals the difference between EPKL and MI.The paper argues that RMI is particularly attractive for structured-prediction uncertainty estimation.
  • Interpretability: Only mutual information cleanly decomposes into total and data uncertainty; EPKL and RMI do not provide those respective clean decompositions.Thus, the measures all estimate knowledge uncertainty but have different interpretability properties.
  • Autoregressive structure: Autoregressive models factorize variable-length sequence probabilities into token-conditionals, with each token conditioned on the preceding context.This supports both token-level uncertainty, conditioned on context, and sequence-level uncertainty over the complete output.

3 MONTE-CARLO APPROXIMATIONS

Exact sequence-level uncertainty calculations are intractable because autoregressive models define combinatorially large hypothesis spaces. The paper therefore studies Monte-Carlo approximations, their stability and sensitivity, and practical choices for inference and ensemble combination.

  • Computational challenge: Autoregressive uncertainty expressions are intractable over the combinatorial sequence space, motivating Monte-Carlo approximations obtainable during standard beam-search inference.The paper examines two approximation types that coincide asymptotically but differ at finite sample sizes.
  • Practical considerations: Length-normalized rate equivalents are used to compare uncertainty across sequences of different lengths.The framework also distinguishes expectation-of-products from product-of-expectations ensemble combination, with only the former fully consistent with sequence-level Bayesian averaging.
  • Total uncertainty approximations: Chain-rule entropy approximations average token-level uncertainties, whereas joint-sequence approximations use sampled complete hypotheses.Both are asymptotically exact for total uncertainty, but chain-rule estimates can be more stable with fewer samples while joint-sequence estimates are more hypothesis-sensitive.
  • Knowledge uncertainty approximations: Some mutual-information estimates require sampling from each model individually, whereas efficient chain-rule estimates can be obtained at no extra cost during standard ensemble inference.The corresponding approximation may not converge to the exact mutual-information expression as the sample count grows.
  • RMI approximations: RMI enables asymptotically exact joint-sequence and chain-rule Monte-Carlo estimates during inference.The joint-sequence form is sensitive to the sampled hypotheses, while the chain-rule form is more stable.

4 EXPERIMENTAL EVALUATION

Experiments evaluate uncertainty for predictive quality, sequence- and token-level error detection, and out-of-domain detection in NMT and ASR. Information-theoretic measures generally perform best, while task characteristics and decoding choices materially affect results.

  • Predictive Performance: Product-of-expectations yields marginally higher translation BLEU and lower ASR WER across beam-search tasks.Both combinations have equivalent teacher-forcing mean length-normalized NLL on reference data.
  • Sequence-level Error Detection: Total-uncertainty joint-sequence estimates outperform chain-rule estimates, while joint-sequence RMI is the strongest knowledge-uncertainty measure.The chain-rule gap is larger for NMT, whose intrinsic uncertainty is higher.
  • Sequence-level Error Detection: Uncertainty-based rejection works better for ASR than NMT because BLEU is only a proxy for translation quality and can penalize valid alternatives.Human translation-quality judgments would provide a better but more expensive evaluation.
  • Out-of-Domain Detection: OOD detection is easier for larger ASR domain mismatches, but uncertainty measures differ only marginally on speech-recognition shifts.ASR’s continuous inputs provide domain, speaker, language, and recording information.
  • Out-of-Domain Detection: For NMT, corrupted English is detected near-perfectly, whereas spoken-English and other-language inputs are difficult because copy-through can lower total uncertainty.Knowledge-uncertainty measures, especially RMI and S-IW, are less affected and discriminate the OOD data.
  • Out-of-Domain Detection: Information-theoretic measures consistently outperform heuristic measures, although gains can be marginal; length normalization is important.Including competing hypotheses can help variance-based measures but can hurt when incorporated ad hoc.

5 CONCLUSION

The paper develops a probabilistically interpretable ensemble framework for uncertainty estimation in autoregressive structured prediction, covering token- and sequence-level measures. It shows how Bayesian model averaging choices and uncertainty decompositions affect interpretation, while identifying limitations of several measures.

  • 5 CONCLUSION: The framework applies ensemble-based uncertainty estimation to structured tasks using token-level and sequence-level measures, with Bayesian model averaging at both levels.The work provides baselines for error detection and out-of-domain input detection across translation and speech recognition tasks.
  • 5 CONCLUSION: Token-level Bayesian model averaging estimates the current token regardless of how context tokens were generated, whereas sequence-level averaging evaluates how the entire sequence was generated.The two averaging schemes therefore encode different uncertainty targets in autoregressive prediction.
  • 5 CONCLUSION: Entropy of the predictive posterior measures total uncertainty, while mutual-information-based quantities distinguish total, knowledge, and expected data uncertainty.These measures can be applied to the predictive posterior obtained through either token-level or sequence-level Bayesian model averaging.
  • 5 CONCLUSION: Reverse mutual information (RMI) is a reverse-KL counterpart to mutual information and yields the same total-uncertainty estimates as the corresponding alternative diversity measure.RMI is related to EPKL and mutual information through their ensemble-diversity decomposition.
  • 5 CONCLUSION: Mutual information cleanly decomposes total uncertainty into knowledge and data uncertainty, whereas EPKL and RMI lack one of these clean decompositions.Specifically, EPKL does not provide clean total-uncertainty measures, and RMI does not provide clean data-uncertainty measures.
  • 5 CONCLUSION: Token-level uncertainty reflects predictions conditioned on input x and context y<l, with sensitivity shifting from the input toward the generated context across a sequence.This interpretation distinguishes uncertainty about early tokens from uncertainty about later tokens whose context has already been generated.

A.2 DERIVATION OF SEQUENCE-LEVEL MONTE-CARLO APPROXIMATIONS

The section derives Monte-Carlo approximations for sequence-level uncertainty, using entropy and relative-entropy chain rules to obtain inference-efficient estimates. It also adapts these approximations to beam search and introduces RMI as an asymptotically exact inference-efficient alternative for sequence-level knowledge uncertainty.

  • Derivation framework: The appendix derives joint-sequence and chain-rule approximations using the chain rules of entropy and relative entropy.These derivations provide the basis for sequence-level uncertainty estimates in the ensemble framework.
  • Computational challenge: Direct joint-sequence Monte-Carlo estimates of mutual information and EPKL are inference-inefficient because they require independent sampling from each ensemble model.The chain-rule construction is introduced to avoid this sampling burden during ensemble inference or beam search.
  • Inference-efficient approximations: Chain-rule approximations express mutual information and EPKL as sums of token-level divergences along hypotheses sampled from the predictive posterior.These approximations replace expectations under individual models with expectations under the predictive posterior.
  • Sequence-level knowledge uncertainty: RMI provides asymptotically exact inference-efficient Monte-Carlo estimates of sequence-level knowledge uncertainty, unlike mutual information and EPKL.RMI is defined with respect to the predictive posterior, whereas exact mutual-information and EPKL estimation require sampling from every model.
  • Beam-search adaptation: Beam-search approximations weight each hypothesis by its probability, reflecting beam search’s interpretation as importance sampling.The same adjustment is applied to chain-rule and joint-sequence uncertainty measures.

C PREDICTIVE PERFORMANCE ABLATION STUDIES

The ablation studies compare ensemble predictive performance and uncertainty-related rejection behavior across NMT and ASR settings. Product-of-expectations generally performs best, while increasing ensemble size yields diminishing returns and preserves its advantage.

  • Predictive performance: Across languages, tasks, and datasets, product-of-expectations yields superior predictive performance with one exception.The comparison covers BLEU, WER, and NLL results reported in Tables 8 and 9.
  • Ensemble-size ablation: Using 4-6 NMT models and 2-3 ASR models captures most ensemble gains at roughly half the cost of full 10- or 6-model ensembles.Both BLEU/WER and NLL show diminishing returns as more models are added.
  • Ensemble-size ablation: The product-of-expectations advantage remains consistent as ensemble size changes, making it preferable regardless of the number of available models.The ablation reports this pattern for both predictive performance and NLL-related comparisons.
  • Rejection analysis: Prediction rejection curves evaluate whether sequence-level uncertainty identifies sentences that are difficult to translate or transcribe.The metric compares uncertainty-based rejection with random and oracle rejection behavior.

D.2 REJECTION CURVES

Rejection-curve behavior differs between NMT and ASR because their sentence-level error distributions differ. Score-based uncertainty generally outperforms entropy-based measures for NMT, whereas the two perform comparably for ASR.

  • Rejection curves: ASR rejection curves are much closer to the oracle than NMT curves because ASR sentence-WER concentrates many utterances at low error with a few large errors.Between 55-75% of ASR utterances have sentence-WER of 0-10%, allowing rejection of a few large-error utterances to reduce mean WER substantially.
  • Rejection curves: NMT oracle curves are not much better than random because sentence-level BLEU is spread across the spectrum, so rejecting a few sentences cannot greatly raise mean BLEU.The contrast with ASR follows from the different distributions of sentence-level errors.
  • Dataset-dependent behavior: AMI produces oracle rejection curves more like NMT because its sentence-WER distribution is more uniform than LibriSpeech’s distribution.The result indicates that oracle-curve shape depends on error distribution rather than task identity alone.
  • Uncertainty measures: Score-based uncertainty measures work better than entropy-based measures on NMT, while they perform comparably on ASR.The proposed explanation is that NMT predictions are less confident, whereas ASR predictions assign greater confidence to their outputs.

E TOKEN-LEVEL ERROR DETECTION

Token-level error-detection results show that the proposed knowledge-uncertainty measure consistently outperforms token-level mutual information and RMI. The observed trends remain stable across ensemble combinations and additional evaluation settings.

  • Token-level error detection: The new score-based knowledge-uncertainty measure Mωl consistently outperforms token-level mutual information and RMI on LibriSpeech.The comparison is reported for beam-search decoding using the evaluation summarized in Table 11.
  • Robustness across ensemble combinations: The token-level error-detection trends do not depend on the ensemble combination used to obtain hypotheses.Table 12 reports the corresponding robustness across ensemble-combination choices.
  • Additional evaluation: Additional out-of-domain detection experiments cover En-De, En-Fr, and ASR models in beam-search decoding, with teacher-forcing results also reported for NMT.These experiments extend evaluation across both translation directions and speech recognition settings.

F.1 ADDITIONAL RESULTS

Additional experiments show that OOD detection depends on ensemble combination, language configuration, and whether copy-through is present. Knowledge-uncertainty measures are especially informative when copy-through is eliminated.

  • F.1 ADDITIONAL RESULTS: For English-French translation, OOD detection is easier for some measures than in English-German, but held-out-language detection remains vulnerable to copy-through.The authors attribute this partly to the larger WMT’14 English-French dataset and to strong copying of unfamiliar languages.
  • F.1 ADDITIONAL RESULTS: Product-of-expectations ensembles generally yield marginally better OOD detection than expectation-of-products ensembles.This trend holds across the reported translation and speech-recognition comparisons, with some exceptions showing larger differences.
  • F.2 TEACHER-FORCING: Copy-through makes unfamiliar-language OOD detection substantially harder, while changing both source and target languages is easy to detect.Forcing copy-through causes total-uncertainty measures to fail, whereas knowledge-uncertainty measures remain effective, particularly when source sentences are not copied.

G SENSITIVITY OF MC ESTIMATORS TO NUMBER OF SAMPLES AND CALIBRATION

Monte Carlo sensitivity differs by task: additional hypotheses usually do not help sequence-error detection but improve OOD detection, while importance-weighting temperature has opposite effects across NMT and ASR.

  • Number of samples: For sequence-error detection, adding hypotheses within the beam has little effect or is detrimental.This behavior is reported for both NMT and ASR sensitivity experiments.
  • Number of samples: Considering more beam hypotheses generally improves OOD detection, especially for joint-sequence reverse mutual information estimates.The benefit reflects using information about the input’s effect on more than the 1-best hypothesis, although the resulting performance gain is described as unsatisfying.
  • Calibration: Higher importance-weighting temperature improves NMT OOD detection but degrades ASR OOD detection.The NMT improvement is especially strong for joint-sequence reverse mutual information, whereas the ASR degradation remains unexplained.
  • Length normalization: Length normalization consistently improves performance on the evaluated tasks, except for French OOD inputs, where removing it yields a large improvement.The exception occurs in a pathological copy-through regime and does not appear for the analogous German-input case.

I COMPARISON TO HEURISTIC MEASURES OF UNCERTAINTY

The paper compares heuristic ensemble-diversity measures with information-theoretic uncertainty measures for structured prediction. Reverse mutual information generally performs better, while length normalization usually helps and checkpoint ensembles offer a cheaper alternative.

  • Heuristic measures: Heuristic measures capture ensemble diversity but are not strictly information-theoretically meaningful and provide limited guidance for incorporating additional hypotheses.The paper therefore extends these measures to average variances over hypotheses within the beam.
  • Comparison of measures: Reverse mutual information outperforms heuristic uncertainty measures on OOD detection, with one exception.The comparison includes cross-BLEU, cross-WER, and variance-based measures of ensemble diversity.
  • Comparison of measures: Length normalization generally improves heuristic-measure performance, although one OOD-detection case is an exception.The compared heuristics use diversity among 1-best hypotheses or variance in probabilities and log-probabilities across ensemble members.
  • Checkpoint ensembles: Checkpoint ensembles are consistently inferior to random-initialization ensembles but differ by only about 6% ROC-AUC points in the largest reported gaps.The largest differences occur on NMT L-FR and L-DE datasets affected by pathological copy-through.
Loading 2002.07650v5…