Self-Attention Mechanism-Long Short Term Memory Neural Network Models for Irrigation Demand Prediction: An Evaluation and Performance Analysis

Document Type : Research/Original/Regular Article

Authors

1 Associate Professor, /Department of Water Engineering, Shahrekord University, Shahrekord,, Iran

2 Former M.Sc. Student,, Dept. of Water Engineering, Faculty of Agriculture, Shahrekord University, Shahrekord, Iran,

Abstract

Abstract

Introduction

Predicting irrigation demand provides valuable information for agricultural planning and decision-making. By accurately predicting irrigation needs, farmers can optimize water distribution and avoid wasting water. Farmers can use this information to set planting schedules, crop rotation, and optimize land use based on water availability. this study introduces a new model for predicting irrigation demand.This study intrudes a new model for predicting irrigation demand. The self-attention-mechanism (SA) is coupled with the long short term memory (LSTM) neural network to predicting irrigation demand. SALSTM incorporates self-attention mechanisms, which enable the model to focus on the most relevant parts of the input sequence while making predictions. The attention mechanism allows SALSTM to assign different weights to different time steps or features, emphasizing the most informative ones for predicting irrigation demands. SALSTM can capture complex non-linear relationships between different input features, such as meteorological data, soil conditions, and crop characteristics.

Predicting irrigation demand provides valuable information for agricultural planning and decision-making.

Materials and Methods

By combining the power of LSTM and attention mechanisms, SALSTM can learn intricate patterns and interactions between these factors, enabling it to make more accurate predictions of irrigation demands. This ability is particularly beneficial in capturing the nuanced relationships that exist in agricultural systems. Relative humidity, temperature, wind speed, rainfall, and potential crop evapotranspiration were used as the inputs to the models. The SALSTM model was benchmarked against the LSTM, recurrent neural network (RNN), Radial Basis Function Neural Network (RBFN), and multiple linear regression (MLR) models. The study also evaluates and compares the performance of SALSTM models for irrigation demand prediction in multiple programming languages, including Python, MATLAB, R, and JavaScript.

Accurate prediction of irrigation demand is crucial for efficient water management in agriculture and can contribute to sustainable engineering practices. Overall, the study contributes to advanced engineering informatics by providing a comparative analysis of SALSTM models, incorporating self-attention mechanisms, and exploring their application in irrigation demand prediction. The study combines concepts from various disciplines, including data science, machine learning, and irrigation engineering. By applying advanced informatics techniques to irrigation demand prediction, the study bridges the gap between these areas and encourages interdisciplinary collaboration

Results and Discussion

In this research, the self-attention mechanism was integrated with the LSTM model to forecast irrigation demands. The SALSTM model leverages self-attention mechanisms, allowing it to concentrate on the most pertinent segments of the input sequence during predictions. This attention mechanism enables SALSTM to allocate varying weights to different time steps or features, highlighting the most significant ones for predicting irrigation needs. The findings showed that the SALSTM model surpassed the performance of other models.

By comparing the performance of SALSTM models implemented in Python, MATLAB, R, and JavaScript, the study provides insights into the advantages and drawbacks of different programming languages for implementing machine learning models in climate studies. This knowledge can aid researchers and practitioners in selecting appropriate programming languages for their specific needs, promoting the efficient and effective utilization of computational resources in climate studies.

The results indicated that the SALSTM model outperformed other models. The SALSTM model had the lowest mean absolute error (MAE) of 1.212, followed by LSTM (1.345), RNN (1.555), RBFN (1.678), and MLR (1.879).

Conclusion

The SALSTM model the lowest MAE of 1.212, followed by LSTM (1.345), RNN (1.555), RBFN (1.678), and MLR (1.879). The median value of the observed data, SALSTM, LSTM, RNN, RBF, and MLR was 18.5, 18.5, 18.5, 23, 22, and 27.5, respectively. SALSTM could capture complex non-linear relationships between different input features, such as meteorological data, soil conditions, and crop characteristics. By combining the power of LSTM and attention mechanisms, SALSTM could learn intricate patterns and interactions between these factors, enabling it to make more accurate predictions of irrigation demands. By accurately predicting irrigation demands, SALSTM enables farmers to avoid excessive water usage. By proactively adjusting irrigation plans based on SALSTM predictions, managers can minimize the risk of crop losses due to under- or over-irrigation. The next studies can develop current study based on the following comments:

