# Construction and Application of the Online Finance Credit Risk Rating Model Based on the Artificial Neural Network

Authors: Yufeng Mao; Zongrun Wang; Xing Li; Chenggang Li; Hanning Wang
Journal: Discrete Dynamics in Nature and Society
 (2021)

---

## Abstract

The low-cost, highly efficient online finance credit provides underfunded individuals and small and medium enterprises (SMEs) with an indispensable credit channel. Most of the previous studies focus on the client crediting and screening of online finance. Few have studied the risk rating under a complete credit risk management system. This paper introduces the improved neural network technology to the credit risk rating of online finance. Firstly, the study period was divided into the early phase and late phase after the launch of an online finance credit product. In the early phase, there are few manually labeled samples and many unlabeled samples. Therefore, a cold start method was designed for the credit risk rating of online finance, and the similarity and abnormality of credit default were calculated. In the late phase, there are few unlabeled samples. Hence, the backpropagation neural network (BPNN) was improved for online finance credit risk rating. Our strategy was proved valid through experiments.


---

## Body

## 1. Introduction

Online finance is a low-cost, highly efficient means to provide services and attract consumers based on internet platforms, making the financial system in China much more inclusive. Online finance can operate in various modes, including online money management, online payment, and online consumer finance [1–5]. Among them, online finance credit provides underfunded individuals and small and medium enterprises (SMEs) with an indispensable credit channel [6–9]. To keep the risk within control, risk rating and control are necessary in the early and late phases after the launch of online finance credit products [10–14]. Therefore, the suitable rating of the online finance credit risk can effectively promote the performance of online finance enterprises in risk management, safe operation, and income generation.Purohit and Kulkarni [15] constructed an evaluation system for the online finance credit risk control of SMEs, which covers four primary indices such as portfolio, quality, cost, and robustness, and obtained the weight and score of each index through the analytic hierarchy process (AHP) and efficiency coefficient method (ECM). Kamboh et al. [16] put forward several countermeasures to the online finance credit risk: enhancing the organizational management of online finance enterprises, controlling the risk of credit businesses within a reasonable range, and optimizing the focus of the risk control department of online finance platforms.Some scholars have analyzed the credit transformation of banks in the context of online finance development [17–21]. Considering the regulating effect of online finance, Xu et al. [22] evaluated the influence of green credit measures on bank performance, constructed an evolutionary game model for the online finance enterprise and loan enterprise, and verified that online finance can effectively weaken the influence of green credit on bank performance. Fayyaz et al. [23] conducted big data analysis on the financial data before, during, and after online finance credit products are issued to SMEs, summarized the big data warning conditions (including risk process and internal evaluation application system, banking operation system, data warehouse platform, risk data market, capital metering, and decision support system), and constructed a risk management and warning system based on the analysis results.Most of the previous studies focus on the client crediting and screening of online finance. Few have studied the risk rating under a complete credit risk management system [24–28]. Capable of solving most nonlinear mapping problems, backpropagation neural network (BPNN) can correctly mine the deep relationships between the indices and values of online finance credit risks. By virtue of the superiority of the artificial neural network in nonlinear mapping, this paper introduces the BPNN to the risk rating of online finance credit products. The main contents of this research are as follows: after the launch of an online finance credit product, there are few manually labeled samples and many unlabeled samples in the early phase. To adapt to this situation, Section 2 designs a cold start method for the credit risk rating of online finance and calculates the similarity and abnormality of the credit default. In the late phase, there are few unlabeled samples. Hence, Section 3 improves the wolf pack algorithm (WPA) based on the belief learning model and relies on the improved WPA to optimize the BPNN. The improved BPNN was adopted to rate the online finance credit risk, which effectively avoids the subjectivity in weight assignment. The proposed model was proved effective through experiments.


## 2. Cold Start of the Risk Rating Model in the Early Phase

