التنبؤ بأسعار الزراعة المعتمد على RNN و GNN باستخدام السلاسل الزمنية المتعددة المتغيرات وتأثير تلطيف تقلباتها على المدى القصير
RNN and GNN based prediction of agricultural prices with multivariate time series and its short-term fluctuations smoothing effect

المجلة: Scientific Reports، المجلد: 15، العدد: 1
DOI: https://doi.org/10.1038/s41598-025-97724-7
PMID: https://pubmed.ncbi.nlm.nih.gov/40258932
تاريخ النشر: 2025-04-21
المؤلف: Zhenyun Du وآخرون
الموضوع الرئيسي: طرق التنبؤ بسوق الأسهم

نظرة عامة

في هذه الدراسة، يستكشف المؤلفون تقنيات التعلم الآلي للتنبؤ بأسعار السلع الزراعية، مع التركيز على تأثير العوامل البيئية مثل الطقس. قاموا بإنشاء مجموعة بيانات زمنية متعددة المتغيرات تدمج أسعار الجملة لأربعة سلع زراعية في كوريا الجنوبية، وستة متغيرات جوية، وأرقام الأسابيع. تستخدم الدراسة طريقتين متقدمتين للتنبؤ: نموذج الذاكرة طويلة وقصيرة المدى (LSTM) المكدس القائم على الشبكات العصبية التكرارية (RNN) وطريقتين من الشبكات العصبية البيانية (GNN) – وهما الشبكة العصبية البيانية الطيفية الزمنية (StemGNN) والشبكة التلافيفية البيانية الزمنية. يعمل نموذج التنبؤ أحادي المتغير كتحكم لتقييم فعالية النهج متعدد المتغيرات. تقيم الدراسة تأثير أطوال نوافذ التنعيم الزمنية الخمسة المختلفة على أداء النموذج.

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

طرق

في هذه الدراسة، تم استخدام كل من منهجيات الشبكة العصبية التكرارية (RNN) والشبكة العصبية البيانية (GNN) للتنبؤ بأسعار السلع الزراعية. النموذج القائم على RNN المستخدم هو شبكة الذاكرة طويلة وقصيرة المدى المكدسة (LSTM)، القادرة على التنبؤ بكل من بيانات السلاسل الزمنية أحادية ومتعددة المتغيرات. على النقيض من ذلك، تم تصميم النماذج القائمة على GNN، وبشكل خاص StemGNN والشبكة التلافيفية البيانية الزمنية (T-GCN)، حصريًا للتنبؤات متعددة المتغيرات. تستفيد هذه النماذج من هيكل بياني لتمثيل العلاقات المتبادلة بين أسعار السلع الزراعية والمتغيرات الجوية ذات الصلة، مما يعزز ملاءمتها لمهام التنبؤ المعقدة متعددة المتغيرات.

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

نتائج

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

بالإضافة إلى ذلك، قد يناقش هذا القسم آثار النتائج، مع التأكيد على أهميتها في المجال الأوسع للدراسة. من الضروري ملاحظة أي قيود تم مواجهتها خلال البحث، حيث قد تؤثر هذه على تفسير النتائج. بشكل عام، يعمل قسم “النتائج” كأساس للمناقشات والاستنتاجات اللاحقة المستخلصة في الورقة.

مناقشة

في هذا القسم، يناقش المؤلفون مجموعة البيانات والمنهجيات المستخدمة للتنبؤ بأسعار السلع الزراعية في كوريا الجنوبية، مع التركيز على أربع سلع مختارة: البطاطس، والبصل، والخس، والخيار. تم اختيار هذه السلع بناءً على تكرار إنتاجها، وقابلية تخزينها، وقابلية استيرادها، وسلوك السوق، مع الحصول على البيانات من إدارة التنمية الريفية (RDA) وخدمة معلومات تسويق الزراعة الكورية (KAMIS). تمتد مجموعة البيانات من 1 يناير 2000 إلى 1 أبريل 2022، وتشتمل على أسعار الجملة اليومية وبيانات الطقس. تم تعويض القيم المفقودة في بيانات الأسعار باستخدام أسعار اليوم السابق، مما يعكس الممارسات الفعلية في السوق. استخدم المؤلفون طريقة المتوسط المتحرك للتنعيم لتحسين دقة التنبؤ من خلال تقليل الضوضاء الناتجة عن تقلبات أسعار المزادات.

استخدمت عملية التنبؤ ثلاثة نماذج للتعلم الآلي: LSTM المكدس، وStemGNN، وT-GCN، كل منها مصمم لالتقاط الاعتمادات الزمنية والمكانية في بيانات السلاسل الزمنية. تم تقييم أداء هذه النماذج باستخدام خطأ النسبة المئوية المطلقة المتوسطة (MAPE) عبر أحجام نوافذ متحركة مختلفة وآفاق تنبؤ. أشارت النتائج إلى أن النماذج القائمة على GNN، وخاصة T-GCN وStemGNN، تفوقت على النماذج أحادية المتغير في التخفيف من التقلبات قصيرة المدى، مما أظهر انخفاضًا كبيرًا في أخطاء التنبؤ، خاصة للسلع المتقلبة مثل الخس والخيار. كما كشفت التحليلات أن العلاقات بين أسعار السلع الزراعية والمتغيرات الجوية تختلف حسب السلعة، حيث تؤثر ظروف الطقس المحددة بشكل كبير على توقعات الأسعار. بشكل عام، تؤكد النتائج على أهمية اختيار النموذج ومعالجة البيانات في تعزيز دقة توقعات أسعار السلع الزراعية.

