Financial risk prediction method based on improved ResNet of channel attention mechanism

By adopting the improved ResNet model of the channel attention mechanism in financial risk prediction, it solves the problems of data imbalance and poor feature correlation, achieves higher prediction accuracy and generalization ability, adapts to the complex changes in the financial market, and provides a basis for risk management. Reliable support provided.

CN118799085APending Publication Date: 2024-10-18XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410965405.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing financial risk prediction methods face the problems of data imbalance and poor feature correlation, resulting in low prediction accuracy and the inability to effectively capture the complex nonlinear relationships in financial markets.

Method used

An improved ResNet model based on the channel attention mechanism is adopted, the data is balanced through the SMOTE method, combined with the channel attention module and the residual block, the importance of each feature channel is emphasized, and transfer learning is used for financial risk prediction.

Benefits of technology

It improves the accuracy and generalization ability of financial risk prediction, can more accurately identify key risk factors, improves prediction accuracy, adapts to complex and dynamic changes in financial markets, and provides reliable support for risk management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799085A_ABST
    Figure CN118799085A_ABST
Patent Text Reader

Abstract

The invention discloses a financial risk prediction method based on improved ResNet of a channel attention mechanism, and the method comprises the steps: extracting a financial risk data set from a csmar database, and carrying out the coding conversion of financial risk data, and obtaining a sequential coding feature; balancing the sequential coding features by using an SMOTE method to obtain new coded data; segmenting into a training set and a test set by adopting a ten-fold cross validation method; constructing an improved ResNet model based on the channel attention mechanism, and inputting the training set into the improved ResNet model based on the channel attention mechanism for training to obtain a financial risk prediction model; predicting the enterprise risk data by using the financial risk prediction model through transfer learning to obtain a prediction result; according to the method, the importance of each feature channel is emphasized through an attention mechanism, and in combination with the deep residual learning ability, the recognition ability of the model for key risk factors is improved, and the generalization ability and prediction accuracy of the model are also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of financial risk prediction, and specifically relates to a financial risk prediction method based on an improved ResNet with a channel attention mechanism. Background Art

[0002] Financial risk refers to the potential risks that may lead to losses faced by financial markets or financial institutions. These risks may come from various factors, including market fluctuations, credit defaults, operational errors, liquidity problems, etc. Financial risk aims to predict and identify potential risks and formulate corresponding risk management strategies and countermeasures to reduce the impact of potential risks on institutions or investment portfolios.

[0003] Financial risk prediction methods can be divided into two types: traditional methods and neural network-based methods. Traditional methods such as random forest algorithm, C4.5 algorithm and classification and regression tree algorithm are used to classify whether financial enterprises have the ability to repay loans. Multiple information from real enterprises, such as debt-to-asset ratio, tangible debt-to-asset ratio, ESG score, etc., are combined. Nie et al. designed a comparison between logistic regression and decision tree, but the experimental results showed that logistic regression performed better. Bhattacharyya et al. tried to discover the performance of algorithms such as support vector machines, random forests and logistic regression in financial risk prediction. Experiments have shown that the overall performance of the random forest algorithm is better than other algorithms. Kumar et al. also proposed a random forest algorithm to predict whether a company in the real world contains financial risks. Traditional methods are relatively simple when processing credit card transactions, and insufficient feature extraction leads to low accuracy and inability to respond quickly to evolving features.

[0004] With the rapid development of machine learning technology in the financial field, neural networks have become one of the most popular methods for financial risk prediction. Based on the consideration of various indicators such as the credit capacity of each enterprise, the growth of the enterprise, and related intrinsic characteristics, Fu et al. proposed a financial risk prediction framework based on CNN, but the data attributes were relatively simple. Jurgovsky et al. regarded the enterprise attribute indicators as a continuous time series and constructed a sequence classification method on the LSTM network. However, the above-mentioned methods face many problems such as the poor correlation between the internal features of the risk data and data imbalance. Therefore, in the latest research, we noticed that the channel attention mechanism can learn and emphasize the importance of each feature channel, so that the model can focus on the most relevant features. This is particularly important for the identification of complex nonlinear relationships in financial enterprise data, and can effectively capture the key features that affect risk changes. The ResNet structure itself has deep residual learning capabilities and can effectively learn complex data representations, especially for processing high-dimensional, nonlinear and dynamic data in the financial market. However, directly predicting financial risk data still has data imbalance risk problems. Summary of the invention