Online finance credit risk rating is a key step in the risk control of online finance credit. Traditional online finance credit risk rating models need to be constructed based on enough historical labeled samples. If there are not enough such samples, the modeling personnel of the early-phase risk rating model must fully understand the risk control rules of the credit product. New methods are necessary to realize the cold start of the online finance credit risk model.After the launch of an online finance credit product, there are few manually labeled samples and many unlabeled samples in the early phase. To adapt to this situation, this paper designs a cold start method for online finance credit risk rating. By machine learning, the proposed method can obtain useful samples out of many unlabeled samples and provide sufficient data for subsequent training of the online finance credit risk rating model based on the neural network.Leta=Sξbe the sample space of online finance credit risk rating; B=−1,0,+1 be the label space; and b be the indicator of sample labeling. If b=+1, the corresponding sample is labeled “client default,” i.e., payment is not completed on time; if b=0, the sample is labeled “normal,” i.e., payment is completed on time; if b=−1, the sample is not labeled.Suppose there exists a dataset ofn samples TS=a1,b2,…,ak,bk,…,an,bn, where ai∈A is a sample in the dataset. The first k samples of the dataset are labeled: TSk=ak+1,bk+1,…,an,bn,…,an,bn. The remaining n− k samples are labeled: TSv=ak+1,bk+1,…,an,bn,…,an,bn. For TSv, the potential default samples and normal samples were determined based on the calculated similarity and abnormality of the credit default.


### 2.1. Default Similarity

Suppose datasetTS=aiim, which is equal to 1, possesses two parameters: a hidden variable C=c1,…cm characterizing the cluster labels of samples and a class parameter ΨΨ1,…,Ψl of the model. Note that cm∈1,…,L, and Ci=l indicates that class i has l members. According to the Bayesian theory, the probability distribution satisfies GVΨ,c|TS∝GV0ΨGV0cGVTS|Ψ,c.The index data in this research are all multidimensional continuous variables obeying the multidimensional Gaussian random distribution. LetΨ be expectation λ. Then, GVai|Ψ,c∼Mvci,Θ. Conjugate prior GV0Ψl∼M0,ε2J can be applied to GV0Ψ Let ml,l∈1,…,L be the number of data in class l. Then, the cluster prior GV0cl of each sample can be generated by the Dirichlet process mixture model:(1)GVci=l|c−i=mlm−1+β,GVci=L+1|c−i=βm−1+β.The first step is to randomly initialize parametersc and Ψ. Each ci can be sampled by(2)GVci=l|TS,Ψ,c−i∝GVci=l|c−iGVai|c,Ψ=mlm−1+β12πξ/2Θ1/2e−1/2ai−λlT∑−1ai−λl.The probability of establishing a new classL+1 can be calculated by(3)GVci=L+1|TS,Ψ,c−i∝GVci=L+1|c−iGVai|c,Ψ=GVci=L+1|c−i∫GV0ΨL+1GVai|ci,Ψ,ΨL+1ξΨL+1=βm−1+β12πξ/2εξΘ′1/2Θ1/2e−1/2aiTΘ−1Θ′Θ−1−Θ−1aiwhereΘ′=1ε2I+Θ−1−1.When new data are added to classl, the parameter Ψl of that class should be updated by(4)GVΨl|TS,c∝GV0Ψl∏i=1mGVai|c,Ψ=GV0Ψl∏ili−lGVai|c,Ψ∝e−1/2ε2λlTλl−1/2∑ili−lai−λlT∑−1ai−λl∼Mλl′,Θl′whereλl′=Θl′∑ili−lai,Θl′1ε2J+Θ−1−1,dl=∑i=1mγc,l.Letλ be the cluster mean. Then, the distance from sample a to a cluster can be measured by Euclidean distance:(5)dista,λ=a−λTa−λ.Ifa∈TSv, the minimum distance from a to the center of a cluster of normal samples, i.e., the similarity between a and a class of normal samples, can be calculated by(6)DALa=mini=1ldista,λi.The similarity betweena and a class of default samples can be calculated by(7)DLTa=mini=1τdista,λi.There are very few client default samples in the scenario of online finance credit risk rating. However, the model is expected to recognize potential default samples more accurately than normal samples. Comparing the results of formulas (6) and (7), the similarity SEMa between a and a class of default samples can be modified as(8)SEMa=DLTaDLTa+DALa.Formula (8) shows the following:(1)
IfDLTa≫DALa,SEMa approximates 1, and the corresponding sample is a default sample(2)
IfDLTa≈DALa,SEMa approximates 0.5, and the corresponding sample is not an obvious default sample(3)
If DLT (a)<<DAL (a), SEM (a) approximates 0, and the corresponding sample is a normal sample


### 2.2. Default Abnormality

All samples in the sample set were modeled by the isolation forest algorithm. LetLT (XB (a)) be the mean height of all isolation trees in the algorithm. Then, the default abnormality VEH (a) of an unlabeled sample can be calculated by(9)VEHa=2−LTXBa.Formula (9) shows that the smaller LT (XB (a)), the greater VEH (a) and the more likely for a sample to be a potential default sample. If many unlabeled samples are not normalized, the LT (XB (a)) value will be relatively high. To prevent the problem, this paper adopts the mean path length of unsuccessful searches in the binary search tree for normalization. If there are M samples, then(10)dM=2XBM−2M−1M.Letδ be the Euler–Mascheroni constant. Then, the number of harmonics XB (M) in formula (10) can be estimated by(11)XBM=lnM+δ.The normalized default abnormality VEH (a) can be calculated by(12)VEHa=2LTXBa/dM.Formula (12) shows the following:(1)
IfLT (r (a)) approximates d (m), VEH (a) approaches 0.5, and the corresponding sample is not an obvious default sample(2)
IfLT (r (a)) approximates 0, VEH (a) approaches 1, and the corresponding sample is a default sample(3)
IfLT (r (a)) approximates m− 1, VEH (a) approaches 0, and the corresponding sample is a normal sample


### 2.3. Sample Recognition and Weighting

SEM (a) and VEH (a) should be considered comprehensively to recognize potential default samples and normal samples from the unlabeled dataset. Let ω be the weight that balances the relative importance of SEM (a) and VEH (a). Then, the total score of online finance credit risk samples can be calculated by(13)RDa=ωVEHa+1−ωSEMa.Letφ be the threshold for a sample to be a potential default sample. To judge a sample as a potential default sample, the total score must satisfy(14)RDa≥ϕ.Letα be the threshold for a sample to be a normal sample. To judge a sample as a normal sample, the total score must satisfy(15)RDa≤α.The thresholdsφ and α can be set in reference to the total risk rating scores for the potential default sample and normal sample in the labeled dataset. The mean φ of potential default samples RD (a) can be calculated by(16)ϕ=1TSk+1∑i=1TSk+1RDai.The meanα of normal samples RD (a) can be calculated by(17)α=1TSk−1∑i=1TSl−1RDai.This paper sets the weight of each labeled sample to 1. For potential default samples, the higher the total score, the higher the confidence of its risk rating. The weight of these samples can be configured by(18)qa=RDamaxaRDa.For normal samples, the higher the total score, the lower the confidence of its risk rating. The weight of these samples can be configured by(19)qa=maxaRDa−RDamaxaTSa−minaRDa.Finally, the loss function can be minimized by(20)∑iqikbi,gai+μSq.


## 2.1. Default Similarity

Suppose datasetTS=aiim, which is equal to 1, possesses two parameters: a hidden variable C=c1,…cm characterizing the cluster labels of samples and a class parameter ΨΨ1,…,Ψl of the model. Note that cm∈1,…,L, and Ci=l indicates that class i has l members. According to the Bayesian theory, the probability distribution satisfies GVΨ,c|TS∝GV0ΨGV0cGVTS|Ψ,c.The index data in this research are all multidimensional continuous variables obeying the multidimensional Gaussian random distribution. LetΨ be expectation λ. Then, GVai|Ψ,c∼Mvci,Θ. Conjugate prior GV0Ψl∼M0,ε2J can be applied to GV0Ψ Let ml,l∈1,…,L be the number of data in class l. Then, the cluster prior GV0cl of each sample can be generated by the Dirichlet process mixture model:(1)GVci=l|c−i=mlm−1+β,GVci=L+1|c−i=βm−1+β.The first step is to randomly initialize parametersc and Ψ. Each ci can be sampled by(2)GVci=l|TS,Ψ,c−i∝GVci=l|c−iGVai|c,Ψ=mlm−1+β12πξ/2Θ1/2e−1/2ai−λlT∑−1ai−λl.The probability of establishing a new classL+1 can be calculated by(3)GVci=L+1|TS,Ψ,c−i∝GVci=L+1|c−iGVai|c,Ψ=GVci=L+1|c−i∫GV0ΨL+1GVai|ci,Ψ,ΨL+1ξΨL+1=βm−1+β12πξ/2εξΘ′1/2Θ1/2e−1/2aiTΘ−1Θ′Θ−1−Θ−1aiwhereΘ′=1ε2I+Θ−1−1.When new data are added to classl, the parameter Ψl of that class should be updated by(4)GVΨl|TS,c∝GV0Ψl∏i=1mGVai|c,Ψ=GV0Ψl∏ili−lGVai|c,Ψ∝e−1/2ε2λlTλl−1/2∑ili−lai−λlT∑−1ai−λl∼Mλl′,Θl′whereλl′=Θl′∑ili−lai,Θl′1ε2J+Θ−1−1,dl=∑i=1mγc,l.Letλ be the cluster mean. Then, the distance from sample a to a cluster can be measured by Euclidean distance:(5)dista,λ=a−λTa−λ.Ifa∈TSv, the minimum distance from a to the center of a cluster of normal samples, i.e., the similarity between a and a class of normal samples, can be calculated by(6)DALa=mini=1ldista,λi.The similarity betweena and a class of default samples can be calculated by(7)DLTa=mini=1τdista,λi.There are very few client default samples in the scenario of online finance credit risk rating. However, the model is expected to recognize potential default samples more accurately than normal samples. Comparing the results of formulas (6) and (7), the similarity SEMa between a and a class of default samples can be modified as(8)SEMa=DLTaDLTa+DALa.Formula (8) shows the following:(1)
IfDLTa≫DALa,SEMa approximates 1, and the corresponding sample is a default sample(2)
IfDLTa≈DALa,SEMa approximates 0.5, and the corresponding sample is not an obvious default sample(3)
If DLT (a)<<DAL (a), SEM (a) approximates 0, and the corresponding sample is a normal sample


## 2.2. Default Abnormality

All samples in the sample set were modeled by the isolation forest algorithm. LetLT (XB (a)) be the mean height of all isolation trees in the algorithm. Then, the default abnormality VEH (a) of an unlabeled sample can be calculated by(9)VEHa=2−LTXBa.Formula (9) shows that the smaller LT (XB (a)), the greater VEH (a) and the more likely for a sample to be a potential default sample. If many unlabeled samples are not normalized, the LT (XB (a)) value will be relatively high. To prevent the problem, this paper adopts the mean path length of unsuccessful searches in the binary search tree for normalization. If there are M samples, then(10)dM=2XBM−2M−1M.Letδ be the Euler–Mascheroni constant. Then, the number of harmonics XB (M) in formula (10) can be estimated by(11)XBM=lnM+δ.The normalized default abnormality VEH (a) can be calculated by(12)VEHa=2LTXBa/dM.Formula (12) shows the following:(1)
IfLT (r (a)) approximates d (m), VEH (a) approaches 0.5, and the corresponding sample is not an obvious default sample(2)
IfLT (r (a)) approximates 0, VEH (a) approaches 1, and the corresponding sample is a default sample(3)
IfLT (r (a)) approximates m− 1, VEH (a) approaches 0, and the corresponding sample is a normal sample


## 2.3. Sample Recognition and Weighting

SEM (a) and VEH (a) should be considered comprehensively to recognize potential default samples and normal samples from the unlabeled dataset. Let ω be the weight that balances the relative importance of SEM (a) and VEH (a). Then, the total score of online finance credit risk samples can be calculated by(13)RDa=ωVEHa+1−ωSEMa.Letφ be the threshold for a sample to be a potential default sample. To judge a sample as a potential default sample, the total score must satisfy(14)RDa≥ϕ.Letα be the threshold for a sample to be a normal sample. To judge a sample as a normal sample, the total score must satisfy(15)RDa≤α.The thresholdsφ and α can be set in reference to the total risk rating scores for the potential default sample and normal sample in the labeled dataset. The mean φ of potential default samples RD (a) can be calculated by(16)ϕ=1TSk+1∑i=1TSk+1RDai.The meanα of normal samples RD (a) can be calculated by(17)α=1TSk−1∑i=1TSl−1RDai.This paper sets the weight of each labeled sample to 1. For potential default samples, the higher the total score, the higher the confidence of its risk rating. The weight of these samples can be configured by(18)qa=RDamaxaRDa.For normal samples, the higher the total score, the lower the confidence of its risk rating. The weight of these samples can be configured by(19)qa=maxaRDa−RDamaxaTSa−minaRDa.Finally, the loss function can be minimized by(20)∑iqikbi,gai+μSq.


## 3. Late-Phase Risk Rating Model

### 3.1. Model Construction

BPNN needs to be trained by sufficient samples. During the training, the error is backpropagated through the network and used to iteratively correct weights and thresholds. The regularity and information of the training data are memorized by the nodes in the network. During evaluation, the BPNN can output risk values once the indices are imported into the network. Since there are few unlabeled samples in the late phase after the launch of an online finance credit product, the BPNN was adopted to rate online finance credit risks, which effectively avoids the subjectivity in weight assignment. Figure1 shows the topology of the BPNN.Figure 1
Topology of the BPNN.LetQ and f be the connection weights and biases of the artificial neural network (ANN), respectively. Then, the input of hidden layer node j can be solved by(21)O=∑i=1mqji⋅ai+fj=qjA+fj.The output of hidden layer nodej can be calculated by the activation function g of the hidden layer:(22)bj=gOj=g∑i=1mqji⋅ai=GqjA.The BPNN training can be trained in two stages: forward propagation and error backpropagation. The network training can be detailed as follows.Based on the sample set of evaluation indices, the structure of input and output layers is determined for the neural network. To initialize the connection weights and biases, the activation functiong of the hidden layer is generally a sigmoid function:(23)ga=11+e−a.During the forward propagation of information, the outputOj of each hidden layer node can be calculated by(24)Oj=g∑i=1mqijai+fj,j=1,2,…,k.The outputbj of each output layer node can be calculated by(25)bl=∑j=1kOjqij+εl,l=1,2,…,n.The errorσl of each output layer node can be calculated by(26)σl=Bl−Pl,l=1,2,…,n.Letζ be the learning rate. During error backpropagation, the weights can be updated by(27)qij∗=qij+ζOj1−Ojai∑l=1nqjkσk,i=1,2,…,m;j=1,2,…,k,qjl∗=qjl+ζOiσl,j=1,2,…,k;l=1,2,…,n.The bias can be updated by(28)fj=fj+ζOj1−Oj∑l=1nqjlσl,j=1,2,…,k,εl=εl+σl,l=1,2,…,n.The training should be terminated when the error reaches the preset threshold or the number of iterations reaches the maximum.


### 3.2. Algorithm Optimization

The WPA is a stochastic probabilistic search algorithm, capable of finding the optimal solution at a high probability. Paralleled search is another feature of the algorithm: the search can start from multiple points at the same time to improve the algorithm efficiency; the points do not affect each other. The traditional BPNN converges slowly and easily falls into the local minimum. This paper improves the WPA based on the belief learning model and relies on the improved WPA to optimize the initial connection weights and biases of the BPNN. Figure2 shows the process of the WPA.Figure 2
Process of the WPA.Figure3 explains the idea of neural network optimization with the WPA improved by the belief learning model. Firstly, a belief learning model was constructed for the virtual game between multiple individuals. Let N be the number of outside individuals and Dd1,d2,…,di,…dl be the set of strategies of these individuals. The belief weight for another outside individual j to choose strategy di can be calculated by(29)fjτ+1di=fjτdi+1,selected,fjτdi,not selected.Figure 3
Idea of neural network optimization with the WPA improved by the belief learning model.Formula (31) shows that if the said outside individual j chooses strategy di in phase τ, then the belief weight should be increased by 1 in phase τ + 1. The probability for individual j to choose strategy di obeys the following correlation with the belief weight of phase τ + 1:(30)λjτ+1di=fjτ+1di∑i=1Jfjτ+1di.The expectation for inside individualj to choose strategy di can be derived from the cost υjτ+1di/λjτ+1+1di of an outside individual to choose a strategy:(31)υτ+1di=∑j∈PEυjτ+1diλjτ+1di•λjτ+1di.In phaseτ + 2, the probability for an inside individual to choose strategy di can be calculated by(32)GVτ+2di=eυτ+1di∑i∈PEeυτ+1di.To optimize the response to future behaviors, every inside individual will choose the strategy with the maximum probability of the optimal response in phaseτ + 2.The BPNN was optimized with the WPA improved based on the belief learning model in the following steps:Step 1: initialize algorithm parameters, such as pack size, number of scout wolves, scout wolf movement factor, scout wolf movement distance factor, maximum number of iterations, and pack update ratio, and randomly initialize the pack. Complete the topology design of the BPNN.Step 2: import the wolf positions and training samples into the neural network. LetNT be the total number of weights and biases and bi − pi be the output error of the ith node. Compute the absolute error between expectation and prediction by formula (33), and take it as the order concentration function for individual wolves in smelling prey:(33)WR=∑i=1NTbi−pi.Select the head wolf, scout wolves, and ferocious wolves in turn based on the calculated concentrations.Step 3: based on the results of the belief learning model, determine the most probable future wandering direction for scout wolves. LetBi and BHW be the distance of an individual wolf i and the head wolf to the prey, respectively. If Bi is greater than BHW or the number of iterations surpasses the maximum number Φmax of wanderings, each individual wolf will compute its expectation for the next movement according to the historical wanderings of other individuals and determine the next wandering direction.Step 4: compute the distance between individualsx and y by(34)EDx,y=∑t=1TSsxy−syt∘tN=1TS⋅θ⋅∑t=1TSmaxy−mint.LetMint,Maxt be the interval of the tth weight or bias to be optimized and γf be the step length of a ferocious wolf to approach the head wolf. Then, the ferocious wolf can approach the prey by(35)sitl+1=sitl+γyt⋅htl−sitlhtl−sitl.Formula (35) shows that if Bi>BHW, then BHW=Bi, and the ferocious wolf will replace the head wolf; if Bi<BBHW, then the ferocious wolf will continue to approach the prey until tI≤tN.Step 5: randomly choose a number Θ from [−1, 1]; defineγd as the besieging step length of individual wolf i. Then, the state of each individual wolf during the besieging can be updated by(36)sitl+1=sitl+Θ⋅γdt⋅Htl−sitl.Step 6: set the individual closest to the prey as the head wolf, and allocate the prey to the pack according to the contribution to foraging. Finally, remove the inferior individuals from the pack.Step 7: after the end of iterations, import the head wolf position as the initial values of weights and biases into the neural network, and complete the network training.Figure4 illustrates the flow of the late-phase online finance credit risk rating model. The relevant parameters have been introduced in preceding parts.Figure 4
Flow of the late-phase online finance credit risk rating model.


## 3.1. Model Construction

BPNN needs to be trained by sufficient samples. During the training, the error is backpropagated through the network and used to iteratively correct weights and thresholds. The regularity and information of the training data are memorized by the nodes in the network. During evaluation, the BPNN can output risk values once the indices are imported into the network. Since there are few unlabeled samples in the late phase after the launch of an online finance credit product, the BPNN was adopted to rate online finance credit risks, which effectively avoids the subjectivity in weight assignment. Figure1 shows the topology of the BPNN.Figure 1
Topology of the BPNN.LetQ and f be the connection weights and biases of the artificial neural network (ANN), respectively. Then, the input of hidden layer node j can be solved by(21)O=∑i=1mqji⋅ai+fj=qjA+fj.The output of hidden layer nodej can be calculated by the activation function g of the hidden layer:(22)bj=gOj=g∑i=1mqji⋅ai=GqjA.The BPNN training can be trained in two stages: forward propagation and error backpropagation. The network training can be detailed as follows.Based on the sample set of evaluation indices, the structure of input and output layers is determined for the neural network. To initialize the connection weights and biases, the activation functiong of the hidden layer is generally a sigmoid function:(23)ga=11+e−a.During the forward propagation of information, the outputOj of each hidden layer node can be calculated by(24)Oj=g∑i=1mqijai+fj,j=1,2,…,k.The outputbj of each output layer node can be calculated by(25)bl=∑j=1kOjqij+εl,l=1,2,…,n.The errorσl of each output layer node can be calculated by(26)σl=Bl−Pl,l=1,2,…,n.Letζ be the learning rate. During error backpropagation, the weights can be updated by(27)qij∗=qij+ζOj1−Ojai∑l=1nqjkσk,i=1,2,…,m;j=1,2,…,k,qjl∗=qjl+ζOiσl,j=1,2,…,k;l=1,2,…,n.The bias can be updated by(28)fj=fj+ζOj1−Oj∑l=1nqjlσl,j=1,2,…,k,εl=εl+σl,l=1,2,…,n.The training should be terminated when the error reaches the preset threshold or the number of iterations reaches the maximum.


## 3.2. Algorithm Optimization

