Research Article

Pre-emptive Prediction of Inference Hallucinations in Large Language Models Based on Machine Learning Algorithms

Jingchen Yang*
Xi’an Jiaotong-Liverpool University

* Corresponding author: [email protected]

Abstract

The reasoning illusion of large language model is the core bottleneck restricting its safe landing. The existing research mostly focuses on post-event detection and lacks pre-prediction mechanism. In order to improve the accuracy of illusion prediction and generalization performance, a BiLSTM-Attention classification algorithm based on RBMO optimization is proposed in this paper. The model uses a two-way long-short-term memory network to capture the pre-and post-sequence dependencies, focuses on key features with the help of attention mechanism, and introduces the red-billed blue magpie optimization algorithm to adaptively optimize the network weights and hyperparameters, so as to alleviate the local optimal problem of gradient descent. A standardized data set containing 1729 samples was constructed in the experiment, and a variety of machine learning algorithms were selected for comparison and verification. The results show that the proposed algorithm is optimal in accuracy, recall, accuracy, F1 value and AUC value, and all indexes are 0.975 or above, which is overall superior to traditional machine learning and single deep learning models, and can provide effective technical support for large model hallucination pre-prediction and safe deployment.

Keywords: Reasoning Illusion; RBMO; BiLSTM; Attention
Published: June 8, 2026
DOI: 10.54254/2755-2721/2026.34274
Volume: ACE Vol.245
pp. 61-68
Download PDF

References

  1. Ashok, Dhananjay, and Jonathan May. "Language models can predict their own behavior."  arXiv preprint arXiv: 2502.13329  (2025).
  2. Downey, Anthony. "Algorithmic predictions and pre-emptive violence: artificial intelligence and the future of unmanned aerial systems." Digital War 5.1 (2024): 123-133.
  3. Perez-Ferreiro, Pablo Miguel, et al. "Generating trustworthy explanations with a language model enriched by fuzzy rule-based systems." 2025 IEEE International Conference on Fuzzy Systems (FUZZ). IEEE, 2025.
  4. Li, Haoyang, et al. "A survey on large language model acceleration based on kv cache management."  arXiv preprint arXiv: 2412.19442  (2024).
  5. Banerjee, Debodeep, et al. "Learning to guide human decision makers with vision-language models."  arXiv preprint arXiv: 2403.16501  (2024).
  6. Xiao, Dannier. Machine learning-based hazard monitoring for autonomous driving: investigating multi-modality and generative language models. Diss. University of Warwick, 2024.
  7. Clarke, Charles LA, et al. "Report on the 2nd Search Futures Workshop at ECIR 2025." ACM SIGIR Forum. Vol. 59. No. 1. New York, NY, USA: ACM, 2025.
  8. Xu, Zhiyuan, et al. "Steering in the Shadows: Causal Amplification for Activation Space Attacks in Large Language Models."  arXiv preprint arXiv: 2511.17194  (2025).
  9. Park, Changmin, et al. "Understanding physical properties of unseen deformable objects by leveraging large-language models and robot actions." International Journal of Advanced Robotic Systems 23.2 (2026): 17298806261430024.
  10. Xuesong, Li, et al. "The Legal Governance Logic of the Artificial Intelligence Open-Source Ecosystem: Evolutionary Path from Post-Event Accountability to Pre-Event Prevention from a Technological Perspective." Available at SSRN 5897262 (2025).