Selective Prediction via Training Dynamics

Stephan Rabanser, Anvith Thudi, Kimia Hamidieh, Adam Dziedzic, Israfil Bahceci, Akram Bin Sediq, Hamza Sokun, Nicolas Papernot

In high-stakes environments like healthcare or autonomous driving, a machine learning model shouldn't just be accurate—it needs to know when it is likely to be wrong. This is the goal of Selective Prediction (SP): providing the model with a "gating mechanism" to either confidently output a prediction or abstain (reject the input) if its uncertainty is too high.

The challenge is that most current SP methods are highly intrusive. They often require specialized architectures (like SelectiveNet) or custom loss functions (like Deep Gamblers). These requirements make them difficult to drop into existing production pipelines, especially when retraining is expensive or data access is restricted. Furthermore, most existing research focuses almost exclusively on classification, leaving regression and time-series tasks behind.

To address this, researchers have introduced Selective Prediction via Training Dynamics (SPTD), a novel framework that identifies when a model is likely to make a mistake by analyzing its "behavior" during training. Instead of modifying model architectures or loss functions, SPTD monitors how much intermediate checkpoints disagree with the final model’s prediction.

The SPTD Framework

SPTD treats the training process as a rich source of information rather than just a means to an end. The core algorithm is post-hoc and domain-agnostic, meaning you do not need to change how you train your model; you simply utilize the checkpoints you likely already save.

Overview of the SPTD framework. During training, intermediate checkpoints are saved. At inference, test points are evaluated across these checkpoints to measure prediction stability.

The method operates through the following steps:

  1. Save Checkpoints: During a standard training run, save the model weights at various intervals.
  2. Monitor Disagreement: At inference time, run the test input through several of these intermediate checkpoints as well as the final model.
  3. Calculate Instability: Compute a "disagreement score" between each checkpoint and the final model. For classification, this is a binary check of whether the label changed. For regression, it is the distance between the predicted values.
  4. Weighted Sum: Combine these disagreements into a single instability score using a weighting function. This function penalizes disagreements that happen late in training more heavily, as late-stage fluctuations are stronger signals of "hard" or "noisy" examples.
  5. Gating: If the total instability score exceeds a user-defined threshold, the prediction is rejected.

Key Insights: The "Flicker" Effect

The fundamental "aha moment" behind SPTD is that correctly classified points tend to converge to their final label very early in training. In contrast, points that the final model gets wrong often "flicker" between classes or values even in the final epochs.

By tracking this history, training dynamics act as a proxy for aleatoric uncertainty (noise inherent in the data). If the optimization process cannot "settle" on a prediction for a specific point, it serves as a strong red flag that the final prediction might be unreliable.

Comparison of decision boundaries and uncertainty distributions. SPTD (orange) provides a much clearer separation of uncertain regions compared to standard Softmax Response (SR, blue).

Experimental Results

The researchers evaluated SPTD across three distinct domains: Image Classification (e.g., CIFAR-10/100, ImageNet subsets), Regression (e.g., California Housing), and Time Series Forecasting (e.g., M4 competition datasets).

Key findings include:

  • State-of-the-Art Performance: SPTD consistently outperformed standard baselines like Softmax Response (SR) and Self-Adaptive Training (SAT) across almost all datasets.
  • Ensemble-Level Quality at a Fraction of the Cost: Deep Ensembles are the current gold standard for uncertainty but require training multiple different models from scratch. SPTD achieves comparable performance by using the "free" snapshots from a single training run. When combined (DE+SPTD), the authors established new state-of-the-art results for selective classification.
  • Versatility: In regression and time-series tasks, SPTD provided much more reliable risk-coverage trade-offs than existing methods.
  • OOD and Adversarial Detection: Though not the primary focus, SPTD proved surprisingly effective at flagging out-of-distribution (OOD) data and adversarial attacks, as these anomalous inputs also trigger high instability across training checkpoints.

Limitations and Future Work

The primary trade-off for SPTD is inference-time latency. To get a prediction, the input must be run through multiple model checkpoints. While the authors demonstrated that sub-sampling as few as 10 checkpoints still yields excellent results, this is inherently slower than a single forward pass.

Future work will likely focus on optimizing the number and selection of checkpoints to minimize this latency, refining the method for more complex tasks like object detection or segmentation, and exploring how training dynamics can be used to identify other model vulnerabilities like unfairness or privacy leaks.

Summary updated

BibTeX
@article{rabanser2024selective,
  author = {Stephan Rabanser and Anvith Thudi and Kimia Hamidieh and Adam Dziedzic and Israfil Bahceci and Akram Bin Sediq and HAMZA SOKUN and Nicolas Papernot},
  title = {{Selective Prediction via Training Dynamics}},
  journal = {Accepted by TMLR},
  year = {2024},
  url = {https://openreview.net/forum?id=2wgnepQjyF},
}
Figure