# Financial Risk Control Model Based on Deep Neural Networks

Authors: Jinghong Xu; Daguang Yang
Journal: Scientific Programming
 (2022)

---

## Abstract

Under the background of global economic integration, commercial banks are facing more and more complex business environment. As one of the major financial risks faced by commercial banks, liquidity risk determines and reflects the safety and profitability of bank operation. Based on joint-stock commercial banks as the research object, this paper, respectively, from the angle of the static and dynamic measurements and projections for liquidity risk and based on the current situation of four joint-stock commercial banks liquidity level study, tries to explore the change law of commercial banks liquidity risk and financial risk control of commercial bank and puts forward reasonable suggestions. In this paper, an AHP neural network model combining subjective and objective methods is proposed. This method can not only overcome the defects of the single evaluation method but also improve the data accessibility by using the qualitative data and quantitative data of AHP. In the aspect of financial risk control system, this paper tries to establish a more comprehensive and practical financial risk control model by combining the previous research of scholars, the business model process, and the experience of practical workers.


---

## Body

## 1. Introduction

Although the overall liquidity of the banking industry has been in a state of excess for a long time, it does not mean that commercial banks do not have liquidity risks [1, 2]. The overall liquidity level of the banking system cannot completely represent the liquidity status of all individual banks, and there is no inevitable relationship between the two. In fact, commercial banks have many potential liquidity risks [3]. Specific manifestations are as follows:(1)
At the present stage, the good liquidity situation of commercial banks is not based on their own efficient risk management [4, 5] but is caused by external macro factors, which is highly unstable. With the full implementation of the opening up of the financial industry, the macro environment faced by banks will become complicated. Only by optimizing and improving the internal risk management level of banks can we fundamentally guarantee the sustainable and stable liquidity level of banks.(2)
China’s state-owned banking system enables commercial banks to be protected by national credit all the time, so there is less possibility of bank runs. However, the excess liquidity situation brought by such institutional reasons will not last for a long time. With the continuous development of the financial market, the banking industry will gradually move towards the mode of independent management. In order to improve their comprehensive competitiveness, banks must attach great importance to the role of internal risk management and comprehensively improve the system of risk management.(3)
With the rapid development of the capital market, financial instruments continue to innovate, financial wealth management products are becoming more abundant, customers who originally belonged to banks will transfer funds to nonbank financial institutions, and the phenomenon of “financial disintermediation” has gradually become clear. According to this, the liquidity of the banking system will be absorbed and dissolved in a large amount, and the stability of funds within the bank will also be challenged.(4)
With the continuous progress of financial technology [6–8], the credit rating system of commercial banks will be constantly updated and upgraded, and the ways of information transmission will become increasingly diversified and fast. Accordingly, the public will put forward higher requirements for the liquidity risk management level of commercial banks. Once the confidence crisis occurs, all negative information about the bank will be fully disclosed and widely spread in a very short time. The “domino effect” caused by this will expand the scope of influence of the crisis, and the bank will face significant risk of solvency crisis and run.Based on the above observations, this article will combine the current status of commercial banks’ liquidity and adopt a more advanced AHP neural network algorithm [9–12] to study the liquidity risks of joint-stock commercial banks. The research results are of great significance to the liquidity financial risk control of commercial banks. Following are the main innovations points of this paper:(i)
In this paper, the neural network based on the depth of the financial risk control model helps the bank’s risk control department to improve the accuracy of risk prediction, so that they can early take corresponding measures to prevent risk and thus effectively reduce the probability of liquidity crisis, to reduce the potential risk of harm degree and the scope and eventually improve the overall operating performance of the bank.(ii)
In this paper, the subjective and objective methods are combined to evaluate financial risks, which can not only overcome the defects of a single evaluation method but also provide timely feedback when a single method deviates, and the AHP neural network model proposed in this paper can effectively predict financial risks.


## 2. Related Work

### 2.1. Commercial Bank Liquidity Risk Measurement