[0005] The purpose of the present invention is to provide a financial risk prediction method based on an improved ResNet with a channel attention mechanism, which solves the problems of data imbalance and inaccurate prediction of financial risks in the prior art.

[0006] The technical solution adopted by the present invention is to perform a financial risk prediction method based on an improved ResNet with a channel attention mechanism, which is specifically implemented in the following steps:

[0007] Step 1: Obtain the financial risk dataset from the CSMAR database and perform preprocessing;

[0008] Step 2: Convert the preprocessed financial risk data into sequential coding features; use the SMOTE method to balance the sequential coding features to obtain new coding data;

[0009] Step 3: The new encoded data was divided into a training set and a test set using a ten-fold cross-validation method;

[0010] Step 4: Build an improved ResNet model based on the channel attention mechanism, input the training set into the improved ResNet model training based on the channel attention mechanism, and use the test set for testing to obtain a financial risk prediction model;

[0011] Step 5: Use transfer learning to predict the enterprise risk data using the financial risk prediction model to obtain the prediction results.

[0012] The present invention is also characterized in that:

[0013] Step 1 The specific process is: Get the financial risk data set from the CSMAR database. Define the financial risk data set as Data_set = {d1, d2, d3, ... d p},o=1,2,3...p, including features F={f1,f2,f3,...f n}, j = 1, 2, 3, ... n, category C = {c1, c2}; count the number of samples in each feature instance number (f i ) and the average number of samples for all features In each feature f i If the number of samples in this category is number(f i ) is less than the average number of samples in the category Then in the absence of this attribute instance, i The new sample value dnew is filled in, and dnew is the average value of other feature instance values ​​​​except the missing values.

[0014] The specific process of step 2 is:

[0015] Step 2.1: The categorical features without sequential information in the preprocessed financial risk data are converted using One-Hot Encoding, and the categorical features with sequential information are converted using sequential encoding to obtain digital features, which are then standardized to obtain sequential encoding features;

[0016] Step 2.2: Use the 3σ method to determine the outliers in the sequential coding features, remove the outliers, and use the SMOTE oversampling method to balance the data of the sequential coding features with outliers removed to obtain new coding data.

[0017] The formula for balancing data using the SMOTE oversampling method is:

[0018] x new =x i +rand(0,1)*|x i -x neighbour |;

[0019] In the formula, x new represents new encoded data, rand(0,1) represents a random number, x i represents the data in the sequentially coded features with outliers removed, x nei g hbour Represents x i An adjacent data of .

[0020] The improved ResNet model based on the channel attention mechanism in step 4 includes: a channel attention module, a residual network structure with the residual block as the basic unit of the network.

[0021] The residual block consists of two convolutional layers, where the first convolutional layer is used to reduce the feature dimension, and the second convolutional layer is used to restore the feature dimension and add the input features to the output features. The expression is:

[0022] y = σ(F(x,W)+x);

[0023] In the above formula, y represents the output of the residual block, i.e., the predicted value of financial risk. In σ(F(x,W)+x), σ(·) represents the activation function, F(·) represents the residual function, x represents the input, and W represents all the weights in the residual block. Let X i ,X i+1 is the input and output of a shallow residual block in the network, X i+1 is the input of the next residual block, X I is the output of a deep residual block, and the ReLU activation function is denoted by r(·).

[0024] The specific process of step 4 is as follows:

[0025] Step 4.1: Build an improved ResNet model based on the channel attention mechanism;

[0026] Step 4.2: Use the channel attention module to traverse the feature F of each sample in the financial risk dataset, and then perform global average pooling, global maximum pooling, multi-layer perceptron, and weight calculation in turn to retain the most important feature F' i,c ;

[0027] Step 4.3: The important feature F' i,c Input into the residual network to obtain the predicted value of financial risk;

[0028] Step 4.4: Return to step 4.2 and traverse the financial risk training set until all features in the training set are processed;

[0029] Step 4.5: For the trained model, use the test set to test it. After the test is completed, use transfer learning to save the dictionary of all weights and biases in the learned model, which is the financial risk prediction model.

