Abstract
Generative Language Models (GLMs) often produce confident hallucinations, which are factually incorrect statements delivered with high certainty. This paper introduces Selective Generation (SGen), a framework that enables models to abstain from answering when the risk of hallucination is high. By utilizing textual entailment as a correctness metric and a semi-supervised learning approach grounded in conformal prediction, SGen provides a theoretical guarantee on the maximum hallucination rate (False Discovery Rate) while maintaining high selection efficiency. Experiments on the Natural Questions dataset demonstrate that SGen significantly outperforms traditional exact-match baselines.
Introduction: The Challenge of Hallucination
Large Language Models (LLMs) are notorious for stating falsehoods with extreme confidence, a phenomenon known as hallucination. In high-stakes fields like medicine or law, this lack of reliability is a major barrier to adoption. While "Selective Prediction"—where a model chooses to remain silent rather than guess—works for simple classification, it often fails in open-ended text generation due to metric misalignment.
Traditional safety mechanisms often rely on "Exact Match" metrics, which require a generated answer to perfectly match a reference string. This is too restrictive; a model might provide a factually correct answer that is phrased differently, leading the safety mechanism to reject it. This results in a "vacuously safe" model that stops answering almost everything. SGen addresses this by shifting the focus from string matching to semantic truth.
Methodology: The SGen Framework
The authors propose the SGen family of algorithms to control the False Discovery Rate with respect to Entailment (FDR-E). This approach ensures that the model only provides answers that are highly likely to be semantically correct.
Textual Entailment as Truth
Instead of checking for an exact word-for-word match, SGen verifies if the generated answer $\hat{A}$ entails the ground truth $A_{true}$. This allows for linguistic flexibility—for example, recognizing that "Paris is France's capital" and "The capital of France is Paris" convey the same fact.
SGenSemi: Semi-Supervised Calibration
To overcome the high cost of human-annotated entailment labels, the researchers developed SGenSemi. This algorithm uses a small labeled set to learn an "entailment set function" via Conformal Prediction. This function then pseudo-labels a large volume of unlabeled data (up to 27,000 samples). By applying PAC (Probably Approximately Correct) learning theory, the framework ensures that the safety guarantees remain mathematically sound even when using these pseudo-labels.
Neuro-Selection Functions
Traditional methods often rely on a single confidence threshold. SGen introduces "neuro-selection," which combines multiple uncertainty signals—such as self-consistency (repeatedly asking the same question to check for stable answers) and log-probabilities—into a neural network. This allows the system to make more nuanced decisions about when to abstain, significantly increasing the model's "answering power" without sacrificing safety.
Experimental Setup and Results
The researchers evaluated SGen using the Natural Questions (NQ) dataset, creating a new layer called NQ-Entailment with approximately 12,000 manually annotated samples for models like Alpaca-7B and GPT-3.5-Turbo.
- Guaranteed Safety: Both supervised (SGenSup) and semi-supervised (SGenSemi) versions successfully kept the hallucination rate below user-defined targets (e.g., 25%) with high statistical confidence.
- Superior Efficiency: SGenSemi demonstrated superior efficiency. On GPT-3.5-Turbo, it achieved an average efficiency of 0.7334, meaning the model could safely answer over 73% of questions while maintaining the risk guarantee.
- Model Agnostic: The approach worked effectively for both open-source (Alpaca) and closed-source (GPT-3.5) models, requiring no access to internal model weights for the selection process.
Conclusion and Future Work
Selective Generation provides a rigorous mathematical path for managing LLM uncertainty. By aligning safety metrics with semantic meaning and leveraging semi-supervised calibration, SGen allows models to be both more useful and more honest about their limitations. Future research will focus on relaxing the assumption that deployment data matches calibration data (I.I.D. assumption) and further optimizing the computational cost of entailment classifiers to make these guarantees even more robust for real-world applications.
Summary updated