Conformal Alignment: Knowing When to Trust Foundation Models with Guarantees

Yu Gui, Ying Jin, Zhimei Ren

TL;DR

Conformal Alignment (CA) is a new framework that provides a rigorous statistical guarantee for foundation model outputs, ensuring that a user-specified fraction of "certified" responses are truly accurate. By using a small amount of reference data to calibrate a lightweight predictor, CA allows practitioners to safely deploy LLMs and vision-language models in high-stakes fields—like medicine—by knowing exactly when to trust the model and when to defer to a human.

The Challenge: Trusting Black-Box Models in High-Stakes Tasks

Foundation models, including large language models (LLMs) like LLaMA and vision-language models, are incredibly capable but notoriously prone to "hallucinations," factual errors, and biases. In high-stakes scenarios—such as generating a radiology report from a chest X-ray—a single error can have grave consequences.

The current state-of-the-art for uncertainty quantification, Conformal Prediction (CP), typically generates a set of possible answers to ensure the correct one is included. However, in generative tasks, a user doesn't want a list of ten possible radiology reports; they want one report they can trust. The challenge is: how do we select only the "aligned" (correct and safe) outputs from a black-box model while maintaining a mathematical guarantee on the error rate?

Introducing Conformal Alignment

The authors introduce Conformal Alignment (CA), which shifts the focus from "predicting a set" to "selecting trustworthy units."

Overview of the Conformal Alignment framework

The process works in three main stages:

  1. Predictor Training: Using a small set of reference data with known ground-truth alignment, the framework trains a lightweight "alignment predictor" (like logistic regression or a random forest). This predictor evaluates features like the model’s self-reported confidence, semantic entropy, and lexical similarity across multiple generated samples to estimate the probability that an output is correct.
  2. Confidence Calibration: On a separate calibration set, the system calculates "conformal p-values." These p-values quantify the evidence that a new, unseen output is actually aligned with human values.
  3. Selective Deployment: Finally, for new test data, the framework uses the Benjamini-Hochberg (BH) procedure to set a data-dependent threshold. Only outputs that exceed this threshold are "certified" for deployment.

The core advantage of this method is that it provides False Discovery Rate (FDR) control. If you set your acceptable error level ($\alpha$) to 1%, the framework guarantees that, on average, at least 99% of the deployed reports will be truly aligned.

Key Insights and Results

The researchers evaluated their framework on Question Answering (TriviaQA, CoQA) using OPT-13B and LLaMA-2-13B-chat, and Medical Imaging (MIMIC-CXR) using a fine-tuned Vision Transformer (ViT) + GPT-2 pipeline.

  • Strict Error Control vs. Overconfident Heuristics: The paper demonstrates that simply asking an LLM "Is your answer correct?" (Self-Evaluation) is a poor safety mechanism. Models are frequently overconfident, and thresholding their raw confidence scores fails to provide actual error guarantees. In contrast, Conformal Alignment successfully keeps the realized FDR below the target $\alpha$ level across all experiments.
  • The "Knowing When You Don't Know" Advantage: Instead of trying to fix the model's internal logic, CA acts as a rigorous quality control filter. If the model is unsure, the system abstains from selecting that unit, signaling that a human expert should take over.
  • Feature Informativeness: Not all uncertainty metrics are created equal. Features based on Jaccard similarity (measuring overlap between multiple generated answers) and Semantic Entropy were far more effective at predicting alignment than the model's internal likelihood scores.
FDR and Power across different sample sizes and models
  • High Efficiency with Small Data: You don't need a massive dataset to make this work. As shown in the performance curves, as few as 500 reference samples are sufficient to achieve high "power" (the ability to select many correct outputs) while strictly maintaining the safety guarantee.
  • Model Comparison: More powerful models (like LLaMA-2 vs. OPT) yield higher power. While CA keeps both models safe, it can certify and deploy a much larger percentage of LLaMA-2's outputs because they are inherently more aligned.

Limitations and Future Work

The primary limitation of the current framework is its reliance on automated proxies for the alignment score (e.g., Rouge-L for text or CheXbert for medical labels), which can sometimes diverge from actual human judgment.

Future work aims to incorporate actual human evaluation labels into the calibration process, extend the framework to handle multi-task and in-context learning settings, and explore other error notions beyond FDR that might be more relevant for specific downstream clinical decisions.

Summary updated

BibTeX
@inproceedings{gui2024conformal,
  author = {Yu Gui and Ying Jin and Zhimei Ren},
  title = {{Conformal Alignment: Knowing When to Trust Foundation Models with Guarantees}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=YzyCEJlV9Z},
}
Figure