Large language models choose each next word from a softmax distribution. The softmax splits a fixed budget of probability among all words in the vocabulary, so a word's probability only says how it ranks against the alternatives at that step. It does not say how confident the model is that a statement is true. A model can put 0.9 on a fabricated birth year because no other year looks better, and 0.3 on a correct name because three spellings share the mass. In practice this means no single confidence cutoff for "state this claim" versus "hold back" works across prompts, topics, and rare entities.
Multi-label classification faced the same problem and largely solved it. It replaced one softmax with independent yes/no decisions per label, each trained with binary cross-entropy (BCE, the log-loss of a sigmoid output). These scores are absolute: 0.7 means the same thing for every input. We propose to give an LLM a small sigmoid "assertion head", trained jointly with the model on per-claim truth labels. The head scores each atomic claim (a single checkable fact) the moment the model finishes writing it. One global threshold then decides, during generation, whether the claim is kept, regenerated, or replaced by a hedge, so a false claim never enters the context that later sentences build on.
Core Claim
The training target matches the evaluation metric. Long-form factuality is scored decomposably: FActScore splits a passage into atomic claims and reports the fraction that are supported. On label dependence and loss minimization in multi-label classification shows that for decomposable losses like Hamming loss, the optimal predictor thresholds each label's marginal probability, so modeling the joint distribution over labels is unnecessary. If we treat each claim in a response as one "label", the right object to learn is the per-claim marginal $p_k = P(c_k \text{ is supported} \mid \text{prefix})$. The right way to learn it is BCE. The right way to use it is a threshold.
Current alignment methods do not optimize this. Fine-Tuning Language Models for Factuality (FactTune) builds response-level preference pairs and trains with Direct Preference Optimization (DPO), a pairwise objective. Mask-DPO masks wrong sentences out of preferred responses and right sentences out of rejected ones, but its loss is still pairwise and sequence-level, and it changes nothing at decoding time.
Our specific, testable claim has two parts. First, a BCE assertion head trained into the backbone gives a factuality score whose single threshold, picked on one domain, transfers to others with a stable precision-versus-coverage trade-off. Softmax-derived confidences cannot do this. Second, gating claims at that threshold during generation raises factual precision without the drop in informativeness that pure abstention causes, partly by cutting the error "snowballing" that ANAH measures. That paper finds the next sentence is hallucinated about 58% of the time in English after a hallucinated sentence.
We do not propose replacing the vocabulary softmax with sigmoids. That is the obvious but poorly motivated version of this intersection. It would break the generative model's normalization, it would require pretraining-scale experiments, and nothing in the file ties it to fewer false facts rather than to different word choices.
Research Program
The head. The assertion head is a sigmoid on a small projection of the hidden state at the last token of each claim. Claim boundaries are marked by a lightweight segmenter distilled from the GPT-3.5 decomposition used in FactTune; the cheaper fallback is sentence boundaries, as in ANAH.
Training labels. We sample the model's own generations on the FactTune biography prompts (463 individuals) and medical prompts (295 conditions). Each claim is labeled supported or unsupported with the FActScore retrieve-and-verify pipeline. ANAH sentence annotations add a second domain with human labels.
The objective. Training uses low-rank adapters on the backbone and minimizes
$$\mathcal{L} = \mathcal{L}_{\text{LM}} + \lambda \sum_{k} \text{BCE}\big(\sigma(w^\top h_k + b),\, y_k\big),$$
where $\mathcal{L}_{\text{LM}}$ is the usual next-token loss on the same generations, which keeps the model fluent. The other symbols are defined as follows. The vector $h_k$ is the hidden state at the end of claim $k$. The label $y_k \in \{0,1\}$ is that claim's verified truth. The weight vector $w$ and the single scalar bias $b$ are shared across all claims, prompts, and domains. Finally, $\lambda$ sets how strongly factuality shapes the representations.
The shared bias follows the argument of Rediscovering BCE Loss for Uniform Classification, which shows that softmax only separates scores within a sample. BCE with a unified bias instead forces one cutoff to work across samples. On ImageNet-1K that raised "uniform" accuracy (accuracy at a single global threshold) from 34.48% to 68.48%. We want the analogous property across entities and topics.
Gating at decoding time. When the model finishes a claim, it keeps the claim if $\sigma(w^\top h_k + b) \ge \tau$. Otherwise it resamples that claim up to $N$ times and keeps the best-scoring version that clears $\tau$. If none clears it, the model emits a short hedge or ends the passage. The cutoff $\tau$ is chosen once, on biography validation data, and frozen.
Analysis of the representations. We test whether joint training changes the model's hidden states rather than merely adding a classifier. Specifically, we measure whether claims about rare and frequent entities become separable by one direction and one offset. FActScore's "rarity penalty" (factuality drops sharply for long-tail entities) suggests they currently are not.
Baselines
Do nothing. The naive reference is the untuned Llama-3.1-8B-Instruct with greedy decoding. Mask-DPO reports it at 49.19% on ANAH in-domain factuality.
Strongest training-based method. This is Mask-DPO on the same backbone. It reports 77.53% on ANAH and 39.39% Biography FActScore for Llama-3.1-8B-Instruct, against 40.47% for the 70B model. We will reproduce it with the same claim labels and the same number of labeled generations as our method, rather than ANAH-v2 labels we do not control. We will also report the published figures alongside. FactTune is run from its codebase; it reports a 53% factual-error reduction on biographies at 7B.
Strongest post-hoc detector. This is the frozen-backbone probe of Simple Factuality Probes, trained on the identical claim labels and plugged into the identical gate. That paper reports an AUROC of about 0.76 on Llama 3.1-405B and a 10.5% FActScore gain on Llama 3.2-3B from neuron clamping.
Decoding-only methods. These are DoLa, run from its repository, and Cautious Next Token Prediction (CNTP). For CNTP we found no reported result on Lacuna for FActScore or ANAH, so we will run it ourselves. We will also run a softmax-confidence gate: identical resampling, but triggered by mean token log-probability over the claim.
Fairness and ablations. All gated variants get the same resampling budget $N$ and a single $\tau$ tuned on the same biography validation split. Two ablations isolate the key ingredients. The first trains the head with the backbone frozen; this is our parameterization of the probe, and it isolates the effect of backpropagating BCE. The second uses per-domain biases instead of one shared bias, which isolates the uniformity claim.
What counts as beating them. We beat Mask-DPO if we exceed its Biography FActScore at equal or higher supported-facts-per-response, and match it on ANAH. We beat the probe if, at the frozen $\tau$, we reach higher precision at equal coverage on the two transfer domains.
Why not just…?
Why not just train a probe on frozen activations and gate with it? This is the main threat, and the frozen-head ablation is exactly this alternative. Han et al. show the signal already exists in frozen states. Their probes, however, are trained and thresholded per setting, and the file reports degradation patterns across entity rarity that a frozen representation has no pressure to fix. If the frozen probe matches our jointly trained head on cross-domain precision at the transferred threshold, the backbone-training half of the proposal is unnecessary. We would then report that and keep only the gate.
Why not just use Mask-DPO? Mask-DPO makes the policy better on average, but it gives no usable per-claim confidence at test time. Its pairwise loss is also mismatched with a decomposable metric. Our method can be stacked on a Mask-DPO model, and we will test that combination. If stacking adds nothing over Mask-DPO alone, the gate brings no new information.
Why not just gate on the model's own token probabilities, or use entropy-triggered resampling like CNTP? Softmax probabilities are relative within a step, so their best cutoff should drift across domains. That drift is the 34% versus 68% uniformity gap seen in vision, and it is also why CNTP triggers on synonym ambiguity rather than on falsehood. The softmax-confidence gate baseline tests this directly: same budget, same transfer protocol.
Why not just use DoLa? DoLa needs no training and gives large TruthfulQA gains: 12 to 17 absolute points. But it only re-weights words the model already ranks highly, and it never withholds a claim. On long-form biographies, where errors cluster in late, long-tail details, we expect it to help less. We will report it on both short-form and long-form benchmarks.
Proposed Experiments
Main comparison. All methods are evaluated on FActScore biographies, FactTune medical QA, and ANAH (English). We report factual precision, number of supported facts per response, and the abstention rate together, because precision alone can be gamed by saying less. FactTune's "strict improvement" standard is the bar: more correct facts and fewer incorrect ones at the same time. TruthfulQA via GPT-judge is a short-form sanity check against DoLa. TruthfulQA reports 58% for the best GPT-3 configuration; we will report the absolute TruthfulQA score for our own backbone with and without DoLa.
Decisive check one: threshold transfer. We freeze $\tau$ from biographies, then plot precision-versus-coverage on medical QA and ANAH for the trained head, the frozen probe, and the softmax gate. Our claim holds only if the trained head's operating point moves least, stratified by entity frequency bucket.
Decisive check two: snowballing. We measure the conditional hallucination rate of sentence $t+1$ given a flagged-and-repaired sentence $t$, and compare it with ANAH's roughly 58% baseline. Lowering that rate is what distinguishes decoding-time gating from post-hoc filtering.
Theory check. We test whether thresholding marginals is actually optimal here. We train a second head conditioned on earlier claims' verdicts and see whether it adds anything. Dembczyński et al.'s analysis predicts it should not for FActScore-style precision, but it could for a metric like "response fully correct".
Final check: generalization of the error-detection signal. We verify that the head's flags line up with FAVABENCH's Entity and Relation error types, and we report where they miss, especially Invented and Unverifiable errors. Fine-grained Hallucination Detection and Editing finds that Unverifiable errors make up over 40% of human-annotated hallucinations and that its retrieval-based detector FAVA reaches 48.1% F1. A failure to catch those types would mark the limit of the method.
References
- FActScore: Fine-grained Atomic Evaluation of Factual Precision in Long Form Text Generation
- On label dependence and loss minimization in multi-label classification
- Fine-Tuning Language Models for Factuality
- Mask-DPO: Generalizable Fine-grained Factuality Alignment of LLMs
- ANAH: Analytical Annotation of Hallucinations in Large Language Models
- Rediscovering BCE Loss for Uniform Classification
- Simple Factuality Probes Detect Hallucinations in Long-Form Natural Language Generation
- DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models
- Cautious Next Token Prediction
- Fine-grained Hallucination Detection and Editing for Language Models