DOI: https://doi.org/10.1038/s41598-026-63013-0
تاريخ النشر: 2026-07-25
المؤلف: Stefano Frizzo Stefenon وآخرون
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم
نظرة عامة
تناقش هذه القسم نقاط القوة في الشبكات العصبية التلافيفية (CNNs) وهياكل المحولات في نمذجة البيانات الزمنية. تُعرف الشبكات العصبية التلافيفية بقدرتها على التقاط الأنماط المحلية وعدم التغير في الترجمة، بينما تتفوق المحولات في نمذجة الاعتمادات بعيدة المدى من خلال آليات الانتباه الذاتي. يقدم البحث هيكلًا هجينًا، CNN-Transformer-SHAP-MHAW، يجمع بين هذين النهجين لتحسين توقعات السلاسل الزمنية متعددة المتغيرات.
يستفيد الهيكل المقترح من قدرات التعرف على الأنماط في الشبكات العصبية التلافيفية لاستخراج ميزات عالية المستوى وتقليل الضوضاء المدخلة والأبعاد، مما يعزز من قوة تمثيل طبقات المحولات التي تليها. من خلال دمج استخراج الميزات التلافيفية مع هيكل الانتباه متعدد الرؤوس، يلتقط النموذج بفعالية كل من الميزات الزمنية المحلية والاعتمادات بعيدة المدى، مما يؤدي إلى تحسين أداء التوقعات. بالإضافة إلى ذلك، فإن استخدام SHAP (SHapley Additive exPlanations) بالتزامن مع آليات الانتباه يوفر نتائج قابلة للتفسير لتوقعات النموذج، كما هو موضح في الأشكال المرفقة.
مقدمة
تتناول مقدمة ورقة البحث التحدي الحاسم في توقع السلاسل الزمنية، وهو أمر أساسي عبر مجالات مختلفة مثل أنظمة الطاقة والمالية وتحليل حركة المرور في الشبكات. تتضمن المهمة فهم الاعتمادات الزمنية المعقدة في البيانات التسلسلية التي غالبًا ما تكون غير خطية وغير مستقرة، متأثرة بالتفاعلات متعددة المتغيرات. على الرغم من التقدم في تقنيات النمذجة، يبقى تحقيق توازن بين التقاط الديناميات قصيرة المدى والاعتمادات طويلة المدى مع ضمان قابلية تفسير النموذج تحديًا كبيرًا.
قدمت التطورات الأخيرة في التعلم العميق هياكل مثل الشبكات العصبية التلافيفية (CNNs) والنماذج المعتمدة على المحولات، والتي أظهرت وعدًا في هذا المجال. تعتبر الشبكات العصبية التلافيفية فعالة في استخراج الميزات الزمنية المحلية من خلال التصفية الهرمية، وبالتالي تمثل الأنماط قصيرة المدى مثل الاتجاهات والتغيرات الموسمية بكفاءة. من ناحية أخرى، تستخدم نماذج المحولات آليات الانتباه الذاتي لنمذجة الاعتمادات بعيدة المدى مباشرة، مما يوفر مزايا في قابلية التوسع والتوازي. ومع ذلك، قد تواجه صعوبة في التقاط الهياكل الزمنية المحلية التفصيلية عند تطبيقها على التسلسلات الخام. لمعالجة هذه القيود، ظهرت هياكل هجينة تدمج بين الآليات التلافيفية والمعتمدة على الانتباه، بهدف الاستفادة من نقاط القوة في كل من استخراج الميزات المحلية ونمذجة السياق العالمي، خاصة في سياق توقع السلاسل الزمنية متعددة المتغيرات.
النتائج
في هذا القسم، يقدم المؤلفون نتائج استخدام تقنيات القابلية للتفسير—تحديدًا SHAP (SHapley Additive exPlanations) وتصور الانتباه متعدد الرؤوس (MHAW)—لتحسين قابلية تفسير نموذجهم لتوقع السلاسل الزمنية أحادية المتغير. المنهجية، الموضحة في الخوارزمية 1، تقيس مساهمة كل خطوة زمنية في نافذة الإدخال في توقعات النموذج. تشير قيم SHAP إلى تأثير كل تأخير، حيث تشير القيم الإيجابية إلى زيادة في التوقعات والقيم السلبية إلى انخفاض. يسمح دمج قيم SHAP مع أوزان الانتباه بفهم شامل لكل من نسبة الميزات والأهمية الزمنية، مما يؤدي إلى خريطة تأثير مجمعة (SHAP-MHAW) تبرز الخطوات الزمنية المهمة.
تكشف النتائج أن الغالبية العظمى من التأثير التفسيري تتركز في أحدث قيم نافذة الإدخال، تحديدًا من الخطوات الزمنية t-10 إلى t-1، والتي تمثل حوالي 85.37% من إجمالي مقدار SHAP. تبرز خريطة التأثير المجمعة، التي تم تنعيمها باستخدام مرشح غاوسي، المناطق في نافذة الإدخال التي يتم الانتباه إليها من قبل النموذج وتؤثر بشكل كبير على التوقعات. من الجدير بالذكر أن أكثر الخطوات الزمنية تأثيرًا تقع نحو نهاية نافذة الإدخال (بين t-6 و t-1)، مما يتماشى مع التوقع بأن التأخيرات الأخيرة أكثر إفادة في التوقعات. بشكل عام، يوفر نهج SHAP-MHAW مقياسًا أكثر موثوقية وقابلية للتفسير للتأثير الزمني مقارنة باستخدام SHAP أو أوزان الانتباه بشكل مستقل، مما يقدم رؤى حول كيفية مساهمة كل خطوة زمنية في توقعات النموذج وأين يتركز اهتمام النموذج خلال عملية اتخاذ القرار.
المناقشة
في هذا القسم، يناقش المؤلفون قيود نماذج التعلم الآلي الحالية في توقع السلاسل الزمنية، وخاصة نقص قابلية التفسير والتحديات في التقاط الاعتمادات الزمنية المعقدة. يبرزون أهمية تقنيات الذكاء الاصطناعي القابل للتفسير (XAI)، مثل SHapley Additive exPlanations (SHAP)، التي تقدم رؤى حول مساهمات الميزات ولكن غالبًا ما تكافح للتوافق مع عمليات اتخاذ القرار لنماذج الانتباه. لمعالجة هذه القضايا، يقترح المؤلفون هيكلًا هجينًا جديدًا، CNN-Transformer-SHAP-MHAW، الذي يدمج الشبكات العصبية التلافيفية (CNNs) لاستخراج الميزات المحلية مع آليات الانتباه متعدد الرؤوس لالتقاط الاعتمادات بعيدة المدى. لا يعزز هذا النموذج الأداء التنبؤي فحسب، بل يحسن أيضًا قابلية التفسير من خلال دمج نسبة الميزات المعتمدة على SHAP مع أوزان الانتباه، مما يخلق تمثيلًا شاملاً للتأثير يوضح سلوك النموذج.
يستخدم الهيكل المقترح طبقات تلافيفية سببية للحفاظ على الطبيعة الذاتية للسلاسل الزمنية بينما يستخرج بفعالية الأنماط المحلية. ثم تعالج آلية الانتباه الذاتي متعدد الرؤوس هذه الميزات لنمذجة العلاقات الزمنية العالمية. يؤكد المؤلفون أن نهجهم يقلل من تعقيد الهيكل مقارنة بالنماذج الحالية مثل المحول الزمني المدمج (TFT) مع الاحتفاظ بالقدرة على التقاط كل من الاعتمادات قصيرة المدى وطويلة المدى. بالإضافة إلى ذلك، يتم استخدام التحسين البايزي لضبط المعلمات، مما يضمن تكوينات مثلى لتحسين دقة التوقعات. بشكل عام، يمثل نموذج CNN-Transformer-SHAP-MHAW تقدمًا كبيرًا في مجال توقع السلاسل الزمنية، حيث يجمع بين الكفاءة وقابلية التفسير والقدرات التنبؤية القوية.
DOI: https://doi.org/10.1038/s41598-026-63013-0
Publication Date: 2026-07-25
Author(s): Stefano Frizzo Stefenon et al.
Primary Topic: Stock Market Forecasting Methods
Overview
This section discusses the strengths of Convolutional Neural Networks (CNNs) and transformer architectures in modeling temporal data. CNNs are noted for their ability to capture local patterns and translational invariances, while transformers excel in modeling long-range dependencies through self-attention mechanisms. The paper introduces a hybrid architecture, CNN-Transformer-SHAP-MHAW, which combines these two approaches to improve multivariate time series forecasting.
The proposed architecture leverages the pattern recognition capabilities of CNNs to extract high-level features and reduce input noise and dimensionality, thereby enhancing the representation power of the transformer layers that follow. By integrating convolutional feature extraction with a multi-head attention backbone, the model effectively captures both localized temporal features and long-range dependencies, leading to improved forecasting performance. Additionally, the use of SHAP (SHapley Additive exPlanations) in conjunction with attention mechanisms provides explainable results for the model’s predictions, as illustrated in the accompanying figures.
Introduction
The introduction of the research paper addresses the critical challenge of time series forecasting, which is essential across various domains such as energy systems, finance, and network traffic analysis. The task involves understanding complex temporal dependencies in sequential data that are often nonlinear and nonstationary, influenced by multivariate interactions. Despite advancements in modeling techniques, achieving a balance between capturing short-term dynamics and long-term dependencies while ensuring model interpretability remains a significant challenge.
Recent developments in deep learning have introduced architectures like Convolutional Neural Networks (CNNs) and Transformer-based models, which have shown promise in this area. CNNs are effective in extracting localized temporal features through hierarchical filtering, thus efficiently representing short-term patterns such as trends and seasonal variations. Conversely, Transformer models utilize self-attention mechanisms to model long-range dependencies directly, offering advantages in scalability and parallelization. However, they may struggle with capturing detailed local temporal structures when applied to raw sequences. To address these limitations, hybrid architectures that integrate convolutional and attention-based mechanisms have emerged, aiming to leverage the strengths of both local feature extraction and global context modeling, particularly in the context of multivariate time series forecasting.
Results
In this section, the authors present the results of employing explainability techniques—specifically SHAP (SHapley Additive exPlanations) and multi-head attention visualization (MHAW)—to enhance the interpretability of their model for univariate time series forecasting. The methodology, outlined in Algorithm 1, quantifies the contribution of each time step in the input window to the model’s predictions. SHAP values indicate the influence of each lag, with positive values suggesting an increase in the forecast and negative values indicating a decrease. The integration of SHAP values with attention weights allows for a comprehensive understanding of both feature attribution and temporal relevance, culminating in a combined influence map (SHAP-MHAW) that highlights significant time steps.
The findings reveal that the majority of explanatory impact is concentrated in the most recent values of the input window, specifically from time steps t-10 to t-1, which account for approximately 85.37% of the total SHAP magnitude. The combined influence map, smoothed using a Gaussian filter, emphasizes the regions of the input window that are both attended to by the model and significantly influence the predictions. Notably, the most impactful time steps are located towards the end of the input window (between t-6 and t-1), aligning with the expectation that recent lags are more informative in forecasting. Overall, the SHAP-MHAW approach provides a more reliable and interpretable measure of temporal influence compared to using SHAP or attention weights independently, offering insights into how each time step contributes to the model’s predictions and where the model’s focus lies during the decision-making process.
Discussion
In this section, the authors discuss the limitations of existing machine learning models in time series forecasting, particularly their lack of interpretability and the challenges in capturing complex temporal dependencies. They highlight the importance of Explainable Artificial Intelligence (XAI) techniques, such as SHapley Additive exPlanations (SHAP), which provide insights into feature contributions but often struggle to align with the decision-making processes of attention-based models. To address these issues, the authors propose a novel hybrid architecture, CNN-Transformer-SHAP-MHAW, which integrates convolutional neural networks (CNNs) for local feature extraction with multi-head attention mechanisms to capture long-range dependencies. This model not only enhances predictive performance but also improves interpretability by merging SHAP-based feature attribution with attention weights, creating a comprehensive influence representation that elucidates model behavior.
The proposed architecture employs causal convolutional layers to maintain the autoregressive nature of time series data while effectively extracting local patterns. The multi-head self-attention mechanism then processes these features to model global temporal relationships. The authors emphasize that their approach reduces architectural complexity compared to existing models like the Temporal Fusion Transformer (TFT) while retaining the ability to capture both short-term and long-term dependencies. Additionally, Bayesian optimization is utilized for hyperparameter tuning, ensuring optimal configurations for improved forecasting accuracy. Overall, the CNN-Transformer-SHAP-MHAW model represents a significant advancement in the field of time series forecasting, combining efficiency, interpretability, and robust predictive capabilities.
