Hallucination in large language models reduces their reliability and slows adoption. Various white-box studies have used internal representations to detect patterns of truthfulness and factuality. A less-studied approach is to identify feed-forward neurons correlated with hallucination. We propose a method to rank feed-forward neurons at the final prompt token using a custom neuron selection dataset. We transfer the selected neuron identities to train hallucination classifiers on other factual question answering datasets. Our work provides empirical evidence that probes trained using the features from the selected neurons perform on par with probes trained on internal states. We also analyze the distribution of selected neurons and the effect of layer depth on detection performance.
Figures & tables
Fig. 1: We collect ui,jℓ and zi,jℓ to compute δi,jℓ for ranking neurons as described in Section II-B
Model
Mistral
Qwen
Llama
Chosen 1%
0.878 ± 0.003
0.828 ± 0.001
0.845 ± 0.007
Final Layer MLP Output
0.858 ± 0.000
0.794 ± 0.003
0.837 ± 0.008
Final Layer Residual Stream
0.860 ± 0.003
0.804 ± 0.005
0.839 ± 0.001
TABLE I: AUROC Performance of Linear Probes on the Neuron Selection Dataset Using Three-Fold Cross Validation
Fig. 2: Distribution of neurons from the chosen set S1% across layers and AUROC of linear NeuroActiSep on the neuron selection dataset for each depth cutoff
Dataset
Model
Truthful
Halluc.
Refusal
No Label
TruthfulQA
Mistral
532
254
29
2
Qwen
501
308
8
0
Llama
427
381
8
1
TriviaQA (Train)
Mistral
6818
2812
193
177
Qwen
6528
3250
90
132
Llama
7501
2230
90
179
TABLE II: Number of labels assigned to each dataset by our annotation pipeline
Method
TriviaQA
TruthfulQA
Mistral
Qwen
Llama
Mistral
Qwen
Llama
Generation Scores
Perplexity
0.617
0.712
0.705
0.545 ± 0.037
0.522 ± 0.042
0.570 ± 0.036
Mean Probability
0.615
0.697
0.693
0.537 ± 0.041
0.514 ± 0.048
0.563 ± 0.034
Mean Logits
0.617
0.656
0.670
0.580 ± 0.036
0.570 ± 0.048
0.562 ± 0.042
Min Logits
0.625
0.749
0.763
0.604 ± 0.028
0.588 ± 0.045
0.588 ± 0.046
P(True)
0.730
0.745
0.720
0.406 ± 0.026
0.510 ± 0.052
0.361 ± 0.017
TABLE III: AUROC performance of NeuroActiSep compared with baselines across datasets and models