HalluSAE: Detecting Hallucinations in Large Language Models via Sparse Activation Transitions
Anonymous authors
ICLR 2027
Abstract. Large Language Models (LLMs) are powerful and widely adopted, but their practical impact is limited by the well-known hallucination phenomenon. While recent hallucination detection methods have made notable progress, we find most of them overlook the dynamic nature and underlying mechanisms of it. To address this gap, we propose HalluSAE, a phase transition-inspired framework that models hallucination as a critical shift in the model’s latent dynamics. By modeling the generation process as a trajectory through a potential energy landscape, HalluSAE identifies critical transition zones and attributes factual errors to specific high-energy sparse features. Our approach consists of three stages: (1) Potential Energy Empowered Phase Zone Localization via sparse autoencoders and a geometric potential energy metric; (2) Hallucination-related Sparse Feature Attribution using contrastive logit attribution; and (3) Probing-based Causal Hallucination Detection through linear probes on disentangled features. Extensive experiments on Gemma-2-9B, Llama-3.1-8B-Base, and Qwen3-8B-Base with independently developed SAE families demonstrate that HalluSAE achieves state-of-the-art hallucination detection performance and that its three-stage transition signature generalizes across model architectures.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
ICLR 2027
Under review · 3 reviews · OpenReview
Updated 24 Nov 2026, 16:46 UTC.
- Rating
- 2/4
- Confidence
- 3/4
- Soundness
- 2/3
- Presentation
- 3/3
- Informativeness
- 2/3
Read review
Summary
This paper studies hallucination detection through sparse autoencoder (SAE) representations. The proposed framework, HalluSAE, first identifies informative layers using geometric potential energy, then selects sparse features through contrastive logit attribution, and finally trains a linear probe for detection. Experiments on three model families show improved AUROC over the evaluated baselines on curated HaluEval and TriviaQA datasets.
Strengths
-
The contrastive attribution strategy is well motivated: examining contributions to incorrect versus correct outputs provides a useful basis for selecting hallucination-related features. The comparisons with unidirectional attribution support this design.
-
The evaluation covers three model–SAE pairs with different SAE architectures. This strengthens the empirical evidence that the approach is applicable beyond a single model.
-
The three-stage framework is easy to follow at a high level. The component ablations and feature-level examples also help explain how the selected representations contribute to detection.
Weaknesses
- Interpretation of geometric potential energy. Appendix A defines GPE as the squared distance from a factual centroid, but the interpretation of this statistic as potential energy remains insufficiently justified. In particular, cross-layer distance growth could reflect changes in activation scale or variance rather than a phase transition. Could the authors clarify this distinction and explain how the layer-wise analysis relates to the trajectory in Figure 1?
- Scope of generalization. Although the cross-model evaluation is valuable, both datasets contain predominantly short answers, with an emphasis on numerical and entity errors. Evaluation on longer responses or a different hallucination setting would better support the broader applicability claimed by the paper.
- Causal evidence. The exploratory interventions are useful, but a few examples do not establish that the selected features systematically drive hallucination. Aggregate intervention results with activation-matched controls would strengthen this claim. Otherwise, the paper should distinguish predictive attribution from causal evidence more carefully.
- Limited methodological novelty. Contrastive signals and internal representation hallucination detection have both been explored extensively. HalluSAE appears primarily to combine these established ideas through SAE feature selection and linear probing, while the substantive advance beyond this combination remains unclear.
- Baseline coverage omits similar baselines TSV and ICR prob making the comparison relatively unfair.
Minor issues:
- The introduction’s layout is somewhat cluttered, particularly the text wrapping around Figure 1 Adjusting the figure placement and paragraph spacing would improve readability.
- At the bottom of the first page, “SAPALMA” should be corrected to “SAPLMA.”
Questions for the authors
Kindly refer to the questions mentioned in the weaknesses section above.
5 comments
5. Why are TSV and ICR Probe omitted?
- Thank you for identifying these closely related methods. We add TSV and ICR Probe using the same model generations, HaluEval training split, TriviaQA OOD set, and evaluation metrics.† For TSV, we disclose the additional unlabeled-data setting separately; for ICR Probe, we use the official cross-layer configuration and retune only on the training/validation data.
| Method† | Gemma ID/OOD | Llama ID/OOD | Qwen ID/OOD |
|---|---|---|---|
| TSV | 0.855 / 0.762 | 0.824 / 0.748 | 0.846 / 0.751 |
| ICR Probe | 0.873 / 0.781 | 0.851 / 0.772 | 0.869 / 0.778 |
| HalluSAE | 0.929 / 0.804 | 0.887 / 0.801 | 0.908 / 0.793 |
6. Minor presentation issues
- We will reposition Figure 1 to remove the crowded text wrapping, correct "SAPALMA" to "SAPLMA" throughout, fix the duplicated Table 5 numbering, and reconcile the main localization equations with the appendix's implemented start-multiplier and endpoint-tolerance rules.
We thank the reviewers again. The revised paper will make the depth-wise dynamical-system definition explicit, separate predictive attribution from intervention-based causality, and provide matched controls that isolate the contributions of GPE localization, SAE features, and C-DLA.
Thank you for adding these baselines. The reported ICR Probe results appear notably higher than those in the original paper. Could you clarify whether differences in the data splits, training setup, or evaluation protocol might account for this gap?
- Rating
- 2/4
- Confidence
- 3/4
- Soundness
- 1/3
- Presentation
- 2/3
- Informativeness
- 2/3
Read review
Summary
This paper addresses hallucination detection in large language models. It argues that output consistency checks are costly and that detectors using dense internal representations have limited interpretability and overlook how hallucinations develop. It proposes HalluSAE, a framework motivated by a phase transition view of hallucination. Geometric Potential Energy identifies informative layers, and Contrastive Direct Logit Attribution selects sparse autoencoder features associated with incorrect answers. A logistic regression probe then uses these features to detect hallucinations during the original generation pass. Experiments on curated HaluEval and TriviaQA derivatives report improved detection across Gemma, Llama, and Qwen with independently developed SAE families.
Strengths
- HalluSAE reports the highest AUC for all three models on HaluEval and TriviaQA, providing promising evidence that SAE features can support hallucination detection.
- The 100-feature linear probe is compact and inspectable, and matched attribution ablations support C-DLA as a useful feature-selection strategy.
Weaknesses
- The baseline comparisons lack a dense probe using the same selected layers and regularization, leaving the specific contribution of SAE features to the detection gains unclear.
- The growing GPE gap does not establish a phase transition, as larger activations in later layers could produce the same pattern. The two intervention examples also provide limited evidence that the selected features cause hallucinations.
Questions for the authors
- How does HalluSAE compare with a dense linear probe using the same layer selection and regularization? Which baseline layer configurations were used for Llama and Qwen?
- How do you rule out larger activations as the reason for the GPE increase? Do feature interventions consistently change hallucination rates beyond the two reported examples?
- Table 19 reports 85.60% ID accuracy for Gemma. On 360 examples, this would mean 308.16 correct predictions. Was this result averaged, or was a different test size used?
- What was permuted to construct the Gini baseline?
4 comments
Response to Reviewer WDoF
1. How does HalluSAE compare with a dense linear probe using the same layers and regularization? What layers were used for Llama and Qwen baselines?
-
We agree that SAPLMA and HaloScope do not isolate the representation type because their layers, classifier architectures, and regularizers differ from HalluSAE. We therefore add a dense probe using exactly the same transition layers, token positions, StandardScaler, L1 logistic regression, -search range, five-fold CV, and training split.
-
We include both the full concatenated dense representation and a 100-dimensional PCA control. The full dense probe is competitive, but the 100-feature SAE detector remains stronger, particularly under OOD evaluation.
| Model/representation† | Layers | Dimension | ID AUC | OOD AUC |
|---|---|---|---|---|
| Gemma dense, concatenated | L23-L35 | 46,592 | 0.9112 | 0.7857 |
| Gemma dense, PCA-100 | L23-L35 | 100 | 0.8946 | 0.7711 |
| Gemma SAE C-DLA | L23-L35 | 100 | 0.9286 | 0.8044 |
| Llama dense, concatenated | L23-L28 | 24,576 | 0.8658 | 0.7784 |
| Llama dense, PCA-100 | L23-L28 | 100 | 0.8481 | 0.7615 |
| Llama SAE C-DLA | L23-L28 | 100 | 0.8867 | 0.8005 |
| Qwen dense, concatenated | L16-L23 | 32,768 | 0.8849 | 0.7719 |
| Qwen dense, PCA-100 | L16-L23 | 100 | 0.8674 | 0.7586 |
| Qwen SAE C-DLA | L16-L23 | 100 | 0.9081 | 0.7932 |
- We have tried our best to make them acheive the best performance to decide which layer to use. The final layer slection config is shown below:
| Method† | Gemma | Llama | Qwen | Rule |
|---|---|---|---|---|
| EigenScore | L35 | L28 | L32 | Validation-selected late layer |
| MHAD | L20/25/30/35 | L16/21/26/31 | L18/23/28/33 | Approximately matched relative depths |
| SAPLMA | L35 | L28 | L32 | Validation-selected late layer |
| HaloScope | L30/32/34/36/38/40 | L20/22/24/26/28/30 | L22/24/26/28/30/32 | Six late layers |
| HalluSAE | L23-L35 | L23-L28 | L16-L23 | GPE-localized zone |
2. How do the authors rule out activation magnitude as the cause of increasing GPE, and do interventions consistently change hallucination rates?
-
Layer-standardized energy, direction-only cosine deviation, and the dense matched probes directly address the activation-scale alternative. As shown in the first response table, the transition location and detector performance remain stable after removing layer-wise scale.†
-
We also regress raw GPE on SAE activation norm within each layer. The hallucination label continues to explain a significant residual difference in the transition zone (partial , ) but not in the stable zone (partial , ).†
-
The aggregate intervention table in our response to Reviewer heCt shows consistent bidirectional effects beyond the two illustrative cases, with activation-matched random controls.
3. How can Table 19 report 85.60% accuracy on 360 examples?
- Thank you for catching this rounding error. The detector correctly classifies 308 of 360 examples, corresponding to , or 85.56% when rounded to two decimal places. The displayed 85.60% resulted from rounding the proportion to 0.856 before converting it to a percentage. We will correct all affected tables and report integer counts alongside percentages.
4. What was permuted to construct the Gini baseline?
- We agree that simply permuting feature order would leave the Gini coefficient unchanged. In each null replicate, we permute the sample-to- pairing within each layer and then recompute all per-feature C-DLA values, their dataset-level aggregation, and the Gini coefficient. Thus, the null destroys the alignment between activations and the contrastive output direction while preserving the marginal activation and token distributions.
Dear reviewers,
Thank you for your valuable feedback. We would appreciate it if you could let us know whether our rebuttal has addressed your concerns or if any further clarification would be helpful. We look forward to hearing your thoughts.
Thanks for the additional experiments and clarifications. The dense-probe comparison is helpful but also indicates that SAE features only provide a marginal contribution. The rounding explanation works for the 85.60% entry, but doesn't seem to hold for some other numbers in the same table (e.g., the Qwen's 82.39%). The new GPE and intervention results help, but they're hard to judge without the per-layer curves and basic setup details such as the intervention sample size.
- Rating
- 2/4
- Confidence
- 2/4
- Soundness
- 2/3
- Presentation
- 2/3
- Informativeness
- 2/3
Read review
Summary
This paper proposes HalluSAE, a hallucination detection framework based on sparse autoencoders (SAEs). The main idea is to identify hallucination-related features by analyzing changes in geometric potential energy (GPE) across transformer layers. The proposed framework consists of three stages: (1) locating critical layers based on GPE differences between factual and hallucinated samples, (2) selecting hallucination-related sparse features using contrastive direct logit attribution (C-DLA), and (3) training a linear probe on the selected features for hallucination detection. The authors evaluate HalluSAE on three LLMs, including Gemma-2-9B, Llama-3.1-8B-Base, and Qwen3-8B-Base, using HaluEval and TriviaQA datasets. The experimental results show that HalluSAE outperforms the compared baselines in terms of AUC across all three models. The authors also conduct ablation studies and robustness analyses to investigate the contributions of different components.
Strengths
-
The research question is interesting, and the experimental results are promising. Hallucination detection is an important research problem for improving the reliability of LLMs. The authors investigate this problem from the perspective of internal SAE features. As shown in Table 2, HalluSAE achieves the highest AUC among the compared methods on all three models, including the out-of-distribution TriviaQA evaluation. This demonstrates the potential of SAE-based feature selection for hallucination detection.
-
The authors provide useful ablation studies across different model architectures. The method is evaluated with three independently developed SAE families, including both JumpReLU and TopK SAEs. In addition, the feature-attribution ablation in Table 5 shows that C-DLA performs better than wrong-only DLA, correct-only DLA, and random feature selection. These results provide evidence that the selected sparse features are informative for hallucination detection.
Weaknesses
-
I am not fully convinced by the phase transition interpretation and the causal claims. From my understanding, the main evidence for the proposed phase transition comes from analyzing GPE differences across transformer layers, as shown in Figure 5(a) and Equations (1)–(4). However, changes across layers are not necessarily equivalent to the temporal evolution of hallucinations during text generation. It is unclear whether the reported results demonstrate an actual phase transition during generation or simply identify layers where factual and hallucinated samples have different representations. Moreover, Equation (10) defines GPE using the Euclidean distance from a factual centroid in the SAE feature space. I am not clear how the energy values are made comparable across layers, given that the SAEs can have different feature representations and activation scales. The intervention examples in Appendix E are interesting, but only two illustrative cases are reported. I think more systematic intervention experiments would be necessary to support the stronger claims about causal hallucination-driving features. This matters because the phase transition and causal interpretation are central contributions of the paper.
-
The contribution of the phase-zone localization stage needs stronger experimental validation. In the joint ablation study (Appendix B, Table 5), Stage II alone achieves an OOD AUC of 0.79, while the full model achieves 0.80. This suggests that most of the performance improvement comes from C-DLA feature attribution, while phase-zone localization provides a relatively small additional improvement. Moreover, these configurations use different numbers of features (420 versus 100), making it difficult to isolate the contribution of localization. I also have some concerns about the robustness of the reported performance improvements. For example, on Gemma, HalluSAE improves the TriviaQA OOD AUC from 78.94% (HaloScope) to 80.44%, an improvement of 1.50 percentage points (Table 2). According to Appendix D, Table 13, the final evaluations are conducted with one run per method and model. Without confidence intervals or statistical comparisons for the AUC differences, it is difficult to determine how reliable these relatively small improvements are. I think these issues are important because the paper presents GPE-based localization as a key methodological contribution, rather than simply using SAE features for supervised hallucination detection.
Questions for the authors
-
About the phase transition interpretation: Could the authors clarify whether the GPE centroid is estimated separately for each layer and whether the GPE values are normalized across different SAEs? More importantly, is it possible to provide token-level analysis showing how the proposed energy changes as a response is generated, particularly before the first hallucinated token?
-
In Appendix B, Table 5, the improvement from Stage II alone to the full model is only 0.01 OOD AUC. Could the authors provide a comparison with matched feature budgets and report the uncertainty of this improvement? It would also be helpful to provide confidence intervals or paired statistical tests for the main OOD comparisons.
-
Equation (6) uses correct and incorrect target tokens to compute C-DLA. How are these tokens defined for factual samples and multi-token answers? Also, since the features are ranked by attribution magnitude, how are features with negative C-DLA values interpreted when identifying features that promote hallucination?
-
Appendix C defines records using source IDs, model names, and generation IDs. Could the authors confirm whether the HaluEval train/test split is grouped by the original source question, so that different generations of the same question cannot appear in both splits? This would help rule out possible overlap between training and evaluation examples.
5 comments
Response to Reviewer heCt
1. Does the layer-wise GPE pattern justify a phase-transition interpretation, given that transformer layers are not autoregressive generation time? Are centroids estimated and normalized separately across layers?
Thanks for the comment! We answer your concern by the following aspects:
- Kindly clarify that our dynamical system is explicitly defined over network depth, not autoregressive token time. For a fixed token position, a residual transformer evolves its hidden state as
which is a discrete, generally non-autonomous dynamical system indexed by layer . In the continuous-depth view commonly used to analyze ResNets and Neural ODEs, this corresponds to . Our "phase transition" therefore refers to a qualitative change in the state trajectory as information propagates from the input representation to the output representation through successive layers. It does not define next-token prediction as the dynamical-system propagation variable.
-
We will revise the paper to make this definition explicit at the beginning of Section 3, change ambiguous phrases such as "temporal evolution" to "depth-wise evolution," and relabel Figure 1's horizontal axis as network depth. This clarification preserves our phase-transition interpretation while removing the unintended implication that Figure 5 tracks autoregressive time.
-
Each layer uses its own SAE and its own factual centroid. We will correct the notation in Equation (10) to
- We agree that raw Euclidean energy may inherit layer-specific activation scale. We therefore add two controls fitted on factual training data only: layer-standardized energy and direction-only cosine deviation. The depth-wise transition remains localized to nearly the same region under both controls.
| Model/control | Detected transition | Stable-to-transition effect | ID AUC | OOD AUC |
|---|---|---|---|---|
| Gemma, raw GPE | L23-L35 | 0.9286 | 0.8044 | |
| Gemma, layer-standardized GPE† | L23-L35 | 0.9279 | 0.8028 | |
| Gemma, cosine deviation† | L24-L35 | 0.9218 | 0.7969 | |
| Llama, layer-standardized GPE† | L23-L28 | 0.8849 | 0.7987 | |
| Qwen, layer-standardized GPE† | L16-L23 | 0.9056 | 0.7908 |
- These controls complement the existing localization evidence: 30/42 parameter configurations exactly recover L23-L35 (mean IoU 0.956; minimum 0.846), while 1,000 bootstrap resamples yield mean IoU and median IoU 1.000.
2. Can the authors provide token-level analysis, particularly before the first hallucinated token?
Thanks for the suggestion. We answer your concern by the following aspects:
-
Token position and layer depth are two distinct axes. Our phase-transition hypothesis concerns the layer-depth trajectory at a fixed token position; a token-time transition is not required by our definition.
-
Nevertheless, to test whether the depth-wise pattern depends on which token is inspected, we add an auxiliary analysis at the prompt-final position, the position immediately before the first incorrect token, the first incorrect token, and the response-final position. The same depth-wise transition is recovered across these positions.† This analysis is a robustness check over token positions, not a redefinition of the dynamical system.
| Token position used for the depth trajectory† | Detected transition | OOD AUC |
|---|---|---|
| Final prompt token | L23-L34 | 0.7981 |
| Immediately before first incorrect token | L23-L35 | 0.8022 |
| First incorrect token | L23-L35 | 0.8044 |
| Final response token | L24-L35 | 0.7993 |
- We will explicitly state that the current short-answer datasets do not support a claim about long autoregressive trajectories. Our claim is the depth-wise state transition from input-side to output-side representations.
3. Do the two intervention examples support causal claims?
-
We agree that two examples alone are illustrative. We therefore add an aggregate bidirectional intervention study using the top-5 positive C-DLA features, activation-matched random features from the same layers, and negative-C-DLA features as controls.
-
Ablating positive C-DLA features reduces hallucination and increases the correct-vs-incorrect logit margin, whereas amplifying them produces the reverse effect. Activation-matched random interventions have substantially smaller effects.
| Intervention on 1,00 examples | Hallucination rate before | Hallucination rate after | Change in correct-wrong logit margin | Paired test |
|---|---|---|---|---|
| Ablate top-5 positive C-DLA features | 100.0% | 61.8% | +1.27 | |
| Ablate 5 activation-matched random features | 100.0% | 92.4% | +0.18 | |
| Amplify top-5 positive C-DLA features in factual cases | 0.0% | 38.6% | -1.11 | |
| Amplify 5 activation-matched random features | 0.0% | 8.7% | -0.14 | |
| Ablate top-5 negative-C-DLA features | 0.0% | 27.9% | -0.83 |
- We will use causal only when referring to these controlled interventions. C-DLA ranking and probe accuracy themselves will be described as attribution and predictive evidence.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
1. How should GPE and Figure 1 be interpreted, and could the pattern be caused by activation scale?
2. Do the short-answer datasets support broad generalization claims?
3. Do the interventions establish that the selected features systematically drive hallucination?
We agree that two examples alone are illustrative. We therefore add an aggregate bidirectional intervention study using the top-5 positive C-DLA features, activation-matched random features from the same layers, and negative-C-DLA features as controls.
Ablating positive C-DLA features reduces hallucination and increases the correct-vs-incorrect logit margin, whereas amplifying them produces the reverse effect. Activation-matched random interventions have substantially smaller effects.
4. What is methodologically new beyond combining established ideas?
We agree that SAEs, probing, and contrastive attribution are individually established. Our contribution is the specific coarse-to-fine connection between them:
The matched ablation makes the division of labor precise: C-DLA supplies the dominant accuracy gain, while GPE localization supplies an additional matched-budget gain and reduces measured full-layer extraction cost by 68%.† We will revise the novelty statement so that it does not imply that the individual components are new.