Conformal online model aggregation

Matteo Gasparin, Aaditya RamdasarXiv 2024 · DOI

Abstract

Conformal prediction offers a mathematically rigorous framework for attaching uncertainty intervals to black-box models. However, practitioners often face the dilemma of choosing a single model to "conformalize" from a pool of candidates. This paper introduces COMA (Conformal Online Model Aggregation), a meta-algorithm that adaptively aggregates multiple conformalized models in real-time. By dynamically updating weights based on model efficiency (set size) using an online learning approach, COMA provides robust uncertainty quantification that adapts to distribution shifts and consistently yields the most efficient prediction sets without sacrificing coverage guarantees.

Introduction

Standard conformal prediction (CP) typically requires fixing an underlying machine learning model in advance. If the chosen model is poorly specified or if the data distribution drifts over time, the resulting prediction intervals may become excessively large and lose their utility. While model selection is a potential solution, it is inherently risky in online settings where the "best" model may change frequently.

The authors address the challenge of model aggregation: combining the outputs of multiple conformalized models into a single, reliable prediction set. The goal is to produce a set that is as small as possible (efficient) while maintaining a guaranteed coverage rate (e.g., 95%).

Methodology: The COMA Framework

The core of COMA is a weighted majority vote mechanism. Given a set of models, each producing a $1-\alpha$ confidence interval, COMA assigns a weight to each model. A value is included in the final aggregated set only if the sum of the weights of the models including that value exceeds a specific threshold (approximately 0.5).

Graphical overview of the COMA framework.

Key Technical Components

  • AdaHedge Weighting: COMA utilizes a variant of the AdaHedge algorithm to update weights. Unlike standard online learning which minimizes prediction error, COMA minimizes the size (Lebesgue measure or cardinality) of the prediction sets. Models that consistently produce smaller, more efficient intervals are assigned higher weights.
  • Theoretical Guarantees: The authors prove that if the input sets have a miscoverage rate of $\alpha$, the aggregated set maintains a miscoverage rate of at most $2\alpha$, assuming a "negative correlation" between model errors and weights.
  • Centralized vs. Decentralized Architectures: The framework supports two modes. In the decentralized version, models act as black boxes sharing only their final sets. In the centralized version, models can collaborate to adjust internal error levels ($\alpha$) based on the aggregator's performance.

Experimental Evaluation

COMA was validated across diverse real-world and synthetic datasets, including NYC Airbnb pricing, Australian electricity pricing (ELEC2), and historical stock prices. It was also tested on classification tasks like Beijing air quality (PM10) and various UCI benchmarks including Crime, Aquatic Toxicity, and Diamonds.

Key Results

The experiments demonstrated that COMA effectively performs automated model selection in stable (iid) settings by quickly identifying and weighting the single best model. In non-iid settings characterized by data drift, COMA's weights fluctuate dynamically, shifting focus to the most suitable experts as performance degrades.

Across nearly all datasets, COMA achieved superior efficiency compared to a naive union of models. For instance, on the Airbnb dataset, COMA reduced the average set size to ~1.67, compared to 2.23 for the union, while strictly maintaining required coverage.

Discussion and Limitations

COMA represents a form of "online stacking" for prediction intervals, treating set size as the loss function to be minimized. This approach is particularly well-suited for federated learning or privacy-sensitive applications, as it only requires the sets produced by underlying models rather than raw data.

However, some challenges remain. While theory guarantees $1-2\alpha$ coverage, empirical results often show coverage closer to $1-\alpha$. Bridging this gap theoretically is an area for future work. Additionally, the primary theorem relies on a negative correlation between errors and weights, which is difficult to guarantee universally. Finally, extending COMA to delayed feedback scenarios remains a promising research direction.

Summary updated

BibTeX
@misc{gasparin2024conformal,
  author = {Matteo Gasparin and Aaditya Ramdas},
  title = {{Conformal online model aggregation}},
  year = {2024},
  eprint = {2403.15527},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.15527},
}
Figure