No Free Lunch: Fundamental Limits of Learning Non-Hallucinating Generative Models

Changlong Wu, Ananth Grama, Wojciech Szpankowski · DOI

Introduction

Generative models, particularly Large Language Models (LLMs), have demonstrated a remarkable ability to synthesize information and generate human-like text. However, they are frequently plagued by "hallucinations"—the generation of content that is factually incorrect or logically inconsistent despite appearing plausible. While empirical strategies such as Reinforcement Learning from Human Feedback (RLHF) and Retrieval-Augmented Generation (RAG) have been deployed to mitigate these issues, a rigorous mathematical understanding of why hallucinations occur has remained elusive.

This paper provides a formal theoretical analysis of the fundamental statistical limits of learning non-hallucinating generative models. The authors demonstrate that hallucinations are not merely a byproduct of noisy training data but represent a fundamental "No Free Lunch" theorem for truth: even with 100% truthful data, learning a non-hallucinating model is impossible without specific structural assumptions.

Defining the Hallucination Problem

To analyze the problem mathematically, the authors define a Hallucination Rate, which quantifies the probability mass a model assigns to "non-fact" instances. They introduce a Demonstrator ($q$), representing a ground-truth data source that is assumed to be "faithful" (it only provides true facts).

A central tension in generative modeling is the desire for the model to be informative—to generate a wide range of true facts beyond what was explicitly seen in the training set—without straying into the territory of falsifiable errors. The paper asks a fundamental "meta-problem": What structural assumptions are necessary to achieve non-hallucinating learnability?

The Theoretical Framework

The study utilizes a learning-theoretic framework, distinguishing between two types of learners:

  • Proper Learners: These are constrained to select a model from a specific hypothesis class $\mathcal{H}$ (e.g., a specific neural network architecture).
  • Improper Learners: These are unconstrained and can output any distribution, provided it satisfies the required criteria.

The complexity of the "set of facts" ($\mathcal{T}$) is measured using Vapnik-Chervonenkis (VC) dimension, a standard metric in computational learning theory. Additionally, information-theoretic measures like Shannon entropy are used to ensure that models do not avoid hallucinations by simply becoming uninformative (e.g., by only outputting a single known fact).

Key Results: Impossibility and Possibility

The paper’s findings are centered on two primary theorems that define the boundaries of what is learnable.

1. The Impossibility of Proper Learning

Theorem 1 establishes that agnostic proper learning is generally impossible. The authors prove that there exists a hypothesis class of size two where any learner will hallucinate with high probability, regardless of the amount of training data provided. This suggests that simply picking a "good" model architecture and training it on perfect data is insufficient to guarantee truthfulness.

2. The Role of VC-Dimension

The most significant breakthrough of the paper is the identification of VC-dimension as the critical factor for non-hallucinating learning. Theorem 2 states that if the set of facts $\mathcal{T}$ belongs to a concept class $\mathcal{C}$ with a finite VC-dimension, then an improper learner can achieve a state where the hallucination rate is effectively zero.

This implies that for a model to be truthful, the "truth" itself must have a learnable structure. If the space of facts is too complex (infinite VC-dimension), no amount of data can prevent hallucinations.

3. Sample Complexity

The authors derive the number of samples ($n$) required to learn a non-hallucinating model. They show that the sample complexity scales linearly with the VC-dimension ($d$) of the facts set: $$n \leq O\left(\frac{VC(\mathcal{C}) \log(1/\epsilon) + \log(1/\delta)}{\epsilon}\right)$$ They also provide a matching lower bound of $\Omega(d/\epsilon)$, confirming that VC-dimension is the correct metric for characterizing this problem.

Discussion and Limitations

While the paper provides a groundbreaking theoretical foundation, it also acknowledges several limitations. The proposed "meta-algorithms" (such as the argmax learning rule) are conceptual and not currently computationally efficient for use in standard stochastic gradient descent (SGD) loops. Furthermore, the theory assumes an unconstrained demonstrator, which may not perfectly capture the nuances of real-world data distributions.

The findings suggest that the path forward for AI safety and reliability lies in incorporating stronger inductive biases. By restricting the set of possible facts to those with learnable structures—perhaps through logical constraints or structured human feedback—we can move closer to generative models that are both creative and consistently truthful.

Conclusion

This research shifts the conversation on hallucinations from empirical "patching" to fundamental statistical theory. By proving that data alone cannot guarantee a non-hallucinating model, the authors highlight the indispensable role of structural assumptions and inductive biases in the design of future AI systems.

Summary updated

BibTeX
@inproceedings{wu2025no,
  author = {Changlong Wu and Ananth Grama and Wojciech Szpankowski},
  title = {{No Free Lunch: Fundamental Limits of Learning Non-Hallucinating Generative Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=OwNoTs2r8e},
}
Figure