Eko Sediyono , Kristoko Dwi Hartomo , Christian Arthur , Intiyas Utami , Ronny Prabowo , Raymond Chiong
{"title":"An integrated framework for multi-commodity agricultural price forecasting and anomaly detection using attention-boosted models","authors":"Eko Sediyono , Kristoko Dwi Hartomo , Christian Arthur , Intiyas Utami , Ronny Prabowo , Raymond Chiong","doi":"10.1016/j.jafr.2025.102021","DOIUrl":null,"url":null,"abstract":"<div><div>Global agricultural systems are increasingly exposed to price instability driven by climate extremes, logistic disruptions, and market uncertainty. These conditions complicate efforts to monitor and manage price behaviours in essential commodity markets. Micro, small, and medium enterprises (MSMEs), which operate with constrained resources and limited access to data-driven tools, are particularly susceptible to sudden and irregular price shifts. Their ability to maintain stable operations depends on timely identification of market anomalies and reliable planning information. This underscores the importance of accurate price forecasting, yet deep learning models such as Bidirectional Long Short-Term Memory (LSTM) and the Gated Recurrent Unit often struggle to capture long-term dependencies and detect irregular price behaviors. To bridge the gap, this study proposes a deep learning framework that integrates Transformer models for price prediction and an attention-boosted LSTM Variational Autoencoder (VAE) for anomaly detection. Using daily price data collected from the period of January 2020 to mid-June 2024, this study demonstrated that Transformers outperformed traditional models while accurately capturing market trends and sudden fluctuations. Additionally, the attention-boosted anomaly detection model can outperform standard LSTM and artificial neural network-VAEs in identifying unexpected price changes. The proposed models outperformed baseline methods by achieving lower forecasting and anomaly detection errors. By addressing critical limitations in existing forecasting approaches, specifically their inability to capture abrupt anomalies, this study provides essential support for enhancing MSMEs’ resilience and improving decision-making under volatile market conditions.</div></div>","PeriodicalId":34393,"journal":{"name":"Journal of Agriculture and Food Research","volume":"22 ","pages":"Article 102021"},"PeriodicalIF":4.8000,"publicationDate":"2025-05-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Agriculture and Food Research","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2666154325003928","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"AGRICULTURE, MULTIDISCIPLINARY","Score":null,"Total":0}
引用次数: 0
Abstract
Global agricultural systems are increasingly exposed to price instability driven by climate extremes, logistic disruptions, and market uncertainty. These conditions complicate efforts to monitor and manage price behaviours in essential commodity markets. Micro, small, and medium enterprises (MSMEs), which operate with constrained resources and limited access to data-driven tools, are particularly susceptible to sudden and irregular price shifts. Their ability to maintain stable operations depends on timely identification of market anomalies and reliable planning information. This underscores the importance of accurate price forecasting, yet deep learning models such as Bidirectional Long Short-Term Memory (LSTM) and the Gated Recurrent Unit often struggle to capture long-term dependencies and detect irregular price behaviors. To bridge the gap, this study proposes a deep learning framework that integrates Transformer models for price prediction and an attention-boosted LSTM Variational Autoencoder (VAE) for anomaly detection. Using daily price data collected from the period of January 2020 to mid-June 2024, this study demonstrated that Transformers outperformed traditional models while accurately capturing market trends and sudden fluctuations. Additionally, the attention-boosted anomaly detection model can outperform standard LSTM and artificial neural network-VAEs in identifying unexpected price changes. The proposed models outperformed baseline methods by achieving lower forecasting and anomaly detection errors. By addressing critical limitations in existing forecasting approaches, specifically their inability to capture abrupt anomalies, this study provides essential support for enhancing MSMEs’ resilience and improving decision-making under volatile market conditions.