Robust Conformal Prediction with a Single Binary Certificate

Soroush H. Zargarbashi, Aleksandar Bojchevski

Abstract

Conformal Prediction (CP) provides a framework for generating prediction sets with rigorous statistical coverage guarantees. However, these guarantees typically rely on the exchangeability of calibration and test data, an assumption that fails under adversarial perturbations. Existing robust CP methods address this through randomized smoothing but suffer from extreme computational overhead, requiring tens of thousands of Monte Carlo samples and per-point optimization. This paper introduces BinCP (Binarized Conformal Prediction), a method that achieves formal robustness guarantees with significantly higher efficiency. By binarizing conformity scores and leveraging the symmetry of smoothing distributions, BinCP reduces the required sample size by orders of magnitude and collapses the complex per-point certification into a single global calculation.

Introduction

Modern neural networks are frequently overconfident, making reliable uncertainty quantification essential for safety-critical applications. Conformal Prediction has emerged as a leading solution, transforming point predictions into sets of labels guaranteed to contain the ground truth with a user-defined probability (e.g., 90%).

Despite its utility, standard CP is fragile. A malicious actor can introduce imperceptible noise to a test input, breaking the exchangeability between the calibration and test distributions and causing coverage guarantees to vanish. While "Robust CP" methods have been proposed to counter this using randomized smoothing, they are often too slow for practical use. These methods typically require solving a separate optimization problem for every data point and demand massive Monte Carlo sampling to produce meaningful results. Without these samples, previous methods often return "empty" or "all-label" sets, rendering them useless in practice.

The BinCP Framework

BinCP addresses these limitations through three primary innovations that simplify the mathematical and computational requirements of robust uncertainty quantification.

1. Binarization of Conformity Scores

Instead of calculating continuous conformity scores, BinCP applies a threshold $\tau$ to the model outputs. The smoothed score then represents a simple probability: the likelihood that a noisy version of the input produces a score exceeding $\tau$. This transformation allows the authors to treat the problem as a series of Bernoulli trials.

2. The Single Binary Certificate

A core contribution of this work is Lemma 2, which identifies a "Single Binary Certificate." The authors prove that for common smoothing distributions (such as Gaussian or Sparse smoothing), the symmetry of the noise allows the complex task of certifying every individual point to be collapsed. They demonstrate that a single certificate calculation based on the global conformal threshold is sufficient to maintain the coverage guarantee across the entire dataset. This eliminates the need for per-point optimization, which was the primary bottleneck in prior state-of-the-art methods.

3. Statistical Efficiency via Clopper-Pearson

Because Monte Carlo sampling introduces statistical error, robust methods must use confidence intervals to remain conservative. BinCP utilizes Clopper-Pearson confidence intervals, which are specifically optimized for binary (Bernoulli) variables. These intervals are significantly tighter than the general-purpose Hoeffding inequalities used in previous research, allowing BinCP to achieve high precision with far fewer samples.

Experimental Evaluation

The authors evaluated BinCP across multiple domains, including image classification (CIFAR-10, ImageNet) and node classification in graphs (Cora-ML). They tested the method against various smoothing schemes, including isotropic Gaussian noise for $\ell_2$ robustness and Sparse smoothing for discrete data.

Key Findings

  • Sample Efficiency: BinCP achieves robust results with as few as 150 Monte Carlo samples. In contrast, previous methods like CAS required upwards of 2,000 samples just to avoid returning trivial (all-label) sets, and often required 10,000 samples to match BinCP's performance.
  • Computational Speedup: By replacing per-point optimization with a single global calculation, BinCP's runtime remains nearly constant regardless of the number of calibration nodes. This represents a massive speedup over previous linear-scaling approaches.
  • Set Quality: On ImageNet, BinCP produces significantly smaller and more informative prediction sets. At low sample rates where previous methods fail, BinCP maintains useful set sizes (e.g., ~10 labels vs. 1,000 labels).
  • Certified Robustness: In adversarial scenarios where vanilla CP coverage drops to 0%, BinCP successfully maintains the target 90% coverage.

Discussion and Limitations

While BinCP represents a significant leap in efficiency, it still carries the inherent overhead of randomized smoothing, requiring multiple forward passes through the model. This makes it slower than non-robust CP, though much faster than its robust predecessors.

Furthermore, the robustness provided is specifically against adversarial noise within a defined radius ($r$). While this protects against targeted attacks, it does not necessarily guarantee coverage under broader distribution shifts (such as environmental changes in lighting or weather) unless those shifts can be mathematically bounded as perturbations. Future work remains to be done in extending these certificates to inductive graph settings and more general forms of data shift.

Summary updated

BibTeX
@inproceedings{zargarbashi2025robust,
  author = {Soroush H. Zargarbashi and Aleksandar Bojchevski},
  title = {{Robust Conformal Prediction with a Single Binary Certificate}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=ltrxRX5t0H},
}
Figure