stat.MLJul 21, 2025

Conformal and kNN Predictive Uncertainty Quantification Algorithms in Metric Spaces

Authors: Gábor LugosiMarcos Matabuena

Organizations: Department of Economics and Business, Pompeu Fabra University, Barcelona, Spain · ICREA, Pg. Lluís Companys 23, 08010 Barcelona, Spain · Barcelona Graduate School of Economics · Mohamed bin Zayed University of Artificial Intelligence · Department of Biostatistics, Harvard University, Boston, MA 02115, USA · Universidad de Santiago de Compostela

Abstract

This paper introduces a framework for uncertainty quantification in regression models defined on metric spaces. Using a proposed notion of homoscedasticity, we define a conformal prediction algorithm that provides finite-sample marginal coverage guarantees and fast convergence rates to the oracle prediction region. For heteroscedastic settings, we introduce a kNN procedure that yields locally adaptive prediction radii in general metric spaces. Although this procedure does not provide the same finite-sample guarantees as the conformal algorithm, it is designed to improve local coverage calibration without imposing smoothing assumptions. Both procedures are compatible with a broad range of regression algorithms and scale to large datasets, allowing practitioners to use their preferred models and incorporate domain-specific knowledge. Building on the heteroscedastic kkNN approach, we also develop a flexible sequential extension for metric-space-valued time series based on nearest-neighbor expert aggregation. We establish the consistency of the proposed estimators under minimal conditions. Finally, we illustrate the practical utility of our framework in personalized medicine applications involving random objects such as probability distributions and graph Laplacians.

Explore similar work

CardsList
  1. Isotonic Conformal Prediction

    Jul 18, 2026Daniel Bensimon, Sean Xiang Yu, Eric D. Kolaczyk +1Conformal PredictionReliable Uncertainty Quantification