Evaluating and Detecting LLMs Hallucination in Arabic Question Answering

Evaluating and Detecting LLMs Hallucination in Arabic Question Answering. Masters thesis, King Fahd University of Petroleum and Minerals.

[img] PDF (Thesis)
AishaAlansari_Thesis_g202314730 (1).pdf - Accepted Version
Restricted to Repository staff only until 19 May 2027.

Download (15MB)

Arabic Abstract

حققت النماذج اللغوية الكبيرة (LLMs) تقدماً ملحوظاً في توليد اللغة الطبيعية، إلا أنها لا تزال عرضة لظاهرة الهلوسة. وقد ركّزت معظم الأبحاث في هذا المجال على اللغة الإنجليزية، في حين لا يزال تقييم واكتشاف الهلوسة في السياق العربي محدوداً نسبياً، رغم تزايد عدد النماذج متعددة اللغات والمخصصة للغة العربية.للتعامل مع هذه الفجوة، قدمنا AraHalluEval، وهو إطار تقييم موحّد لتحليل الهلوسة في النماذج العربية ومتعددة اللغات ونماذج الاستدلال، مع التركيز على مهمة الإجابة التوليدية عن الأسئلة. يهدف هذا الإطار إلى تجاوز التقييم الثنائي البسيط (صحيح/خاطئ)، وتقديم تحليل أكثر تفصيلًا لأنماط الهلوسة في السياق العربي. قمنا ببناء مجموعة تقييم مكونة من 300 سؤال من مجموعة بيانات TyDiQA العربية، وعرّفنا 7 أنواع من الهلوسة الواقعية و2 من هلاوس الالتزام بالسياق، مع اعتماد التقييم البشري اليدوي بواسطة متحدثين أصليين بالعربية. أظهرت النتائج أن الأخطاء المتعلقة بالكيانات المسماة والأرقام كانت من أكثر الأسباب التي تؤدي إلى الهلوسة. بناءً على هذه الملاحظات، طورنا HalluScore، وهو أول معيار عربي منظم للإجابة عن الأسئلة مخصص لدراسة الهلوسة بشكل شامل. صُمم هذا المعيار ليختبر النماذج عبر أبعاد متعددة، مثل الاستدلال، المعرفة المتخصصة، السياق التاريخي، والمعرفة الثقافية العربية. قمنا بتقييم 17 نموذجًا لغويًا عربيًا ومتعدد اللغات ونماذج استدلال، مع تنفيذ تقييم بشري واسع شمل أكثر من 14 ألف استجابة. أظهرت النتائج أن الهلوسة في النماذج العربية لا تقتصر على الأخطاء الواقعية فقط، بل تشمل أيضًا ضعف الفهم الثقافي، والأخطاء اللغوية، ومشكلات الاستدلال المنطقي. كما كشف التحليل النوعي عن أنماط متكررة مثل قبول فرضيات غير صحيحة، سوء فهم الثقافة العربية، الحساسية لصياغة السؤال، وضعف في القواعد العربية والاستدلال. بعد ذلك، انتقلنا من التقييم إلى كشف الهلوسة. قدمنا CrossHallu، وهي أول دراسة تبحث فيما إذا كانت إشارات الهلوسة المستخرجة من التمثيلات الداخلية للنماذج يمكن أن تنتقل بين اللغات والمجالات المختلفة، مع التركيز على العربية والإنجليزية. باستخدام الحالات المخفية، وأنماط الانتباه، واحتمالات التوكنات، وجدنا أن الهلوسة يمكن كشفها بوضوح داخل نفس اللغة، وأن النقل بين اللغات ممكن، لكنه يؤدي إلى انخفاض في الأداء مقارنة بالتدريب والاختبار داخل نفس اللغة. كما لاحظنا أن النماذج متعددة اللغات مثل Aya و Phi4-mini أظهرت قدرة أفضل على التعميم بين العربية والإنجليزية. أما الانتقال بين المجالات المختلفة داخل العربية، فكان ممكنًا ولكن بشكل غير متوازن، حيث كان التدريب على بيانات أنظف ثم الاختبار على بيانات أكثر صعوبة أكثر نجاحًا من العكس. وبالاستفادة من هذه النتائج، طورنا TrustShift، وهو إطار متقدم لكشف الهلوسة يعتمد على الوصول إلى التمثيلات الداخلية للنموذج (white-box). بدلاً من الاعتماد على إشارة واحدة، يجمع هذا الإطار مجموعة غنية من المؤشرات، مثل تغير التوزيعات الداخلية، وديناميكيات الانتباه، ومسارات الثقة، والتغيرات عبر طبقات النموذج، مع تصميم معماري مخصص لدمج هذه الإشارات بفعالية. حقق هذا النموذج أفضل النتائج الحالية (SOTA) عبر ثلاثة معايير مختلفة لكشف الهلوسة، متفوقًا على عدد من الأساليب السابقة. باختصار، تقدم هذه الأطروحة دراسة شاملة لمشكلة الهلوسة في النماذج اللغوية، مع تركيز خاص على اللغة العربية، من خلال بناء معايير جديدة، وتطوير أطر تقييم دقيقة، وتصميم أساليب قوية لكشف الهلوسة، بهدف الوصول إلى نماذج لغوية أكثر موثوقية واعتمادية في السياق العربي.

