Sample Efficient Model Evaluation

Emine Yilmaz, Peter Hayes, Raza Habib, Jordan Burgess, David BarberarXiv 2021

Abstract

Labelling data is a major practical bottleneck in training and testing classifiers. Given a collection of unlabelled data points, we address how to select which subset to label to best estimate test metrics such as accuracy, $F_1$ score or micro/macro $F_1$. We consider two sampling based approaches, namely the well-known Importance Sampling and we introduce a novel application of Poisson Sampling. For both approaches we derive the minimal error sampling distributions and how to approximate and use them to form estimators and confidence intervals. We show that Poisson Sampling outperforms Importance Sampling both theoretically and experimentally.

Introduction

Evaluating machine learning models on massive datasets is often bottlenecked by the high cost of human labeling. While "Active Learning" focuses on picking the best data for training, this paper tackles the less-studied problem of Sample Efficient Model Evaluation: how do we pick a small subset of the test set to label so that our estimate of the model's performance (e.g., its F1 score) is as accurate as possible?

Standard uniform sampling is often inefficient, especially when classes are imbalanced. If only 1% of your data is "offensive content," a random sample might miss those cases entirely, leading to a wildly inaccurate F1 score. The authors seek a way to "smartly" pick which points to label to minimize the variance of performance estimates.

Methodology

The authors compare two main sampling strategies:

  1. Importance Sampling (IS): A technique where points are sampled (with replacement) from a proposal distribution.
  2. Bernoulli (Poisson) Sampling (BS): The paper’s primary contribution. Instead of picking $M$ points from a pool, we go through every point in the test set and flip a weighted coin (with probability $b_n$) to decide whether to label it.

To make these methods work, a pre-sampling stage uses the model’s own probabilistic predictions to estimate the "optimal" sampling weights. A smoothing parameter ($\lambda$) prevents the system from becoming overconfident in the model's own predictions. For Bernoulli Sampling, they derive an efficient $O(N)$ "water-filling" style algorithm to find the optimal inclusion probabilities ($b_n$) that minimize expected error for a fixed labeling budget.

Key Insights

  • The "With Replacement" Flaw: Importance Sampling is limited because it samples with replacement. In a deterministic setting, re-sampling the same point adds zero new information. Bernoulli Sampling avoids this by design.
  • Certainty and Convergence: Unlike Importance Sampling, Bernoulli Sampling can assign a probability of $1.0$ to specific points. As the budget increases, BS naturally converges to the true metric value of the entire dataset.
F1 score estimation and 90% confidence intervals for Uniform (left), Importance (middle), and Bernoulli (right) sampling.

Experimental Results

The researchers evaluated their approach on MNIST, 20 Newsgroups, and the Toxic Comment Classification Challenge.

  • Superior Efficiency: Bernoulli Sampling significantly outperformed both Importance Sampling and Uniform Sampling, achieving lower error with fewer labels across almost all metrics (Accuracy, F1, Precision, Recall).
  • Better Calibration: The authors showed that the confidence intervals generated by Bernoulli Sampling are "well-calibrated," meaning the true metric value falls within the range with the expected frequency.
Comparison of estimation error for F1, Precision, and Recall across different sampling strategies.

Conclusion

Bernoulli Sampling provides a robust framework for model evaluation under labeling constraints. While it relies on initial model predictions, its consistency ensures eventual convergence even if the model is poorly calibrated. Future work may explore "online" settings where labels inform subsequent sampling decisions to further improve efficiency.

Summary updated

BibTeX
@misc{yilmaz2021sample,
  author = {Emine Yilmaz and Peter Hayes and Raza Habib and Jordan Burgess and David Barber},
  title = {{Sample Efficient Model Evaluation}},
  year = {2021},
  eprint = {2109.12043},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.12043},
}
Figure