Confidence Estimation in Structured Prediction

Avihai Mejer, Koby CrammerarXiv 2011

TL;DR

Online discriminative algorithms for structured prediction (like the Structured Perceptron or Passive-Aggressive frameworks) are fast and accurate but lack the ability to quantify how confident they are in their token-level outputs. This paper introduces several post-hoc methods to estimate per-word confidence for these non-probabilistic models. The authors demonstrate that these confidence scores successfully identify prediction errors, optimize precision-recall trade-offs, and reduce human annotation effort in active learning by up to 34%.

What Problem Does This Paper Address?

Structured prediction tasks, such as Named Entity Recognition (NER) and dependency parsing, serve as foundational building blocks for complex Natural Language Processing (NLP) pipelines. Online discriminative learning algorithms are highly popular for these tasks because they are simple to implement, fast to train, and deliver state-of-the-art accuracy.

However, unlike probabilistic models (such as Conditional Random Fields), these margin-based methods only output a single "best" global prediction. They provide no native probability distribution or confidence scores for individual elements (like words or edges). Without these scores, downstream applications cannot filter out likely errors, and human annotators cannot efficiently target highly uncertain sentences for active learning. This paper bridges the gap by developing post-hoc confidence estimation techniques specifically tailored for non-probabilistic structured prediction models.

Methods

The authors propose three primary frameworks to extract single-number confidence scores from linear discriminative models:

  1. Margin-Based Method (Delta): This calculates confidence for a specific token by taking the difference between the score of the globally optimal prediction and the score of the best alternative prediction where that token's label is forced to be incorrect.
  2. Marginal-Probability Method (Gamma): This maps structural scores to a valid probability distribution using a softmax-like exponential normalization factor, computing marginals efficiently via the forward-backward algorithm.
  3. Confidence by Alternatives: This approach generates $K$ alternative labelings and computes confidence as the proportion of these alternatives that agree with the primary prediction. The alternatives are generated using two strategies:
  4. Deterministic: Utilizing $K$-best Viterbi or $K$-best Maximum Spanning Trees.
  5. Stochastic (KD-Fix / KD-PC): Sampling $K$ different weight vectors from a Gaussian distribution centered around the learned model parameters and running standard inference for each.

For dependency parsing, the authors also introduce a hybrid method (KD-Fix + Delta) that uses the margin-based score to break ties among stochastically generated trees.

The computational complexities and characteristics of these methods are summarized in the paper's properties table:

Properties of confidence estimation methods

Datasets

The methods were rigorously evaluated across two distinct structured prediction paradigms:

  • Sequence Labeling: Four large standard benchmarks from the CoNLL shared tasks were used: Noun-Phrase (NP) chunking (CoNLL-2000) and Named Entity Recognition (NER) in English, Spanish, and Dutch (CoNLL-2002/2003).
  • Dependency Parsing: Evaluated across 14 languages, including 13 from the CoNLL-2006 shared task (ranging from Arabic and Chinese to Turkish and Swedish) alongside the English Penn Treebank.

Key Insights and Ideas

  • Sampling Models Beats Sampling Paths: Generating alternative predictions by perturbing the model parameters (stochastic sampling via KD-Fix/KD-PC) yields significantly better confidence estimates than looking at the top-$K$ scoring paths from a single model.
  • Implicit Uncertainty is Sufficient: Surprisingly, KD-Fix (which uses a fixed, isotropic covariance matrix to sample weights) performs comparably to or slightly better than KD-PC (which uses the explicit parameter covariance tracked by Confidence-Weighted learning). This means practitioners do not need to use a specialized confidence-tracking algorithm during training to get high-quality post-hoc confidence estimates.
  • Complementary Strengths in Parsing: In dependency parsing, KD-Fix excels at identifying errors early (low recall), while the Margin-based (Delta) method performs better at high recall. Combining them into a hybrid approach yields the best overall results.

Key Results

  • Highly Effective Error Detection: In an English NER error retrieval task, sorting words by their lowest KD-Fix confidence score allowed the system to catch 86% of all prediction mistakes after inspecting just 10% of the tokens. A random inspection would only catch 10% of the errors for the same effort.
  • Significant Active Learning Gains: Incorporating the KD-Fix confidence metric into an active learning loop reduced the human annotation workload by 25% to 34% across all sequence labeling tasks compared to a random sentence selection baseline.
  • Precision-Recall Tuning: By establishing a confidence threshold and discarding low-confidence entity tags, the system successfully traded recall for higher precision (e.g., boosting English NER precision from 0.83 to 0.90) without degrading the overall F-measure.

Limitations and Future Work

  • Computational Overhead: The stochastic sampling methods (KD-Fix and KD-PC) require $K$ full inference passes per sentence. While manageable for sequence labeling, this can become computationally expensive for complex structured tasks like non-projective dependency parsing.
  • Theoretical Open Questions: While the empirical results strongly favor model-sampling techniques over margin-based alternatives, a rigorous theoretical explanation for why parameter perturbation provides superior confidence bounds remains an open problem.
  • Asymmetry in Tuning: The authors note that trading precision for higher recall (i.e., turning a predicted "non-entity" into an entity based on low confidence) is significantly harder than trading recall for precision, because the model must still successfully guess which alternative tag is the correct one.

Summary updated

BibTeX
@misc{mejer2011confidence,
  author = {Avihai Mejer and Koby Crammer},
  title = {{Confidence Estimation in Structured Prediction}},
  year = {2011},
  eprint = {1111.1386},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1111.1386},
}
Figure