# Sample Transform Cost-Based Training-Free Hallucination Detector for Large Language Models

*Zeyang Ding, Xinglin Hu, Jicong Fan*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/154259) · [OpenReview](https://openreview.net/forum?id=F6wp9J9jVl) · [alphaXiv](https://www.alphaxiv.org/abs/2603.22303) · [Open on the map](../papers.html#p154259)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Hallucination Detection Methods](../pgroup/500.md) · Type: new method · Keywords: hallucination detection, training-free methods, Wasserstein distance, representation complexity, black-box LLMs

Areas: [Safety & Security](../areas/safety.md) › Language Model Security › Hallucination Detection; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Safety › Hallucination and Text Detection

## Summary
Sample Transform Cost-Based Training-Free Hallucination Detector is a training-free method that leverages sample-to-sample transform costs in representation space to detect hallucinations in large language models.

## Explained to a 5-year-old
Large language models are computers that write sentences, but sometimes they make up facts that aren't true. To catch these mistakes, we can ask the model many possible answers to the same question and look at how different those answers are. If the answers are very different from each other, it often means the model is unsure or has made something up. We also use a helper model to check the answers when we don't have direct access to the original model. This way we can spot lies without having to teach a new system how to do it.

## Explained to a 5-year-old, longer
Large language models are like smart computers that can write stories, answer questions, and have conversations. Sometimes they write things that aren't true, which we call "hallucinations." To find these made-up facts, we can ask the model many different answers to the same question. Each answer is a sequence of words, and we can look at how similar or different those answers are. We turn each answer into a collection of hidden numbers that represent the words. Then we measure the cost to change one answer's numbers into another answer's numbers using a special distance called Wasserstein. If the answers are very far apart, it often means the model is uncertain or has made something up. We also look at how complex the pattern of distances is, which tells us another clue about hallucinations. For models we cannot see inside (black-box models), we use a simpler helper model to create similar hidden numbers. This helper model helps us get the same kind of distance information without needing the original model's details. By combining these two clues-average distance and complexity-we can spot hallucinations without training a new system. This approach works for many different language models and many different test sets, making it useful in real situations.

## For a technical reader
The paper addresses the problem of detecting hallucinations-incorrect or fabricated facts-in large language models (LLMs) that are deployed in production. It proposes a training-free detector that samples multiple responses to a prompt, converts each response into an empirical distribution over token hidden embeddings, and computes pairwise Wasserstein distances to form a transform-cost matrix. Two signals are derived from this matrix: the average Wasserstein distance (AvgWD) and a spectral complexity measure (EigenWD), which together indicate when the model’s output distribution becomes unusually complex-a sign of hallucination. To work with black-box LLMs, the authors use an auxiliary model to generate consistent representation-space signals, extending the detector beyond models with open internals. Experiments on five open-source LLMs and four benchmarks show that the detector achieves competitive or better AUROC compared to existing training-free baselines, offering a practical way to monitor LLM reliability.

## Problem
Hallucinations in large language models hinder trustworthy deployment, and existing detection methods often require training or access to model internals. The unknown response distribution, represented by variable-length token sequences, makes it challenging to directly estimate its complexity.

## Method
The approach represents each sampled response as an empirical distribution over token hidden embeddings and computes pairwise Wasserstein distances between responses to form a transform-cost matrix. From this matrix, two signals are derived: the average Wasserstein distance (AvgWD) and the spectral complexity (EigenWD), which together indicate hallucination presence. For black-box LLMs, an auxiliary model is used to construct representation-space consistency signals.

## Results
Across five open-source LLMs and four benchmarks, AvgWD and EigenWD achieve competitive or superior AUROC compared to existing training-free uncertainty baselines.

## Contributions
The paper provides a training-free hallucination detection framework that leverages distributional complexity in token-level representation space and extends to black-box LLMs via an auxiliary model. It introduces two complementary signals, AvgWD and EigenWD, that capture average transform cost and spectral complexity, respectively.

## Practical relevance
The detector enables practical, training-free hallucination monitoring for deployed black-box language models, improving trustworthiness without additional model training.

## Research questions this paper is counted under

- [How can hallucination detection be performed without model-specific training or internal access?](../q/75.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/154259)