Effective measurement of liquidity risk is the core link and important premise of liquidity risk prediction [13]. However, there is no unified and comprehensive liquidity measurement index system in theory and practice, and the effective measurement of liquidity level is still a difficult problem worthy of in-depth discussion. To sum up, there are three main methods to measure liquidity risk at present: first, the static liquidity index measurement method; second, market signal system forecasting method; third, dynamic liquidity measures [14, 15].The so-called static liquidity index measurement method mainly means that commercial banks use a series of economic indicators to measure the stock level of liquidity at a certain point in time. According to the basic characteristics of liquidity, liquidity can be measured from two aspects: assets and liabilities. Among them, the asset liquidity index is used to measure the degree of difficulty of the bank’s asset realization. The so-called market signal system prediction [16, 17] method mainly analyzes bank liquidity from the external generation mechanism of risk. This method believes that the indicator system for measuring liquidity risk mainly includes changes in deposits, securities prices, premiums of debt instruments issued by banks, and asset realization. The dynamic measurement methods [18, 19] adopt frame analysis to include more factors affecting liquidity. The main methods include liquidity gap, net liquid assets, cash flow, and financing gap [20, 21].


### 2.2. AHP

AHP is a decision-making method that quantifies qualitative issues. It decomposes decision-making issues into goals, criteria, and plans. On this basis, qualitative analysis and quantitative analysis are carried out to hierarchize and quantify people’s thinking processes. It also uses mathematics to provide a quantitative basis for analysis, decision-making, forecasting, or control. The simplicity and effectiveness of the analytic hierarchy process have made it quickly accepted by people. After decades of development, the current analytic hierarchy process has been widely used in energy system analysis, system evaluation, planning scheme selection, scientific research management [22], business management [23], policy analysis, regional planning [24], etc. Various applications of the AHP are present in literature [25].


### 2.3. BP Neural Network

BP neural network [26, 27] generally has a network structure of three layers or more. Adjacent neurons are fully connected, and each connection has a corresponding weight. Neurons in the same layer have no connection and no weight. The overall structure generally includes an input layer, an intermediate layer, and an output layer. The intermediate layer may have several layers, and the input layer and the output layer are both single layers. The structure of the BP neural network with a three-layer structure is shown in Figure 1.Figure 1
BP neural network structure.In the same neural network model, in order to improve the computational accuracy of the neural network, the method of increasing the number of hidden layers or the number of neurons in the hidden layer is generally adopted. Increasing the number of hidden layers makes the model more complex, and the time needed to train the weight is greatly increased and the efficiency is low. Therefore, scholars basically do not adopt this method. In practice, regulating the number of neurons in the hidden layer is the method chosen by most people, but there is no clear way to determine the optimal number of neurons. An excessive number of neurons will lead to a longer training time, and the target of optimal precision may not be achieved. A too small number of neurons will lead to the weak training neural network, and the fault tolerance is poor. At present, there is no universal method to determine the number of neurons. The only way to determine the number of neurons is to train different numbers of neurons and then increase the allowance appropriately.


## 2.1. Commercial Bank Liquidity Risk Measurement

Effective measurement of liquidity risk is the core link and important premise of liquidity risk prediction [13]. However, there is no unified and comprehensive liquidity measurement index system in theory and practice, and the effective measurement of liquidity level is still a difficult problem worthy of in-depth discussion. To sum up, there are three main methods to measure liquidity risk at present: first, the static liquidity index measurement method; second, market signal system forecasting method; third, dynamic liquidity measures [14, 15].The so-called static liquidity index measurement method mainly means that commercial banks use a series of economic indicators to measure the stock level of liquidity at a certain point in time. According to the basic characteristics of liquidity, liquidity can be measured from two aspects: assets and liabilities. Among them, the asset liquidity index is used to measure the degree of difficulty of the bank’s asset realization. The so-called market signal system prediction [16, 17] method mainly analyzes bank liquidity from the external generation mechanism of risk. This method believes that the indicator system for measuring liquidity risk mainly includes changes in deposits, securities prices, premiums of debt instruments issued by banks, and asset realization. The dynamic measurement methods [18, 19] adopt frame analysis to include more factors affecting liquidity. The main methods include liquidity gap, net liquid assets, cash flow, and financing gap [20, 21].


## 2.2. AHP

AHP is a decision-making method that quantifies qualitative issues. It decomposes decision-making issues into goals, criteria, and plans. On this basis, qualitative analysis and quantitative analysis are carried out to hierarchize and quantify people’s thinking processes. It also uses mathematics to provide a quantitative basis for analysis, decision-making, forecasting, or control. The simplicity and effectiveness of the analytic hierarchy process have made it quickly accepted by people. After decades of development, the current analytic hierarchy process has been widely used in energy system analysis, system evaluation, planning scheme selection, scientific research management [22], business management [23], policy analysis, regional planning [24], etc. Various applications of the AHP are present in literature [25].


## 2.3. BP Neural Network

BP neural network [26, 27] generally has a network structure of three layers or more. Adjacent neurons are fully connected, and each connection has a corresponding weight. Neurons in the same layer have no connection and no weight. The overall structure generally includes an input layer, an intermediate layer, and an output layer. The intermediate layer may have several layers, and the input layer and the output layer are both single layers. The structure of the BP neural network with a three-layer structure is shown in Figure 1.Figure 1
BP neural network structure.In the same neural network model, in order to improve the computational accuracy of the neural network, the method of increasing the number of hidden layers or the number of neurons in the hidden layer is generally adopted. Increasing the number of hidden layers makes the model more complex, and the time needed to train the weight is greatly increased and the efficiency is low. Therefore, scholars basically do not adopt this method. In practice, regulating the number of neurons in the hidden layer is the method chosen by most people, but there is no clear way to determine the optimal number of neurons. An excessive number of neurons will lead to a longer training time, and the target of optimal precision may not be achieved. A too small number of neurons will lead to the weak training neural network, and the fault tolerance is poor. At present, there is no universal method to determine the number of neurons. The only way to determine the number of neurons is to train different numbers of neurons and then increase the allowance appropriately.


## 3. Methodology

### 3.1. AHP-NN

The training of neural network requires relatively high sample data. It is difficult to achieve full coverage of absolutely large amount of globally representative data, and it is difficult to ensure the accuracy, robustness, and stability of the training network in the training of simple neural network with small samples. In the real logistics financial risk assessment, many qualitative problems are difficult to be expressed with quantitative data, so it is difficult to grasp the accuracy of the samples that can be used for neural network neuron training. The samples obtained by AHP method and proved by practice first ensure the accuracy of neural network training. In addition, expert evaluation makes it possible to quantify qualitative data, which objectively guarantees the source of neural network sample data. Finally, the neural network based on AHP can learn the knowledge and experience of experts in a small sample to maximize the learning efficiency of the network.The shortcomings of the AHP method are that subjective factors have a great influence on the evaluation results, the objectivity is poor, and the evaluation operations are more repetitive. In addition, the AHP evaluation method does not accumulate existing work experience; that is, historical data is difficult to have a positive impact on subsequent evaluations. The characteristic of the neural network is that the neural network stores information or knowledge in a large number of neurons or the entire system. It has the characteristics of holographic association, high-speed computing capability, strong adaptability, and self-learning and self-organizing capabilities. The self-learning ability and self-adaptability of the neural network method make the empirical accumulation of historical data retained in the network. As the sample data continues to expand, the accuracy of the model will become higher and higher.The AHP-NN model is an evaluation model that combines the two methods of AHP and neural network. This model not only simply combines the two but also gives full play to their respective advantages and complements their shortcomings. Therefore, it has the advantages of subjective and objective analysis methods and can overcome their own shortcomings, and the evaluation model has good stability and accuracy.


### 3.2. AHP-NN Modeling

#### 3.2.1. Positive Index

The bigger the indicator data, the better, such as sales growth rate and net profit growth rate. The standardized equation of the positive index is as follows:(1)xij∗=x−ijxminxmax−xmin,where xij∗ is the standardized data, xij is the original data, xmax is the maximum value in the data, and xmin is the minimum value in the data.


#### 3.2.2. Negative Index

The smaller the indicator data, the better. The standardized calculation equation for negative indicators is as follows:(2)xij∗=x−maxxijxmax−xmin.The basic steps of using analytic hierarchy process to evaluate financial risks are as follows:(1)
Establish the hierarchical structure of the system(2)
Perform pairwise comparisons of the elements at the same level to construct a pairwise judgment matrix(3)
Perform a consistency check on the calculated weights(4)
Calculate the composite weight, reorder the levels, and check the overall consistency(5)
Construct an evaluation model and calculate the evaluation results


### 3.3. Neural Networks Model