The WPA is a stochastic probabilistic search algorithm, capable of finding the optimal solution at a high probability. Paralleled search is another feature of the algorithm: the search can start from multiple points at the same time to improve the algorithm efficiency; the points do not affect each other. The traditional BPNN converges slowly and easily falls into the local minimum. This paper improves the WPA based on the belief learning model and relies on the improved WPA to optimize the initial connection weights and biases of the BPNN. Figure2 shows the process of the WPA.Figure 2
Process of the WPA.Figure3 explains the idea of neural network optimization with the WPA improved by the belief learning model. Firstly, a belief learning model was constructed for the virtual game between multiple individuals. Let N be the number of outside individuals and Dd1,d2,…,di,…dl be the set of strategies of these individuals. The belief weight for another outside individual j to choose strategy di can be calculated by(29)fjτ+1di=fjτdi+1,selected,fjτdi,not selected.Figure 3
Idea of neural network optimization with the WPA improved by the belief learning model.Formula (31) shows that if the said outside individual j chooses strategy di in phase τ, then the belief weight should be increased by 1 in phase τ + 1. The probability for individual j to choose strategy di obeys the following correlation with the belief weight of phase τ + 1:(30)λjτ+1di=fjτ+1di∑i=1Jfjτ+1di.The expectation for inside individualj to choose strategy di can be derived from the cost υjτ+1di/λjτ+1+1di of an outside individual to choose a strategy:(31)υτ+1di=∑j∈PEυjτ+1diλjτ+1di•λjτ+1di.In phaseτ + 2, the probability for an inside individual to choose strategy di can be calculated by(32)GVτ+2di=eυτ+1di∑i∈PEeυτ+1di.To optimize the response to future behaviors, every inside individual will choose the strategy with the maximum probability of the optimal response in phaseτ + 2.The BPNN was optimized with the WPA improved based on the belief learning model in the following steps:Step 1: initialize algorithm parameters, such as pack size, number of scout wolves, scout wolf movement factor, scout wolf movement distance factor, maximum number of iterations, and pack update ratio, and randomly initialize the pack. Complete the topology design of the BPNN.Step 2: import the wolf positions and training samples into the neural network. LetNT be the total number of weights and biases and bi − pi be the output error of the ith node. Compute the absolute error between expectation and prediction by formula (33), and take it as the order concentration function for individual wolves in smelling prey:(33)WR=∑i=1NTbi−pi.Select the head wolf, scout wolves, and ferocious wolves in turn based on the calculated concentrations.Step 3: based on the results of the belief learning model, determine the most probable future wandering direction for scout wolves. LetBi and BHW be the distance of an individual wolf i and the head wolf to the prey, respectively. If Bi is greater than BHW or the number of iterations surpasses the maximum number Φmax of wanderings, each individual wolf will compute its expectation for the next movement according to the historical wanderings of other individuals and determine the next wandering direction.Step 4: compute the distance between individualsx and y by(34)EDx,y=∑t=1TSsxy−syt∘tN=1TS⋅θ⋅∑t=1TSmaxy−mint.LetMint,Maxt be the interval of the tth weight or bias to be optimized and γf be the step length of a ferocious wolf to approach the head wolf. Then, the ferocious wolf can approach the prey by(35)sitl+1=sitl+γyt⋅htl−sitlhtl−sitl.Formula (35) shows that if Bi>BHW, then BHW=Bi, and the ferocious wolf will replace the head wolf; if Bi<BBHW, then the ferocious wolf will continue to approach the prey until tI≤tN.Step 5: randomly choose a number Θ from [−1, 1]; defineγd as the besieging step length of individual wolf i. Then, the state of each individual wolf during the besieging can be updated by(36)sitl+1=sitl+Θ⋅γdt⋅Htl−sitl.Step 6: set the individual closest to the prey as the head wolf, and allocate the prey to the pack according to the contribution to foraging. Finally, remove the inferior individuals from the pack.Step 7: after the end of iterations, import the head wolf position as the initial values of weights and biases into the neural network, and complete the network training.Figure4 illustrates the flow of the late-phase online finance credit risk rating model. The relevant parameters have been introduced in preceding parts.Figure 4
Flow of the late-phase online finance credit risk rating model.


## 4. Experiments and Results’ Analysis

