Yanqiang Zhang

Author directory

2026

While large language models (LLMs) have exhibited remarkable performance across diverse natural language processing tasks, their inherent propensity to generate hallucinations poses a critical challenge to reliable deployment in high-stakes scenarios. Existing hallucination detection methods often rely on static single-layer representations or aggregated features across all layers, which often fail to capture fine-grained factual inconsistencies and thus exhibit limited generalization capability. To address this limitation, this paper proposes TemHal (Temporal Hallucination Detector), a novel detection framework that models the cross-layer evolutionary trajectory of internal representations. Specifically, TemHal tracks the dynamic representational progression of key factual tokens across selected intermediate MLP activations and employs a bidirectional temporal modeling network to identify representational patterns that differentiate factually consistent outputs from hallucinated ones. Extensive experimental results demonstrate that the proposed method achieves consistent performance improvements across multiple mainstream model architectures and diverse benchmark datasets, while also exhibiting robust cross-dataset generalization across multiple LLM backbones. Furthermore, ablation studies validate the contribution of each architectural component and confirm the importance of temporal modeling and intermediate-layer focusing for detection performance.