Temperature Prediction Using Transformer–LSTM Deep Learning Models and Sarimax from a Signal Processing Perspective
Source abstract
Abstract
Recent developments in machine learning (ML), deep learning (DL), and statistical signal processing have led to substantial improvements in the accuracy of time series forecasting, particularly for environmental parameters such as temperature. The accuracy of air temperature prediction is not only vital for meteorological forecasting but also critically impacts agriculture, energy management, and environmental monitoring. In this study, a comprehensive modeling approach is proposed by incorporating both data-driven learning methods and classical signal processing techniques. Specifically, statistical models such as Seasonal AutoRegressive Integrated Moving Average with eXogenous regressors (SARIMAX) are evaluated alongside modern neural network architectures, including Long Short-Term Memory (LSTM) networks and Transformer-based attention mechanisms. The implemented models utilize key atmospheric variables—humidity, pressure, and past temperature values—to predict ambient temperature for future time horizons, such as one week and six months ahead. The SARIMAX model, which is grounded in digital signal processing theory, is particularly examined for its ability to capture seasonality and trend components in structured data. Meanwhile, deep learning models excel in learning complex, nonlinear temporal dependencies. Experimental results show that while LSTM performs well in short-term predictions (mean absolute error (MAE): 2.27, mean squared error (MSE): 6.63), the attention-based Transformer model is superior in capturing the predictions in the long term (MAE: 2.99, MSE: 14.92). SARIMAX, on the other hand, demonstrates a reliable performance in the short term compared to LSTM. These findings provide valuable insights into the strengths and limitations of each modeling approach, guiding future efforts in temperature forecasting and time series analysis.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Energy Load and Power Forecasting
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Department of Electrical-Electronics Engineering, Istanbul Arel University, Istanbul 34537, Türkiye
References (32)
Show source-provided references
1. A transformer neural network for predicting near-surface temperature10.1002/met.2098 ↗
2. Daily means ambient temperature prediction using artificial neural network method: A case study of Turkey10.1016/j.renene.2008.07.007 ↗
3. Shah, V., Patel, N., Shah, D., Swain, D., Mohanty, M., Acharya, B., Gerogiannis, V.C., and Kanavos, A. (2024). Forecasting Maximum Temperature Trends with SARIMAX: A Case Study from Ahmedabad, India. Sustainability, 16.10.20944/preprints202407.1521.v1 ↗
4. Alharbi, F.R., and Csala, D. (2022). A Seasonal Autoregressive Integrated Moving Average with Exogenous Factors (SARIMAX) Forecasting Model-Based Time Series Approach. Inventions, 7.10.3390/inventions7040094 ↗
5. Long short-term memory artificial neural network approach to forecast meteorology and PM 2.5 local variables in Bogotá, Colombia10.1007/s40808-021-01274-6 ↗
6. Cifuentes, J., Marulanda, A., Bello, A., and Reneses, J. (2020). Air temperature forecasting using machine learning techniques: A review. Energies, 13.10.3390/en13164215 ↗
7. Prediction of greenhouse micro-climate using artificial neural network10.15666/aeer/1501_767778 ↗
8. Times Series Forecasting of Monthly Rainfall using Seasonal Auto Regressive Integrated Moving Average with EXogenous Variables (SARIMAX) Model10.1007/s11269-024-03756-5 ↗
9. Time-serial analysis of deep neural network models for prediction of climatic conditions inside a greenhouse10.1016/j.compag.2020.105402 ↗
10. Forecasting greenhouse air and soil temperatures: A multi-step time series approach employing attention-based LSTM network10.1016/j.compag.2023.108602 ↗
11. Deep learning methods for atmospheric PM2.5 prediction: A comparative study of transformer and CNN-LSTM-attention10.1016/j.apr.2023.101833 ↗
12. Prediction and analysis of sea surface temperature based on LSTM-transformer model
13. Joint optimization of linear and nonlinear models for sequential regression10.1016/j.dsp.2022.103802 ↗
14. Fente, D.N., and Singh, D.K. (2018). Weather Forecasting Using Artificial Neural Network, IEEE.10.1109/ICICCT.2018.8473167 ↗
15. Setiawan, K.E., Elwirehardja, G.N., and Pardamean, B. (2022, January 20–21). Sequence to sequence deep learning architecture for forecasting temperature and humidity inside closed space. Proceedings of the 2022 10th International Conference on Cyber and IT Service Management, Yogyakarta, Indonesia.10.1109/CITSM56380.2022.9936008 ↗
16. Luo, S., Rao, Y., Chen, J., Wang, H., and Wang, Z. (2020). Short-Term Load Forecasting Model of Distribution Transformer Based on CNN and LSTM, IEEE.10.1109/ICHVE49031.2020.9279813 ↗
17. Gu, X., Yao, T., Wang, X., Wang, H., Jiang, C., Xiang, Q., and Yan, L. (2021). Improved AM-LSTM for Power Transformer Error Forecasting Model, IEEE.10.1109/ICCSE51940.2021.9569472 ↗
18. A transformer self-attention model for time series forecasting
19. New approach to estimate daily reference evapotranspiration based on hourly temperature and relative humidity using machine learning and deep learning10.1016/j.agwat.2020.106113 ↗
20. Prediction of 10-min, hourly, and daily atmospheric air temperature: Comparison of LSTM, ANFIS-FCM, and ARMA10.1007/s12517-021-06982-y ↗
21. Jenkins, I.R., Gee, L.O., Knauss, A., Yin, H., and Schroeder, J. (2018). Accident Scenario Generation with Recurrent Neural Networks, IEEE.10.1109/ITSC.2018.8569661 ↗
22. Prediction of hourly air temperature based on CNN–LSTM10.1080/19475705.2022.2102942 ↗
23. High- precision collaborative estimation of lithium-ion battery state of health and remaining useful life based on call activation function library-long short term memory neural network algorithm10.1016/j.est.2024.110749 ↗
24. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, Curran Associates.
25. Full-field temperature prediction in tunnel fires using limited monitored ceiling flow temperature data with transformer-based deep learning models10.1016/j.firesaf.2024.104232 ↗
26. Oliveira, H.S., and Oliveira, H.P. (2023). Transformers for energy forecast. Sensors, 23.10.3390/s23156840 ↗
27. Qingsong, W., Linxiao, Y., Tian, Z., and Liang, S. (2022, January 14–18). Robust time series analysis and applications: An industrial perspective. Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA.
28. Elango, V. (2025). ATTENTION2D: Communication Efficient Distributed Self-Attention Mechanism. arXiv.
29. Elshewey, A.M., Shams, M.Y., Elhady, A.M., Shohieb, S.M., Abdelhamid, A.A., Ibrahim, A., and Tarek, Z. (2022). A novel WD-SARIMAX model for temperature forecasting using Daily Delhi Climate Dataset. Sustainability, 15.10.3390/su15010757 ↗
30. Multi-content time-series popularity prediction with multiple-model transformers in MEC networks10.1016/j.adhoc.2024.103436 ↗
31. Sevgin, F. (2025). Machine Learning-Based Temperature Forecasting for sustainable climate change adaptation and mitigation. Sustainability, 17.10.3390/su17051812 ↗
32. Zhou, K., Zhang, C., Xu, B., Huang, J., Li, C., and Pei, Y. (2024). TE-LSTM: A prediction model for temperature based on multivariate time series data. Remote Sens., 16.10.3390/rs16193666 ↗