التعلم العميق القابل للتفسير لتحليل السلاسل الزمنية: دمج SHAP وLIME في نماذج قائمة على LSTM
Explainable Deep Learning for Time Series Analysis: Integrating SHAP and LIME in LSTM-Based Models

المجلة: Journal of Information Systems Engineering & Management، المجلد: 10، العدد: 16
DOI: https://doi.org/10.52783/jisem.v10i16s.2627
تاريخ النشر: 2025-03-06
المؤلف: Divyani Sen
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم

نظرة عامة

يتناول القسم دمج SHAP (SHapley Additive exPlanations) و LIME (Local Interpretable Model-agnostic Explanations) مع شبكات الذاكرة طويلة وقصيرة الأمد (LSTM) لتعزيز قابلية تفسير هذه النماذج العميقة، التي غالبًا ما تُعتبر “صناديق سوداء”. يوفر LIME تفسيرات محلية من خلال تقريب النموذج بنماذج أبسط وقابلة للتفسير، بينما يقدم SHAP تفسيرًا شاملاً من خلال قياس مساهمة كل ميزة في توقعات النموذج.

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

مقدمة

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

يذكر القسم أيضًا بإيجاز تقديم SHAP (SHapley Additive exPlanations) و LIME (Local Interpretable Model-agnostic Explanations)، مما يشير إلى التركيز على الطرق التي تهدف إلى تعزيز قابلية تفسير النماذج المعقدة، وبالتالي معالجة مخاوف صانعي القرار بشأن شفافية النموذج وموثوقيته.

طرق

في هذا القسم، يحدد المؤلفون المنهجية لتطوير نموذج ذاكرة طويلة وقصيرة الأمد (LSTM) القابل للتفسير لتنبؤ السلاسل الزمنية. تبدأ العملية ببناء نموذج LSTM، تليها إعداد البيانات لضمان ملاءمتها للتحليل. لتعزيز قابلية التفسير، يدمج المؤلفون تقنيات SHAP (SHapley Additive exPlanations) و LIME (Local Interpretable Model-agnostic Explanations)، التي تسهل فهم توقعات النموذج. أخيرًا، يتم تقييم أداء النموذج جنبًا إلى جنب مع قابليته للتفسير، مما يضمن معالجة كل من الدقة وقابلية التفسير بشكل كافٍ في التقييم.

نتائج

تشير النتائج إلى أن دمج SHAP و LIME يعزز قابلية تفسير توقعات نموذج LSTM، سواء على المستوى العالمي أو المحلي. عند تطبيقه على مجموعة بيانات تاريخية من NASDAQ للمعاملات اليومية للأسهم، يتفوق نموذج LSTM على طرق التنبؤ التقليدية، بما في ذلك ARIMA و SARIMA و GRU و RNN البسيط، كما هو موضح في الجدول 3. على وجه التحديد، يحقق LSTM أدنى القيم لـ RMSE (8.5) و MAE (7.2) و MAPE (5.8)، إلى جانب دقة اتجاهية عالية تبلغ 94%. بالمقابل، تظهر النماذج الأخرى مقاييس خطأ أعلى ودقة اتجاهية أقل، حيث يظهر ARIMA أسوأ أداء.

علاوة على ذلك، فإن دمج LSTM مع نماذج الصدمات الاقتصادية يحقق أداءً متفوقًا عبر مقاييس تقييم مختلفة، بما في ذلك RMSE و MAE و MAPE، كما هو موضح في الشكل 5. لا يساعد استخدام SHAP و LIME فقط في فهم توقعات النموذج، بل يعزز أيضًا موثوقية النتائج من خلال تقييم العوامل الرئيسية التي تؤثر على هذه التوقعات، مما يوفر ميزة كبيرة على النماذج التقليدية الأكثر تعقيدًا. بالإضافة إلى ذلك، تُظهر قيم RMSE لكل من نماذج LSTM و GRU على مدى 20 دورة تدريبية، كما هو موضح في الشكل 3، أن LSTM يتقارب بشكل أسرع ويحقق RMSE نهائي أقل مقارنةً بـ GRU.

مناقشة

تؤكد قسم المناقشة على الدور الحاسم لقابلية التفسير في تحليل السلاسل الزمنية، خاصة بالنسبة لنماذج الذكاء الاصطناعي مثل LSTM (ذاكرة طويلة وقصيرة الأمد). تعتبر قابلية تفسير هذه النماذج ضرورية لتعزيز ثقة المستخدم وتسهيل اعتمادها في قطاعات مثل المالية والطاقة، حيث تؤثر التوقعات على القرارات الاستراتيجية. تهدف الورقة إلى تعزيز قابلية تفسير نماذج LSTM من خلال دمج SHAP (SHapley Additive exPlanations) و LIME (Local Interpretable Model-Agnostic Explanations). يسمح هذا الدمج بفهم شامل لكل من أهمية الميزات العالمية والمحلية، مما يسد الفجوة بين البيانات التاريخية والتوقعات المستقبلية.

