Inference-Time Trajectory Selection for Truthful Generation
Research Team
Large language models produce factually incorrect statements even when they hold the correct knowledge in their parameters. Seven inference-time control approaches were tested before one passed with a bootstrap confidence interval reliably above zero. The final design keeps the model's near-greedy output and only swaps to a sampled alternative when a per-layer factuality probe confirms the alternative is clearly better by a margin. No hidden states or logits are perturbed.
The controller operates per-span during autoregressive generation. At each span boundary the model produces one near-greedy candidate and five sampled alternatives. A linear probe on the last-token hidden state at layer 24, projected into the Hidden Activation Reasoning Projection subspace (HARP, Hu et al. 2025, arXiv 2509.11536), scores all six. The span-level probe paradigm follows Obeso et al. (2025, arXiv 2509.03531). The probe achieves within-span Area Under the Receiver Operating Characteristic curve (AUROC) of 0.87 with grouped cross-validation that eliminates leakage. The controller applies an asymmetric rule: keep the default unless an alternative beats it by at least 0.05 in hallucination probability. No absolute threshold, no refusal.
On 50 held-out LongFact++ prompts (published at obalcells/longfact-augmented-annotations; Min et al. 2023, arXiv 2305.14251, augmented by Obeso et al. 2025, arXiv 2509.03531), the controller lifts factuality as measured by Natural Language Inference (NLI) by Δ = +0.0344 over vanilla generation, 95% bootstrap confidence interval (CI) [+0.0095, +0.0648]. Switch rate is 47% across 296 spans. Gains concentrate where vanilla NLI is below 0.95 (mean Δ = +0.0575, n = 32). An earlier argmin-plus-refusal controller passed but with a 17-times-smaller CI lower bound (+0.0005). Its absolute refusal destroyed correct on-domain answers.
The diagnostic arc behind this result uses three steps. First, truthful candidates exist in 64% of risky spans with six alternatives. Second, a previously deployed hallucination head scored below chance (AUROC 0.40) for candidate ranking, but raw hidden states carry signal. Third, correcting three information-losing design errors and switching to a lossless probe identified a factuality-informative band at layers 20 through 25, peaking at layer 24 on Qwen 2.5 7B Instruct.

