Conformal prediction has emerged as a useful tool for providing valid predictive inference regardless of the data distribution. However, its implementation can be computationally intensive, even for small-scale data sets. Hence, it is typically prohibitive to construct full conformal prediction intervals for multiple test points, which limits its practicality. As an alternative, a sample-split approach can be used, but it usually provides wider prediction intervals, as it does not use all observations in the data for training. This paper attempts to fill this gap by developing a scalable conformal prediction algorithm for multiple test points. We find that when we use kernel ridge regression for the underlying prediction method, it is possible to reuse some computation in constructing prediction intervals across multiple test points, which enables us to avoid repeating the heavy computation of a matrix inverse for each test point. We propose an efficient algorithm that employs this fact, dramatically reducing the computational cost. We demonstrate the effectiveness and practical usefulness of the proposed algorithm in numerical experiments.
Citation: Ilsang Ohn, Jisu Park. Fast full conformal prediction for multiple test points[J]. AIMS Mathematics, 2025, 10(3): 5143-5157. doi: 10.3934/math.2025236
Conformal prediction has emerged as a useful tool for providing valid predictive inference regardless of the data distribution. However, its implementation can be computationally intensive, even for small-scale data sets. Hence, it is typically prohibitive to construct full conformal prediction intervals for multiple test points, which limits its practicality. As an alternative, a sample-split approach can be used, but it usually provides wider prediction intervals, as it does not use all observations in the data for training. This paper attempts to fill this gap by developing a scalable conformal prediction algorithm for multiple test points. We find that when we use kernel ridge regression for the underlying prediction method, it is possible to reuse some computation in constructing prediction intervals across multiple test points, which enables us to avoid repeating the heavy computation of a matrix inverse for each test point. We propose an efficient algorithm that employs this fact, dramatically reducing the computational cost. We demonstrate the effectiveness and practical usefulness of the proposed algorithm in numerical experiments.
[1] |
R. F. Barber, E. J. Candes, A. Ramdas, R. J. Tibshirani, Predictive inference with the jackknife+, Ann. Statist., 49 (2021), 486–507. http://doi.org/10.1214/20-AOS1965 doi: 10.1214/20-AOS1965
![]() |
[2] | E. Burnaev, V. Vovk, Efficiency of conformalized ridge regression, In: Proceedings of The 27th Conference on Learning Theory, 35 (2014), 605–622. |
[3] | E. Burnaev, I. Nazarov, Conformalized kernel ridge regression, In: 2016 15th IEEE International Conference on Machine Learning and Applications, Anaheim, USA, 2016, 45–52. https://doi.org/10.1109/ICMLA.2016.0017 |
[4] | K. Buza, Feedback prediction for blogs, In: Data analysis, machine learning and knowledge discovery, Berlin: Springer, 2013,145–152. https://doi.org/10.1007/978-3-319-01595-8_16 |
[5] |
M. M. Campos, A. Farinhas, C. Zerva, M. A. T. Figueiredo, A. F. T. Martins, Conformal prediction for natural language processing: a survey, Trans. Assoc. Comput. Linguist., 12 (2024), 1497–1516. https://doi.org/10.1162/tacl_a_00715 doi: 10.1162/tacl_a_00715
![]() |
[6] | T. J. Cleophas, A. H. Zwinderman, Machine learning in medicine-a complete overview, Berlin: Springer, 2015. https://doi.org/10.1007/978-3-319-15195-3 |
[7] | P. Drineas, M. W. Mahoney, N. Cristianini, On the Nyström method for approximating a gram matrix for improved Kernel-based learning, J. Mach. Learn. Res., 6 (2005), 2153–2175. |
[8] |
F. Fiedler, S. Lucia, Improved uncertainty quantification for neural networks with Bayesian last layer, IEEE Access, 11 (2023), 123149–123160. https://doi.org/10.1109/ACCESS.2023.3329685 doi: 10.1109/ACCESS.2023.3329685
![]() |
[9] |
H. Gao, G. Kou, H. Liang, H. Zhang, X. Chao, C. C. Li, et al., Machine learning in business and finance: a literature review and research opportunities, Financ. Innov., 10 (2024), 86. https://doi.org/10.1186/s40854-024-00629-z doi: 10.1186/s40854-024-00629-z
![]() |
[10] |
J. Lei, M. G'Sell, A. Rinaldo, R. J. Tibshirani, L. Wasserman, Distribution-free predictive inference for regression, J. Amer. Statist. Assoc., 113 (2018), 1094–1111. https://doi.org/10.1080/01621459.2017.1307116 doi: 10.1080/01621459.2017.1307116
![]() |
[11] |
L. E. Makili, J. A. Vega Sánchez, S. Dormido-Canto, Active learning using conformal predictors: application to image classification, Fusion Sci. Technol., 62 (2012), 347–355. https://doi.org/10.13182/FST12-A14626 doi: 10.13182/FST12-A14626
![]() |
[12] |
M. Redmond, A. Baveja, A data-driven software tool for enabling cooperative information sharing among police departments, Eur. J. Oper. Res., 141 (2002), 660–678. https://doi.org/10.1016/S0377-2217(01)00264-8 doi: 10.1016/S0377-2217(01)00264-8
![]() |
[13] | G. Shafer, V. Vovk, A tutorial on conformal prediction, J. Mach. Learn. Res., 9 (2008), 371–421. |
[14] | M. H. Shaker, E. Hüllermeier, Ensemble-based uncertainty quantification: Bayesian versus credal inference, In: Proceedings. 31. Workshop Computational Intelligence, Berlin, 2021. |
[15] |
J. Vazquez, J. C. Facelli, Conformal prediction in clinical medical sciences, J. Healthc. Inform. Res., 6 (2022), 241–252. https://doi.org/10.1007/s41666-021-00113-8 doi: 10.1007/s41666-021-00113-8
![]() |
[16] | V. Vovk, A. Gammerman, G. Shafer, Algorithmic learning in a random world, New York: Springer, 2005. |
[17] |
T. Wuest, D. Weimer, C. Irgens, K. D. Thoben, Machine learning in manufacturing: advantages, challenges, and applications, Prod. Manuf. Res., 4 (2016), 23–45. https://doi.org/10.1080/21693277.2016.1192517 doi: 10.1080/21693277.2016.1192517
![]() |
[18] |
Y. Yang, M. Pilanci, M. J. Wainwright, Randomized sketches for kernels: fast and optimal nonparametric regression, Ann. Statist., 45 (2017), 991–1023. https://doi.org/10.1214/16-AOS1472 doi: 10.1214/16-AOS1472
![]() |