Papers › HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detection

HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detection

26 Sep 2024arXiv:2409.17504archive 2025-07-28

Xuefeng Du, Chaowei Xiao, Yixuan Li

The surge in applications of large language models (LLMs) has prompted concerns about the generation of misleading or fabricated information, known as hallucinations. Therefore, detecting hallucinations has become critical to maintaining trust in LLM-generated content. A primary challenge in learning a truthfulness classifier is the lack of a large amount of labeled truthful and hallucinated data. To address the challenge, we introduce HaloScope, a novel learning framework that leverages the unlabeled LLM generations in the wild for hallucination detection. Such unlabeled data arises freely upon deploying LLMs in the open world, and consists of both truthful and hallucinated information. To harness the unlabeled data, we present an automated membership estimation score for distinguishing between truthful and untruthful generations within unlabeled mixture data, thereby enabling the training of a binary truthfulness classifier on top. Importantly, our framework does not require extra data collection and human annotations, offering strong flexibility and practicality for real-world applications. Extensive experiments show that HaloScope can achieve superior hallucination detection performance, outperforming the competitive rivals by a significant margin. Code is available at https://github.com/deeplearningwisc/haloscope.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2409.17504")

Code

Syntology Ran 14 of 16 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · our draft was wrong; 2 ran · fixture could not drive it; 9 ran with no contract checked.

By repository: found in paper text by Syntology: 16 samples from 1 repository, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

deeplearning-wisc/haloscope found in paper text by Syntology report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 14 ran; 1 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
2ran · our draft was wrong
2ran · fixture could not drive it
9ran
2unverified

Licence: 16 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from deeplearning-wisc/haloscope. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv deeplearning-wisc/haloscope/llama_iti/modeling_llama.py found in paper text by Syntology ran · fixture could not drive it fingerprinted no licence file found · pointer only · 30d7eec482ebf6b1 · report
accuracy deeplearning-wisc/haloscope/linear_probe.py found in paper text by Syntology ran no licence file found · pointer only · 31f45aff0c4290a2 · report
apply_rotary_pos_emb deeplearning-wisc/haloscope/llama_iti/modeling_llama.py found in paper text by Syntology ran · fixture could not drive it no licence file found · pointer only · d61c483a3c2b3156 · report
cluster_acc deeplearning-wisc/haloscope/ylib/ytool.py found in paper text by Syntology ran no licence file found · pointer only · 0f87c7b11ad6cedb · report
compute_intermediate_size deeplearning-wisc/haloscope/llama_iti/convert_llama_weights_to_hf.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · 507f475feb734647 · report
format_truthfulqa deeplearning-wisc/haloscope/utils.py found in paper text by Syntology ran no licence file found · pointer only · 2b0f9e1f6130bf16 · report
format_truthfulqa_end_q deeplearning-wisc/haloscope/utils.py found in paper text by Syntology ran no licence file found · pointer only · d3900ac9d63a27db · report
fpr_and_fdr_at_recall deeplearning-wisc/haloscope/metric_utils.py found in paper text by Syntology ran no licence file found · pointer only · 1134ab62338793e2 · report
get_measures deeplearning-wisc/haloscope/metric_utils.py found in paper text by Syntology ran no licence file found · pointer only · 9b1abfca5a67be06 · report
read_json deeplearning-wisc/haloscope/llama_iti/convert_llama_weights_to_hf.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · c5bcf01d18bba63d · report
rotate_half deeplearning-wisc/haloscope/llama_iti/modeling_llama.py found in paper text by Syntology ran · our draft was wrong fingerprinted no licence file found · pointer only · b99eea6376d1e212 · report
set_optimizer deeplearning-wisc/haloscope/linear_probe.py found in paper text by Syntology ran no licence file found · pointer only · a44a1925c2c778ba · report
stable_cumsum deeplearning-wisc/haloscope/metric_utils.py found in paper text by Syntology ran · honoured contract fingerprinted no licence file found · pointer only · d4acb3120a027622 · report
train deeplearning-wisc/haloscope/linear_probe.py found in paper text by Syntology ran no licence file found · pointer only · e01d82ee5f1bfbdd · report
tokenized_tqa deeplearning-wisc/haloscope/utils.py found in paper text by Syntology unverified no licence file found · pointer only · 86d6684648b96be2 · report
write_model deeplearning-wisc/haloscope/llama_iti/convert_llama_weights_to_hf.py found in paper text by Syntology unverified no licence file found · pointer only · 4681d3d61616d9e0 · report

Tasks

Hallucination

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections