Rainfall Prediction Using Attention-Based LSTM Architecture - Romadhani, Ahmad; Santoso, Irwan Budi; Crysdian, Cahyo (JURIKOM (Jurnal Riset Komputer), 2025)
This study addresses the challenge of accurately predicting rainfall in regions with complex climate dynamics, such as Malang Regency, East Java. It evaluates the performance of a Long Short-Term Memory (LSTM) model enhanced with the Bahdanau Attention Mechanism, comparing it with a Standard LSTM model in forecasting daily rainfall based on historical weather parameters including average temperature, relative humidity, sunshine duration, and wind speed. Using daily data from BMKG covering 2000 to 2023, both models underwent a structured machine learning process including data preprocessing, feature selection, model training, and evaluation. The Attention-Based LSTM consistently outperformed the Standard LSTM, particularly in handling rainfall anomalies, achieving an MSE of 0.00800 and RMSE of 0.08948, compared to 0.00817 and 0.09039 respectively for the Standard LSTM. These results demonstrate that integrating Bahdanau Attention improves the model’s focus on relevant temporal features, enhancing prediction accuracy and robustness. The architecture consisting of two LSTM cells combined with the attention mechanism effectively captures complex sequential patterns that the standard model tends to overlook. This research highlights the potential of attention mechanisms in time series weather prediction, contributing to more reliable early warning systems, adaptive agricultural strategies, and disaster risk reduction frameworks. Future work could explore hybrid models or incorporate additional weather features to further improve performance and generalization.