Journal: Scientific Reports, Volume: 15, Issue: 1
DOI: https://doi.org/10.1038/s41598-025-97724-7
PMID: https://pubmed.ncbi.nlm.nih.gov/40258932
Publication Date: 2025-04-21
Author(s): Zhenyun Du et al.
Primary Topic: Stock Market Forecasting Methods

Overview

In this study, the authors explore machine learning techniques for predicting agricultural commodity prices, emphasizing the influence of environmental factors such as weather. They constructed a multivariate time series dataset that integrates wholesale prices of four agricultural commodities in South Korea, six weather variables, and week numbers. The research employs two advanced prediction methods: a stacked long short-term memory (LSTM) model based on recurrent neural networks (RNN) and two graph neural network (GNN) approaches—namely, the spectral temporal graph neural network (StemGNN) and the temporal graph convolutional network. A univariate prediction model serves as a control to assess the effectiveness of the multivariate approach. The study evaluates the impact of five different smoothing time window lengths on model performance.

The findings indicate that mitigating short-term fluctuations significantly enhances the predictive accuracy of multivariate models compared to the univariate model. Notably, the GNN-based models demonstrated superior performance over the RNN-based models in predicting agricultural commodity prices. Additionally, the analysis of adjacency weight matrices within the self-attention mechanism of StemGNN allowed for the identification of key weather variables influencing price fluctuations. The study concludes that leveraging multivariate data can substantially improve prediction accuracy, with implications for market applications. Future research is encouraged to expand the dataset to include a wider range of agricultural commodities and their international pricing dynamics, despite the increased complexity this may entail.

Methods

In this study, both Recurrent Neural Network (RNN) and Graph Neural Network (GNN) methodologies are employed for forecasting agricultural commodity prices. The RNN-based model utilized is a Stacked Long Short-Term Memory (LSTM) network, which is capable of predicting both univariate and multivariate time series data. In contrast, the GNN-based models, specifically StemGNN and Temporal Graph Convolutional Network (T-GCN), are exclusively designed for multivariate predictions. These GNN models leverage a graph structure to represent the interrelationships between agricultural commodity prices and relevant weather variables, enhancing their suitability for complex multivariate forecasting tasks.

All models are configured with shared hyperparameters, including the input sequence length, termed the window size, which dictates the number of past observations incorporated into the training and prediction processes. Additionally, the prediction horizon is defined, indicating the extent to which the model forecasts future values beyond the last observation within the input window. This methodological framework aims to improve the accuracy of price predictions by effectively capturing temporal and relational dynamics within the data.

Results

The “Results” section of the research paper presents key findings derived from the conducted experiments or analyses. It typically includes quantitative data, statistical analyses, and visual representations such as graphs or tables that illustrate the outcomes. The results are often compared against the initial hypotheses or objectives outlined in the study, highlighting significant trends, correlations, or anomalies observed during the research.

Additionally, this section may discuss the implications of the findings, emphasizing their relevance to the broader field of study. It is crucial to note any limitations encountered during the research, as these may affect the interpretation of the results. Overall, the “Results” section serves as a foundation for subsequent discussions and conclusions drawn in the paper.

Discussion

In this section, the authors discuss the dataset and methodologies used for predicting agricultural commodity prices in South Korea, focusing on four selected commodities: potatoes, onions, lettuce, and cucumbers. These commodities were chosen based on their production frequency, storability, importability, and market behavior, with data sourced from the Rural Development Administration (RDA) and the Korea Agricultural Marketing Information Service (KAMIS). The dataset spans from January 1, 2000, to April 1, 2022, and includes daily wholesale prices and weather data. Missing values in the price data were imputed using the previous day’s prices, reflecting actual market practices. The authors employed a rolling average method for data smoothing to enhance prediction accuracy by reducing noise from auction price fluctuations.

The forecasting process utilized three machine learning models: Stacked LSTM, StemGNN, and T-GCN, each designed to capture temporal and spatial dependencies in the time series data. The performance of these models was evaluated using mean absolute percentage error (MAPE) across different rolling window sizes and prediction horizons. Results indicated that GNN-based models, particularly T-GCN and StemGNN, outperformed univariate models in mitigating short-term fluctuations, demonstrating a significant reduction in prediction errors, especially for highly volatile commodities like lettuce and cucumbers. The analysis also revealed that the relationships between agricultural prices and weather variables varied by commodity, with specific weather conditions significantly impacting price predictions. Overall, the findings underscore the importance of model selection and data preprocessing in enhancing the accuracy of agricultural price forecasts.