تقييم فعالية تقنيات XAI لنماذج اللغة المعتمدة على الترميز Evaluating the effectiveness of XAI techniques for encoder-based language models

شارك:
المجلة: Knowledge-Based Systems، المجلد: 310
DOI: https://doi.org/10.1016/j.knosys.2025.113042
تاريخ النشر: 2025-01-23
المؤلف: Melkamu Abay Mersha وآخرون
الموضوع الرئيسي: الذكاء الاصطناعي القابل للتفسير (XAI)

نظرة عامة

تتناول هذه الورقة البحثية الحاجة إلى تقنيات الذكاء الاصطناعي القابل للتفسير (XAI) لتعزيز الشفافية والموثوقية لنماذج اللغة الكبيرة (LLMs). تقدم إطار تقييم شامل يعتمد على أربعة مقاييس رئيسية: اتفاق التفكير البشري (HA)، المتانة، الاتساق، والتباين. تقيم الدراسة ست تقنيات للتفسير من فئات XAI المختلفة – بما في ذلك تبسيط النموذج (LIME)، طرق قائمة على الاضطراب (SHAP)، أساليب قائمة على التدرج (InputXGradient، Grad-CAM)، نشر الصلة على مستوى الطبقات (LRP)، وآليات الانتباه (تصور آلية الانتباه، AMV) – عبر خمسة نماذج لغة قائمة على التشفير (TinyBERT، BERTbase، BERTlarge، XLM-R large، وDeBERTa-xlarge) باستخدام مجموعات بيانات مراجعات الأفلام IMDB واستخراج مشاعر التغريدات.

تكشف النتائج أن LIME يتفوق باستمرار على التقنيات الأخرى عبر مقاييس متعددة، محققًا درجة HA ملحوظة تبلغ 0.9685 على DeBERTa-xlarge، بينما يظهر أيضًا متانة واتساقًا مع زيادة تعقيد النموذج. يتفوق AMV في المتانة والاتساق، مع درجات تقترب من 0.9999، بينما يظهر LRP أداءً متفوقًا في التباين، خاصة مع النماذج المعقدة، محققًا درجات تصل إلى 0.9371. تستنتج الدراسة أنه بينما تعتبر طرق تبسيط النموذج مثل LIME فعالة عبر مقاييس متنوعة، فإن AMV مفضل للتطبيقات التي تتطلب الاستقرار، وLRP مفيد للمهام التي تتطلب تحديد الميزات المتباينة. يوفر إطار التقييم الذي تم إنشاؤه في هذا البحث نهجًا منظمًا لتقييم تقنيات XAI، مما يمهد الطريق للتقدم المستقبلي في موثوقية التفسيرات في التطبيقات الواقعية لنماذج اللغة.

مقدمة

تسلط مقدمة الورقة البحثية الضوء على التأثير التحويلي لنماذج اللغة الكبيرة (LLMs) مثل GPT وBERT عبر مجالات متنوعة، لا سيما في التطبيقات الحرجة للسلامة. ومع ذلك، فإن تعقيد وغموض هذه النماذج يشكلان تحديات كبيرة في فهم عمليات اتخاذ القرار الخاصة بها. تؤكد الورقة على ضرورة وجود تقنيات الذكاء الاصطناعي القابل للتفسير (XAI) لتوفير رؤى قابلة للتفسير حول قرارات النموذج، وهو أمر حاسم لتحديد التحيزات، وتعزيز ثقة المستخدم، وضمان الامتثال التنظيمي، وتسهيل دمج الذكاء الاصطناعي المسؤول. يتم مناقشة طرق XAI المختلفة بعد الحدث، بما في ذلك تبسيط النموذج، وتقنيات قائمة على الاضطراب، وأساليب قائمة على التدرج، ونشر الصلة على مستوى الطبقات (LRP)، وآليات الانتباه، كل منها يقدم طرقًا مختلفة لتوضيح سلوك النموذج.

يحدد المؤلفون فجوة في الأدبيات الحالية بشأن تقييم تقنيات XAI، مشيرين إلى عدم الاتساق في المقاييس ونقص المعايير الموحدة للمقارنة. يقترحون إطار تقييم شامل يدمج مقاييس جديدة قائمة على ترتيب النصوص جنبًا إلى جنب مع درجات الأهمية التقليدية، مما يعالج قيود الطرق الحالية. يهدف هذا الإطار إلى تقييم تقنيات XAI عبر هياكل النماذج المتنوعة والمهام، مع التركيز على عوامل مثل تعقيد النموذج وتنوع اللغة. تشمل مساهمات الدراسة تطوير إطار تقييم قوي، وتحليلات مقارنة لطرق XAI عبر نماذج اللغة القائمة على التشفير المختلفة، وإرشادات لاختيار تقنيات XAI المناسبة المصممة لتناسب المهام المحددة. توضح الورقة هيكلها، مشيرة إلى استكشاف شامل للأعمال ذات الصلة، والمنهجية، وإعداد التجارب، والنتائج، والقيود، واتجاهات البحث المستقبلية.

