Detecting Unsupported Claims by Folding Responses into Evidence Factors

When a language model answers from retrieved documents, a common failure is not contradicting the documents. It is quietly adding claims that the documents never made. We propose a training-free detector for these unsupported claims. It works in three steps. First, factorize the model's own internal activations on the retrieved passages into a small set of "evidence factors" that are shared across all transformer layers. Second, separate those factors from generic factors that the model uses on any text at all. Third, for each generated sentence, measure how much of its internal representation these evidence factors can explain. A sentence whose activations, across all layers, cannot be rebuilt from the evidence factors is flagged as unsupported. No hallucination labels and no second judge model are needed.

The mechanism is borrowed from recommender systems. In joint matrix factorization, item vectors are tied to the factors of their text, so a brand-new item with no interaction history can be "folded in": you solve for its coordinates in the learned space and judge how well it fits. We treat each generated sentence as a cold-start item that has to be explained by the evidence. This matters for three reasons. Supervised critics need tens of thousands of span-annotated responses. Prompted judges are weak at spotting subtle unsupported content. Existing internal-state monitors either need labels or score where attention goes rather than what the representation contains.

Core Claim

The claim is that support from retrieved evidence can be read off the geometry of a model's activations, but only if the factorization has two properties. First, it must be joint across layers, so that a single set of per-token loadings has to explain every layer at once. Second, it must be contrasted against a background of generic, content-free factors.

Under these conditions, the share of a sentence's activation energy captured by context-specific factors gives a label-free hallucination score. We expect this score to beat perplexity and attention-based scores on subtle unsupported information. We also expect it to transfer across tasks and models better than probes trained on one dataset.

A falsifiable sub-claim follows from it. If independent per-layer subspace projection, which is plain PCA at each layer, matches the joint version, then the "joint factorization" part of the idea contributes nothing and should be dropped.

Where this sits in prior work

The closest bridge work is Bridging Legal Knowledge and AI. It runs hierarchical non-negative matrix factorization over a legal corpus to build topic nodes for a knowledge graph and vector index, then prompts closed models. Its factorization happens offline, over documents, and never looks inside the generator. Ours runs per response, over the generator's activations, and is itself the detector.

Two papers motivate looking inside the model.

Cross-Layer Attention Probing shows that hallucination signals evolve across depth. Its small supervised transformer over all layers' activations beats single-layer probes. However, it is trained on labels and tested only closed-book. We keep the "use all layers" lesson but replace the learned probe with an unsupervised factorization that is conditioned on the retrieved text.

FACTUM splits citation-token computation into a reading pathway (attention aligned with the context) and a recalling pathway (feed-forward "parametric force"). It finds that correct citations show more parametric force, not less. This result constrains our design. A naive score of "distance from context" could penalize a model that correctly corroborates the evidence from memory. Our score therefore rewards energy on the context factors and does not penalize the size of the representation's other components. We test this directly below.

The method itself is supplied by the factorization literature. A Joint Matrix Factorization Analysis of Multilingual Representations uses PARAFAC2 to split representations into per-slice transforms, a shared latent space, and diagonal per-slice signatures. That work is purely diagnostic, and we repurpose the same decomposition with layers as slices. Collaborative Topic Ranking and TopicMF tie latent item factors to text factors, which is what lets unseen items be scored. We take the fold-in idea, not their rating objectives. Understanding the Effectiveness of Reviews found that using text to constrain a latent space was both more accurate in sparse settings and about 100x cheaper than feeding text in as features. That finding motivates a light, per-response computation instead of a second large model reading the text.

Research Program

For a retrieval-augmented response, we run the generator, or teacher-force the response through it. We record hidden states at every layer for every context token and every response token.

Let $X_l$ be the matrix of layer-$l$ activations for the retrieved context tokens. Let $Y_l$ be the matching matrix for a fixed background set of unrelated passages under the same prompt template. We fit the PARAFAC2-style joint model

$$X_l \approx A_c D_l B_l^\top, \qquad Y_l \approx A_g E_l G_l^\top,$$

with the following components:

  • $A_c$ holds context-token loadings and is shared across all layers.
  • $D_l$ is a diagonal matrix giving each factor's strength at layer $l$.
  • $B_l$ holds layer-specific directions. Following PARAFAC2, $B_l^\top B_l$ is constant across layers, so the factors are identifiable.
  • $A_g$, $E_l$ and $G_l$ are the corresponding background quantities.

The background factors $G_l$ are fitted once per model and reused. The context factors are fitted per response after projecting out the span of $G_l$. In recommender terms, the background plays the role of the generic, user-independent component. This background step makes the context factors carry document content rather than position, syntax or template structure.

To score a generated sentence with activations $Z_l$, we fold it in. We solve a single least-squares problem for its loadings $a$ on the context and background factors jointly across all layers. We then compute

$$s = \frac{\sum_l \lVert a_c D_l B_l^\top \rVert^2}{\sum_l \lVert Z_l \rVert^2},$$

the fraction of the sentence's total cross-layer energy explained by evidence factors. A low $s$ means unsupported content.

Because the loadings must be shared across depth, a sentence cannot earn support by matching the context at one convenient layer while diverging elsewhere. That cross-depth coupling is the feature an independent per-layer projection lacks.

We also record the per-layer residual profile. This lets us check whether unsupported sentences diverge in the middle layers, where the multilingual analysis found shared structure, or later.

Three practical questions get their own analyses:

  • Rank selection: how many context factors to keep. We use held-out reconstruction on the context only, never labels.
  • Long contexts: we chunk the passages and fit block-shared factors.
  • Cost: we report wall-clock overhead relative to generation.

