SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.17504 · NeurIPS · 2024

HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detection

Yixuan Li, Xuefeng Du, Chaowei Xiao

arXiv · PDF · Open in the Atlas

Code that ran

14 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 12 failures of our instrument; 2 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2409.17504.json · badge: /api/ran/2409.17504.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
deeplearning-wisc/haloscope canonical (classifier label)
classifier basis: census
14 ran · 2 no recorded run
FunctionStatusWhere it lives
repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/haloscope/llama_iti/modeling_llama.py
pointer only (licence: NONE) · get_code("30d7eec482ebf6b1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/haloscope/linear_probe.py
pointer only (licence: NONE) · get_code("31f45aff0c4290a2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/haloscope/llama_iti/modeling_llama.py
pointer only (licence: NONE) · get_code("d61c483a3c2b3156")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cluster_acc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/haloscope/ylib/ytool.py
pointer only (licence: NONE) · get_code("0f87c7b11ad6cedb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_intermediate_size Ran
ran, honoured the contract we drafted
deeplearning-wisc/haloscope/llama_iti/convert_llama_weights_to_hf.py
pointer only (licence: NONE) · get_code("507f475feb734647")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

format_truthfulqa Ran
ran; our contract draft was wrong, not the code
deeplearning-wisc/haloscope/utils.py
pointer only (licence: NONE) · get_code("2b0f9e1f6130bf16")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

format_truthfulqa_end_q Ran
ran; our contract draft was wrong, not the code
deeplearning-wisc/haloscope/utils.py
pointer only (licence: NONE) · get_code("d3900ac9d63a27db")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

fpr_and_fdr_at_recall Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/haloscope/metric_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from HaoyueBaiZJU/aha, is pointer only (licence: NONE) · get_code("1134ab62338793e2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_measures Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/haloscope/metric_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from HaoyueBaiZJU/aha, is pointer only (licence: NONE) · get_code("9b1abfca5a67be06")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_json Ran
ran; our contract draft was wrong, not the code
deeplearning-wisc/haloscope/llama_iti/convert_llama_weights_to_hf.py
pointer only (licence: NONE) · get_code("c5bcf01d18bba63d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

rotate_half Ran
ran; our contract draft was wrong, not the code
deeplearning-wisc/haloscope/llama_iti/modeling_llama.py
pointer only (licence: NONE) · get_code("b99eea6376d1e212")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

set_optimizer Ran
ran; our contract draft was wrong, not the code
deeplearning-wisc/haloscope/linear_probe.py
pointer only (licence: NONE) · get_code("a44a1925c2c778ba")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

stable_cumsum Ran
ran, honoured the contract we drafted
deeplearning-wisc/haloscope/metric_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from fanghenshaometeor/ood-kernel-pca-ext, is pointer only (licence: NONE) · get_code("d4acb3120a027622")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

train Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deeplearning-wisc/haloscope/linear_probe.py
pointer only (licence: NONE) · get_code("e01d82ee5f1bfbdd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tokenized_tqa Not yet run
unverified (harvested, no recorded run)
deeplearning-wisc/haloscope/utils.py
pointer only (licence: NONE) · get_code("86d6684648b96be2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

write_model Not yet run
unverified (harvested, no recorded run)
deeplearning-wisc/haloscope/llama_iti/convert_llama_weights_to_hf.py
pointer only (licence: NONE) · get_code("4681d3d61616d9e0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, deeplearning-wisc/haloscope when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 4 the same month, 9 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
rotate_half 360 other papers
178 dated earlier, 5 the same month, 168 later, 6 same year, order not determinable, 3 undated · 30 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 357 more not named here
repeat_kv 243 other papers
114 dated earlier, 4 the same month, 121 later, 2 same year, order not determinable, 2 undated · 22 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2305.17888 (2023-05)
LLM-QAT: Data-Free Quantization Aware Training for Large Language Models
and 240 more not named here
apply_rotary_pos_emb 75 other papers
42 dated earlier, 4 the same month, 29 later · 2 only as an assembly brick
2309.11499 (2023-09)
DreamLLM: Synergistic Multimodal Comprehension and Creation
2312.02051 (2023-12)
TimeChat: A Time-sensitive Multimodal Large Language Model for Long Video Understanding
2312.03414 (2023-12)
Compressed Context Memory For Online Language Model Interaction
and 72 more not named here
stable_cumsum 29 other papers
21 dated earlier, 2 the same month, 6 later · 1 only as an assembly brick
1911.11132 (2019-11)
Scaling Out-of-Distribution Detection for Real-World Settings
2003.08440 (2020-03)
Synthesize then Compare: Detecting Failures and Anomalies for Semantic Segmentation
2104.08812 (2021-04)
Contrastive Out-of-Distribution Detection for Pretrained Transformers
and 26 more not named here
read_json 21 other papers
18 dated earlier, 3 later
2210.07316 (2022-10)
MTEB: Massive Text Embedding Benchmark
2304.08177 (2023-04)
Efficient and Effective Text Encoding for Chinese LLaMA and Alpaca
2304.14454 (2023-04)
PMC-LLaMA: Towards Building Open-source Language Models for Medicine
and 18 more not named here
compute_intermediate_size 13 other papers
10 dated earlier, 3 later
2305.13718 (2023-05)
Exploring Self-supervised Logic-enhanced Training for Large Language Models
2307.08072 (2023-07)
Do Emergent Abilities Exist in Quantized Large Language Models: An Empirical Study
2308.16137 (2023-08)
LM-Infinite: Zero-Shot Extreme Length Generalization for Large Language Models
and 10 more not named here
set_optimizer 9 other papers
8 dated earlier, 1 later
1901.07659 (2019-01)
A Machine Learning Benchmark for Facies Classification
1906.05849 (2019-06)
Contrastive Multiview Coding
2004.11362 (2020-04)
Supervised Contrastive Learning
and 6 more not named here
get_measures 5 other papers
4 dated earlier, 1 later
2202.01197 (2022-02)
VOS: Learning What You Don't Know by Virtual Outlier Synthesis
2302.07106 (2023-02)
Normalizing Flow based Feature Synthesis for Outlier-Aware Object Detection
and 2 more not named here
fpr_and_fdr_at_recall 4 other papers
3 dated earlier, 1 later
2202.01197 (2022-02)
VOS: Learning What You Don't Know by Virtual Outlier Synthesis
2405.18635 (2024-05)
When and How Does In-Distribution Label Help Out-of-Distribution Detection?
and 1 more not named here
accuracy 1 other paper
1 dated earlier
2405.18635 (2024-05)
When and How Does In-Distribution Label Help Out-of-Distribution Detection?

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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/deeplearning-wisc/haloscope.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2409.17504")
get_code_for_paper("2409.17504")
have("2409.17504")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2409.17504.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2409.17504.svg)](https://syntology.ai/paper/2409.17504)

Connect an agent — have() is free.