Neuron is the most basic unit of artificial neural network [28–31]. The neuron of the next layer receives the neuron information of the previous layer as input and obtains its output result after being stimulated by the excitation function, and the output result is used as the input of the neuron of the next layer. The input and output results of the neurons in the input layer of the neural network are the same, which means that the neurons do not do processing. The data of the neurons in the hidden layer and the output layer are stimulated by the transfer function. When the mean square error between the result of the output layer and the target result is lower than the set error value, it indicates that the training set learning has met the requirements. If the mean square error is greater than the set error value, weight correction is required, and the information must be propagated backwards.This paper chooses the hyperbolic tangent function as the excitation function. In the forward information process, the operation of the hidden layer and the output layer is as follows:(3)Ykj=f∑i=1nWk−1i,kjYk−1i,f=eλnet−θ−e−λnet−θeλnet−θ+e−λnet−θ,where net is the weighted sum of the input signal and θ is the offset.When the root mean square error between the output result and the target value is greater than 0.1, the neural network training does not meet the standard, so the weight of the neural network needs to be corrected. At this time, reverse propagation is performed. Assuming theP-th sample, the input formula of the j-th node (neuron) is(4)netpj=∑iWjiOpj.The output formula of theP-th sample and the j-th node (neuron) is(5)Opj=fnetpj.Then, the root mean square error of each input sample and target sample is(6)E=∑PEP=∑Pdpj−Opj2p2,where dpj is the target value of the p -th sample output unit j.The weight correction formula for neural network reverse transmission is(7)Wji=Wjit+ησpjOpj,where Wjt is the updated weight, Wjtt is the original weight, η is the learning rate, and σpj is the input and output error. Among them, the error calculations of output layer neurons and hidden layer neurons are different. The calculation equation of the neurons in the output layer is as follows:(8)σpj=f′netpjdpj−Opj.The error calculation formula of the hidden layer neuron is(9)σpj=f′netpj∑σpkWkj.Usually an inertia parameterα needs to be added to the weight correction formula. The new calculation equation is as follows:(10)Wji=Wjit+ησpjOpj+αWjit−Wjit−1,where α is a constant, which represents the influence of the last weight update on this update.


## 3.1. AHP-NN

The training of neural network requires relatively high sample data. It is difficult to achieve full coverage of absolutely large amount of globally representative data, and it is difficult to ensure the accuracy, robustness, and stability of the training network in the training of simple neural network with small samples. In the real logistics financial risk assessment, many qualitative problems are difficult to be expressed with quantitative data, so it is difficult to grasp the accuracy of the samples that can be used for neural network neuron training. The samples obtained by AHP method and proved by practice first ensure the accuracy of neural network training. In addition, expert evaluation makes it possible to quantify qualitative data, which objectively guarantees the source of neural network sample data. Finally, the neural network based on AHP can learn the knowledge and experience of experts in a small sample to maximize the learning efficiency of the network.The shortcomings of the AHP method are that subjective factors have a great influence on the evaluation results, the objectivity is poor, and the evaluation operations are more repetitive. In addition, the AHP evaluation method does not accumulate existing work experience; that is, historical data is difficult to have a positive impact on subsequent evaluations. The characteristic of the neural network is that the neural network stores information or knowledge in a large number of neurons or the entire system. It has the characteristics of holographic association, high-speed computing capability, strong adaptability, and self-learning and self-organizing capabilities. The self-learning ability and self-adaptability of the neural network method make the empirical accumulation of historical data retained in the network. As the sample data continues to expand, the accuracy of the model will become higher and higher.The AHP-NN model is an evaluation model that combines the two methods of AHP and neural network. This model not only simply combines the two but also gives full play to their respective advantages and complements their shortcomings. Therefore, it has the advantages of subjective and objective analysis methods and can overcome their own shortcomings, and the evaluation model has good stability and accuracy.


## 3.2. AHP-NN Modeling

### 3.2.1. Positive Index

The bigger the indicator data, the better, such as sales growth rate and net profit growth rate. The standardized equation of the positive index is as follows:(1)xij∗=x−ijxminxmax−xmin,where xij∗ is the standardized data, xij is the original data, xmax is the maximum value in the data, and xmin is the minimum value in the data.


### 3.2.2. Negative Index

The smaller the indicator data, the better. The standardized calculation equation for negative indicators is as follows:(2)xij∗=x−maxxijxmax−xmin.The basic steps of using analytic hierarchy process to evaluate financial risks are as follows:(1)
Establish the hierarchical structure of the system(2)
Perform pairwise comparisons of the elements at the same level to construct a pairwise judgment matrix(3)
Perform a consistency check on the calculated weights(4)
Calculate the composite weight, reorder the levels, and check the overall consistency(5)
Construct an evaluation model and calculate the evaluation results


## 3.2.1. Positive Index

