تفسير كشف الشذوذ القائم على التعلم العميق في بيانات استهلاك الطاقة من خلال التركيز على البيانات ذات الصلة السياقية
Explaining deep learning-based anomaly detection in energy consumption data by focusing on contextually relevant data

شارك:
المجلة: Energy and Buildings، المجلد: 328
DOI: https://doi.org/10.1016/j.enbuild.2024.115177
تاريخ النشر: 2024-12-13
المؤلف: Mohammad Noorchenarboo وآخرون
الموضوع الرئيسي: تكنولوجيا البيانات الضخمة وتطبيقاتها

نظرة عامة

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

في الختام، تقدم الدراسة منهجية منهجية تحسن من قابلية تفسير اكتشاف الشذوذ القائم على التعلم العميق في بيانات استهلاك الطاقة. من خلال اختيار أسس ذات صلة بالسياق بشكل مبتكر لخوارزميات الشرح المستقلة عن النموذج، يعزز الأسلوب المقترح من اتساق نسب الميزات عبر مجموعات بيانات وأنواع SHAP المختلفة. تُظهر التقييمات انخفاضات كبيرة في التباين، تتراوح من 26.1% إلى 80.3%، خاصة بالنسبة لـ Kernel وPermutation وSampling SHAP. على الرغم من أن LIME وPartition SHAP لم تظهرا بشكل متسق دلالة إحصائية، إلا أنهما لا تزالا تشير إلى انخفاضات في التباين. ستركز الأبحاث المستقبلية على تطوير مقاييس إضافية لتقييم جودة الشرح واستكشاف تصورات البشر لهذه التقييمات، بالإضافة إلى تطبيق النهج على حالات استخدام متنوعة.

مقدمة

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

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

الطرق

تصف المنهجية الموضحة في هذا القسم نهجًا مبتكرًا لشرح نماذج اكتشاف الشذوذ المطبقة على بيانات استهلاك الطاقة. يستخدم الأسلوب أنواعًا من SHAP (SHapley Additive exPlanations)، وخاصة Kernel SHAP، مع تعزيز استقرار وتناسق الشروحات من خلال اختيار مستهدف لمجموعة البيانات الخلفية. يتم تحقيق هذا الاختيار باستخدام تقنية التشابه الكوني الموزون، والتي تعتبر حاسمة لاكتشاف الشذوذ القائم على التنبؤ حيث ينتج نموذج الصندوق الأسود توقعات الطاقة التي تتم مقارنتها بقيم الاستهلاك الفعلية. يتم تحديد الشذوذات عندما يتجاوز الفرق عتبة محددة مسبقًا.

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

النتائج

تسلط نتائج الدراسة حول اكتشاف الشذوذ القابل للتفسير الضوء على فعالية هياكل التعلم العميق المختلفة، بما في ذلك الشبكات العصبية التكرارية (RNNs)، والشبكات العصبية التلافيفية (CNNs)، والنماذج المعتمدة على المحولات. استخدمت عملية التحسين مُقدّر بارزين الشجري (TPE) من التحسين البايزي، حيث تم إجراء 50 تجربة لتحديد أفضل تركيبات المعلمات الفائقة لكل نموذج. تم استخدام مقاييس الأداء مثل متوسط الخطأ التربيعي (MSE)، وجذر متوسط الخطأ التربيعي (RMSE)، ومتوسط الخطأ المطلق (MAE)، ومتوسط الخطأ المطلق النسبي المتماثل (SMAPE)، ومتوسط الخطأ النسبي المطلق (MAPE)، و$R^2$ لتقييم دقة النموذج. من الجدير بالذكر أن نموذج وحدة التكرار المغلقة (GRU) أظهر أدنى معدلات خطأ وأعلى درجة $R^2$، مما يدل على قدرته التنبؤية الفائقة.

كشفت تحليل أداء النموذج عبر مجموعات بيانات مختلفة – بما في ذلك منشأة تصنيع، وعيادة طبية، ومتجر تجزئة، ومبنى مكتبي – أنه لم يتفوق أي نموذج بشكل متسق على الآخرين عبر جميع المقاييس. ومع ذلك، أظهر الشبكة التلافيفية الزمنية (TCN) أداءً قويًا بشكل عام. تؤكد النتائج على أهمية تحسين المعلمات الفائقة في تعزيز موثوقية النموذج وقابلية تفسيره، حيث أن النماذج الدقيقة ضرورية لتوليد شروحات موثوقة. يتم تلخيص النتائج في الجدولين 2 و3، اللذين يقدمان نظرة شاملة على المعلمات الفائقة المختارة ومقاييس الأداء لمجموعات البيانات المختلفة التي تم تحليلها.

المناقشة

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

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

Journal: Energy and Buildings, Volume: 328
DOI: https://doi.org/10.1016/j.enbuild.2024.115177
Publication Date: 2024-12-13
Author(s): Mohammad Noorchenarboo et al.
Primary Topic: Big Data Technologies and Applications

Overview

The research paper addresses the critical need for anomaly detection in energy consumption data to identify inefficiencies and equipment failures. While machine learning, particularly deep learning, has shown promise in this area, traditional methods often lack transparency. The authors propose a novel explainability approach that enhances the interpretability of anomaly detection models by focusing on context-relevant information. This method integrates existing explainability techniques, particularly variants of SHAP, with global feature importance and weighted cosine similarity to select a background dataset tailored to each anomaly’s context. Experimental results across ten machine learning models and five datasets indicate that this approach significantly reduces the variability of explanations, achieving an average reduction of approximately 38%.

In conclusion, the study presents a systematic methodology that improves the explainability of deep learning-based anomaly detection in energy consumption data. By innovatively selecting context-relevant baselines for model-agnostic explainability algorithms, the proposed method enhances the consistency of feature attributions across various datasets and SHAP variants. The evaluation demonstrates substantial reductions in variability, ranging from 26.1% to 80.3%, particularly for Kernel, Permutation, and Sampling SHAP. Although LIME and Partition SHAP did not consistently show statistical significance, they still indicated variability reductions. Future research will focus on developing additional metrics for assessing explanation quality and exploring human perceptions of these evaluations, as well as applying the approach to diverse use cases.

Introduction

The introduction of the research paper highlights the urgent need to address the rising global electricity demand, projected to increase by nearly 80% by 2040, which poses significant environmental challenges, including heightened greenhouse gas emissions. Residential and commercial buildings are identified as major contributors to energy consumption, necessitating improvements in energy efficiency. A key strategy for achieving this is the detection and correction of anomalies in electricity usage, which can stem from various factors such as faulty devices or user negligence. Data-driven approaches, particularly those employing Deep Learning (DL) methods, have shown promise in identifying these anomalies due to their ability to model complex relationships in time series data. However, challenges related to the transparency and explainability of DL models remain critical for their effective deployment in the energy sector.

To enhance the interpretability of anomaly detection models, the paper proposes a model-agnostic approach using SHapley Additive exPlanations (SHAP) to provide consistent and reliable feature importance scores. While traditional SHAP methods face computational challenges, particularly with large datasets, the proposed approach aims to improve explanation stability by selecting relevant background data samples for SHAP calculations. This method not only enhances the reliability of feature attributions but also reduces computational burdens. The paper outlines a comparison between random and similar background dataset selection methods, demonstrating that the latter yields more stable and interpretable results, thereby facilitating better decision-making in energy management. The subsequent sections of the paper will delve into related work, methodology, results, and conclusions.

Methods

The methodology outlined in this section describes an innovative approach to explaining anomaly detection models applied to energy consumption data. The method utilizes variants of SHAP (SHapley Additive exPlanations), particularly Kernel SHAP, while enhancing the stability and consistency of the explanations through a targeted selection of the background dataset. This selection is achieved using a weighted cosine similarity technique, which is crucial for prediction-based anomaly detection where a black-box model generates energy predictions that are compared against actual consumption values. Anomalies are identified when the discrepancy exceeds a predefined threshold.

Following the detection of anomalies, the methodology details a multi-step explanation phase aimed at elucidating the feature contributions associated with each identified anomaly. The overall process, which integrates both anomaly detection and feature explanation, is visually summarized in Figure 1, with further elaboration provided in subsequent subsections. This structured approach not only enhances the interpretability of the model but also aids in understanding the underlying factors contributing to energy consumption anomalies.

Results

The results of the study on explainable anomaly detection highlight the effectiveness of various deep learning architectures, including Recurrent Neural Networks (RNNs), Convolutional Neural Networks (CNNs), and Transformer-based models. The optimization process utilized the Tree-structured Parzen Estimator (TPE) from Bayesian optimization, conducting 50 trials to identify the best hyperparameter combinations for each model. Performance metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Symmetric Mean Absolute Percentage Error (SMAPE), Mean Absolute Percentage Error (MAPE), and $R^2$ were employed to evaluate model accuracy. Notably, the Gated Recurrent Unit (GRU) model exhibited the lowest error rates and the highest $R^2$ score, indicating its superior predictive capability.

The analysis of model performance across different datasets—including a manufacturing facility, a medical clinic, a retail store, and an office building—revealed that no single model consistently outperformed others across all metrics. However, the Temporal Convolutional Network (TCN) demonstrated strong overall performance. The findings underscore the importance of hyperparameter optimization in enhancing model reliability and explainability, as accurate models are crucial for generating trustworthy explanations. The results are summarized in Tables 2 and 3, which provide a comprehensive overview of the selected hyperparameters and performance metrics for the various datasets analyzed.

Discussion

The discussion section of the research paper reviews the application of Explainable Artificial Intelligence (XAI) techniques in energy systems, time series analysis, and anomaly detection. It highlights significant advancements in using XAI methods, particularly SHAP (SHapley Additive exPlanations), to enhance the interpretability of models in energy load forecasting and fault detection. For instance, studies such as those by Moon et al. and Chung and Liu demonstrate how XAI can elucidate the factors influencing energy predictions, with SHAP outperforming other methods like LIME in maintaining accuracy with fewer input variables. Additionally, the integration of XAI in power systems has been explored, with Zhang et al. employing SHAP to clarify decision-making in emergency control scenarios.

Despite these advancements, the paper identifies critical gaps in the reliability and stability of explanations generated by current XAI methods. Issues such as computational complexity and variability due to random background dataset selection hinder the robustness of SHAP explanations. The authors propose a novel approach that enhances explanation stability by selecting background datasets based on context-relevant information, thereby improving the practical utility of XAI in anomaly detection and fault diagnosis. This approach aims to provide consistent insights into model behavior, ultimately fostering greater trust and understanding among decision-makers in energy systems and beyond.

شارك: