Introduction
Evaluating Large Language Models (LLMs) is a complex and resource-intensive task. Traditional benchmarks often rely on Multiple Choice Questions (MCQs), which offer limited information density—typically only 1-2 bits per prompt. Moreover, these evaluations primarily focus on unstructured text, making it difficult to precisely quantify "hallucinations," where models present false information as fact.
This research proposes a novel approach: using mathematically structured graphs as a probe. A single request for an $n$-node graph can extract $O(n^2)$ bits of information, allowing for a more efficient audit of model reliability. By employing topological metrics such as density, assortativity, and degree distribution, researchers can precisely measure the structural "distance" between a model's output and the ground truth.
Methodology
The study investigates two primary research questions:
- RQ1: Recitation (Memorization): 21 LLMs were prompted to provide Python edge lists for well-known networks, including Zachary’s Karate Club and the Les Misérables character graph. Performance was measured using topological statistics and a new metric, Graph Atlas Distance (GAD), which calculates the average edit distance across a set of standard graphs from the Graph Atlas.
- RQ2: Generation (Emergent Ability): 25 models were tasked with generating Erdős–Rényi (ER) random graphs based on specific parameters ($n$ nodes and edge probability $p$). The statistical validity of these generated graphs was assessed using a $\chi^2$ hypothesis test on the degree distribution.
The researchers also explored the impact of Chain-of-Thought (CoT) prompting and varying sampling temperatures on the quality of the generated structures.
Key Insights
- High-Density Probing: Graph-based queries are highly "request-efficient." A small number of graph recitation tasks can reveal a model's propensity for hallucination as effectively as tens of thousands of text-based MCQs.
- The Hallucination Correlation: Performance on just five small graphs (the GAD metric) was found to correlate strongly with rankings on much larger external benchmarks, such as the Vectara Hallucination Leaderboard. This suggests that graph recitation is a powerful proxy for general factuality.
- Global vs. Local Knowledge: Models frequently retain global features (e.g., node counts) but fail to accurately reproduce specific local topologies (edges). This indicates that while models ingest structured data during training, they do not necessarily "encode" the underlying structure accurately.
- The Temperature Paradox: In generative tasks, higher sampling temperatures led to poorer adherence to formatting rules but improved the statistical quality of the produced randomness.
Results
The evaluation revealed that no model is currently perfect at graph recitation. Even high-performing models like dbrx-instruct introduced hallucinated edges when attempting to recreate the Karate Club graph. gpt-4o stood out as the only model capable of achieving perfect isomorphism on the smallest graphs in the Graph Atlas.
In the random generation tasks, models achieved an average success rate of approximately 45%. Orca-2-13b performed surprisingly well in this category. Furthermore, CoT prompting was found to significantly improve performance for sparse graphs ($p \le 1/n$) but provided diminishing returns for denser structures.
Conclusion and Future Work
While graph-based evaluation provides a rigorous framework for measuring hallucinations, the study acknowledges certain limitations. The $\chi^2$ test used for random graphs is relatively lenient, and it remains challenging to distinguish between true emergent reasoning and the regurgitation of training data. Future research could expand this work by investigating "labeling mismatches" and scaling the evaluation to much larger graph structures.
Summary updated