[0030] The specific process of step 4.2 is as follows:

[0031] Step 4.2.1, traverse the feature F of each sample in the financial risk data set through the channel attention module, and extract the data features of each feature F through the convolution layer. The global average pooling and global maximum pooling are used to coordinate the global information of the channel and capture the most significant features. The formulas of global average pooling and global maximum pooling are:

[0032]

[0033] MaxPool(F) c =max i F i,c ;

[0034] Among them, L represents the sequence length and C represents the number of channels;

[0035] Step 4.2.2, use a multi-layer perceptron to calculate the weight of each feature. The first layer transforms the pooling result of each channel into a lower-dimensional feature space through the weight matrix W1, where the ReLU activation function is used to introduce nonlinearity to help the model learn complex feature dependencies. The second layer further processes and maps the features back to the original channel dimension through another weight matrix W2. The Sigmoid function compresses the output to the range of [0,1] and generates a weight between 0 and 1 for each channel. The expressions for the first and second layers are:

[0036] S c =ReLU(W1×Pool(F) c );

[0037] T c =Sigmoid(W2×S c );

[0038] Among them, Pool can be AvgPool or MaxPool, W1 and W2 are the weight matrices of the multilayer perceptron;

[0039] Step 4.2.3, channel attention weight M c It is obtained by adding and fusing the outputs of two multi-layer perceptrons, where and Respectively represent the multi-layer perceptron output applied to the global average pooling and global maximum pooling results, the formula is:

[0040]

[0041] Step 4.2.4, attention weight M c It is used to weight the original feature F, where the features of each channel are multiplied by the corresponding weight, expressed as:

[0042] F'i,c =M c ×F i,c ;

[0043] Among them, M c Should be replicated over length L to match the dimensions of F.

[0044] The beneficial effects of the present invention are:

[0045] The improved ResNet financial risk prediction method based on the channel attention mechanism of the present invention has a high prediction accuracy in financial risk prediction; the importance of each feature channel is emphasized through the attention mechanism, and combined with the deep residual learning ability of ResNet, it not only improves the model's ability to identify key risk factors, but also improves the model's generalization ability and prediction accuracy. This method can effectively cope with the complex and dynamic changes in the financial market and provide reliable support for risk management and decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flow chart of the financial risk prediction method based on the improved ResNet of the present invention based on the channel attention mechanism;

[0047] Figure 2 This is a schematic diagram of the overall process network structure of the model in the present invention;

[0048] Figure 3 Schematic diagram of the balanced data SMOTE method in the present invention;

[0049] Figure 4 This is a diagram of the improved ResNet network structure in the present invention;

[0050] Figure 5 This is a network structure diagram of the channel attention mechanism in the present invention;

[0051] Figure 6 This is a diagram of the transfer learning network structure in the present invention;

[0052] Figure 7 It is the experiment conducted by the present invention on the financial enterprise risk prediction data set and the line graph of the changes of various evaluation indicators during the training process;

[0053] Figure 8 It is a graph showing the change of AUC in the BankSim dataset experiment of the present invention;

[0054] Fig. 9 It is a columnar evaluation index result diagram of the comparative experiment between the present invention and the existing prediction method on the F_risk_adjusted data set;

[0055] Fig.10It is a columnar evaluation index result diagram of a comparative experiment between the present invention and the existing prediction method on the F_risk_adjusted_1vs_5 data set;

[0056] Fig.11 It is a columnar evaluation index result diagram of the comparative experiment between the present invention and the existing prediction method on the F_risk_adjusted_1vs_20 data set;

[0057] Fig.12 It is a comparison chart of columnar algorithm evaluation indicators of the present invention and four existing prediction methods on 9 data sets. DETAILED DESCRIPTION

[0058] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] Example 1

[0060] This embodiment uses an improved ResNet based on the channel attention mechanism to perform financial risk prediction. Figure 1 As shown in the figure, the overall process network structure of the model is as follows Figure 2 As shown, the specific implementation steps are as follows:

[0061] Step 1: Extract the financial risk data set from the CSMAR database and perform preprocessing. The specific process is: obtain the financial risk data set from the CSMAR database. Define the financial risk data set as Data_set = {d1, d2, d3, ...d p},o=1,2,3...p, including features F={f1,f2,f3,...f n}, j = 1, 2, 3, ... n, category C = {c1, c2}; count the number of samples in each feature instance number (f i ) and the average number of samples for all features In each feature f i If the number of samples in this category is number(f i ) is less than the average number of samples in the category Then in the absence of this attribute instance, i The new sample value dnew is filled in, and dnew is the average value of other feature instance values ​​​​except the missing values.

[0062] Step 2: Convert the preprocessed financial risk data into sequential coding features; use the SMOTE method to balance the sequential coding features to obtain new coding data; the specific process is as follows:

[0063] Step 2.1, divide the data that cannot be directly processed in the preprocessed data set into ordered and unordered features. Use One-Hot Encoding to process the category features without sequential information. Similarly, there are other sequential features between categories. For this kind of feature, One-Hot Encoding cannot be used due to the sequential information between different categories. This embodiment uses sequential encoding, that is, mapping the sequential features to different natural numbers to obtain digital features, and standardizing the digital features to obtain sequential coded features;

[0064] Step 2.2: Use the 3σ method to determine the outliers in the sequential coding features, remove the outliers, and use the SMOTE oversampling method to balance the data of the sequential coding features with outliers removed to obtain new coding data. The specific effect diagram is as follows: Figure 3 shown.

[0065] The formula for balancing data using the SMOTE oversampling method is:

[0066] x new =x i +rand(0,1)*|x i -x neighbour | (1)

[0067] In the formula, x new represents new encoded data, rand(0,1) represents a random number, x i represents the data in the sequentially coded features with outliers removed, x neighbour Represents x i An adjacent data of .

[0068] Step 3: The new encoded data was divided into a training set and a test set using a ten-fold cross-validation method;

[0069] Step 4: Build an improved ResNet model based on the channel attention mechanism, input the training set into the improved ResNet model training based on the channel attention mechanism, and use the test set for testing to obtain a financial risk prediction model;

[0070] Step 5: Use transfer learning to predict the enterprise risk data using the financial risk prediction model to obtain the prediction results.

[0071] Example 2

[0072] Based on Example 1, an improved ResNet model based on the channel attention mechanism is constructed in this embodiment. Figure 4 , Figure 5 As shown, it includes: a channel attention module and a residual network structure with a residual block as the basic unit of the network.

[0073] The residual block consists of two convolutional layers, where the first convolutional layer is used to reduce the feature dimension, and the second convolutional layer is used to restore the feature dimension and add the input features to the output features. The expression is:

[0074] y=σ(F(x,W)+x) (2);

[0075] In the above formula, y represents the output of the residual block, i.e., the predicted value of financial risk. In σ(F(x,W)+x), σ(·) represents the activation function, F(·) represents the residual function, x represents the input, and W represents all the weights in the residual block. Let X i ,X i+1 is the input and output of a shallow residual block in the network, X i+1 is the input of the next residual block, X I is the output of a deep residual block, and the ReLU activation function is denoted by r(·).

[0076] In the improved ResNet model, with the addition of residual blocks, when the optimal solution is reached, F(x) = x is directly used, so that the weight parameters can achieve the purpose of at least not being worse than the previous training effect, and the network convergence can be accelerated. As for the gradient diffusion problem of the residual block output y, it can be solved by the gradient layer-by-layer update method of formulas (9), (10), and (11).

[0077] X i+1 = r(X i +F(X i ,W i ))=X i +F(X i ,W i ) (3)

[0078] X i+2 = r(X i+1 +F(X i+1 ,W i+1 ))=X i +F(X i ,W i )+F(X i+1 ,W i+1 ) (4)

[0079]

[0080] In the above formulas (3) and (4), we can recursively deduced downward to obtain formula (5). It can be seen that in the residual network, the output of the residual block in the lower layer can be determined by a certain layer above. In the back propagation, the gradient formula of the residual network when updating the gradient is shown in formula (6).

[0081]

