Despite their widespread use, Large Language Models (LLMs) remain limited by a fundamental problem: the generation of plausible but false content, known as hallucinations. Most existing detection methods operate at the answer or sentence level, yet per-token detection is essential for localizing hallucinated spans and enabling fine-grained interventions. In this paper, we explore the use of the Mixture-of-Experts (MoE) paradigm to address this gap. In MoE architectures, a single forward pass activates a sparse subset of experts (i.e., distinct feedforward networks per layer) via a routing mechanism, producing internal signals (e.g., router entropy, expert disagreement, and expert usage patterns) that are unavailable in dense architectures and have not been previously exploited for hallucination detection. To this end, we introduce InnerExpert, the first method to leverage these MoE-specific signals for per-token hallucination detection. InnerExpert combines routing-level and standard transformer signals into compact per-token feature vectors, classified by a lightweight detector trained on labels produced by an LLM-as-a-judge pipeline, which enables continuous model updates without manual annotation. Our results show that InnerExpert outperforms existing methods across five datasets and two MoE architectures, achieving up to 0.91 answer-level and 0.76 token-level AUROC, while requiring only a single forward pass.
Figures & tables
Figure 1: Overview of InnerExpert . A single forward pass through the MoE model exposes internal signals ( i.e., router distributions, per-expert hidden states, and expert usage patterns) which are combined into per-token hallucination scores.
FQA
NQO
RTQA
SQuAD
TQA
Rank
Avg
Gemma-4-26B
IE (LR)
0.705
0.635
0.759
0.785
0.740
3.0
0.725
IE (MLP)
0.710
0.662
0.756
0.806
0.715
2.6
0.730
IE (RF)
0.638
0.651
0.749
0.788
0.724
3.6
0.710
IE (Transf.)
0.656
0.619
0.716
0.760
0.722
4.6
0.694
IE (XGB)
0.711
0.678
0.805
0.802
0.767
1.2
0.753
Table 1: Token-level results (AUROC) across datasets and host models.
FQA
NQO
RTQA
SQuAD
TQA
Rank
Avg
Gemma-4-26B
HaluNet
0.836
0.835
0.937
0.945
0.952
3.2
0.901
IE (LR)
0.847
0.790
0.927
0.933
0.963
3.8
0.892
IE (MLP)
0.866
0.780
0.939
0.943
0.952
3.0
0.896
IE (RF)
0.752
0.832
0.870
0.919
0.937
5.8
0.862
IE (Transf.)
0.813
0.854
0.902
0.883
0.947
5.0
0.880
Table 2: Answer-level results (AUROC) across datasets and host models.
Figure 2: Inference time (per 100 tokens) vs. answer-level AUROC (averaged across five evaluation datasets) for each detection method, measured on 50 RealTimeQA questions per host model. The gray, dashed line represents the pareto frontier.
OLMoE-1B-7B
Gemma-4-26B
Method
Answer
Token
Answer
Token
Inv. Herfindahl
0.685
0.675
0.784
0.602
Exp. Entropy
0.613
0.574
0.884
0.591
Exp. Gini
0.599
0.561
0.824
0.626
Expert Hidden
0.693
0.640
0.722
0.466
Expert Similarity
0.397
0.442
0.717
0.437
Table 3: Average AUROC for individual MoE signals, baselines, InnerExpert (XGB). Each value is averaged across all five evaluation datasets per host model. Answer-level scores use the best aggregation per method. Methods without a token-level counterpart are marked “—”.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Signal
Notation
Category
Description
Per-token dim.
Hidden state score
ϕt,lhid
Standard
Mean log-singular-value of hidden state covariance
L
Attention score
ϕt,l,hatt
Standard
Log-cumulative sum of attention kernel diagonal
LH
Router entropy
ϕt,lrout
MoE
Shannon entropy of gating distribution
L
Expert hidden score
ϕt,lexp-hid
MoE
Routing-weighted hidden score of selected experts
L
Expert similarity
ϕt,lsim
MoE
Routing-weighted pairwise cosine similarity of experts
L
Expert usage
ut,l
MoE
Cumulative routing-weighted usage distribution
LN
Appendix
Table 4: Summary of signals extracted by InnerExpert . Each signal is computed cumulatively over the generated prefix up to position t , yielding a per-token value. The total per-token feature dimensionality is the sum of all signal dimensions. L = number of MoE layers, H = number of attention heads, N = number of experts.
Model
L
H
N
∣Φt∣
Params
Act.
OLMoE-1B-7B-0924-Instruct
16
16
64
1 360
∼ 7B
∼ 1B
Gemma-4-26B-A4B-it
30
16
129
4 470
∼ 26B
∼ 4B
Appendix
Table 5: Feature dimensionality for each host model. L : number of layers, H : number of attention heads, N : number of experts, ∣Φt∣ : per-token feature dimensionality, Params: total model parameters, Act.: number of active parameters per token.
Dataset
N
Base
Eviden.
Halluc.
Grounded
Halluc. %
Ans.
Gemma-4-26B
SQuAD
400
200
200
172
228
43.0
17.1
TQA
399
199
200
194
205
48.6
19.2
NQO
400
200
200
233
167
58.2
16.0
FQA
400
200
200
226
174
56.5
13.3
RTQA
730
365
365
397
333
54.4
15.3
Appendix
Table 6: Dataset statistics for all evaluation datasets and host models. Labels are from the LLM-as-a-judge approach (GLM-5.1). “Ans.” is the average number of words in the generated answer.
Classifier
Hyperparameter
Grid
Logistic Regression
C
{0.01,0.1,1.0,10.0}
Random Forest
n_estimators
{300,500,1000}
max_depth
{3,6,10}
min_samples_leaf
{1,5}
XGBoost
n_estimators
{300,500,1000}
max_depth
{3,6,10}
Appendix
Table 7: Hyperparameter grids for each classifier family. Hyperparameters used for OLMoE are boldfaced, the ones used for Gemma are underlined.
LLM-as-a-judge
Grounded
Hallucinated
Total
Human
Grounded
93
20
113
Hallucinated
7
80
87
Total
100
100
200
Weak heuristic
Grounded
Hallucinated
Total
Human
Appendix
Table 8: Confusion matrix between human annotations and LLM-as-a-judge labels/Weak labeling on the 200-sample validation set (pooled across both host models, 25 per 2×2 contingency cell per model).
Confidence
OLMoE (%)
Gemma (%)
[0.0, 0.2[
36 (0.9 %)
220 (9.6 %)
[0.2, 0.4[
598 (15.5 %)
88 (3.8 %)
[0.4, 0.6[
230 (6.0 %)
33 (1.4 %)
[0.6, 0.8[
121 (3.1 %)
71 (3.1 %)
[0.8, 1.0]
2862 (74.4 %)
1877 (82.0 %)
Total
3847 ( 100 %)
2289 ( 100 %)
Appendix
Table 9: Confidence distribution, based on the weak labeling approach, for hallucinated labels (label=1)
Confidence
OLMoE (%)
Gemma (%)
[0.0, 0.2[
196 (24.9 %)
1764 (75.2 %)
[0.2, 0.4[
531 (67.5 %)
301 (12.8 %)
[0.4, 0.6[
44 (5.6 %)
50 (2.1 %)
[0.6, 0.8[
6 (0.8 %)
42 (1.8 %)
[0.8, 1.0]
10 (1.3 %)
189 (8.1 %)
Total
787 ( 100 %)
2346 ( 100 %)
Appendix
Table 10: Confidence distribution, based on the weak labeling approach, for grounded labels (label=0)
Condition
N
Halluc.
Grounded
Halluc. %
OLMoE-1B-7B
Base
2318
2312
6
99.7 %
Evidence
2318
1535
783
66.2 %
Overall
4636
3847
789
83.0 %
Gemma-4-26B
Base
2318
1980
338
85.4 %
Appendix
Table 11: Label distribution by model and evidence condition
FQA
NQO
RTQA
SQuAD
TQA
Rank
Avg
Gemma-4-26B
IE (LR)
0.648
0.629
0.751
0.705
0.730
2.6
0.693
IE (MLP)
0.646
0.625
0.681
0.718
0.706
4.0
0.675
IE (RF)
0.571
0.575
0.756
0.706
0.774
3.2
0.676
IE (Transf.)
0.586
0.544
0.726
0.653
0.671
5.2
0.636
IE (XGB)
0.175
0.116
0.782
0.139
0.168
6.6
0.276
Appendix
Table 12: Token-level results (F1) across datasets and host models.
FQA
NQO
RTQA
SQuAD
TQA
Rank
Avg
Gemma-4-26B
HaluNet
0.778
0.769
0.849
0.825
0.897
3.2
0.824
IE (LR)
0.790
0.763
0.849
0.873
0.904
2.4
0.836
IE (MLP)
0.828
0.780
0.876
0.890
0.868
2.0
0.849
IE (RF)
0.689
0.679
0.809
0.837
0.912
4.6
0.785
IE (Transf.)
0.751
0.787
0.840
0.760
0.884
3.6
0.804
Appendix
Table 13: Answer-level results (F1) across datasets and host models.
OLMoE-1B-7B
Gemma-4-26B
Method
Time per 100 tok (s)
Peak GPU (GB)
Time per 100 tok (s)
Peak GPU (GB)
Vanilla
1.146
12.660
3.825
46.810
Logit Entropy
1.152
12.670
3.830
46.880
Perplexity
1.152
12.670
3.830
47.010
LC (att.)
1.198
12.680
3.965
46.880
LC (hid.)
1.246
12.670
4.133
46.830
Appendix
Table 14: Inference time (per 100 tokens) and peak GPU memory for each detection method, measured on 50 RealTimeQA questions per host model. InnerExpert times include MoE feature extraction (SVD-based hidden scores, attention scores, expert routing signals) as well as classifier inference.
OLMoE-1B-7B
Gemma-4-26B
Method
Answer
Token
Answer
Token
Inv. Herfindahl
0.940
0.731
0.697
0.619
Exp. Entropy
0.881
0.639
0.748
0.671
Exp. Gini
0.869
0.597
0.745
0.671
Expert Hidden
0.945
0.698
0.707
0.667
Expert Similarity
0.945
0.634
0.740
0.523
Appendix
Table 15: Average F1 for individual MoE signals, baselines, InnerExpert (XGB). Each value is averaged across all five evaluation datasets per host model. Answer-level scores use the best aggregation per method. Methods without a token-level counterpart are marked “—”.
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 demonstrate that HalluSAE achieves state-of-the-art hallucination detection performance.
Boshui Chen, Zhaoxin Fan, Ke Wang +5
Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing, School of Artificial Intelligence, Beihang University, Beijing, China. · State Key Laboratory of Virtual Reality Technology and Systems, Beihang University, Beijing, China. · Beijing Academy of Blockchain and Edge Computing, Beijing, China. +1
Large language models (LLMs) frequently generate fluent yet factually incorrect responses, raising concerns about their reliability. Recent hallucination detectors increasingly exploit internal representations, but extracting informative signals from high-dimensional hidden states remains challenging. Existing approaches often rely on selected activations or pooling-based compression, potentially overlooking discriminative information distributed across Transformer layers, feature modes, and tokens. We propose LOTUS (Low-rank Order-statistic TUcker-based Subspace learning), a multilinear low-rank decomposition framework for hallucination detection that extracts compact representations from LLM hidden states while reducing dependence on labeled data. Our approach first summarizes variable-length token representations using complementary statistical descriptors that capture peak activations, activation distributions, and cross-layer changes. We then leverage low-rank multilinear decomposition to extract compact representations that capture the underlying structure of LLM hidden states, which are subsequently used to train a lightweight hallucination classifier. Experiments across multiple LLMs and question-answering benchmarks demonstrate improved hallucination detection performance over recent state-of-the-art baselines.
Devansh Sharma, Faizul Rakib Sayem, Shahana Ibrahim
Department of Electrical & Computer Engineering, University of Central Florida
As Large Language Models (LLMs) increasingly serve as foundational reasoning engines, their tendency to hallucinate remains a critical vulnerability. While recent internal state probes offer a promising alternative to slow external retrieval systems, they largely reduce hallucination detection to a token-wise binary classification task, failing to capture the structured, sequential boundaries of semantic drift. Here, we introduce an internal hidden state framework for fine-grained, span-level hallucination detection. By inspecting layer-wise activation patterns, we attempt to detect the exact hallucination onset and continuation tokens in an LLM generation. Our experiments show that this approach successfully isolates hallucination onsets, achieving substantial improvements in Precision-Recall AUC over random baselines despite extreme class imbalance. Ultimately, we propose a novel cross-model detection framework in which one model observes the internal representations elicited by another model's generation. We find that an external observer can match or exceed a generator's self-detection of its own hallucination onsets, including when the observer is the smaller model, suggesting that self-detection is not the ceiling for onset localisation.
Kingshuk Gupta, Davide Buscaldi
LIX, École Polytechnique · School of Electrical and Electronic Engineering, Nanyang Technological University · LIPN, Sorbonne Paris Nord