Recent work identifies a sparse set of "hallucination neurons" (H-neurons), less than 0.1% of feed-forward network neurons, that reliably predict when large language models will hallucinate. These neurons are identified on general-knowledge question answering and shown to generalize to new evaluation instances. We ask a natural follow-up question: do H-neurons generalize across knowledge domains? Using a systematic cross-domain transfer protocol across 6 domains (general QA, legal, financial, science, moral reasoning, and code vulnerability) and 5 open-weight models (3B to 8B parameters), we find they do not. Classifiers trained on one domain's H-neurons achieve AUROC 0.783 within-domain but only 0.563 when transferred to a different domain (delta = 0.220, p < 0.001), a degradation consistent across all models tested. Our results suggest that hallucination is not a single mechanism with a universal neural signature, but rather involves domain-specific neuron populations that differ depending on the knowledge type being queried. This finding has direct implications for the deployment of neuron-level hallucination detectors, which must be calibrated per domain rather than trained once and applied universally.
Figures & tables
Figure 1: Overview of the cross-domain H-neuron transfer protocol. For each model, we extract CETT-based neuron activation features across 6 domains, train per-domain L1-regularized logistic regression classifiers, and evaluate every classifier on every domain to construct a 6×6 transfer matrix.
Model
Gen.
Leg.
Fin.
Sci.
Mor.
Code
Qwen-3B
.896
.795
.882
.662
.836
.597
Nemotron-4B
.876
.807
.677
.753
.872
.563
Phi-3.5
.902
.768
.838
.871
.899
.557
Mistral-7B
.824
.862
.767
.929
.818
.666
Llama-8B
.805
.747
.890
.797
.805
.542
Mean
.861
.796
.811
.802
.846
.585
Table 1: Within-domain AUROC for H-neuron classifiers (direct prompting). Each value represents a classifier trained and tested on the same domain (held-out test set). All values except code substantially exceed chance (0.5). Bootstrap point estimates with CIs are reported in Appendix D .
Figure 2: Cross-domain transfer matrix (mean AUROC across 5 models, direct prompting). Diagonal entries (within-domain) are consistently higher than off-diagonal entries (cross-domain). The transfer gap Δ=0.220 is statistically significant ( p<0.001 , permutation test).
Train ↓ Test →
Gen.
Leg.
Fin.
Sci.
Mor.
Code
General
.861
.582
.617
.604
.634
.510
Legal
.525
.796
.556
.698
.552
.517
Financial
.526
.595
.811
.560
.602
.494
Science
.559
.722
.542
.802
.572
.523
Moral
.601
.578
.618
.547
.846
.530
Code
.470
.507
.508
.542
.508
.585
Table 2: Mean cross-domain AUROC across 5 models (direct prompting). Shaded diagonal entries are within-domain; off-diagonal entries are cross-domain transfers. The diagonal consistently dominates.
Figure 3: Within-domain (dark) vs. cross-domain (light) mean AUROC by model. The gap is consistent across all models and architectures.
Domain
Qwen
Nem.
Phi
Mis.
Llama
Direct prompting
General
.896
.876
.902
.824
.805
Legal
.795
.807
.768
.862
.747
Financial
.882
.677
.838
.767
.890
Science
.662
.753
.871
.929
.797
Moral
.836
.872
.899
.818
.805
Table 3: Within-domain AUROC under direct vs. CoT prompting. † indicates pairs where the model produced identical responses under both strategies, yielding identical classifier results.
Figure 4: Comparison of within-domain AUROC under direct (left) and CoT (center) prompting, with the difference shown on the right. CoT effects are heterogeneous across models and domains.
Figure 5: Domain specificity (transfer gap Δ ) by model size. Domain specificity does not consistently increase or decrease with model scale in the 3B-8B range.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Domain
Dataset
Split
Samples Used
Task Type
Answer Format
General QA
TriviaQA
test
1000
Open-ended factual QA
Free-form text
Legal
CaseHOLD
test
1000
Holding identification
5-way multiple choice
Financial
FinancialPhraseBank
train
1000
Sentiment classification
3-way classification
Science
ARC-Challenge
test
1000
Science reasoning
4-way multiple choice
Moral
ETHICS (commonsense)
test
1000
Moral judgment
Binary classification
Code
Devign
test
1000
Vulnerability detection
Binary classification
Appendix
Table 4: Dataset details for each domain. Samples Used refers to questions presented to each model; see Table 10 for evaluation counts after filtering.
Train ↓ / Test →
General
Legal
Financial
Science
Moral
Code
General
.805
.571
.690
.563
.876
.529
Legal
.607
.747
.707
.734
.604
.588
Financial
.593
.659
.890
.606
.763
.534
Science
.593
.754
.519
.797
.574
.520
Moral
.602
.561
.641
.522
.805
.498
Code
.489
.539
.558
.463
.651
.542
Appendix
Table 5: Transfer matrix for Llama-3.1-8B-Instruct (direct prompting). Within-domain diagonal in bold.
Train ↓ / Test →
General
Legal
Financial
Science
Moral
Code
General
.824
.576
.685
.742
.725
.481
Legal
.351
.862
.607
.873
.374
.448
Financial
.642
.579
.767
.731
.586
.514
Science
.393
.845
.627
.929
.513
.475
Moral
.651
.631
.559
.384
.818
.527
Code
.411
.436
.423
.593
.529
.666
Appendix
Table 6: Transfer matrix for Mistral-7B-Instruct-v0.3 (direct prompting).
Train ↓ / Test →
General
Legal
Financial
Science
Moral
Code
General
.876
.536
.618
.552
.444
.586
Legal
.579
.807
.406
.582
.779
.516
Financial
.498
.535
.677
.391
.737
.498
Science
.592
.738
.590
.753
.718
.647
Moral
.524
.563
.663
.669
.872
.512
Code
.488
.644
.513
.470
.210
.563
Appendix
Table 7: Transfer matrix for Nemotron-Mini-4B-Instruct (direct prompting).
Train ↓ / Test →
General
Legal
Financial
Science
Moral
Code
General
.902
.597
.451
.665
.511
.474
Legal
.467
.768
.491
.642
.256
.548
Financial
.516
.645
.838
.532
.461
.404
Science
.604
.605
.374
.871
.332
.423
Moral
.605
.490
.558
.625
.899
.588
Code
.462
.465
.449
.631
.488
.557
Appendix
Table 8: Transfer matrix for Phi-3.5-mini-instruct (direct prompting).
Train ↓ / Test →
General
Legal
Financial
Science
Moral
Code
General
.896
.633
.641
.498
.614
.479
Legal
.619
.795
.567
.660
.747
.485
Financial
.383
.555
.882
.541
.460
.519
Science
.614
.668
.598
.662
.724
.548
Moral
.624
.642
.667
.534
.836
.524
Code
.500
.450
.597
.552
.662
.597
Appendix
Table 9: Transfer matrix for Qwen2.5-3B-Instruct (direct prompting).
Domain
Qwen
Nem.
Phi
Mis.
Llama
General
160
200
212
142
90
Legal
230
104
180
82
88
Financial
128
86
110
112
80
Science
100
106
56
76
64
Moral
124
66
192
90
26
Code
264
240
256
103
182
Appendix
Table 10: Evaluation sample sizes per model and domain.
Model
Domain
AUROC [95% CI]
CV (mean ± std)
Perm. p
Verdict
Qwen2.5-3B
General
.925 [.882, .963]
.920 ± .013
.000
ROBUST
Legal
.788 [.725, .843]
.794 ± .035
.000
ROBUST
Financial
.749 [.655, .839]
.806 ± .026
.000
ROBUST
Science
.783 [.691, .866]
.763 ± .076
.000
ROBUST
Moral
.818 [.746, .889]
.811 ± .020
.000
ROBUST
Code
.604 [.538, .673]
.621 ± .040
.000
ROBUST
Appendix
Table 11: Robustness analysis for all experiments under direct prompting. AUROC is the bootstrap point estimate with 95% CI (1,000 resamples). CV reports 5-fold cross-validated AUROC.
Model
Domain
AUROC [95% CI]
CV (mean ± std)
Perm. p
Verdict
Qwen2.5-3B
General
.924 [.880, .961]
.942 ± .016
.000
ROBUST
Legal
.793 [.738, .850]
.788 ± .017
.000
ROBUST
Financial
.830 [.750, .901]
.809 ± .009
.000
ROBUST
Science
.607 [.499, .724]
.692 ± .055
.000
WEAK
Moral
.850 [.779, .908]
.836 ± .021
.000
ROBUST
Code
.646 [.574, .713]
.628 ± .041
.050
WEAK
Appendix
Table 12: Robustness analysis for all experiments under CoT prompting. † marks experiments identical to direct prompting (response caching). See Table 11 caption for details.
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.
Ali Derogar Odolou, Reza Nazari, Mostafa Salehi
School of Intelligent Systems Engineering College of Interdisciplinary Science and Technology University of Tehran, Tehran, Iran
Large language models generate fluent text that can contain unfaithful claims -- a phenomenon known as hallucination. We present a multi-signal detection pipeline combining fine-tuned DeBERTa-v3 classification, Monte Carlo (MC) Dropout uncertainty quantification, and temperature-scaled calibration for response-level hallucination detection. Evaluated on the HaluEval benchmark, our pipeline achieves F1=0.915 and AUROC=0.977 on general-domain tasks, with per-task F1 scores of 0.97 (QA), 0.96 (Summarization), and 0.82 (Dialogue). MC Dropout inference further improves accuracy to 93.2%. A context ablation study confirms the model performs genuine entailment reasoning rather than exploiting surface patterns, with summarization F1 dropping 24% when knowledge context is removed. Learning curve analysis reveals that 25% of training data captures 77% of full-data performance. Beyond detection, we apply Direct Preference Optimization (DPO) to a Qwen2.5-0.5B generator, reducing its hallucination rate from 85.5% to 37.7% (55.9% relative reduction) as measured by our detector. Cross-domain evaluation on the SciFact biomedical benchmark shows that general-domain training transfers poorly (F1=0.52), motivating domain-specific fine-tuning. PubMedBERT fine-tuned on SciFact achieves F1=0.63 and AUROC=0.81, demonstrating that domain-matched pre-training is the strongest adaptation strategy. Code and models are available at https://github.com/varunteja99/hallucination-detection-nlp
Varun Teja Chundru, Debasmita Biswas
Department of Computer Science Purdue University Fort Wayne
Recent hallucination detection techniques in large language models (LLMs) focus on directly extracting features from a model's internal representations and training a classifier on these features to detect hallucinations, demonstrating promising results. Notwithstanding this advancement, most internal-state hallucination detection techniques have been explored predominantly in English, raising the question of whether such internal signals generalize across different languages and domains. To address this gap, we present CrossHallu, the first study to evaluate the cross-lingual and cross-domain generalization of hallucination detection using internal representations from six LLMs on the generative question-answering task. We conduct a systematic Arabic <-> English evaluation using TruthfulQA, an Arabic translated version of TruthfulQA, and HalluScore. This evaluation encompasses monolingual training and testing, cross-lingual transfer, cross-domain transfer, and combined cross-lingual and cross-domain transfer. The results reveal that internal-state hallucination signals in LLMs transfer across languages and domains for most models, with cross-lingual performance highly dependent on both class separability and language alignment in the feature space, whereas cross-domain transfer within Arabic varies depending on the training and testing datasets used for the hallucination detector. The code is publicly available at https://github.com/aishaalansari57/CrossHal.
Aisha Alansari, Malak Alkhorasani, Hamzah Luqman
King Fahd University of Petroleum and Minerals · Imam Abdulrahman bin Faisal University