[0082] Among them, the gradient of back propagation consists of two items. For the direct mapping of x, the gradient is 1; is the result of mapping on a multi-layer ordinary neural network. That is, when the gradient of the newly added multi-layer network is 0, the gradient update of the residual network contains a 1, which is the defined residual block. It is precisely because of this additional path that the gradient from the deep layer can pass directly to the previous layer, so that the parameters of the shallow network layer can be effectively trained, avoiding the problem of gradient disappearance.

[0083] The training set is input into the improved ResNet model training based on the channel attention mechanism, and the test set is used for detection to obtain the financial risk prediction model. The specific process is as follows:

[0084] The specific process is:

[0085] Step 4.1: Build an improved ResNet model based on the channel attention mechanism;

[0086] Step 4.2: Use the channel attention module to traverse the feature F of each sample in the financial risk dataset, and then perform global average pooling, global maximum pooling, multi-layer perceptron, and weight calculation in turn to retain the most important feature F' i,c ; The specific process is:

[0087] Step 4.1.1, traverse the feature F of each sample in the financial risk data set through the channel attention module, and extract the data features of each feature F through the convolution layer. The global average pooling and global maximum pooling are used to coordinate the global information of the channel and capture the most significant features. The formulas of global average pooling and global maximum pooling are:

[0088]

[0089] MaxPool(F) c =max i F i,c (8)

[0090] Among them, L represents the sequence length and C represents the number of channels;

[0091] Step 4.1.2, use a multi-layer perceptron to calculate the weight of each feature. The first layer transforms the pooling result of each channel into a lower-dimensional feature space through the weight matrix W1, where the ReLU activation function is used to introduce nonlinearity to help the model learn complex feature dependencies. The second layer further processes and maps the features back to the original channel dimension through another weight matrix W2. The Sigmoid function compresses the output to the range of [0,1] and generates a weight between 0 and 1 for each channel. The expressions for the first and second layers are:

[0092] S c =ReLU(W1×Pool(F) c ) (9)

[0093] T c =Sigmoid(W2×S c ) (10)

[0094] Among them, Pool can be AvgPool or MaxPool, W1 and W2 are the weight matrices of the multilayer perceptron;

[0095] Step 4.1.3: Channel attention weight M c It is obtained by adding and fusing the outputs of two multi-layer perceptrons, where and Respectively represent the multi-layer perceptron output applied to the global average pooling and global maximum pooling results, the formula is:

[0096]

[0097] Step 4.1.4, attention weight M c It is used to weight the original feature F, where the features of each channel are multiplied by the corresponding weight, expressed as:

[0098] F' i,c =M c ×F i,c (12)

[0099] Among them, M c Should be replicated over length L to match the dimensions of F.

[0100] Step 4.3: The important feature F' i,c Input the residual block to get the predicted value of financial risk;

[0101] Step 4.4: Return to step 4.2 and traverse the financial risk training set until all features in the training set are processed;

[0102] Step 4.5: For the trained model, use the test set to test it. After the test is completed, use transfer learning to save the dictionary of all weights and biases in the learned model, such as Figure 6 The financial risk prediction model is shown in Figure 2.

[0103] Example 3

[0104] The prediction model trained in Example 2 is used to test the test data. After the output results are obtained, the accuracy, AUC, recall, F1 score and H-Measure are used as evaluation criteria to evaluate the results.

[0105] The pseudo code of the improved residual network algorithm based on the channel attention mechanism is shown in Table 1:

[0106] Table 1

[0107]

[0108]

[0109] The pseudo code of the SMOTE algorithm is shown in Table 2:

[0110] Table 2

[0111]

[0112]

[0113] Performance evaluation of the present invention:

[0114] In order to verify the effectiveness of the improved residual network financial risk prediction method based on the channel attention mechanism in the present invention, the method of the present invention is compared with the existing financial risk prediction algorithm. Comparison is carried out through comparative experiments on 9 unbalanced data sets. Among them, the three data sets of F_risk_adjusted, F_risk_adjusted_1vs_5, and F_risk_adjusted_1vs_20 are all taken from the real data sets of Chinese financial risk enterprises in CSMAR, and the specific parameter indicators can be seen in Table 3.

[0115] Table 3

[0116]

[0117]