• Comparative Analysis: Conduct a comparative analysis of different models for predicting irrigation demand, including other deep learning architectures, traditional machine learning models, or hybrid models.

• Feature Engineering: Discover additional features that can improve the prediction accuracy of the SALSTM model. Examine how different feature sets affect the performance of the model and identify the most meaningful features for predicting irrigation needs.

• Model Interpretability: Enhance the interpretability of the SALSTM model by investigating techniques such as attention visualization or feature importance analysis.

• Transfer Learning and Generalization: Explore the transferability of the pre-trained SALSTM model across different geographical regions, crops, or irrigation systems. Investigate the effectiveness of transfer learning by fine-tuning the pre-trained model on new datasets.

• Uncertainty Estimation: Incorporate uncertainty estimation techniques into the SALSTM model to quantify prediction uncertainty. This can help decision-makers assess the reliability of the predictions and make informed decisions based on the level of uncertainty associated with irrigation demand predictions..

Keywords

Main Subjects


منابع
ستاری، محمدتقی، شیرینی، کیمیا، و جاویدان، سحر (1403). ارزیابی کارائی روش‌های کاهش پارامترها در بهبود دقت مدل‌سازی شاخص کیفی آب در رودخانة قزل اوزن با استفاده از الگوریتم‌های یادگیری ماشین. مدل‌سازی و مدیریت آب و خاک، 4(2)، 89-104. doi: 10.22098/mmws.2023.12434.1241
عالم‌‌پور رجبی، فرناز، قربانی، محمد علی، و اسدی، اسماعیل (1403). مدل‌سازی فرآیند تبخیر با استفاده از الگوریتم هیبریدی پرندة کوت و شبکة عصبی مصنوعی. مدل‌‌سازی و مدیریت آب و خاک، 4(2)، 279-294.
doi: 10.22098/mmws.2023.12692.1266
محمدی، مجتبی، جهانتیغ، حسین، و ذوالفقاری، فرهاد. (1403). پیش‌بینی ماهانة تبخیر از تشت با استفاده از رویکردهای انفرادی و ترکیبی مدل‌های داده‌کاوی در مناطق خشک. مدل‌سازی و مدیریت آب و خاک، 4(2)، 279-294.
doi: 10.22098/mmws.2023.12728.1270
 
 
 
