Class Adaptive Conformal Training

Badr-Eddine Marani, Julio Silva-Rodríguez, Ismail Ben Ayed, Maria Vakalopoulou, Stergios Christodoulidis, Jose Dolz

TL;DR

This paper introduces Class Adaptive Conformal Training (CaCT), a novel method that allows machine learning models to generate more accurate and informative uncertainty estimates (prediction sets) by adapting these sets on a per-class basis. CaCT achieves this by reformulating conformal training as an optimization problem that learns class-specific penalties, leading to significantly improved efficiency and robustness, especially on challenging datasets with class imbalance.

What Problem Does This Paper Address?

Machine learning models, particularly deep neural networks, often provide unreliable probability estimates, leading to overconfidence in their predictions. Conformal Prediction (CP) offers a robust framework for quantifying uncertainty by producing prediction sets that are statistically guaranteed to contain the true label. However, existing CP methods, especially those integrated into the training process (conformal training), tend to optimize for overall prediction set size. This approach struggles to adapt to datasets with many classes or imbalanced class distributions, where minority classes often end up with overly conservative and uninformative prediction sets. The core challenge is to shape these prediction sets in a class-conditional manner without requiring prior knowledge of the data distribution.

Methods

The authors propose Class Adaptive Conformal Training (CaCT), a novel framework that addresses the limitations of existing methods.

  • Class-Conditional Constraints: Instead of a single global constraint on prediction set size, CaCT introduces class-conditional constraints. This means the model learns to optimize the size of prediction sets for each class individually.
  • Augmented Lagrangian Optimization: To handle these class-conditional constraints adaptively, CaCT reformulates the problem using an Augmented Lagrangian Method (ALM). This approach allows for the automatic learning of class-specific penalty weights, eliminating the need for manual tuning of a global regularization parameter.
  • Adaptive Penalty Multipliers: The ALM framework iteratively updates penalty multipliers ($\lambda$) and penalty parameters ($\rho$). This dynamic adjustment mechanism ensures that the model learns to satisfy constraints more effectively over time, adapting to the varying difficulty of different classes.
  • Differentiable Approximations: To enable gradient-based optimization, CaCT employs smooth approximations for indicator functions and quantile calculations, similar to prior work like ConfTr. These approximations are used during training, while the exact (non-smooth) conformal prediction is used at test time to retain formal coverage guarantees.

Datasets

The authors evaluate CaCT on a variety of datasets, including:

  • Standard Image Classification: MNIST, CIFAR-10, CIFAR-100, ImageNet.
  • Long-tailed Image Classification: Manually resampled long-tailed versions of MNIST, CIFAR-10, CIFAR-100, and ImageNet-LT. These datasets are characterized by a skewed distribution of class frequencies.
  • Text Classification: 20 Newsgroups dataset.

Key Insights and Ideas

  • Class-specific adaptation is crucial: The paper strongly demonstrates that a one-size-fits-all approach to prediction set size optimization is suboptimal, especially for imbalanced datasets. Adapting penalties per class is key to achieving both efficiency and robustness.
  • ALM is a powerful tool for conformal training: Leveraging Augmented Lagrangian Methods allows for the automatic, adaptive learning of class-specific regularization, overcoming the challenges of manual hyperparameter tuning in complex optimization landscapes.
  • CaCT is robust to imbalance: The proposed method consistently outperforms existing techniques on long-tailed datasets, showing its ability to handle minority classes effectively.
  • Efficiency and adaptivity go hand-in-hand: CaCT not only produces smaller prediction sets (efficiency) but also achieves lower coverage gaps, indicating better adaptivity to instance difficulty.

Key Results

  • Superior Performance: CaCT consistently outperforms state-of-the-art conformal training methods (ConfTr, CUT, InfoCTr, DPSM) across multiple benchmarks and tasks.
  • Reduced Set Size: CaCT achieves the smallest average prediction set sizes across all tested datasets, indicating improved efficiency. For example, on CIFAR100-LT, CaCT + ALM achieves a set size of 3.03, significantly lower than ConfTr (4.76) and CUT (4.56).
  • Lower Coverage Gap: CaCT also demonstrates the lowest coverage gaps, signifying better class-conditional coverage and adaptivity. On ImageNet-LT, CaCT + ALM achieves a coverage gap of 4.40, compared to 5.08 for ConfTr and 4.74 for CUT.
  • Robustness to Imbalance: Even with severe imbalance factors ($\gamma=0.1$), CaCT maintains competitive performance, outperforming methods like Focal Loss (FL) which struggle with inflated set sizes.
  • Adaptive Hyperparameter Learning: The ALM-based approach eliminates the need to tune a global regularization parameter ($\lambda$), which is shown to be highly sensitive and dataset-dependent for existing methods.

Limitations and Future Work

  • Computational Cost: While CaCT offers significant improvements, the ALM framework can introduce additional computational overhead during training due to the iterative updates of multipliers and penalty parameters.
  • Generalization of ALM: The paper notes that while ALM is theoretically established for convex optimization, its empirical performance in non-convex deep learning scenarios is strong but still an area of active research.
  • Future Work: The authors suggest exploring the application of CaCT to other domains beyond classification, such as regression and structured prediction. Further investigation into more advanced ALM variants or alternative optimization techniques for class-adaptive conformal training could also be beneficial.

Summary updated

BibTeX
@inproceedings{marani2026class,
  author = {Badr-Eddine Marani and Julio Silva-Rodríguez and Ismail Ben Ayed and Maria Vakalopoulou and Stergios Christodoulidis and Jose Dolz},
  title = {{Class Adaptive Conformal Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=U4gGjBCf7z},
}
Figure