[0118] from Figure 7 It can be seen that the changes in various evaluation indicators of the improved residual network method based on the channel attention mechanism during the experiment. Figure 8 You can see the change results of AUC of the method on the data set. Fig. 9 , Fig.10 and Fig.11 It can be seen that the improved residual network method based on the channel attention mechanism outperforms the existing mainstream classifier algorithm in terms of AUC, recall rate, F1 score and H-Measure, indicating that the algorithm is effective and stable.

[0119] In order to verify the effectiveness of the improved residual network method based on the channel attention mechanism in the present invention, four comparative algorithms (random forest algorithm, C4.5 algorithm, classification and regression tree algorithm, XGBoost algorithm) are used to compare with the classification algorithm in the present invention. Experiments are conducted on 6 public data sets and 3 collected financial risk data sets. Fig.12 It can be seen that the improved residual network algorithm based on the channel attention mechanism has better accuracy than other comparison algorithms on the 9 data sets, and its average performance is better than other comparison algorithms. The experiments show the effectiveness of the feature selection algorithm. The data set information can be found in Table 4, and the detailed information of the unbalanced data set can be found in Table 5.

[0120] Table 4

[0121]

[0122]

[0123] Table 5

[0124]

[0125] After using the SMOTE algorithm to process the imbalanced data set, the improved residual network method based on the channel attention mechanism is used as a prediction classifier and compared with four other popular classification algorithms (random forest algorithm, C4.5 algorithm, classification and regression tree algorithm, and XGBoost algorithm). Fig. 9 , Fig.10 , Fig.11 In the figure, we can see the bar chart of the comparison between the improved residual network based on the channel attention mechanism and the random forest algorithm, C4.5 algorithm, classification and regression tree algorithm, and XGBoost algorithm on F_risk_adjusted, F_risk_adjusted_1vs_5, and F_risk_adjusted_1vs_20. It can be clearly seen that the method we proposed is the best.

[0126] exist Fig.12 In the paper, four classification algorithms are compared on 9 data sets. The improved residual network algorithm based on the channel attention mechanism outperforms other compared algorithms in terms of accuracy, AUC, recall, F1 score and H-Measure, and has the best overall performance. The effectiveness of the present invention is demonstrated through experiments.

[0127] Through the above-mentioned method, the improved ResNet of the present invention based on the channel attention mechanism performs financial risk prediction, which has a high prediction accuracy in financial risk prediction; by emphasizing the importance of each feature channel through the attention mechanism, combined with the deep residual learning ability of ResNet, it not only improves the model's ability to identify key risk factors, but also improves the model's generalization ability and prediction accuracy. This method can effectively cope with the complex and dynamic changes in the financial market and provide reliable support for risk management and decision-making.

Claims

1. A financial risk prediction method based on an improved ResNet with channel attention mechanism, characterized in that: Follow the steps below to implement it: Step 1: Extract the financial risk data set from the CSMAR database and perform preprocessing; Step 2: Convert the preprocessed financial risk data into sequential coding features; Use the SMOTE method to balance the sequential encoding features and obtain new encoding data; Step 3: The new encoded data was divided into a training set and a test set using a ten-fold cross-validation method; Step 4: Build an improved ResNet model based on the channel attention mechanism, input the training set into the improved ResNet model training based on the channel attention mechanism, and use the test set for testing to obtain a financial risk prediction model; Step 5: Use transfer learning to predict the enterprise risk data using the financial risk prediction model to obtain the prediction results.

2. The method for predicting financial risks using the improved ResNet based on the channel attention mechanism according to claim 1 is characterized in that: Step 1 The specific process is: Get the financial risk data set from the CSMAR database and define the financial risk data set as Data_set = {d1, d2, d3, ... d p },o=1,2,3...p, including features F={f1,f2,f3,...f n }, j = 1, 2, 3, ... n, category C = {c1, c2}; count the number of samples in each feature instance number (f i ) and the average number of samples for all features In each feature f i If the number of samples in this category is number(f i ) is less than the average number of samples in the category Then in the absence of this attribute instance, i The new sample value dnew is filled in, and dnew is the average value of other feature instance values ​​​​except the missing values.