Receiver operating characteristic (ROC) is a curve drawn by a series of different dichotomy methods, with true positive (TP) as the ordinate and false positive (FP) as the abscissa. Unlike traditional evaluation metrics, ROC metric allows the existence of intermediate state, which reflects the actual situation, and applies to a wide range. By this metric, the test results can be divided into several sequential classes for statistical analysis. This paper adopts the AUC of the ROC curve to evaluate the performance of the online finance credit risk rating model. The number of labeled samples in the early phase after the launch of an online finance credit product was set to 20, and the proportion of potential default samples was adjusted from 0 to 0.5. Figure5 shows the influence of that proportion on the AUC. With the growing proportion of potential default samples, the AUCs of STSSLA and our algorithm increased to a certain extent. Meanwhile, the AUC of isolation forest algorithm changed very little because the algorithm is an unsupervised method immune to labels.Figure 5
Influence of the proportion of potential default samples in labeled samples on the AUC. Note: AUC is short for area under the curve.Suppose there are 20 labeled samples in the early phase after the launch of an online finance credit product, including 10 normal samples and 10 potential default samples. Then, the proportion of potential default samples in unlabeled samples and test samples was adjusted from 0 to 0.1. Figure6 shows the influence of that proportion on the AUC. With the growing proportion of potential default samples, the AUC of STSSLA increased to a certain extent, while that of our algorithm and isolation forest algorithm declined.Figure 6
Influence of the proportion of potential default samples in unlabeled samples on the AUC.To verify the effectiveness of the late-phase credit risk rating model for online finance credit products, this paper applies the traditional BPNN and fuzzy BPNN separately on our samples for 200 iterations and compares their search results with the solution obtained by our model. Table1 compares the prediction errors and time consumptions of these models. The convergence accuracy and efficiency of each model were measured by mean squared error (MSE) and mean time consumption (MTC), respectively.Table 1
Prediction errors and time consumptions of different models.
Serial numberModelMSEMTCSerial numberModelMSEMTC1BPNN4.8763∗10−219.78542BPNN5.1812∗10−320.8921GA-BPNN3.4221∗10−214.1387GA-BPNN4.1974∗10−621.4613Our model3.1986∗10−711.9341Our model8.3761∗10−730.48973BPNN2.5405∗10−522.79324BPNN3.2439∗10−721.6495GA-BPNN3.8873∗10−618.9246GA-BPNN5.7946∗10−522.2056Our model6.9249∗10−812.1624Our model9.3632∗10−722.16325BPNN4.2126∗10−421.78436BPNN2.0643∗10−228.1989GA-BPNN4.1934∗10−620.6415GA-BPNN6.3786∗10−328.3894Our model9.1507∗10−716.7964Our model8.3894∗10−727.4891As shown in Table1, our model achieved a lower MSE in a shorter MTC than the BPNN and GA-BPNN in rating the postphase online finance credit risk. This is because the traditional BPNN randomly initializes weights and thresholds, which lowers efficiency and accuracy. Experimental results show that our model overcomes this defect of the traditional BPNN and effectively improves the prediction performance.Figures7–9 provide the output error curve of our model during the training on different samples, MSE curves of our model, and the scatterplot of predictions and expectations on different samples. It can be seen that our model can effectively rate the postphase online finance credit risk.Figure 7
Output error curve on different samples.Figure 8
MSE curve of our model.Figure 9
Scatterplot of predictions and expectations on different samples.Figure10 compares the ROCs of our model before and after optimization. This paper adjusts the ratio of the loss of mistaking normal clients as default clients to the loss of mistaking default clients as normal clients. As shown in Figure 10, our model performed stably at different ratios. The AUCs of the original model and the improved model stabilized at 0.7231 and 0.8277, respectively. The optimized model obviously has better prediction ability.Figure 10
ROCs of the (a) original model and (b) improved model.
(a)(b)Table2 presents the confusion matrix of sample verification with different misjudgment ratios. Table 3 presents the confusion matrix of time verification with different misjudgment ratios. As expected, the number of normal clients being misjudged decreased with the growing loss, while the number of default clients being misjudged increased with the loss. Therefore, the confusion matrix outputted by our model changes with the demands of online finance credit businesses.Table 2
Confusion matrix of sample verification with different misjudgment ratios.
v0.30.51.02.0Actual/predicted0101010105923452710846216723538916342,8794273,0852363,271853,428Table 3
Confusion matrix of time verification with different misjudgment ratios.
v0.30.51.02.0Actual/predicted0101010109639758119326611561,915672,001272,042112,057All in all, the above experimental results testify the superiority of our model in sample recognition accuracy, operating stability, and prediction power.


## 5. Conclusions

This paper explores the online finance credit risk rating based on the neural network. Specifically, the research period was divided into an early phase and a late phase by the launch of an online finance credit product. For the early phase, a cold start method was developed for the credit risk rating of online finance, and the similarity and abnormality of credit default were calculated. For the late phase, the BPNN was improved to rate the online finance credit risk. Through experiments, the AUC curves were plotted with different proportions of potential default clients in labeled and unlabeled samples, and the prediction errors and time consumptions were compared between the BPNN, GA-BPNN, and our model. The results show that our model can effectively rate the postphase credit risk of online finance.



---

*Source: 6926216-2021-09-30.xml*