The bigger the indicator data, the better, such as sales growth rate and net profit growth rate. The standardized equation of the positive index is as follows:(1)xij∗=x−ijxminxmax−xmin,where xij∗ is the standardized data, xij is the original data, xmax is the maximum value in the data, and xmin is the minimum value in the data.


## 3.2.2. Negative Index

The smaller the indicator data, the better. The standardized calculation equation for negative indicators is as follows:(2)xij∗=x−maxxijxmax−xmin.The basic steps of using analytic hierarchy process to evaluate financial risks are as follows:(1)
Establish the hierarchical structure of the system(2)
Perform pairwise comparisons of the elements at the same level to construct a pairwise judgment matrix(3)
Perform a consistency check on the calculated weights(4)
Calculate the composite weight, reorder the levels, and check the overall consistency(5)
Construct an evaluation model and calculate the evaluation results


## 3.3. Neural Networks Model

Neuron is the most basic unit of artificial neural network [28–31]. The neuron of the next layer receives the neuron information of the previous layer as input and obtains its output result after being stimulated by the excitation function, and the output result is used as the input of the neuron of the next layer. The input and output results of the neurons in the input layer of the neural network are the same, which means that the neurons do not do processing. The data of the neurons in the hidden layer and the output layer are stimulated by the transfer function. When the mean square error between the result of the output layer and the target result is lower than the set error value, it indicates that the training set learning has met the requirements. If the mean square error is greater than the set error value, weight correction is required, and the information must be propagated backwards.This paper chooses the hyperbolic tangent function as the excitation function. In the forward information process, the operation of the hidden layer and the output layer is as follows:(3)Ykj=f∑i=1nWk−1i,kjYk−1i,f=eλnet−θ−e−λnet−θeλnet−θ+e−λnet−θ,where net is the weighted sum of the input signal and θ is the offset.When the root mean square error between the output result and the target value is greater than 0.1, the neural network training does not meet the standard, so the weight of the neural network needs to be corrected. At this time, reverse propagation is performed. Assuming theP-th sample, the input formula of the j-th node (neuron) is(4)netpj=∑iWjiOpj.The output formula of theP-th sample and the j-th node (neuron) is(5)Opj=fnetpj.Then, the root mean square error of each input sample and target sample is(6)E=∑PEP=∑Pdpj−Opj2p2,where dpj is the target value of the p -th sample output unit j.The weight correction formula for neural network reverse transmission is(7)Wji=Wjit+ησpjOpj,where Wjt is the updated weight, Wjtt is the original weight, η is the learning rate, and σpj is the input and output error. Among them, the error calculations of output layer neurons and hidden layer neurons are different. The calculation equation of the neurons in the output layer is as follows:(8)σpj=f′netpjdpj−Opj.The error calculation formula of the hidden layer neuron is(9)σpj=f′netpj∑σpkWkj.Usually an inertia parameterα needs to be added to the weight correction formula. The new calculation equation is as follows:(10)Wji=Wjit+ησpjOpj+αWjit−Wjit−1,where α is a constant, which represents the influence of the last weight update on this update.


## 4. Experiments and Results

### 4.1. Evaluation Methods

The quality of experimental results is generally verified by experimental results, so certain evaluation standards and criteria are needed to measure our experimental results. Even for the same model, different results may appear under different evaluation systems. This experiment selects several evaluation criteria that are frequently used in the financial industry.


#### 4.1.1. Confusion Matrix

The confusion matrix is also called the error matrix, which is generally used to distinguish the quality of the classification model. The labels predicted by the model are represented by the columns of the matrix, and the actual labels of the samples are represented by rows. Take the binary classification problem as an example; it is a 2 ∗ 2 square matrix, as shown in Figure2.Figure 2
Confusion matrix.According to the true value of the sample and the prediction result of the model, four commonly used indicators can be obtained: true positive, false positive, false negative, and true negative. Commonly used predictors are precision, true positive rate, false positive rate, and specificity.


#### 4.1.2.F-Measure

The precision index and the recall index sometimes have contradictions. The most common way to deal with this situation is to introduce theF-Measure that integrates these two indexes. F-Measure is the weighted harmonic average of precision index and recall index. Its calculation equation is as follows:(11)F=b2+1P∗Rb2P+R,and when the parameter b=1, it is the F1 score, and its calculation equation is as follows:(12)F=2∗P∗RP+R.


#### 4.1.3. ROC and AUC

