Conservative Prediction via Transductive Confidence Minimization

Caroline Choi, Fahim Tajwar, Yoonho Lee, Huaxiu Yao, Ananya Kumar, Chelsea Finn

TL;DR

This paper introduces Transductive Confidence Minimization (TCM), a novel method that trains models to be "conservative" by minimizing their confidence on unlabeled test data. This allows models to abstain from making predictions on uncertain inputs, which is crucial for safety-critical applications. TCM achieves state-of-the-art performance in both out-of-distribution detection and selective classification tasks.

What Problem Does This Paper Address?

Deep learning models, despite their impressive performance, often fail unexpectedly on inputs that are slightly different from their training data, yet they do so with high confidence. This "overconfidence" is a major roadblock for deploying these models in safety-critical domains like healthcare, where errors can have severe consequences. The paper tackles the challenge of making models more reliable by enabling them to recognize and abstain from making predictions on uncertain or out-of-distribution (OOD) inputs. Existing methods for OOD detection and selective classification struggle with consistency across different datasets and often require extensive labeled data or complex ensemble methods.

Methods

The core idea of TCM is to leverage the transductive setting, where unlabeled test data is available during training. This allows the model to learn not only to predict correctly on known data but also to become less confident on unknown or potentially erroneous data.

The method involves a two-stage fine-tuning process:

  1. Standard Training: The model is initially trained on labeled data using a standard cross-entropy loss to maximize accuracy on in-distribution (ID) examples.
  2. Confidence Minimization: The model is then fine-tuned with an additional regularization term that minimizes the predictive confidence on an "uncertainty dataset." This uncertainty dataset is crucial and is defined differently for the two main problem settings:
  3. OOD Detection: The uncertainty dataset is the unlabeled test data, which is assumed to contain a mix of ID and OOD examples. By minimizing confidence on this mixed set, the model learns to be less confident on OOD inputs while its confidence on ID inputs is maintained by the standard cross-entropy loss.
  4. Selective Classification: The uncertainty dataset consists of the misclassified examples from a validation set. This teaches the model to be less confident on inputs it is likely to get wrong.

The overall objective is a weighted sum of the standard cross-entropy loss and the confidence minimization loss.

Datasets

The paper evaluates TCM on several standard image classification benchmarks:

  • ID Datasets: CIFAR-10, CIFAR-100, SVHN, TinyImageNet, LSUN, iSUN, Camelyon17, FMoW.
  • OOD Datasets: Various datasets are used as OOD sources, including CIFAR-10-C (corrupted CIFAR-10), and other datasets like SVHN, TinyImageNet, LSUN, iSUN when used in conjunction with different ID datasets.

The paper also mentions the use of the WILDS benchmark for evaluating performance on distribution shifts.

Key Insights and Ideas

  • Transductive Confidence Minimization is Key: The core insight is that by explicitly minimizing confidence on unlabeled test data during training, a model can learn to identify and abstain from making predictions on uncertain inputs. This is particularly effective when the unlabeled data is representative of the target distribution.
  • ID vs. OOD Confidence Dynamics: The paper highlights how the confidence minimization objective interacts differently with ID and OOD data. For ID data, the cross-entropy loss (which encourages high confidence) "averages out" the confidence minimization. For OOD data, where the cross-entropy loss is less informative, the confidence minimization term forces the model to output low-confidence predictions. This difference allows for effective OOD detection.
  • Selective Classification via Misclassified Examples: For selective classification, using misclassified validation examples as the uncertainty set is a clever way to teach the model to be cautious on inputs it's likely to err on, without needing explicit OOD data.
  • Theoretical Guarantees: The paper provides theoretical analysis showing that TCM learns a lower bound on true confidence, which can be leveraged to provably detect examples that differ from training data.

Key Results

  • State-of-the-Art OOD Detection: TCM consistently outperforms existing OOD detection methods, including those that use much larger OOD datasets or ensembles of models. It achieves the highest performance on 9 out of 10 ID→OOD pairs tested.
  • Competitive Selective Classification: In selective classification settings, TCM consistently outperforms MSP and Binary Classifier. It also outperforms Fine-Tuning when tested on data from a previously unseen distribution, demonstrating its robustness to distribution shifts.
  • Efficiency: TCM achieves these results using a single network, whereas some competing methods like ERD require an ensemble of three networks, making TCM more computationally efficient.

Limitations and Future Work

  • Transductive Assumption: The primary limitation is the reliance on the transductive setting, where unlabeled test data is available during training. While this is feasible in some real-world scenarios (e.g., batch processing of medical data), it's not universally applicable.
  • Feasibility in All Settings: For OOD detection, access to unlabeled target data is crucial. For selective classification, this is less of a limitation as ID validation data is often readily available.
  • Future Work: The paper suggests that TCM represents a promising step towards building more robust and reliable machine learning systems. Further exploration of its applicability in various domains and with different model architectures would be valuable.

Summary updated

BibTeX
@inproceedings{choi2023conservative,
  author = {Caroline Choi and Fahim Tajwar and Yoonho Lee and Huaxiu Yao and Ananya Kumar and Chelsea Finn},
  title = {{Conservative Prediction via Transductive Confidence Minimization}},
  booktitle = {ME-FoMo @ ICLR},
  year = {2023},
  url = {https://openreview.net/forum?id=9wwnrg_dbR},
}
Figure