Research on Company Financial Risk Early Warnings Based on FA-LSTFormer Model
Timely identification of company financial risks is crucial for investors and regulators. However, existing studies overlook the class imbalance caused by the scarcity of high-risk samples, and the interpretability of deep models is insufficient, making it difficult to meet the practical needs. To address these problems, we propose a classification model named FA-LSTFormer, which models a company’s financial risk as low-, medium- and high-warning tasks. FA-LSTFormer employs LSTM and Transformer to decouple the short-term continuity and long-term dependency inherent in financial data. To further attend to indicator-level nuances, we incorporate a Risk-Sensitive Hierarchical Indicator Attention (RSHA) module. Moreover, given the pronounced class imbalance where high-risk events are substantially underrepresented, we further propose a Class-Imbalance-Aware Focal Loss (CIFL) function to prioritize these minor yet critical samples and suppress false negatives. On the dataset of Chinese A-share manufacturing listed companies, experimental results show that our FA-LSTFormer achieves superior performance in accuracy, precision, recall, F1-score and AUC, achieving 92.76%, 93.13%, 91.84%, 92.48%, and 95.27%, respectively. Compared to the suboptimal LTR-Net, it improves these metrics by 1.64–3.60%. Compared to the LSTM–Transformer baseline, FA-LSTFormer improves on it by 4.30–9.13%. In the risk-oriented decision evaluation, FA-LSTFormer achieves a warning ROC of 0.954 for the high-risk class and lowers the error rate to 9.82%. It maintains an accuracy rate of 84.46% even after three years of early warning and exhibits strong robustness across different warning thresholds and company sizes. These results verify the advantages of FA-LSTFormer in both algorithmic performance and practical early-warning applications.