3. The method for predicting financial risks using the improved ResNet based on the channel attention mechanism according to claim 1 is characterized in that: The specific process of step 2 is as follows: Step 2.1: The categorical features without sequential information in the preprocessed financial risk data are converted using One-Hot Encoding, and the categorical features with sequential information are converted using sequential encoding to obtain digital features, which are then standardized to obtain sequential encoding features; Step 2.2: Use the 3σ method to determine the outliers in the sequential coding features, remove the outliers, and use the SMOTE oversampling method to balance the data of the sequential coding features with outliers removed to obtain new coding data.

4. The method for predicting financial risks using the improved ResNet based on the channel attention mechanism according to claim 3 is characterized in that: The formula for balancing data using the SMOTE oversampling method is: x new =x i +rand(0,1)*|x i -x neighbour | In the formula, x new represents new encoded data, rand(0,1) represents a random number, x i represents the data in the sequentially coded features with outliers removed, x neighbour Represents x i An adjacent data of .

5. The method for predicting financial risks using the improved ResNet based on the channel attention mechanism according to claim 1 is characterized in that: The improved ResNet model based on the channel attention mechanism described in step 4 includes: a channel attention module, a residual network structure with the residual block as the basic unit of the network.

6. The method for predicting financial risks using the improved ResNet based on the channel attention mechanism according to claim 5 is characterized in that: The residual block consists of two convolutional layers, where the first convolutional layer is used to reduce the feature dimension, and the second convolutional layer is used to restore the feature dimension and add the input feature to the output feature. The expression is: y = σ(F(x,W)+x); In the above formula, y represents the output of the residual block, i.e., the predicted value of financial risk. In σ(F(x,W)+x), σ(·) represents the activation function, F(·) represents the residual function, x represents the input, and W represents all the weights in the residual block. Let X i ,X i+1 is the input and output of a shallow residual block in the network, X i+1 is the input of the next residual block, X I is the output of a deep residual block, and the ReLU activation function is denoted by r(·).

7. The method for predicting financial risks using the improved ResNet based on the channel attention mechanism according to claim 5 is characterized in that: The specific process of step 4 is as follows: Step 4.1: Build an improved ResNet model based on the channel attention mechanism; Step 4.2: Use the channel attention module to traverse the feature F of each sample in the financial risk dataset, and then perform global average pooling, global maximum pooling, multi-layer perceptron, and weight calculation in turn to retain the most important feature F. i ' ,c ; Step 4.3: The important feature F i ' ,c Input the residual block to get the predicted value of financial risk; Step 4.4: Return to step 4.2 and traverse the financial risk training set until all features in the training set are processed; Step 4.5: For the trained model, use the test set to test it. After the test is completed, use transfer learning to save the dictionary of all weights and biases in the learned model, which is the financial risk prediction model.

8. The method for predicting financial risks using the improved ResNet based on the channel attention mechanism according to claim 7 is characterized in that: The specific process of step 4.2 is as follows: Step 4.2.1, traverse the feature F of each sample in the financial risk data set through the channel attention module, and extract the data features of each feature F through the convolution layer. The global average pooling and global maximum pooling are used to coordinate the global information of the channel and capture the most significant features. The formulas of global average pooling and global maximum pooling are: MaxPool(F) c =max i F i,c ; Among them, L represents the sequence length and C represents the number of channels; Step 4.2.2, use a multi-layer perceptron to calculate the weight of each feature. The first layer transforms the pooling result of each channel into a lower-dimensional feature space through the weight matrix W1, where the ReLU activation function is used to introduce nonlinearity to help the model learn complex feature dependencies. The second layer further processes and maps the features back to the original channel dimension through another weight matrix W2. The Sigmoid function compresses the output to the range of [0,1] and generates a weight between 0 and 1 for each channel. The expressions for the first and second layers are: S c =ReLU(W1×Pool(F) c ); T c =Sigmoid(W2×S c ); Among them, Pool can be AvgPool or MaxPool, W1 and W2 are the weight matrices of the multilayer perceptron; Step 4.2.3, channel attention weight M c It is obtained by adding and fusing the outputs of two multi-layer perceptrons, where and Respectively represent the multi-layer perceptron output applied to the global average pooling and global maximum pooling results, the formula is: Step 4.2.4, attention weight M c It is used to weight the original feature F, where the features of each channel are multiplied by the corresponding weight, expressed as: F’ i,c =M c ×F i,c ; Among them, M c Should be replicated over length L to match the dimensions of F.