طرق

توضح قسم المنهجية تطوير إطار تقييم شامل للذكاء الاصطناعي القابل للتفسير (XAI)، مع معالجة قيود الأطر الحالية التي غالبًا ما تركز على مهام ضيقة، ونماذج ذكاء اصطناعي محدودة، وتقنيات تفسير محددة. تفتقر الأطر الحالية إلى نهج موحد لتقييم فعالية طرق XAI عبر تطبيقات متنوعة واحتياجات أصحاب المصلحة.

يهدف الإطار المقترح إلى سد هذه الفجوة من خلال دمج مجموعة واسعة من مجموعات البيانات، والمهام، وهياكل الذكاء الاصطناعي، بما في ذلك الشبكات العصبية ونماذج المحولات. يستخدم مجموعة من طرق XAI ومقاييس التقييم، مما يسهل المقارنات الدقيقة لتقنيات XAI في سيناريوهات مختلفة. مصمم من أجل الوضوح والقابلية للتوسع، يسمح الإطار بدمج مجموعات بيانات جديدة، ومهام، ونماذج، ومقاييس مع تطور المجال، مما يجعله مناسبًا بشكل خاص للتقييمات الشاملة لطرق XAI.

نتائج

تقيم نتائج الدراسة طرق الذكاء الاصطناعي القابل للتفسير (XAI) المختلفة المطبقة على نماذج اللغة القائمة على التشفير عبر مجموعات بيانات IMDB (نصوص طويلة) وTSE (نصوص قصيرة)، مع التركيز على فعالية هذه الطرق بدلاً من أداء النماذج. تكشف التحليلات أن LIME يتفوق باستمرار على تقنيات XAI الأخرى، محققًا درجات عالية من اتفاق التفكير البشري (HA)، خاصة مع النماذج الأكبر، مثل DeBERTa-xlarge، حيث وصلت درجته إلى 0.9685 على IMDB و0.9118 على TSE. كما يظهر SHAP أداءً محسنًا مع النماذج الأكبر، بينما يعاني LRP من التعقيد، حيث يؤدي بشكل أفضل مع النماذج الأبسط. تظهر InputXGradient وGrad-CAM أداءً معتدلًا، حيث تستفيد InputXGradient من زيادة تعقيد النموذج، بينما يتخلف AMV باستمرار عبر جميع النماذج.

فيما يتعلق بالمتانة، يظهر LIME استقرارًا قويًا عبر جميع النماذج، مع درجات تشير إلى تفسيرات متسقة لكل من النصوص الطويلة والقصيرة. يظهر AMV أفضل متانة بشكل عام، بينما يظهر LRP تباينًا كبيرًا، خاصة مع النماذج الأكبر. تعتبر متانة SHAP معتدلة، مع انخفاض الأداء للنماذج الأكبر. تسلط النتائج الضوء على أن LIME وAMV هما أكثر طرق XAI متانة، حيث توفر تفسيرات مستقرة عبر تعقيدات النماذج المختلفة وأطوال النصوص، بينما يعتبر LRP وSHAP أقل موثوقية، خاصة مع زيادة تعقيد النموذج.

مناقشة

في قسم المناقشة من الورقة البحثية، يصنف المؤلفون تقنيات الذكاء الاصطناعي القابل للتفسير (XAI) إلى طرق قبل الحدث وبعد الحدث، مع تفضيل التقنيات بعد الحدث بسبب تعقيد نماذج اللغة الكبيرة (LLMs). تُقسم طرق ما بعد الحدث إلى تقنيات غير مرتبطة بالنموذج وتقنيات محددة بالنموذج، تشمل خمس مجموعات رئيسية بناءً على وظائفها: تبسيط النموذج (مثل LIME)، طرق قائمة على الاضطراب (مثل SHAP)، تقنيات قائمة على التدرج (مثل التدرجات المتكاملة، Grad-CAM)، نشر الصلة على مستوى الطبقات (LRP)، وتصوير آليات الانتباه. تسلط الورقة الضوء على قابلية التكيف لـ LRP، التي تم تصميمها في الأصل لمعالجة الصور، لتكون مناسبة لمهام معالجة اللغة الطبيعية، مما يعزز القابلية للتفسير في نماذج مثل BERT.

