[Paper Review] Learning Optimal Conformal Classifiers
This paper proposes Conformal Training (ConfTr), a differentiable, end-to-end training procedure that integrates conformal prediction into model training by simulating calibration and prediction on mini-batches. ConfTr reduces average confidence set size (inefficiency) and enables fine-grained control over class-conditional inefficiency and confidence set composition while preserving marginal coverage guarantees.
Modern deep learning based classifiers show very high accuracy on test data but this does not provide sufficient guarantees for safe deployment, especially in high-stake AI applications such as medical diagnosis. Usually, predictions are obtained without a reliable uncertainty estimate or a formal guarantee. Conformal prediction (CP) addresses these issues by using the classifier's predictions, e.g., its probability estimates, to predict confidence sets containing the true class with a user-specified probability. However, using CP as a separate processing step after training prevents the underlying model from adapting to the prediction of confidence sets. Thus, this paper explores strategies to differentiate through CP during training with the goal of training model with the conformal wrapper end-to-end. In our approach, conformal training (ConfTr), we specifically "simulate" conformalization on mini-batches during training. Compared to standard training, ConfTr reduces the average confidence set size (inefficiency) of state-of-the-art CP methods applied after training. Moreover, it allows to "shape" the confidence sets predicted at test time, which is difficult for standard CP. On experiments with several datasets, we show ConfTr can influence how inefficiency is distributed across classes, or guide the composition of confidence sets in terms of the included classes, while retaining the guarantees offered by CP.
Motivation & Objective
- Address the lack of model adaptation to conformal prediction (CP) in standard training, where models are trained for accuracy but CP is applied post-hoc without optimization for efficiency.
- Overcome the limitation of post-hoc CP, which cannot shape confidence sets or reduce inefficiency based on model training objectives.
- Enable training-time optimization of arbitrary losses defined on confidence sets, such as minimizing average size or penalizing specific class inclusions.
- Develop a differentiable, smooth approximation of CP calibration and prediction to allow backpropagation through the conformal wrapper.
- Provide a training procedure that allows the model to learn to produce predictions that yield smaller, better-distributed confidence sets under CP, improving practical uncertainty estimation.
Proposed method
- Introduce Conformal Training (ConfTr), a method that simulates conformal prediction on each mini-batch by splitting it into calibration and prediction halves.
- Use smooth, differentiable approximations of the threshold-based conformity score calibration (SmoothCal) and prediction (SmoothPred) steps for end-to-end training.
- Integrate the conformal wrapper into the training loop by computing losses on predicted confidence sets using differentiable loss functions.
- Optimize a composite loss combining a classification loss (Lclass) that penalizes incorrect or undesirable class inclusions and a size loss (Ω) that minimizes average confidence set size.
- Apply temperature-softplus smoothing to the prediction step to enable gradient flow through the thresholding operation in conformal prediction.
- Use a differentiable quantile estimation method (e.g., based on the empirical distribution) to approximate the calibration threshold τ in a differentiable way.
Experimental results
Research questions
- RQ1Can conformal prediction be integrated into the training process of deep classifiers to reduce confidence set inefficiency?
- RQ2Can end-to-end training with conformal prediction allow for better control over class-conditional inefficiency and confidence set composition?
- RQ3Does differentiable conformal prediction enable the model to learn to produce more informative confidence sets while preserving marginal coverage guarantees?
- RQ4How does ConfTr compare to standard training followed by post-hoc CP in terms of average confidence set size and coverage distribution across classes?
- RQ5Can the method be extended to optimize arbitrary objectives on confidence sets beyond size minimization?
Key findings
- ConfTr significantly reduces average confidence set size (inefficiency) on MNIST and Fashion-MNIST compared to standard training followed by post-hoc CP.
- On MNIST and Fashion-MNIST, ConfTr reduces class-conditional inefficiency across all classes, with the distribution of inefficiency remaining similar but shifted downward.
- ConfTr enables control over confidence set composition: when trained with a classification loss (Lclass), it reduces coverage confusion, especially for hard-to-classify classes.
- On CIFAR-10, ConfTr does not significantly reduce average inefficiency, indicating that the benefit is more pronounced on simpler datasets with better-calibrated models.
- ConfTr subsumes prior work such as Bellotti (2021), which only optimizes for inefficiency without calibration, by incorporating the calibration step into training and enabling broader optimization objectives.
- The method preserves the marginal coverage guarantee of conformal prediction, ensuring that the true label is included in the predicted confidence set with probability at least 1−α.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.