LSTM AND GRU IN RICE PREDICTION FOR FOOD SECURITY IN INDONESIA - Triyani Hendrawati; Kennedy Marthendra; Brian Riski Jayama Simanjuntak; Anindya Aprilianti Pravitasari (PATTIMURA UNIVERSITY, 2026)
Hunger in Indonesia remains a serious challenge, especially in the face of food price instability, particularly rice as the main staple food. In order to achieve SDG 2 “Zero Hunger” by 2030, policies that support price stability and more effective food distribution are needed. This study aims to assess the predictive power of Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) models for Indonesian rice prices. The dataset, consisting of 1,424 observations from early 2021 to late 2024, was collected from official sources and preprocessed using normalization techniques. The data was then divided into training, validation, and testing sets. Each model was trained and evaluated using Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE) metrics. LSTM, a type of Recurrent Neural Network (RNN), uses three gates and cell memory to identify long-term patterns in time series data. GRU, with a simpler structure involving only two gates, is more efficient in modeling temporal relationships. The results show that the LSTM model achieved MAPE 3.49%, while the GRU model outperformed it with MAPE 1.08%. Overall, the GRU model demonstrated higher accuracy in forecasting rice prices.