يتناول المؤلفون أيضًا قيود طرق XAI الحالية، مشيرين إلى التباين في الفعالية عبر نماذج مختلفة والحاجة إلى تقييمات منهجية. يؤكدون على أهمية مقاييس التقييم القوية لتقنيات XAI، بما في ذلك اتفاق التفكير البشري (HA)، ومتوسط الدقة المتوسطة (MAP)، والمتانة، والاتساق، والتباين. تهدف هذه المقاييس إلى قياس التوافق بين تفسيرات النموذج وحدس البشر، واستقرار التفسيرات تحت تغييرات المدخلات، والتفريق بين توقعات الفئات. يقترح المؤلفون إطار تقييم شامل لتقييم فعالية طرق XAI عبر LLMs ذات التعقيدات المتنوعة، بهدف تحديد أكثر التقنيات فعالية المصممة لتناسب هياكل النماذج والمهام المحددة.

قيود

تنشأ قيود هذه الدراسة من تركيزها على مقاييس محددة، ونماذج اللغة القائمة على التشفير، وتقنيات الذكاء الاصطناعي القابل للتفسير (XAI)، ومهام التصنيف، مما يقيد عمومية النتائج. يجب أن تهدف الأبحاث المستقبلية إلى توسيع هذا النطاق من خلال دمج مجموعة أوسع من تقنيات XAI والتحقيق في نماذج المحولات الأكثر تعقيدًا، مثل LLaMA. بالإضافة إلى ذلك، فإن تضمين اللغات ذات الموارد المحدودة ومجموعة أوسع من المهام اللاحقة من شأنه تعزيز موثوقية مقاييس التقييم وقابليتها للتطبيق في السيناريوهات الواقعية.

علاوة على ذلك، فإن معالجة التعقيد الحسابي المرتبط بتقنيات XAI أمر ضروري لتحسين قابلية التوسع والجدوى لإطار التقييم المقترح، خاصة للتطبيقات واسعة النطاق. سيكون هذا التركيز على قابلية التوسع حاسمًا لتقدم التنفيذ العملي لـ XAI في سياقات متنوعة.

Journal: Knowledge-Based Systems, Volume: 310
DOI: https://doi.org/10.1016/j.knosys.2025.113042
Publication Date: 2025-01-23
Author(s): Melkamu Abay Mersha et al.
Primary Topic: Explainable Artificial Intelligence (XAI)

Overview

This research paper addresses the need for explainable AI (XAI) techniques to enhance the transparency and trustworthiness of large language models (LLMs). It introduces a comprehensive evaluation framework based on four key metrics: Human-reasoning Agreement (HA), Robustness, Consistency, and Contrastivity. The study evaluates six explainability techniques from various XAI categories—including model simplification (LIME), perturbation-based methods (SHAP), gradient-based approaches (InputXGradient, Grad-CAM), Layer-wise Relevance Propagation (LRP), and attention mechanisms (Attention Mechanism Visualization, AMV)—across five encoder-based language models (TinyBERT, BERTbase, BERTlarge, XLM-R large, and DeBERTa-xlarge) using the IMDB Movie Reviews and Tweet Sentiment Extraction datasets.

The findings reveal that LIME consistently outperforms other techniques across multiple metrics, achieving a notable HA score of 0.9685 on DeBERTa-xlarge, while also demonstrating robustness and consistency as model complexity increases. AMV excels in Robustness and Consistency, with scores nearing 0.9999, while LRP shows superior performance in Contrastivity, particularly with complex models, achieving scores up to 0.9371. The study concludes that while model simplification methods like LIME are effective across various metrics, AMV is preferable for applications requiring stability, and LRP is advantageous for tasks necessitating the identification of contrasting features. The evaluation framework established in this research provides a structured approach for assessing XAI techniques, paving the way for future advancements in the reliability of explanations in real-world applications of language models.

Introduction

The introduction of the research paper highlights the transformative impact of large language models (LLMs) such as GPT and BERT across various domains, particularly in safety-critical applications. However, the complexity and opacity of these models pose significant challenges in understanding their decision-making processes. The paper emphasizes the necessity for Explainable Artificial Intelligence (XAI) techniques to provide interpretable insights into model decisions, which is crucial for identifying biases, enhancing user trust, ensuring regulatory compliance, and facilitating responsible AI integration. Various post-hoc XAI methods are discussed, including model simplification, perturbation-based techniques, gradient-based approaches, Layer-wise Relevance Propagation (LRP), and attention mechanisms, each offering different ways to elucidate model behavior.

