Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Control

Anastasios N. Angelopoulos, Stephen Bates, Emmanuel J. Candès, Michael I. Jordan, Lihua LeiThe Annals of Applied Statistics 2021 · DOI

TL;DR

This paper introduces "Learn then Test" (LTT), a novel framework that equips complex machine learning models with rigorous, finite-sample statistical guarantees on their predictions. LTT addresses a critical gap by enabling risk control for arbitrary error metrics, even those that aren't monotonic, by reframing the problem as multiple hypothesis testing.

What Problem Does This Paper Address?

Modern machine learning models, especially deep neural networks, are incredibly powerful but often lack transparency and reliability guarantees. When deployed in critical applications (e.g., healthcare, autonomous systems), it's crucial to understand and control the potential errors or risks associated with their predictions. Existing methods for providing such guarantees, like conformal prediction, often struggle with complex, non-monotonic risk functions or require specific assumptions about the model and data. This paper tackles the challenge of providing robust, distribution-free statistical guarantees for a wide range of predictive tasks and error metrics, even when dealing with complex, black-box models.

Methods

The core of the LTT framework is a "Learn then Test" approach. First, a predictive model is trained (the "Learn" phase). Then, a calibration dataset is used to "Test" and adjust the model's outputs to satisfy statistical guarantees. The key innovation lies in:

  • Reframing Risk Control as Multiple Hypothesis Testing: Instead of directly optimizing for risk, LTT treats each potential prediction parameter (represented by $\lambda$) as a hypothesis about whether the risk is controlled.
  • Arbitrary Risk Control: Unlike prior work that often requires monotonic risks, LTT can handle arbitrary risk functions. This is achieved by developing valid p-values for each hypothesis and then employing sophisticated multiple hypothesis testing procedures.
  • FWER Control: The paper leverages Family-Wise Error Rate (FWER) control to ensure that the probability of making any false rejection (i.e., claiming risk is controlled when it's not) is bounded.
  • Advanced Multiple Testing Procedures: LTT utilizes techniques like fixed sequence testing and sequential graphical testing (SGT) to efficiently search for parameters $\lambda$ that satisfy the desired risk control properties.
  • Novel Concentration Inequalities: For an alternative approach, the paper develops new concentration inequalities for self-normalized empirical processes, aiming to provide uniform bounds on risk.

Datasets

The paper demonstrates its framework on several large-scale datasets:

  • MS COCO: Used for multi-label classification and instance segmentation tasks.
  • Imagenet: Used for selective classification experiments.
  • MEPS (Medical Expenditure Panel Survey): Used for selective regression tasks.
  • CIFAR-10: Used for out-of-distribution (OOD) detection and coverage control.

Key Insights and Ideas

  • The Power of Hypothesis Testing for Risk Control: Reframing risk control as hypothesis testing unlocks powerful statistical tools that were previously inaccessible for complex ML models and arbitrary risks.
  • Decoupling Learning from Guaranteeing: LTT allows for the use of any pre-trained model, separating the model learning phase from the guarantee-providing calibration phase. This makes the framework highly adaptable to new architectures and models.
  • Arbitrary Risks are Tractable: The ability to control non-monotonic risks is a significant advancement, opening up possibilities for guaranteeing a wider range of performance metrics.
  • FWER Control as a Robust Foundation: Using FWER control provides a strong theoretical backbone for ensuring the reliability of the selected prediction parameters.
  • Uniform Concentration is Often Too Conservative: While theoretically sound, the uniform concentration approach for risk control proved to be significantly more conservative in practice compared to the multiple hypothesis testing methods.

Key Results

  • Demonstrated Guarantees: LTT successfully provides finite-sample, distribution-free statistical guarantees for various tasks, including:
  • False Discovery Rate (FDR) control in multi-label classification.
  • Intersection-over-Union (IOU), coverage, and recall control in instance segmentation.
  • Selective error control in classification and regression.
  • Simultaneous control of OOD detection type-1 error and prediction set coverage.
  • Improved Performance: The proposed methods, particularly fixed sequence testing and SGT, often outperform simpler methods like Bonferroni correction in terms of power (finding more valid parameters) while still maintaining rigorous error control.
  • Practical Applicability: The framework is shown to be effective on real-world, large-scale datasets, demonstrating its practical utility.

Limitations and Future Work

  • Marginal Guarantees: The authors acknowledge that the guarantees provided are "marginal," meaning they hold on average over the data distribution but not necessarily for specific strata of the data (e.g., specific object classes, demographic groups). Balancing errors across strata is identified as an important future direction.
  • Learning the Graph for SGT: While SGT is powerful, designing the graph structure can be challenging. The paper introduces "split fixed sequence testing" as a way to learn the graph from data, but further research into more sophisticated graph learning for SGT is suggested.
  • Optimal Testing Procedures: The paper raises questions about the existence and nature of optimal testing procedures within the LTT framework.
  • Tightness of Guarantees: While LTT controls risks, the guarantees can sometimes be conservative, especially when using the uniform concentration approach or when optimizing for certain parameters first. Future work could focus on achieving tighter bounds.

Summary updated

BibTeX
@misc{angelopoulos2021learn,
  author = {Anastasios N. Angelopoulos and Stephen Bates and Emmanuel J. Candès and Michael I. Jordan and Lihua Lei},
  title = {{Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Control}},
  year = {2021},
  eprint = {2110.01052},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.01052},
}
Figure