English Abstract

Large language models (LLMs) have achieved remarkable progress in natural language generation (NLG), but remain susceptible to hallucination. Extensive research on LLMs' hallucination has mainly focused on English. Despite the growing number of multilingual and Arabic-specific LLMs, evaluating and detecting LLMs' hallucination in the Arabic context remains relatively underexplored. To address this gap, we introduce AraHalluEval, a unified evaluation framework for systematically assessing hallucinations in Arabic, multilingual, and reasoning-based LLMs across generative question answering (GQA). The framework was designed to move beyond coarse binary evaluation and provide a fine-grained understanding of hallucination behavior in the Arabic context, where dedicated evaluation resources remain limited. We sampled 300 GQA instances from TyDiQA-AR and defined 7 categories of factual hallucinations and 2 categories of faithfulness hallucinations to enable detailed analysis of hallucination patterns and model weaknesses. All generated outputs were manually annotated by native Arabic speakers following clear annotation guidelines to ensure high-quality evaluation. Through this fine-grained analysis, we observed recurring hallucination patterns, particularly in named-entity and numerical errors. These findings directly motivated the development of HalluScore, which is a dedicated Arabic GQA hallucination benchmark designed to systematically stress-test LLMs on hallucination-prone question types. HalluScore is the first structured Arabic QA benchmark designed to evaluate hallucination behavior across multiple dimensions, including reasoning difficulty, domain knowledge, historical context, and culturally grounded scenarios. Using this benchmark, we conducted a large-scale human evaluation of 17 Arabic, multilingual, and reasoning-based LLMs, comprising 14,059 annotated responses. Our findings show that hallucination in Arabic LLMs extends beyond factual inaccuracies to include failures in cultural understanding, linguistic reasoning, and logical consistency. Through response-level analysis, we identified recurring failure patterns, including reality violation, cultural misunderstanding, prompt sensitivity, and weaknesses in Arabic grammar and reasoning, highlighting persistent limitations even in advanced reasoning and multilingual LLMs. To further investigate hallucination detection beyond benchmark creation and evaluation, we first introduce CrossHallu, the first study to examine whether hallucination signals learned from internal LLM representations can generalize across languages and domains, with a particular focus on Arabic and English. Using hidden states, attention dynamics, and token probability signals, we show that hallucination signals are detectable in monolingual settings across all evaluated models and datasets. Cross-lingual transfer is feasible but consistently degrades relative to monolingual performance, with stronger transfer observed in multilingual models such as Phi4-mini and Aya, which exhibit greater English–Arabic feature-space alignment. Cross-domain transfer within Arabic shows a clear asymmetry: training on TruthfulQA Arabic and testing on HalluScore often outperforms the HalluScore baseline, whereas the reverse direction performs worse, suggesting that cleaner training signals transfer more effectively to harder, noisier datasets. The combined cross-lingual and cross-domain setting is the most challenging transfer condition, though some models, particularly Aya and Phi4-mini, maintain competitive generalization performance across both shifts simultaneously. Building on these findings, we introduce TrustShift, a white-box hallucination detection framework designed to improve robustness by moving beyond fixed internal signals toward a richer representation of hallucination behavior. TrustShift leverages distributional shifts in hidden representations together with complementary signals derived from attention entropy, confidence trajectories, and global distribution layer shifts. We also introduce layer-wise feature importance, cross-family fusion, and dual-branch gated fusion to enhance the detection performance. The proposed approach achieves SOTA performance across three QA hallucination benchmarks and several hallucination detection techniques. In summary, this thesis provides a comprehensive analysis of hallucination in LLMs in Arabic through the curation of benchmarks, fine-grained evaluation frameworks, and robust hallucination-detection methods.

Item Type: Thesis (Masters)
Subjects: Computer
Research
Research > Information Technology
Department: College of Computing and Mathematics > Information and Computer Science
Thesis Advisor:
Hamzah Luqman,
Thesis Committee Members:
Moataz Ahmed, Irfan Ahmad,
Depositing User: AISHA ALANSARI (g202314730)
Date Deposited: 19 May 2026 10:40
Last Modified: 19 May 2026 10:40
URI: https://eprints.kfupm.edu.sa/id/eprint/144368