CBMA: Improving Conformal Prediction through Bayesian Model Averaging
-
Department of Mathematical and Statistical Sciences, University of Alberta, Canada [pbhagwat,lkong, bei1@ualberta.ca]
Keywords: Model uncertainty – Machine learning – Confidence – Prediction regions
1 Abstract
Conformal prediction has emerged as a popular technique for facilitating valid predictive inference across a spectrum of machine learning models, under minimal assumption of exchangeability. Recently, Hoff [2023] showed that full conformal Bayes provides the most efficient prediction sets (smallest by expected volume) among all prediction sets that are valid at the level if the model is correctly specified. However, a critical issue arises when the Bayesian model itself may be mis-specified, resulting in prediction set that might be suboptimal, even though it still enjoys the frequentist coverage guarantee. To address this limitation, we propose an innovative solution that combines Bayesian model averaging (BMA) with conformal prediction. This hybrid not only leverages the strengths of Bayesian conformal prediction but also introduces a layer of robustness through model averaging. Theoretically, we prove that the resulting prediction set will converge to the optimal level of efficiency, if the true model is included among the candidate models. This assurance of optimality, even under potential model uncertainty, provides a significant improvement over existing methods, ensuring more reliable and precise uncertainty quantification.
2 Motivation
Conformal prediction is a distribution-free uncertainty quantification method that generates prediction sets with valid coverage under minimal assumptions of exchangeability [Vovk et al., 2005]. By building on existing machine learning techniques, conformal prediction uses available data to establish valid prediction set for new instances with coverage guarantee . Prediction sets that include the ground truth with high probability are essential for high-stakes applications, such as autonomous vehicles and clinical settings. However, it is also preferable for the prediction sets to be efficient i.e. as small as possible, as smaller sets are more informative. Recently, Hoff [2023] investigated the optimal efficiency of full conformal Bayes prediction sets under a correctly specified Bayesian model, showing that they yield prediction sets with the minimum expected volume at a given target coverage level . In addition, Fong and Holmes [2021] introduced scalable methods for generating full conformal Bayes prediction sets applicable to any Bayesian model, highlighting the advantages of conformal Bayesian predictions over traditional Bayesian posterior predictive sets, especially in the presence of model misspecification.
However, constructing or selecting the correct Bayesian model to obtain optimally efficient conformal prediction sets is a challenging task. Although conformal prediction sets provide finite-sample coverage guarantees for any model, they may fail to achieve volume optimality when the underlying model is misspecified. This challenge underscores a broader limitation of traditional conformal prediction methods, which typically rely on a fixed machine learning model to generate prediction sets with a predetermined marginal coverage level. Given the vast array of possible predictive models for a given problem, and the fact that conformal methods yield valid sets for all of them, identifying the most appropriate model becomes inherently difficult. This issue of model uncertainty has long been a persistent and underexplored problem in the conformal prediction literature.
3 Our Contributions
In this paper, we provide an innovative solution in the form of Conformal Bayesian model averaging (CBMA) to the challenging issue of constructing efficient conformal prediction sets when there is model uncertainty in the Bayesian framework. Our proposed CBMA prediction method seamlessly combines conformity scores of each Bayesian model in order to construct a single conformal prediction set. This paves the way for incorporating model averaging procedures into conformal prediction framework which is currently lacking in the literature. To the best of our knowledge, our CBMA approach is the first method which combines conformity scores from diverse models to construct valid conformal prediction sets and requires no data splitting (data efficient). Our choice of conformity scores in the form of posterior predictive densities is also optimal and leads to the most efficient prediction set when the underlying Bayesian model is true [Hoff, 2023]. Our CBMA method can construct full conformal prediction sets given samples for model parameters of each model from their posterior distributions and posterior model probabilities, which can be obtained as the output of BMA. Theoretically, we also prove the optimal efficiency achieved by conformal prediction sets constructed using CBMA method as the sample size increases. Such guarantee of optimal efficiency even under model uncertainty provides an improvement over existing methods. Finally, our method incorporates both data and model uncertainty into the construction of prediction sets which enhances the reliability of the predictions.
4 Methodology
In this section, we summarize our CBMA approach to construct conformal predictive sets. We consider a collection of i.i.d. observations , where each observation is a covariate-response pair. For each model in the model space , we consider Bayesian prediction using training data for an outcome of interest and covariates . Given a model likelihood and prior on parameters, for , the posterior predictive distribution for the response at a new takes on the form
where is the Bayesian posterior and . We first fit candidate models using BMA [Raftery et al., 1997, Hoeting et al., 1999]. Following Fong and Holmes [2021], full conformal Bayes prediction sets are constructed using posterior predictive densities as conformity measures:
Finally, we aggregate individual model conformity scores to construct a weighted combination defined as:
(1) |
where
(2) |
References
- Conformal bayesian computation. Advances in Neural Information Processing Systems 34, pp. 18268–18279. Cited by: §2, §4.
- Bayesian model averaging: a tutorial. Statistical science 14 (4), pp. 382–417. Cited by: §4.
- Bayes-optimal prediction with frequentist coverage control. Bernoulli 29 (2), pp. 901–928. Cited by: §1, §2, §3.
- Bayesian model averaging for linear regression models. Journal of the American Statistical Association 92 (437), pp. 179–191. Cited by: §4.
- A tutorial on conformal prediction.. Journal of Machine Learning Research 9 (3). Cited by: §4.
- Algorithmic learning in a random world. Vol. 29, Springer. Cited by: §2, §4.