TL;DR
TOKENHD introduces a holistic framework to train lightweight, token-level hallucination detectors that pinpoint reasoning errors directly in free-form text. By bypassing the rigid step-segmentation required by traditional Process Reward Models (PRMs), a tiny 0.6B TOKENHD detector can outscore massive reasoning models like QwQ-32B at a fraction of the computational cost.
What Problem Does This Paper Address?
When Large Language Models (LLMs) tackle complex, reasoning-intensive tasks like mathematics or coding, their hallucinations are notoriously subtle. The generated text often looks perfectly coherent and fluent, yet hides fatal logical flaws or incorrect intermediate calculations.
To catch these errors, current state-of-the-art methods rely on Process Reward Models (PRMs) that evaluate text at the step level. However, PRMs suffer from two major flaws:
- Rigid Structure: They require text to be explicitly segmented into steps, which fails on free-form text.
- Coarse Granularity: They flag an entire step as wrong even if the error is confined to a single token, making precise error localization impossible.
TOKENHD addresses this by shifting the focus to the atomic units of text—tokens—allowing for fine-grained hallucination detection without any predefined structural assumptions.
Methods
The authors developed a complete pipeline to synthesize token-level training data and optimize the detector:
- Scalable Data Synthesis Engine: Since token-level hallucination labels are incredibly scarce, the authors used multiple cost-effective "critic models" (like QwQ-32B and GPT-4.1) to flag hallucinated text fragments in LLM outputs.
- Iterative Text Restoration: Raw critiques often suffer from minor formatting mismatches (e.g., spacing or formula formatting). The pipeline uses an LLM-driven iterative restoration process to map these flagged fragments back to exact token spans in the original text, achieving a 98.10% recovery rate.
- Adaptive Ensemble Strategy: Rather than simply averaging the outputs of different critics (which introduces a "barrel effect" where weaker models degrade the overall quality), TOKENHD learns optimal weights for each critic on a validation set by minimizing Mean Squared Error (MSE) against high-quality ground-truth labels.
- Importance-Weighted Training: Because hallucinated tokens are naturally sparse across a dataset, standard training biases models toward predicting everything as correct. TOKENHD introduces a reweighting scheme to upweight the loss contribution of sparse hallucinated tokens, stabilizing the training process.
Datasets
- Training Data: ~49,000 valid mathematical reasoning samples curated from Math, AceReason-Math, and Big-Math, generated using GPT-4o-mini as the policy model.
- Mathematical Evaluation Benchmarks: Math-500, AIME-2024, AIME-2025, and OlympiadBench-Math. Ground-truth annotations for evaluation were generated using top-tier labeler models (GPT-5 and o3).
- Cross-Domain Generalization Benchmarks: STEM domains (GPQA, OlympiadBench-Phy, FinQA) and coding tasks (Code-Elo, LiveCodeBench-Lite).
Key Insights and Ideas
- Beyond Imitation: Remarkably, even though the TOKENHD detectors are trained on data annotated by the critic models, the final detectors actually outperform most of their own critics. This indicates that the framework successfully distills and refines the underlying error-detection signal.
- The Power of Graded Outputs: Critic models provide hard binary annotations (error vs. no error), which leave no room for nuance. TOKENHD outputs continuous token-level scores, providing a much richer signal for ranking and isolating errors.
- Eliminating Verbal Overhead: Unlike LLM critics that must generate long verbal rationales to explain an error, TOKENHD directly outputs token scores. This drastically reduces inference latency, making it highly practical as a real-time plug-in module.
Key Results
- Lightweight Efficiency: As shown in the main results table, the smallest variant, TOKENHD-0.6B, achieves a hallucination F1 score ($S_{incor}$) of 61.41% to 64.99% across math benchmarks, significantly outperforming the much larger QwQ-32B reasoning model.
- PRM Crushing Performance: TOKENHD-8B outperforms strong open-source PRM baselines (like Qwen2.5-Math-PRM-72B) by a staggering 30 to 57 points across five benchmarks, proving that token-level optimization is vastly superior to step-level approximations.
- Strong Cross-Domain Generalization: Despite being trained exclusively on pure mathematical data, TOKENHD generalized robustly to scientific, financial, and coding tasks, consistently beating its backbone models and outperforming larger critics like GPT-4.1.
Limitations and Future Work
- Data Scaling Saturation: The authors noted that performance gains begin to slow down significantly after utilizing 50% of their training dataset, suggesting that simply adding more of the same synthesized data yields diminishing returns.
- Domain-Specific Tuning: While the math-trained model generalizes well to STEM, shifting to highly distinct domains like code generation requires data mixing or model merging (e.g., TIES-Merging) to maintain peak accuracy. Future work will likely focus on expanding the automated data engine to natively cover a broader array of non-mathematical distributions.
Summary updated