The ROC curve is plotted with the characteristic true positive rate (TPR) and false positive rate (FPR) as the vertical and horizontal axes, which shows a “game” between positive and negative examples. AUC is the area enclosed by the ROC curve. Its meaning is explained as follows. A sample A is randomly selected from all positive examples, and a sample B is randomly selected from all negative examples. The classifier judges A as a positive example with a higher probability than B. The probability of judging as a positive example is high.


### 4.2. Experimental Results

The AHP-NN neural network consists of an input layer, a hidden layer, and an output layer. The number of nodes in the input layer must be consistent with the dimension of the input data. We set the number of nodes in the input layer to 45, and the number of nodes in the output layer must be the same as the output layer. The categories of the results remain the same. The output results of this article have only two states: Pass and Reject, so the number of output nodes is 1, as shown in Table1.Table 1
Type of output node data.
Approval resultsType of outputRefuse1Agree0Regarding the setting of the number of hidden layers and the number of nodes, the method for determining the number of layers and nodes is more complicated. Currently, there is no general solution. Usually, systematic experimental methods are used to select the appropriate number of layers and nodes for a specific data set. This article adopts the method of selecting fewer layers or fewer nodes at the beginning, and then gradually increasing the complexity of the network structure, and the basic principle is to correctly reflect the relationship between output and input.In the process of debugging the number of network layers, this article locks other hyperparameters: the number of hidden layer nodes is 20, the activation function uses Sigmoid, the error function uses the log loss function, the optimization function uses Adam, the number of batches is 100, and the number of iterations is set as 100. The number of network layers is set to contain one hidden layer (one), two hidden layers (two), three hidden layers (three), and four hidden layers (four). For the above in the four scenarios, the data in this article is used to test, and the loss curve on the test set is shown in Figure3.Figure 3
Loss curve graphs under different layers.According to Figure3, when the number of layers reaches 4, the loss value reaches a low value, and the loss value does not decrease significantly as the number of layers increases. After the model training is completed, the final loss and AUC values are shown in Table 2.Table 2
LOSS and AUC values under different layers.
LayersLossAUC10.26950.878920.20690.885430.18960.915240.17520.9355It can be seen from Table2 that when the number of hidden layers is 4, both AUC and KS reach high values. Accordingly, the number of hidden layers selected in this paper is 4. In addition, the curve of AUC is shown in Figure 4.Figure 4
AUC curve graphs under different layers.To further verify the effectiveness of AHP-NN as a financial risk control model, the P-R diagram and ROC diagram are drawn as reference, as shown in Figures5 and 6.Figure 5
PR curve chart.Figure 6
ROC curve graphs under different layers.


## 4.1. Evaluation Methods

The quality of experimental results is generally verified by experimental results, so certain evaluation standards and criteria are needed to measure our experimental results. Even for the same model, different results may appear under different evaluation systems. This experiment selects several evaluation criteria that are frequently used in the financial industry.


### 4.1.1. Confusion Matrix

The confusion matrix is also called the error matrix, which is generally used to distinguish the quality of the classification model. The labels predicted by the model are represented by the columns of the matrix, and the actual labels of the samples are represented by rows. Take the binary classification problem as an example; it is a 2 ∗ 2 square matrix, as shown in Figure2.Figure 2
Confusion matrix.According to the true value of the sample and the prediction result of the model, four commonly used indicators can be obtained: true positive, false positive, false negative, and true negative. Commonly used predictors are precision, true positive rate, false positive rate, and specificity.


### 4.1.2.F-Measure

The precision index and the recall index sometimes have contradictions. The most common way to deal with this situation is to introduce theF-Measure that integrates these two indexes. F-Measure is the weighted harmonic average of precision index and recall index. Its calculation equation is as follows:(11)F=b2+1P∗Rb2P+R,and when the parameter b=1, it is the F1 score, and its calculation equation is as follows:(12)F=2∗P∗RP+R.


### 4.1.3. ROC and AUC

The ROC curve is plotted with the characteristic true positive rate (TPR) and false positive rate (FPR) as the vertical and horizontal axes, which shows a “game” between positive and negative examples. AUC is the area enclosed by the ROC curve. Its meaning is explained as follows. A sample A is randomly selected from all positive examples, and a sample B is randomly selected from all negative examples. The classifier judges A as a positive example with a higher probability than B. The probability of judging as a positive example is high.


## 4.1.1. Confusion Matrix

