Title:
Meta-transformer: leveraging metaheuristic algorithms for agricultural commodity price forecasting

Abstract

Predicting agricultural commodity prices is inherently complex due to factors such as perishability, seasonality, and market volatility. To address these challenges, this study proposes a novel framework that combines Transformer models with Metaheuristic Algorithms (MHAs), including the Grey Wolf Optimizer (GWO), Whale Optimization Algorithm (WOA), and Particle Swarm Optimization (PSO) to enhance agricultural price forecasting accuracy. While Transformer architectures are known for their powerful time series modeling capabilities, their performance is highly sensitive to hyperparameter selection, especially in contexts with limited or noisy data. The novelty of this research lies in the automated and adaptive tuning of these hyperparameters using MHAs, enabling improved generalization, faster convergence, and enhanced predictive accuracy. By integrating MHAs, known for their fast convergence and global search efficiency, the proposed models, Transformer-PSO, Transformer-GWO, and Transformer-WOA offer enhanced training efficiency and improved forecasting accuracy. This hybrid modeling approach is applied to predict weekly prices of potatoes in key Northern Indian markets. Results demonstrate that the Transformer-GWO and Transformer-WOA models outperform conventional models such as GARCH by 70–90% across standard evaluation metrics like Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE). By bridging state-of-the-art deep learning architectures with robust optimization strategies, this study contributes a scalable and interpretable solution for agricultural price forecasting. The findings have significant implications for policymakers, market regulators, and farmers by supporting timely interventions, improving market transparency, and enabling data-driven decision-making. © The Author(s) 2025.

Description

Citation

Collections

Endorsement

Review

Supplemented By

Referenced By