References
Alempour Rajabi, F., Ghorbani, M. A., & Asadi, E. (2024). Modeling of the evaporation process using the hybrid algorithm of the COOT bird and artificial neural network.  Water and Soil Management and Modelling,  4(2), 279-294. [In Persian] doi:10.22098/mmws.2023.12692.1266
An, N. N., Thanh, N. Q., & Liu, Y. (2019). Deep CNNs with self-attention for speaker identification. IEEE access, 7, 85327-85337.
Ashofteh, P. S., Haddad, O. B., & A. Mariño, M. (2013). Climate change impact on reservoir performance indexes in agricultural water supply. Journal of Irrigation and Drainage Engineering139(2), 85-97.doi:10.1061/(asce)ir.1943-4774.0000496
Ashofteh, P. S., Haddad, O. B., & Marino, M. A. (2015). Risk analysis of water demand for agricultural crops under climate change. Journal of Hydrologic Engineering20(4), 04014060. doi: 10.1061/(asce)he.1943-5584.0001053
Bonatti, C., Berisha, B., & Mohr, D. (2022). From CP-FFT to CP-RNN: Recurrent neural network surrogate model of crystal plasticity. International Journal of Plasticity158, 103430. doi:10.1016/j.ijplas.2022.103430
Chen, X., & Liu, Z. (2022). A long short-term memory neural network based Wiener process model for remaining useful life prediction. Reliability Engineering & System Safety, 226, 108651. doi.org/10.1016/j.ress.2022.108651
Ehteram, M., Ahmed, A. N., Khozani, Z. S., & El-Shafie, A. (2023). Graph convolutional network–Long short term memory neural network-multi layer perceptron-Gaussian progress regression model: A new deep learning model for predicting ozone concertation. Atmospheric Pollution Research, 14(6), 101766. doi:10.1016/j.apr.2023.101766
Emami, M., Ahmadi, A., Daccache, A., Nazif, S., Mousavi, S. F., & Karami, H. (2022). County-level irrigation water demand estimation using machine learning: Case study of California. Water14(12), 1937. doi:10.3390/w14121937
Fahim, A., Tan, Q., Mazzi, M., Sahabuddin, M., Naz, B., & Ullah Bazai, S. (2021). Hybrid LSTM self‐attention mechanism model for forecasting the reform of scientific research in Morocco. Computational Intelligence and Neuroscience2021(1), 6689204. doi:10.1155/2021/6689204
Fu, E., Zhang, Y., Yang, F., & Wang, S. (2022). Temporal self-attention-based Conv-LSTM network for multivariate time series prediction. Neurocomputing501, 162-173. doi:10.1016/j.neucom.2022.06.014
Giorgi, F.M., Ceraolo, C. and Mercatelli, D., (2022). The R language: an engine for bioinformatics and data science. Life, 12(5), p.648. doi.org/:10.3390/life12050648
Hao, G., Guo, J., Zhang, W., Chen, Y., & Yuen, D. A. (2022). High-precision chaotic radial basis function neural network model: Data forecasting for the Earth electromagnetic signal before a strong earthquake. Geoscience Frontiers13(1), 101315. doi:10.1016/j.gsf.2021.101315
He, Z., Liu, P., Zhao, X., He, X., Liu, J., & Mu, Y. (2022). Responses of surface O3 and PM2. 5 trends to changes of anthropogenic emissions in summer over Beijing during 2014–2019: A study based on multiple linear regression and WRF-Chem. Science of The Total Environment, 807, 150792. doi:10.1016/j.scitotenv.2021.150792
Jin, Y., Xie, J., Guo, W., Luo, C., Wu, D., & Wang, R. (2019). LSTM-CRF neural network with gated self attention for Chinese NER. IEEE Access7, 136694-136703. doi:10.1109/ACCESS.2019.2942433
Jing, R. (2019, April). A self-attention based LSTM network for text classification. In Journal of Physics: Conference Series (Vol. 1207, p. 012008). IOP Publishing. doi:10.1088/1742-6596/1207/1/012008
Li, W., Qi, F., Tang, M., & Yu, Z. (2020). Bidirectional LSTM with self-attention mechanism and multi-channel features for sentiment classification. Neurocomputing387, 63-77. doi:10.1016/j.neucom.2020.01.006
Majumdar, P., Bhattacharya, D., Mitra, S., Solgi, R., Oliva, D., & Bhusan, B. (2023). Demand prediction of rice growth stage-wise irrigation water requirement and fertilizer using Bayesian genetic algorithm and random forest for yield enhancement. Paddy and Water Environment21(2), 275-293. doi:10.1007/s10333-023-00930-0
Mohammadi, M., Jahantigh, H., & Zolfahari, F. (2024). Monthly prediction of pan evaporation using individual and combined approaches of data mining models in arid regions. Water and Soil Management and Modeling, 4(2), 227-240. doi: 10.22098/mmws.2023.12728.1270 [In Persian]
Mokhtar, A., Al-Ansari, N., El-Ssawy, W., Graf, R., Aghelpour, P., He, H., Hafez, S.M., & Abuarab, M. (2023). Prediction of irrigation water requirements for green beans-based machine learning algorithm models in arid region. Water Resources Management, 37(4), 1557-1580. doi:10.1007/s11269-023-03443-x
Oukawa, G. Y., Krecl, P., & Targino, A. C. (2022). Fine-scale modeling of the urban heat island: A comparison of multiple linear regression and random forest approaches. Science of the total environment815, 152836. doi:10.1016/j.scitotenv.2021.152836
Peng, Y., Xiao, Y., Fu, Z., Dong, Y., Zheng, Y., Yan, H., & Li, X. (2019). Precision irrigation perspectives on the sustainable water-saving of field crop production in China: Water demand prediction and irrigation scheme optimization. Journal of Cleaner Production230, 365-377. doi:10.1016/j.jclepro.2019.04.347
Perea, R. G., García, I. F., Poyato, E. C., & Díaz, J. R. (2023). New memory-based hybrid model for middle-term water demand forecasting in irrigated areas. Agricultural Water Management, 284, 108367. doi:10.1016/j.agwat.2023.108367
Perea, R. G., Poyato, E. C., Montesinos, P., & Díaz, J. R. (2019). Prediction of irrigation event occurrence at farm level using optimal decision trees. Computers and Electronics in agriculture157, 173-180.doi:10.1016/j.compag.2018.12.043
Sattari, M. T., Shirini, K., & Javidan, S. (2024). Evaluating the efficiency of dimensionality reduction methods in improving the accuracy of water quality index modeling in Qizil-Uzen River using machine learning algorithms.  Water and Soil Management and Modelling, 4(2), 89-104. doi:10.22098/mmws.2023.12434.1241 [In Persian]
Sherstinsky, A. (2020). Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network. Physica D: Nonlinear Phenomena404, 132306. doi:10.1016/j.physd.2019.132306
Siłka, J., Wieczorek, M., & Woźniak, M. (2022). Recurrent neural network model for high-speed train vibration prediction from time series. Neural Computing and Applications34(16), 13305-13318. doi:10.1007/s00521-022-06949-4
Taylor, K. E. (2001). Summarizing multiple aspects  of model performance in a single diagram. Journal of Geophysical Research:Atmospheres, 106(D7), 7183-7192. doi:10.1029/2000JD900719
Vu, H. L., Ng, K. T. W., Richter, A., & An, C. (2022). Analysis of input set characteristics and variances on k-fold cross validation for a Recurrent Neural Network model on waste disposal rate estimation. Journal of Environmental Management311, 114869. doi:10.1016/j.jenvman.2022.114869
Yadav, S. P., Zaidi, S., Mishra, A., & Yadav, V. (2022). Survey on machine learning in speech emotion recognition and vision systems using a recurrent neural network (RNN). Archives of Computational Methods in Engineering29(3), 1753-1770. doi:10.1007/s11831-021-09647-x
Yan, X., Gan, X., Wang, R., & Qin, T. (2022). Self-attention eidetic 3D-LSTM: Video prediction models for traffic flow forecasting. Neurocomputing509, 167-176. doi:10.1016/j.neucom.2022.08.060
Yatsenko, D., Reimer, J., Ecker, A.S., Walker, E.Y., Sinz, F., Berens, P., Hoenselaar, A., James Cotton, R., Siapas, A.S., &and Tolias, A.S., (2015). Data Joint: managing big scientific data using MATLAB or Python.  BioRxiv, p.031658. doi: 10.1101/031658
Yi, S., Liu, H., Chen, T., Zhang, J., & Fan, Y. (2023). A deep LSTM‐CNN based on self‐attention mechanism with input data reduction for short‐term load forecasting. IET Generation, Transmission & Distribution, 17(7), 1538-1552. doi:10.1049/gtd2.12763
Zang, H., Xu, R., Cheng, L., Ding, T., Liu, L., Wei, Z., & Sun, G. (2021). Residential load forecasting based on LSTM fusing self-attention mechanism with pooling. Energy, 229, 120682. doi:10.1016/j.energy.2021.120682
Zhang, Q., Abdullah, A. R., Chong, C. W., & Ali, M. H. (2022). A Study on Regional GDP Forecasting Analysis Based on Radial Basis Function Neural Network with Genetic Algorithm (RBFNN‐GA) for Shandong Economy. Computational Intelligence and Neuroscience2022(1), 8235308. doi:10.1155/2022/8235308
Zou, L., Zha, Y., Diao, Y., Tang, C., Gu, W., & Shao, D. (2023). Coupling the causal inference and informer networks for short-term forecasting in irrigation water usage. Water Resources Management, 37(1), 427-449. doi:10.1007/s11269-022-03381-0