The confusion matrix is also called the error matrix, which is generally used to distinguish the quality of the classification model. The labels predicted by the model are represented by the columns of the matrix, and the actual labels of the samples are represented by rows. Take the binary classification problem as an example; it is a 2 ∗ 2 square matrix, as shown in Figure2.Figure 2
Confusion matrix.According to the true value of the sample and the prediction result of the model, four commonly used indicators can be obtained: true positive, false positive, false negative, and true negative. Commonly used predictors are precision, true positive rate, false positive rate, and specificity.


## 4.1.2.F-Measure

The precision index and the recall index sometimes have contradictions. The most common way to deal with this situation is to introduce theF-Measure that integrates these two indexes. F-Measure is the weighted harmonic average of precision index and recall index. Its calculation equation is as follows:(11)F=b2+1P∗Rb2P+R,and when the parameter b=1, it is the F1 score, and its calculation equation is as follows:(12)F=2∗P∗RP+R.


## 4.1.3. ROC and AUC

The ROC curve is plotted with the characteristic true positive rate (TPR) and false positive rate (FPR) as the vertical and horizontal axes, which shows a “game” between positive and negative examples. AUC is the area enclosed by the ROC curve. Its meaning is explained as follows. A sample A is randomly selected from all positive examples, and a sample B is randomly selected from all negative examples. The classifier judges A as a positive example with a higher probability than B. The probability of judging as a positive example is high.


## 4.2. Experimental Results

The AHP-NN neural network consists of an input layer, a hidden layer, and an output layer. The number of nodes in the input layer must be consistent with the dimension of the input data. We set the number of nodes in the input layer to 45, and the number of nodes in the output layer must be the same as the output layer. The categories of the results remain the same. The output results of this article have only two states: Pass and Reject, so the number of output nodes is 1, as shown in Table1.Table 1
Type of output node data.
Approval resultsType of outputRefuse1Agree0Regarding the setting of the number of hidden layers and the number of nodes, the method for determining the number of layers and nodes is more complicated. Currently, there is no general solution. Usually, systematic experimental methods are used to select the appropriate number of layers and nodes for a specific data set. This article adopts the method of selecting fewer layers or fewer nodes at the beginning, and then gradually increasing the complexity of the network structure, and the basic principle is to correctly reflect the relationship between output and input.In the process of debugging the number of network layers, this article locks other hyperparameters: the number of hidden layer nodes is 20, the activation function uses Sigmoid, the error function uses the log loss function, the optimization function uses Adam, the number of batches is 100, and the number of iterations is set as 100. The number of network layers is set to contain one hidden layer (one), two hidden layers (two), three hidden layers (three), and four hidden layers (four). For the above in the four scenarios, the data in this article is used to test, and the loss curve on the test set is shown in Figure3.Figure 3
Loss curve graphs under different layers.According to Figure3, when the number of layers reaches 4, the loss value reaches a low value, and the loss value does not decrease significantly as the number of layers increases. After the model training is completed, the final loss and AUC values are shown in Table 2.Table 2
LOSS and AUC values under different layers.
LayersLossAUC10.26950.878920.20690.885430.18960.915240.17520.9355It can be seen from Table2 that when the number of hidden layers is 4, both AUC and KS reach high values. Accordingly, the number of hidden layers selected in this paper is 4. In addition, the curve of AUC is shown in Figure 4.Figure 4
AUC curve graphs under different layers.To further verify the effectiveness of AHP-NN as a financial risk control model, the P-R diagram and ROC diagram are drawn as reference, as shown in Figures5 and 6.Figure 5
PR curve chart.Figure 6
ROC curve graphs under different layers.


## 5. Conclusion

This paper takes joint-stock commercial banks as the research object, measures and predicts liquidity risks from static and dynamic perspectives, and conducts research based on the current level of liquidity of four joint-stock commercial banks in China, trying to explore the changes in commercial banks’ liquidity risks laws, and then puts forward reasonable suggestions on the financial risk control of commercial banks. This paper proposes a neural network model of analytic hierarchy process that combines subjective and objective methods. This method can not only overcome the shortcomings of a single evaluation method but also use AHP’s qualitative and quantitative data to significantly improve the availability of data. In terms of financial risk control system, this article combines the previous scholars’ research, business model process, and the experience of practical workers to establish a more comprehensive and practical financial risk control model. Experimental results of the study shows the effectiveness of the proposed study under consideration.



---

*Source: 7253832-2022-03-10.xml*