Comparative Analysis of Transformer and LSTM Networks for Food Production Forecasting
摘要
For many agricultural authorities, predicting food production demand efficiently is a challenge. Precise production estimates are necessary for a strong supply chain, which is essential to avoid situations of over- or under-production. Demand forecasting methods powered by Machine Learning are capable of making predictions about trends and behaviors based on the collected historical data. Previous research has focused on improving prediction accuracy using the sequential model, namely Long Short-Term Memory (LSTM), and the integration of non-sequential/static features such as temperature, rainy day count, and production month. Two LSTM variations were created, and the prediction of food production was used to compare the two types’ performances. The findings reveal that the incorporation of static features leads to a notable enhancement in the forecasting accuracy of items that are affected by them. Building on previous findings, this paper investigates the topic by applying Transformer encoder models. The choice between Transformers and LSTMs for time series forecasting depends on the nature of the problem and the dataset, the availability of the computational resources, and the complexity of the relationships within the data. Unlike LSTM, Transformers can excel in capturing long-range dependencies and process inputs in parallel due to their attention mechanism. This parallelization can lead to faster training time. Moreover, they can recognize the importance of different elements in the input sequence and ignore irrelevant or noisy data. Our experiments show that the performance of the Transformer models on the food production dataset outperformed the LSTM models, thereby expanding the body of knowledge regarding efficient time series forecasting techniques.