The authors identify a gap in the existing literature regarding the evaluation of XAI techniques, noting inconsistencies in metrics and a lack of standardized criteria for comparison. They propose a comprehensive evaluation framework that integrates new text ranking-based metrics alongside traditional saliency scores, addressing the limitations of current methods. This framework aims to assess XAI techniques across diverse model architectures and tasks, focusing on factors such as model complexity and language diversity. The study’s contributions include the development of a robust evaluation framework, comparative analyses of XAI methods across various encoder-based language models, and guidance for selecting appropriate XAI techniques tailored to specific downstream tasks. The paper outlines its structure, indicating a thorough exploration of related work, methodology, experimental setup, results, limitations, and future research directions.

Methods

The methodology section outlines the development of a comprehensive evaluation framework for Explainable Artificial Intelligence (XAI), addressing the limitations of existing frameworks that often focus on narrow tasks, limited AI models, and specific explainability techniques. Current frameworks lack a standardized approach to assess the effectiveness of XAI methods across diverse applications and stakeholder needs.

The proposed framework aims to fill this gap by incorporating a wide variety of datasets, tasks, and AI architectures, including neural networks and transformer models. It employs multiple XAI methods and evaluation metrics, facilitating rigorous comparisons of XAI techniques in various scenarios. Designed for clarity and extensibility, the framework allows for the integration of new datasets, tasks, models, and metrics as the field evolves, making it particularly well-suited for comprehensive evaluations of XAI methods.

Results

The results of the study evaluate various explainable artificial intelligence (XAI) methods applied to encoder-based language models across the IMDB (long texts) and TSE (short texts) datasets, focusing on the effectiveness of these methods rather than the models’ performance. The analysis reveals that LIME consistently outperforms other XAI techniques, achieving high Human-reasoning Agreement (HA) scores, particularly with larger models, such as DeBERTa-xlarge, where it reached a score of 0.9685 on IMDB and 0.9118 on TSE. SHAP also shows improved performance with larger models, while LRP struggles with complexity, performing better with simpler models. InputXGradient and Grad-CAM exhibit moderate performance, with InputXGradient benefiting from increased model complexity, whereas AMV consistently underperforms across all models.

In terms of robustness, LIME demonstrates strong stability across all models, with scores indicating consistent explanations for both long and short texts. AMV shows the best robustness overall, while LRP exhibits significant variability, particularly with larger models. SHAP’s robustness is moderate, with performance decreasing for larger models. The findings highlight that LIME and AMV are the most robust XAI methods, providing stable explanations across varying model complexities and text lengths, while LRP and SHAP are less reliable, particularly as model complexity increases.

Discussion

In the discussion section of the research paper, the authors categorize Explainable Artificial Intelligence (XAI) techniques into ante-hoc and post-hoc methods, with a preference for post-hoc techniques due to the complexity of large language models (LLMs). Post-hoc methods are further divided into model-agnostic and model-specific techniques, encompassing five main groups based on their functionalities: model simplification (e.g., LIME), perturbation-based methods (e.g., SHAP), gradient-based techniques (e.g., Integrated Gradients, Grad-CAM), Layer-wise Relevance Propagation (LRP), and attention mechanism visualizations. The paper highlights the adaptability of LRP, originally designed for image processing, to NLP tasks, enhancing interpretability in models like BERT.

The authors also address the limitations of existing XAI methods, noting the variability in effectiveness across different models and the need for systematic assessments. They emphasize the importance of robust evaluation metrics for XAI techniques, including Human-reasoning Agreement (HA), Mean Average Precision (MAP), robustness, consistency, and contrastivity. These metrics aim to quantify the alignment between model explanations and human intuition, the stability of explanations under input variations, and the differentiation of class predictions. The authors propose a comprehensive evaluation framework to systematically assess the effectiveness of XAI methods across LLMs of varying complexities, ultimately aiming to identify the most effective techniques tailored to specific model architectures and tasks.

Limitations

The limitations of this study stem from its focus on specific metrics, encoder-based language models, explainable artificial intelligence (XAI) techniques, and classification tasks, which restricts the generalizability of the findings. Future research should aim to expand this scope by integrating a wider array of XAI techniques and investigating more complex transformer-based models, such as LLaMA. Additionally, including under-resourced languages and a broader range of downstream tasks would enhance the robustness of the evaluation metrics and their applicability in real-world scenarios.

Moreover, addressing the computational complexity associated with XAI techniques is essential for improving the scalability and feasibility of the proposed evaluation framework, particularly for large-scale applications. This focus on scalability will be critical for advancing the practical implementation of XAI in diverse contexts.