Federated Conformal Predictors for Distributed Uncertainty Quantification

Charles Lu, Yaodong Yu, Sai Praneeth Karimireddy, Michael Jordan, Ramesh Raskar

TL;DR

This paper introduces Federated Conformal Prediction (FCP), a framework that brings rigorous uncertainty quantification to federated learning. By introducing a novel "partial exchangeability" assumption, the authors provide a way to generate prediction sets—rather than just single guesses—that are guaranteed to contain the correct answer with high probability, even when data is spread across heterogeneous clients.

The Challenge: Uncertainty in Federated Networks

In safety-critical fields like medicine or autonomous driving, a machine learning model shouldn't just output a "best guess"; it needs to express its uncertainty. Conformal Prediction (CP) is a powerful, post-hoc tool for this. Instead of a single class label, it produces a prediction set (e.g., "this image is 90% likely to be either a dog or a cat") with a mathematical guarantee on marginal coverage.

However, standard CP relies heavily on the assumption of exchangeability—essentially, that your training data and your test data are drawn from the same distribution (IID). In Federated Learning (FL), where models are trained collaboratively across many different hospitals or edge devices, this assumption completely falls apart. One hospital might see mostly rare diseases, while another sees common ones, creating severe data heterogeneity. If you calibrate your uncertainty based on one localized distribution, the mathematical guarantees won't hold up globally. This paper solves the problem of how to provide rigorous CP guarantees when data is non-IID and distributed across a network.

Federated Conformal Prediction (FCP)

To bridge this gap, the authors propose the Federated Conformal Prediction (FCP) framework. The mathematical "secret sauce" behind FCP is a relaxed assumption called partial exchangeability. Instead of assuming all data globally is identical, FCP assumes data is exchangeable within each specific client, and that the final test point is drawn from a mixture of those client distributions. This allows for finite-sample coverage guarantees that actually hold in real-world federated settings.

The Federated Conformal Prediction (FCP) framework generates rigorous prediction sets from distributed client data.

The FCP pipeline operates in two main stages:

  1. Model Training: The authors recommend using Train-Convexify-Train (TCT), a recent FL optimization method, rather than standard algorithms like FedAvg. Standard methods often produce poorly calibrated models under high heterogeneity, leading to massive, uninformative prediction sets.
  2. Distributed Calibration: To find the global "quantile" needed to construct conformal sets without violating privacy, clients compute "conformity scores" locally. Instead of sending raw scores to a central server, they send a compressed, privacy-preserving "sketch" of their score distribution using an algorithm called T-Digest. The central server aggregates these sketches to find a global threshold that ensures the desired coverage (e.g., 90% confidence).

Key Insights and Efficiency Gains

Heterogeneity is the Enemy of Efficiency

While it is technically possible to get coverage guarantees with standard FL models, the resulting prediction sets are often impractically large. If a model is poorly calibrated due to non-IID data, the conformal procedure compensates by expanding the prediction set—sometimes including almost every possible class just to meet the 90% coverage guarantee.

TCT is the "Efficiency Engine"

The choice of federated optimization algorithm plays a massive role in the usefulness of the resulting prediction sets. The authors demonstrate that using TCT instead of FedAvg or FedProx significantly shrinks the size of the prediction sets.

Histogram comparing prediction set sizes across federated models. TCT produces much smaller, more precise sets compared to FedAvg and FedProx.

In high-heterogeneity scenarios (e.g., on CIFAR-100), FedAvg produced prediction sets that were 3.8x larger than a centralized baseline. In contrast, FCP using TCT was only 1.2x larger, making the uncertainty estimates much tighter and more practical for end-users.

Selective Classification

A powerful application highlighted in the paper is using prediction set size as a filter for selective classification. By only trusting the model's prediction when the conformal set size is small (indicating high confidence), the authors boosted accuracy on the real-world Fitzpatrick17K skin lesion dataset from 53% to 95%.

Datasets and Theoretical Results

The researchers evaluated FCP on a mix of standard computer vision (FashionMNIST, CIFAR-10/100) and specialized medical imaging datasets (DermaMNIST, PathMNIST, TissueMNIST, and Fitzpatrick17K).

Crucially, the authors provide a formal proof that FCP maintains marginal coverage between $1-\alpha$ and $1-\alpha + \frac{K}{N+K}$, where $K$ is the number of clients and $N$ is the total number of samples. They also demonstrated that T-Digest is superior to other distributed quantile methods (like DDSketch) at the high-confidence thresholds required for safety-critical applications.

Limitations and Future Work

  • Known Mixture Weights: The current theory assumes the "mixture weights" (how much each client contributes to the global test distribution) are known. While the authors discuss estimation techniques, unexpected test distribution shifts remain a challenge.
  • Communication Overhead: While T-Digest sketches are lightweight, the FCP framework still requires an additional round of communication for calibration after the model is fully trained.
  • Personalization: The paper focuses on calibrating a single global model. A promising future direction is extending this to Personalized Federated Learning, where individual clients receive tailored uncertainty guarantees specific to their local distributions.

Summary updated

BibTeX
@inproceedings{lu2023federated,
  author = {Charles Lu and Yaodong Yu and Sai Praneeth Karimireddy and Michael Jordan and Ramesh Raskar},
  title = {{Federated Conformal Predictors for Distributed Uncertainty Quantification}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=YVTr9PzIrK},
}
Figure