تسلط مراجعة الأدبيات الضوء على التقدمات الأخيرة في الذكاء الاصطناعي القابل للتفسير، مما يبرز ضرورة قابلية التفسير في نماذج LSTM، التي غالبًا ما تُعتبر “صناديق سوداء”. تم تطبيق تقنيات مثل SHAP و LIME بنجاح عبر مجالات مختلفة، بما في ذلك التنبؤ المالي، لتوفير رؤى حول سلوك النموذج وأهمية الميزات. تحدد الورقة أهدافًا محددة، مثل استخدام SHAP لأهمية السمات العامة و LIME للتوقعات الفردية، بهدف إنشاء إطار عمل قوي يعزز قابلية الاستخدام والشفافية لنماذج التنبؤ بالسلاسل الزمنية المعتمدة على LSTM. لا يحسن هذا النهج قابلية تفسير النموذج فحسب، بل يدعم أيضًا أصحاب المصلحة في اتخاذ قرارات مستنيرة بناءً على توقعات أوضح.

Journal: Journal of Information Systems Engineering & Management, Volume: 10, Issue: 16
DOI: https://doi.org/10.52783/jisem.v10i16s.2627
Publication Date: 2025-03-06
Author(s): Divyani Sen
Primary Topic: Stock Market Forecasting Methods

Overview

The section discusses the integration of SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) with Long Short-Term Memory (LSTM) networks to enhance the interpretability of these deep learning models, which are often viewed as “black boxes.” LIME provides local interpretations by approximating the model with simpler, interpretable models, while SHAP offers a comprehensive explanation by quantifying the contribution of each feature to the model’s predictions.

The application of these methods in forecasting energy consumption based on variables such as temperature and humidity illustrates their effectiveness in elucidating the impact of both current and historical data on predictions. This dual-explanation approach not only bolsters the credibility of LSTM models but also aids domain experts in understanding the dynamics of time-series data. Importantly, the use of SHAP and LIME enhances the interpretability of time series analysis without sacrificing model performance, thereby contributing significantly to the field of Explainable Deep Learning.

Introduction

The introduction highlights the significance of time series analysis across various domains, including finance, health, telecommunications, energy, and climate modeling. It emphasizes that predictive modeling is crucial for decision-making, resource optimization, and anomaly detection. Long Short-Term Memory networks (LSTMs) are identified as advanced deep learning architectures that excel in temporal sequence modeling, yet their complexity poses challenges for user interpretation. This complexity leads to skepticism among stakeholders, particularly in critical sectors like banking and healthcare, regarding the reliability of these models and their outputs.

The section also briefly mentions the introduction of SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations), suggesting a focus on methods aimed at enhancing the interpretability of complex models, thereby addressing the concerns of decision-makers regarding model transparency and trustworthiness.

Methods

In this section, the authors outline the methodology for developing an explainable Long Short-Term Memory (LSTM) model for time series forecasting. The process begins with the construction of the LSTM model, followed by data preparation to ensure suitability for analysis. To enhance interpretability, the authors integrate SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) techniques, which facilitate understanding of the model’s predictions. Finally, the performance of the model is assessed alongside its interpretability, ensuring that both accuracy and explainability are adequately addressed in the evaluation.

Results

The results indicate that the integration of SHAP and LIME enhances the interpretability of the LSTM model’s predictions, both globally and locally. When applied to a NASDAQ Historical Dataset of daily stock transactions, the LSTM model outperforms traditional forecasting methods, including ARIMA, SARIMA, GRU, and simple RNN, as shown in Table 3. Specifically, LSTM achieves the lowest values for RMSE (8.5), MAE (7.2), and MAPE (5.8), alongside a high directional accuracy of 94%. In contrast, the other models exhibit higher error metrics and lower directional accuracy, with ARIMA showing the poorest performance.

Furthermore, the combination of LSTM with economic shock models yields superior performance across various evaluation metrics, including RMSE, MAE, and MAPE, as illustrated in Figure 5. The use of SHAP and LIME not only aids in understanding the model’s predictions but also enhances the reliability of the results by evaluating the key factors influencing these predictions, thereby providing a significant advantage over more complex traditional models. Additionally, the RMSE values for both LSTM and GRU models over 20 training epochs, depicted in Figure 3, demonstrate that LSTM converges more quickly and achieves a lower final RMSE compared to GRU.

Discussion

The discussion section emphasizes the critical role of explainability in time series analysis, particularly for AI models like LSTM (Long Short-Term Memory). The interpretability of these models is essential for fostering user confidence and facilitating their adoption in sectors such as finance and energy, where predictions influence strategic decisions. The paper aims to enhance the interpretability of LSTM models by integrating SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-Agnostic Explanations). This integration allows for a comprehensive understanding of both global and local feature importance, bridging the gap between historical data and future predictions.

The literature review highlights recent advancements in explainable AI, underscoring the necessity for interpretability in LSTM models, which are often perceived as “black boxes.” Techniques like SHAP and LIME have been successfully applied across various domains, including financial forecasting, to provide insights into model behavior and feature significance. The paper outlines specific objectives, such as employing SHAP for general attribute significance and LIME for individual predictions, ultimately aiming to create a robust framework that enhances the usability and transparency of LSTM-based time series forecasting models. This approach not only improves model interpretability but also supports stakeholders in making informed decisions based on clearer predictions.