Predicting generalization performance with correctness discriminators

Yuekun Yao, Alexander Koller

Abstract

Reliably estimating the accuracy of Natural Language Processing (NLP) models on out-of-distribution (OOD) data remains a significant challenge, as gold labels are typically unavailable in production environments. Traditional confidence-based point estimates often fail to account for the estimator's own uncertainty. This paper introduces a framework using "correctness discriminators"—binary classifiers trained to distinguish between correct and incorrect model outputs. By employing an ensemble of these discriminators with optimistic and cautious voting strategies, we generate reliable upper and lower bounds for model accuracy. Our results across semantic parsing and tagging tasks demonstrate that these bounds consistently capture the true accuracy and provide a more robust measure of performance than standard baselines.

Introduction

As machine learning models transition from controlled research environments to real-world applications, the "trust gap" becomes a critical hurdle. While a model may exhibit high accuracy on its training distribution, its performance often degrades unpredictably when encountering OOD data. Standard evaluation requires human-verified gold labels, which are costly and slow to obtain.

Existing methods for unsupervised accuracy estimation often rely on a model's internal confidence scores (e.g., MaxProb). However, these provide only a single point estimate, masking the inherent uncertainty of the estimation itself. We propose that a more useful metric is a range—an upper and lower bound—that allows users to understand the potential variance in model performance.

Methodology: Correctness Discriminators

Our approach centers on training a secondary model, the Correctness Discriminator, to evaluate the primary parser's outputs.

The Discriminator Framework

The discriminator is a binary classifier (e.g., RoBERTa, T5) that takes an input sentence and the parser's generated output as a pair. It is trained to predict whether the output is Correct or Incorrect.

Overview of the Correctness Discriminator pipeline, showing how sentences are processed by a parser and then evaluated by discriminators to produce accuracy bounds.

Generating Training Data

A key innovation is the method for generating "hard" negative examples. High-performing models rarely fail on their training data, making it difficult to find examples of errors for the discriminator to learn from. We address this by using intermediate checkpoints from the parser's own training process. These "younger" versions of the model produce realistic errors that mirror the types of failures expected on OOD data.

Ensemble Voting for Bounds

To quantify uncertainty, we utilize an ensemble of five discriminators. We define two voting mechanisms:

  • Upper Bound (Optimistic): An instance is marked Correct if at least one ensemble member predicts it is correct.
  • Lower Bound (Cautious): An instance is marked Incorrect if at least one ensemble member predicts an error.

The percentage of instances labeled Correct under these rules across a test set defines the accuracy range.

Experimental Results

We evaluated our framework across several benchmarks, including semantic parsing (COGS, CFQ, TOPv2) and Part-of-Speech tagging (Brown corpus).

Reliability and Tightness of Bounds

In nearly all tested scenarios, the true "gold" accuracy was successfully captured between the predicted upper and lower bounds. As shown in Figure 6, these bounds remain stable across different data scales and effectively bracket the gold performance line.

Accuracy estimation results across various datasets (MCD1, MCD2, COGS, TOP, POS-COGS, POS-Brown). The gold accuracy (green) is consistently captured between the predicted upper (orange) and lower (blue) bounds.

Comparison to Baselines

Our method significantly outperformed traditional confidence-based metrics. For instance, on the MCD1 semantic parsing task, our method achieved an Absolute Error (AE) between 1.7 and 5.2, while the MaxProb baseline reached errors as high as 26.7. Furthermore, simply taking the mean of our bounds provided a point estimate superior to existing state-of-the-art methods like ATC.

Discussion and Limitations

While effective, the ensemble approach increases computational overhead during the training phase. Additionally, the method currently struggles with very long sequences (e.g., linearized constituency trees) due to the token limits of transformer-based discriminators. The current implementation is also restricted to tasks with a single unique correct answer (Exact Match), making it less suitable for open-ended generation tasks like summarization.

Conclusion

Correctness discriminators provide a powerful, unsupervised way to bound model performance on OOD data. By moving from point estimates to reliable ranges, we provide a more transparent and trustworthy measure of model reliability. Future work will explore using these discriminators for semi-supervised learning, leveraging high-confidence correct predictions to further refine the base models.

Summary updated

BibTeX
@inproceedings{yao2024predicting,
  author = {Yuekun Yao and Alexander Koller},
  title = {{Predicting generalization performance with correctness discriminators}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.686},
}
Figure