As a secondary use, the score can act as a gate. Sentences that fall below a threshold are resampled, mirroring the RAGTruth filtering experiment but applied mid-generation. It is reported separately from the detection results so it cannot inflate them.

Baselines

The naive reference points are a majority-class predictor and the generator's own token perplexity and entropy averaged over each sentence. These are free to compute. FACTUM reports that its pathway scores beat perplexity by up to 37.5% in AUC on long-form citations, so this floor is known to be beatable. A label-free method that fails to clear it is dead.

The strongest label-free internal competitor is a FACTUM-style pathway score. It combines context-attention alignment and parametric force computed at the same tokens from the same forward pass. On TREC NeuCLIR 2024 citation hallucination, FACTUM reports a peak AUC of 0.737 and a precision gain from 0.201 to 0.334 on Llama-3.1-8B. That AUC is the target on that benchmark. FACTUM's classifiers do use labels, so we also report a fully unsupervised version of its scores. Beating it means exceeding 0.737 AUC with no labels, or matching it while being label-free.

The strongest supervised competitors define the upper reference. The first is the fine-tuned Llama-2-13B critic from RAGTruth, which reports 78.7% response-level F1 and 52.7% span-level F1. On the same corpus, GPT-4 with tuned prompting reaches 63.4% and 28.3%. The second is a CLAP-style cross-layer probe from Cross-Layer Attention Probing, which we retrain on RAGTruth training splits using the same activations we factorize. Its numbers in the file are for closed-book data only, and no reported RAGTruth result was found on Lacuna for it.

Our method beats the prompted judge if it exceeds 28.3% span-level F1 without labels. Approaching 52.7% span F1 would be a strong result. We do not expect to beat the supervised critic in-distribution. We do expect to beat both supervised baselines when they are trained on one RAGTruth task and tested on another, or on NeuCLIR.

All internal methods use identical activations, generator weights and data splits. Thresholds for every method are chosen on the same small development split. Probe hyperparameters get the same search budget as our rank and background-size choices.

A non-mechanistic competitor scores each response sentence by its maximum sentence-embedding similarity to the retrieved passages. It is cheap, and if it ties our method the internal-state story is unnecessary.

The key ablations isolate each ingredient:

  • independent per-layer truncated SVD instead of the joint, depth-shared loadings, which tests the "joint" claim;
  • no background factors, which tests the contrast step;
  • last-layer-only factorization;
  • a score that penalizes total off-context energy rather than rewarding on-context energy, which tests the FACTUM constraint.

Why not just…?

Why not just fine-tune a critic or probe on RAGTruth? This is the most serious threat. In-distribution, the 13B critic's 78.7% response F1 will likely beat us. The critic needs 17,790 annotated responses and a second large-model pass over every output. A probe is cheap but is still tied to its labels and to one model. Our bet is transfer. We will train the critic-style probe on RAGTruth question answering and test it on summarization, data-to-text and NeuCLIR. If the supervised probe still wins out of distribution, the label-free argument is reduced to cost, and we will report it that way.

Why not just measure attention to the context? Attention says where the model looked, not whether what it wrote is contained in what it read. FACTUM's own finding, that correct citations carry more parametric force, shows that reading-pathway signals alone mislabel healthy corroboration. Our comparison against unsupervised FACTUM scores, and the "penalize off-context energy" ablation, settle whether representation content adds anything beyond attention patterns.

Why not just project onto a per-layer PCA of the context activations? If this works as well, the joint factorization is unnecessary decoration, and the method should be simplified to per-layer projection. This is exactly our first ablation, and we commit to dropping the joint claim if the gap is inside seed variance. The evidence that depth should help is indirect: CLAP's cross-layer gains over single-layer probes, up to 6.3% AUC out of distribution, suggest depth carries signal, but they do not show that factorization captures it.

Why not just compare sentence embeddings to the retrieved passages? RAGTruth reports that subtle introduction of baseless information dominates. A fluent sentence that paraphrases the passage's topic while adding one unsupported detail will look similar at the embedding level. We test this on RAGTruth's subtle-baseless category specifically. If embedding similarity matches us there, we lose.

Proposed Experiments

The main benchmark is RAGTruth: response-level and span-level F1, plus AUC, broken out by its four hallucination types and by position in the response. The breakdown by type and position tests whether the score catches tail-end hallucinations. For responses whose generator weights are available we use the generator itself. Otherwise we teacher-force through Llama-3.1-8B and report the two settings separately. We do not assume the file confirms which generators RAGTruth used.

The second benchmark is TREC NeuCLIR 2024 citation hallucination, measured by AUC against FACTUM's 0.737 at the same citation tokens, with Llama-3.2-3B and Llama-3.1-8B. The third is HaluEval question answering with its supplied knowledge, as a cross-format transfer check. There, ChatGPT reaches 62.59% detection accuracy, per HaluEval.

The decisive check against FACTUM's finding is a controlled set built from RAGTruth question-answering contexts. Each context is paired with a correct answer the model also knows from memory, a correct answer it does not know, and an inserted unsupported detail. The score must separate the third case from the first two, and in particular must not penalize the first. Failing that would mean the method measures novelty rather than support.

The decisive check for the joint factorization is the per-layer SVD ablation across all three benchmarks.

For the gating experiment, we compare hallucination rate and answer quality against ungated generation and against DoLa-style intervention. CLAP reports that applying DoLa everywhere corrupts responses that were already correct, so we track the correct-to-incorrect flip rate explicitly.

Finally, we report per-response factorization time against generation time. The method must remain a small overhead to justify itself over a second-model critic.