Research on Financial Risk Prediction of Listed Companies Based on CNN-Transformer Ensemble Learning
Abstract
Traditional financial risk prediction models for listed companies mostly rely on annual quantitative indicators for modeling. With a long data update cycle, such models cannot effectively capture the dynamic evolution characteristics of corporate financial status within the year, making it difficult to realize timely early warning of financial risks. Quarterly financial data feature higher temporal resolution, which can accurately reflect the intra-year fluctuation pattern of corporate financial conditions and effectively improve the timeliness of financial risk identification. However, when such data are applied to risk prediction, there still exist problems including difficulty in extracting multi-dimensional feature matrices and insufficient modeling of time-series correlation features. In view of this, this paper constructs an ensemble learning model for financial risk prediction by integrating CNN and Transformer. Firstly, multi-dimensional quarterly financial risk indicators of enterprises are reconstructed into matrix-valued input features. Convolutional Neural Network (CNN) is used to mine the time-series evolution features of financial indicators, while Transformer is adopted to capture the complex correlations and global dependency features among different financial indicators. Meanwhile, an ensemble learning strategy based on stratified sampling is introduced to effectively alleviate the class imbalance caused by the scarcity of ST risk samples of listed companies and achieve a balanced trade-off between model bias and variance. The proposed model is verified with the financial risk prediction of A-share listed companies as an empirical scenario. Experimental results show that the CNN-Transformer ensemble model outperforms traditional benchmark models in prediction performance. In addition, the SHAP explainable framework is introduced to interpret the model prediction results. It is found that financial information of quarters close to the prediction point carries higher risk-discriminating weights, and indicators such as corporate debt-servicing and financing pressure as well as abnormal costs and expenses are key factors driving financial risks of listed companies.
References
- Kim, H., Cho, H. and Ryu, D. (2020) Corporate default predictions using machine learning: Literature review. Sustainability, 12(16), 6325. https: //doi.org/10.3390/su12166325
- El Madou, K., Marso, S., El Kharrim, M. and El Merouani, M. (2024) Evolutions in machine learning technology for financial distress prediction: A comprehensive review and comparative analysis. Expert Systems, 41(2), e13485. https: //doi.org/10.1111/exsy.13485
- Liang, M., Li, H. X., & Zhang, S. M. (2023). Measurement of financial distress and cross-sectional stock returns based on ST prediction. Chinese Journal of Management Science, 31(2), 138–149. https: //doi.org/10.16381/j.cnki.issn1003-207x.2020.1532
- Raudys, A. and Goldstein, E. (2022) Forecasting detrended volatility risk and financial price series using LSTM neural networks and XGBoost regressor. Journal of Risk and Financial Management, 15(12), 602. https: //doi.org/10.3390/jrfm15120602
- Xu, Y., Li, J. and Wu, A. (2024) An XGboost algorithm based model for financial risk prediction. Tehnički vjesnik, 31(6), 1898–1907. https: //doi.org/10.17559/TV-20231021001043
- Wang, D., Li, L. and Zhao, D. (2022) Corporate finance risk prediction based on LightGBM. Information Sciences, 602, 259–268. https: //doi.org/10.1016/j.ins.2022.04.058
- Zhang, J. (2024) Impact of an improved random forest-based financial management model on the effectiveness of corporate sustainability decisions. Systems and Soft Computing, 6, 200102. https: //doi.org/10.1016/j.sasc.2024.200102
- Zou, Y., Yuan, Y., Zhu, C. and Yu, C. (2025) Symmetric equilibrium bagging–cascading boosting ensemble for financial risk early warning. Symmetry, 17(10), 1779. https: //doi.org/10.3390/sym17101779
- Chen, W., Fang, J. and Gu, C. (2025) Class imbalance in financial distress models: A novel LightGBM-based hybrid classifier. In: Lu, P., Lu, Z. and Cheng, D. (eds.) Digital Finance: CCF China Digital Finance Conference, CDFC 2025, Shanghai, China, August 15–17, 2025, Revised Selected Papers. Communications in Computer and Information Science, vol. 2711. Singapore: Springer Nature Singapore, pp. 119–137. https: //doi.org/10.1007/978-981-95-5211-5_7
- Matsumaru, M. and Katagiri, H. (2025) A two-stage machine learning approach to bankruptcy prediction: Integrating full-feature modeling and optimized feature selection. Journal of Risk and Financial Management, 18(12), 662. https: //doi.org/10.3390/jrfm18120662
- Nguyen, H. H., Viviani, J. L. and Ben Jabeur, S. (2026) Predicting firm bankruptcy using macroeconomic and uncertainty variables: An ensemble machine learning study of the French market. The European Journal of Finance. https: //doi.org/10.1080/1351847X.2026.2661059
- Che, W., Wang, Z., Jiang, C. and Abedin, M. Z. (2024) Predicting financial distress using multimodal data: An attentive and regularized deep learning method. Information Processing & Management, 61(4), 103703. https: //doi.org/10.1016/j.ipm.2024.103703
- Sun, Y. (2025) Financial transaction network risk prediction model based on graph neural network. Procedia Computer Science, 261, 763–771. https: //doi.org/10.1016/j.procs.2025.04.403
- Zhang, M. (2025) GNN-GAT-LSTM: A graph neural network-based early warning model for enterprise financial risk in dynamic inter-firm networks. Informatica, 49(24), 369–384. https: //doi.org/10.31449/inf.v49i23.9868
- Korangi, K., Mues, C. and Bravo, C. (2023) A transformer-based model for default prediction in mid-cap corporate markets. European Journal of Operational Research, 308(1), 306–320. https: //doi.org/10.1016/j.ejor.2022.10.032