Research on CPI prediction based on LSTM model with double-layer attention mechanism

Dong Manru,Tang Xiaobin
DOI: https://doi.org/10.59782/sidr.v1i1.53
2024-09-26
Abstract:With the increasingly complex and changing economic and political environment at home and abroad, timely and accurate forecasting of the consumer price index (CPI) plays an important role in boosting consumer confidence and implementing the strategy of expanding domestic demand. Aiming at the multidimensional characteristics of CPI dynamic changes and the lag problem of release, this paper constructs a CPI prediction dataset by combining natural language processing technology, introduces a two-layer Attention mechanism into the LSTM neural network structure, and constructs an ATT-LSTM-ATT model for CPI prediction. At the same time, multiple machine learning models (ATT-LSTM, LSTM, SVR, RF, XGBoost and LGBM) are introduced for comparison and cross-validation analysis. The study found that: (1) The two-layer Attention mechanism can dynamically focus on key information in the two dimensions of features and time series, strengthen the LSTM model's attention allocation to real estate policies, Double Eleven and holidays, highlight the impact of important features and important time points on CPI changes, and effectively improve the model's accuracy in predicting CPI; (2) Compared with the other six machine learning prediction models, the ATT-LSTM-ATT model has better prediction results. It is found that the model has strong stability in predicting CPI with different terms. At the same time, different machine learning models show heterogeneous characteristics in predicting CPI with different terms; (3) Text mining data can grasp the dynamics of residents' consumption in advance. The CPI value predicted by the comprehensive text mining data set and the ATT-LSTM-ATT model is about 3 weeks ahead of the official release time. This paper proposes a two-layer Attention mechanism LSTM model that combines big data and machine learning methods, which provides a new research idea for the prediction and prediction of CPI, can timely adjust the instability of the consumer market, and provide reference value for macroeconomic management and regulation.
What problem does this paper attempt to address?