Credit risk assessment method, device, equipment, storage medium and program product
By embedding an attention mechanism into the feedforward neural network model, the problems of complex nonlinear correlation and extreme sample imbalance in traditional credit risk assessment methods are solved, achieving efficient and transparent credit risk assessment that is applicable to various consumer credit scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2026-01-28
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional credit risk assessment methods struggle to accurately identify high-risk customers when faced with complex nonlinear correlations, extreme sample imbalances, and a lack of dynamic feature importance assessments. This leads to decreased model predictive performance and poor decision-making transparency, failing to meet regulatory requirements.
A feedforward neural network model with embedded attention mechanism is used to train a credit risk assessment model by combining a weighted loss function and adaptive feature weights with an early stopping strategy and learning rate decay. This enables dynamic identification and robust learning of high-risk customers, and the final result is output through an interpretable risk decision threshold.
It improves the accuracy and recall of credit risk assessment, enhances the transparency and adaptability of the model, meets regulatory requirements, and is applicable to a variety of consumer credit risk control scenarios.
Smart Images

Figure CN122155824A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more specifically to a credit risk assessment method, apparatus, device, storage medium, and program product. Background Technology
[0002] In consumer credit, especially in scenarios like auto loan installment payments, accurately and efficiently assessing customer credit risk is crucial for financial institutions to control asset quality and reduce bad debt losses. Traditional automated risk assessment methods primarily rely on expert rule systems and statistical models based on logistic regression, decision trees, or traditional scoring cards. While these methods have been widely used in long-term practice, their inherent technical limitations are becoming increasingly prominent as business data becomes more complex, risk patterns become more subtle, and regulatory requirements for model interpretability increase. These limitations are mainly reflected in the following three aspects:
[0003] First, traditional models lack the ability to model feature interactions and complex nonlinear relationships. Most models are based on linear assumptions or simple binning, making it difficult to effectively characterize the complex nonlinear relationships and higher-order interactions among multi-dimensional customer characteristics (such as income level, debt ratio, historical credit behavior, and recent query frequency). This deficiency in modeling ability prevents models from fully uncovering deep-seated, potential risk patterns, and their predictive performance is prone to significant degradation when facing new types of fraud or economic cycle fluctuations.
[0004] Secondly, the problem of extreme sample imbalance severely limits the model's sensitivity in identifying high-risk customers. In actual business data, the proportion of customers with serious delinquencies (positive samples) is usually extremely low. Traditional training methods can cause the model to be severely biased towards the majority of normal customers (negative samples), resulting in low recall for high-risk customers. In other words, a large number of truly high-risk customers are missed by the model, thus causing potential asset losses for the institution.
[0005] Finally, the lack of a dynamic, adaptive feature importance assessment mechanism results in poor transparency in the model's decision-making process. Traditional models typically assign fixed weights to all input features, failing to dynamically identify and focus on the most discriminative key risk indicators for different clients' specific circumstances. This "one-size-fits-all" weight allocation not only reduces the personalized accuracy of risk assessment but also makes model decision-making a "black box," making it difficult for risk control personnel to understand the specific decision-making basis of the model. This hinders both the monitoring and auditing of model risks and makes it difficult to meet increasingly stringent regulatory compliance requirements.
[0006] In recent years, deep learning technology, especially multilayer perceptrons, has shown potential in credit scoring due to its powerful nonlinear fitting capabilities. Meanwhile, attention mechanisms have achieved significant success in natural language processing and computer vision, their core being the ability to dynamically assign importance weights to different parts of the input information. However, in the specific field of credit risk assessment, existing solutions often apply these advanced modules in isolation, failing to form an end-to-end systematic solution tailored to the characteristics of credit data (high-dimensional, sparse, and extremely imbalanced). Specifically, how to organically combine attention mechanisms with deep neural networks to simultaneously achieve dynamic focusing of key features, robust learning under imbalanced samples, and convenient integration of probabilistic outputs with flexible business strategies remains an unresolved technical challenge in this field. This also leads to challenges such as unstable performance, complex tuning, or poor business adaptability in the actual deployment of existing advanced models in business applications. Summary of the Invention
[0007] In view of the above problems, embodiments of this application provide a credit risk assessment method, apparatus, device, medium, and program product.
[0008] According to a first aspect of this application, a credit risk assessment method is provided, comprising: sending a data acquisition authorization request to the object to be assessed; after obtaining authorization from the object to be assessed, acquiring feature data of the object to be assessed and preprocessing the feature data; inputting the preprocessed feature data into a pre-trained credit risk assessment model to obtain a risk score of the object to be assessed; wherein the credit risk assessment model is a feedforward neural network with an embedded attention mechanism; and judging the risk score according to a preset risk decision threshold and outputting the final risk classification result of the object to be assessed.
[0009] According to embodiments of this application, the feature data includes at least one type of information from the following categories: application and processing information related to a specific financial transaction; personal identity and income information reflecting the basic attributes and financial status of the applicant; risk scoring and query record information provided by a credit reporting or risk control system; and credit limits, contract amounts, and balance information of the applicant at other financial institutions.
[0010] According to embodiments of this application, the credit risk assessment model includes the following structural layers connected in sequence: an input layer for receiving preprocessed feature vectors; an attention mechanism layer connected to the input layer for calculating the weights of each input feature and converting the feature vectors into weighted feature vectors; one or more hidden layers connected to the attention mechanism layer for performing nonlinear transformations on the weighted feature vectors to extract deep risk features, each hidden layer including a fully connected layer, a batch normalization layer, a random deactivation layer, and an activation function layer connected in sequence; and an output layer connected to the last hidden layer for outputting a score representing the probability of risk occurrence.
[0011] According to an embodiment of this application, a method for training a credit risk assessment model includes: acquiring a historical sample dataset, the dataset containing feature data of the samples and corresponding risk labels; dividing the historical sample dataset into a training set and a validation set; iteratively training the credit risk assessment model using the training set data to obtain a pre-trained credit risk assessment model; wherein, the iterative training includes: calculating the prediction error using a weighted loss function, the weighted loss function being configured to assign a higher weight to the prediction error of high-risk category samples than to low-risk category samples; and updating the parameters of the credit risk assessment model using the AdamW optimizer.
[0012] According to an embodiment of this application, the weighted loss function is a weighted binary cross-entropy loss function, wherein the weight coefficient of high-risk class samples is inversely proportional to the proportion of high-risk class samples in the training dataset.
[0013] According to embodiments of this application, the iterative training process is controlled using an early stopping strategy and / or a learning rate decay strategy.
[0014] According to an embodiment of this application, the method for training a credit risk assessment model further includes: evaluating the model's performance indicators under different candidate decision thresholds based on a validation set; determining a risk decision threshold from different candidate decision thresholds according to a preset business optimization objective; wherein the preset business optimization objective is to maximize the risk identification accuracy, maximize the risk identification recall, or maximize the comprehensive evaluation index F1 score.
[0015] According to a second aspect of this application, a credit risk assessment device is provided, comprising: a data acquisition module for acquiring feature data of an object to be assessed and preprocessing the feature data; a risk assessment module for inputting the preprocessed feature data into a pre-trained credit risk assessment model to obtain a risk score of the object to be assessed; wherein the credit risk assessment model is a feedforward neural network with an embedded attention mechanism; and a result output module for judging the risk score according to a preset risk decision threshold and outputting the final risk classification result of the object to be assessed.
[0016] According to a third aspect of this application, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0017] According to a fourth aspect of this application, a computer-readable storage medium is also provided, on which a computer program or instructions are stored, wherein the computer program or instructions, when executed by a processor, implement the steps of the above-described method.
[0018] According to a fifth aspect of this application, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description
[0019] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0020] Figure 1 The illustrations depict application scenarios of credit risk assessment methods, apparatus, devices, media, and program products according to embodiments of this application.
[0021] Figure 2 A flowchart illustrating a credit risk assessment method according to an embodiment of this application is shown schematically.
[0022] Figure 3 The diagram illustrates the architecture of a credit risk assessment model according to an embodiment of this application.
[0023] Figure 4 A flowchart illustrating a method for training a credit risk assessment model according to an embodiment of this application is shown schematically.
[0024] Figure 5 A schematic diagram of a PR curve according to an embodiment of this application is shown.
[0025] Figure 6 This schematic diagram illustrates the structural block diagram of a credit risk assessment apparatus according to an embodiment of the present application;
[0026] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a credit risk assessment method according to an embodiment of this application. Detailed Implementation
[0027] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0028] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0029] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0030] In the technical solution of this application, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0031] In scenarios where personal information is used for automated decision-making, the methods, devices, and systems provided in this application all provide users with corresponding operation entry points for users to choose to agree to or reject the automated decision results; if the user chooses to reject, the process enters the expert decision-making process.
[0032] As used in this article, the term "model" refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that uses multiple layers of processing units to process inputs and provide corresponding outputs. A neural network model is an example of a deep learning-based model. In this article, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.
[0033] It's important to note that the term "neural network" can refer to a machine learning network based on deep learning. A neural network processes input and provides corresponding output, typically consisting of an input layer, an output layer, and one or more hidden layers between them. Neural networks used in deep learning applications often include many hidden layers, increasing the network's depth. The layers of a neural network are connected sequentially, so that the output of the previous layer serves as the input to the next layer. The input layer receives the input to the neural network, while the output layer's output becomes the final output. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each processing the input from the layer above.
[0034] It should be understood that this process can generally include three phases: the training phase, the testing phase, and the application phase (also known as the inference phase). In the training phase, a given model is trained using a large amount of training data, iteratively updating parameter values until the model can consistently generate inferences from the training data that meet the expected goals. Through training, the model can be considered to have learned the relationship between inputs and outputs (also known as the input-output mapping) from the training data. The parameter values of the trained model are determined. In the testing phase, test inputs are applied to the trained model to test whether it can provide the correct output, thereby determining the model's performance. In the application phase, the model can be used to process actual inputs based on the trained parameter values to determine the corresponding output.
[0035] Figure 1 The diagram illustrates an application scenario of the credit risk assessment method according to an embodiment of this application. For example... Figure 1 As shown, application scenario 100 according to an embodiment of this application may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables. For example, a user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send information, etc.
[0036] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be electronic devices such as smartphones, wearable devices, personal computers, intelligent voice interaction devices, smart home appliances, intelligent vehicles, in-vehicle terminals, aircraft, unmanned vending terminals, and extended reality devices. Extended reality devices can include virtual reality devices, augmented reality devices, and mixed reality devices. A client application for the target application can be installed and run on the terminal devices. This target application can include, but is not limited to, financial transaction applications, payment applications, shopping applications, web browser applications, search applications, instant messaging tools, email clients, and social media platform software (these are just examples). Furthermore, this application embodiment does not limit the form of the target application, and it can include, but is not limited to, applications, mini-programs, etc., installed on the terminal devices, and can also be in the form of web pages.
[0037] Server 105 can be a server providing various services, such as a backend management server supporting websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process received user requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and basic cloud computing services such as big data. The server can be the backend server of the aforementioned target application, used to provide backend services to the clients of the target application.
[0038] It should be noted that the credit risk assessment method provided in this application embodiment can generally be executed by server 105 and / or terminal devices 101-103. Accordingly, the credit risk assessment device provided in this application embodiment can generally be set in server 105 and / or terminal devices 101-103.
[0039] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0040] Figure 2 A flowchart illustrating a credit risk assessment method according to an embodiment of this application is shown. Figure 2 As shown, the credit risk assessment method 200 according to the embodiments of this application may include steps S210 to S230.
[0041] In step S210, the feature data of the object to be evaluated is obtained and the feature data is preprocessed.
[0042] According to embodiments of this application, the consent or authorization of the object to be evaluated can be obtained before acquiring its feature data. For example, before step S210, a request to acquire the feature data of the object to be evaluated can be sent to the object to be evaluated. If the object to be evaluated consents or authorizes the acquisition of the feature data, step S210 is executed.
[0043] According to embodiments of this application, the feature data includes at least one type of information from the following categories: First, application and processing information directly related to specific financial transactions, such as product type, contract amount, installment period, and collateral value. This information defines the specific scenario of risk occurrence and the basic attributes of the debt contract. Second, static information reflecting the basic attributes and financial status of the assessed entity, including but not limited to age, occupation, education, marital status, residential stability, and verified average monthly income. This information is used to assess its socioeconomic stability and basic repayment ability. Third, dynamic credit history information provided by authoritative credit reporting agencies or internal risk control systems, such as comprehensive credit scores, historical risk account identifiers, and recent credit inquiry frequency. This data is a key indicator for quantifying its historical credit behavior and current credit status. Fourth, information on the assessed entity's existing liabilities at other financial institutions, such as total credit limits, used credit limits, total outstanding balances of various loans, and contract amounts. This information is crucial for comprehensively assessing its overall debt leverage and repayment pressure. This structured, multi-source data acquisition and classification method can provide a comprehensive, accurate, and compliant data foundation for subsequent risk assessment. It supports the model to conduct comprehensive analysis from multiple levels, such as scenario attributes, entity qualifications, credit history, and debt situation, thereby improving the accuracy and reliability of risk identification, while ensuring that business operations comply with regulatory requirements and ethical norms.
[0044] Before inputting the aforementioned feature data into the model, a series of standardized preprocessing operations need to be performed. For missing values in the data, imputation is performed using methods such as median imputation (for numerical features) or mode imputation (for categorical features), depending on the field characteristics. To eliminate interference from extreme values, a statistical distribution-based approach is used, for example, the Z-score method to identify outliers. The specific steps are as follows: For each numerical feature, calculate the Z-score for all data points. The formula for calculating the Z-score is as follows:
[0045]
[0046]
[0047]
[0048] in, This represents the Z-score of the i-th data point. Let μ represent the value of the i-th data point, μ represent the mean of the dataset, σ represent the standard deviation of the dataset, and n represent the number of data points in the dataset.
[0049] When the absolute value of the Z-score of a data point is greater than 3, the data can be considered outlier. To prevent outlier data from interfering with subsequent model training, the identified outlier data needs to be deleted.
[0050] Furthermore, to meet the computational requirements of the model, categorical features need to be one-hot encoded, and numerical features need to be standardized to transform them into a distribution with a mean of zero and a standard deviation of one. The standardization calculation formula is as follows:
[0051]
[0052] in, This represents the standardized data value of the i-th data point. Let μ represent the initial data value of the i-th data point, μ represent the mean of the dataset, and σ represent the standard deviation of the dataset.
[0053] Ultimately, this set of cleaned, encoded, and standardized composite feature vectors serves as the input to a feedforward neural network with an embedded attention mechanism, providing a high-quality information source for the model to achieve adaptive feature weighting and deep risk pattern mining.
[0054] For example, taking a customer applying for an auto loan installment plan (hereinafter referred to as "the applicant") as an example, the complete data acquisition and preprocessing process can be specifically described as follows:
[0055] First, the authorization and data acquisition steps are executed. After the applicant submits the loan application, the system displays a "Personal Information Collection and Use Authorization Form," which clearly outlines the scope and purpose of the data to be collected. After the applicant completes online authorization through electronic signatures or other means, the system proceeds with subsequent data collection accordingly.
[0056] Secondly, the system collects the applicant's original characteristics. Based on the authorization, the system collects the applicant's original characteristic data through internal business systems and external compliant data interfaces (such as credit reporting agency interfaces). A sample set of raw data might include: Regarding business information, the applied product is a "new energy vehicle installment loan," with a contract amount of 200,000 yuan, an installment period of 36 months, and an appraised value of 220,000 yuan for the purchased vehicle; regarding personal information, the applicant is 35 years old, an occupation of "software engineer," a "master's degree," a marital status of "married," owns a home in the local area, and has an average monthly income of 25,000 yuan (their bank statements for the past 6 months can serve as evidence); regarding credit information, the applicant's comprehensive score from a credit reporting agency is 720 points, with no risky account records in the past 24 months, but 4 credit approval inquiries in the past 6 months; regarding liabilities at other banks, the applicant's total credit limit on credit cards from other banks is 100,000 yuan, with 30,000 yuan currently used, and there is an outstanding personal consumption loan from another bank with a contract amount of 50,000 yuan and a current balance of 20,000 yuan.
[0057] Subsequently, data preprocessing operations are performed. Specifically: for any missing values that may exist in the data, they are handled according to the characteristics of the field. For example, if the "Loan Balance with Other Banks" field is temporarily missing due to an interface issue, it is filled with the median of this field in all training samples (e.g., 15,000 yuan). To eliminate interference from extreme values, statistical distribution-based methods such as the Z-score method are used to identify outlier data samples. For example, in the "Number of Queries in the Last 6 Months" field, if a sample value of 20 queries is found and its Z-score is greater than 3, it is determined to be an outlier and removed from the training set. To adapt to model calculations, categorical features such as "Occupation" and "Marital Status" are one-hot encoded. For example, "Occupation" is encoded as a vector form of [0,1,0,...]. In addition, numerical features such as "contract amount", "average monthly income", "credit score" and "used credit limit of other banks' credit cards" are standardized. For example, assuming that the mean (μ) of "average monthly income" in the training set is 20,000 yuan and the standard deviation (σ) is 8,000 yuan, then the standardized value of the applicant's monthly income of 25,000 yuan is (25,000 - 20,000) / 8,000 = 0.625.
[0058] Finally, after the aforementioned cleaning, encoding, and standardization processes, all of the applicant's features were integrated and transformed into a unified, dimensionless numerical feature vector. This vector integrates information from four dimensions: business, personal, credit, and debt, forming the direct input to the subsequent feedforward neural network with an embedded attention mechanism. This provides a structured, high-quality information source for the model to perform adaptive feature weighting and deep risk pattern mining.
[0059] Return to reference Figure 2 In step S220, the preprocessed feature data is input into a pre-trained credit risk assessment model to obtain the risk score of the object to be assessed; wherein, the credit risk assessment model is a feedforward neural network with an embedded attention mechanism.
[0060] According to embodiments of this application, a corresponding operation entry point can be provided for the object to be evaluated, allowing the object to choose to agree to or reject the automated decision result. That is, before performing credit risk assessment / decision processing on the characteristic data of the object to be evaluated, instructions from the user to agree to or reject the processing / decision can be obtained through the corresponding operation entry point. If the user agrees to the processing / decision, credit risk assessment / decision is performed on the user information, i.e., step S220 is executed. If the user refuses to perform the processing / decision, the expert decision-making process is initiated.
[0061] Figure 3 The diagram illustrates the architecture of a credit risk assessment model according to an embodiment of this application.
[0062] like Figure 3As shown, the credit risk assessment model according to an embodiment of this application includes the following sequentially connected structural layers: an input layer for receiving preprocessed feature vectors; an attention mechanism layer connected to the input layer for calculating the weights of each input feature and converting the feature vectors into weighted feature vectors; one or more hidden layers connected to the attention mechanism layer for performing nonlinear transformations on the weighted feature vectors to extract deep risk features, each hidden layer including a sequentially connected fully connected layer, a batch normalization layer, a dropout layer, and an activation function layer; and an output layer connected to the last hidden layer for outputting a score representing the probability of risk occurrence. This model significantly improves the accuracy and recall of risk identification through an end-to-end learning approach, and its output threshold can be flexibly adjusted according to business needs to balance precision and recall. The interpretability of the attention weights also provides a transparent basis for risk decision-making. The modular design also supports cross-scenario migration and expansion, making it suitable for various consumer credit risk control scenarios and possessing good practicality and promotional value.
[0063] For example, the input layer receives a feature vector of length n. ), where n represents the number of feature fields. The attention layer first calculates the attention score for each feature through a fully connected layer. ),in Then, the attention scores are normalized into attention weights using the Softmax function. ),in The calculation formula is: Then, the original feature vector is multiplied element-wise by the attention weight vector to obtain the weighted feature vector. ),in The hidden layer comprises three fully connected layers, with the number of neurons in each layer adjustable to 256, 128, and 64, respectively. Each fully connected layer is followed by a batch normalization layer, a Dropout layer, and a ReLU activation function. The batch normalization layer accelerates model convergence and improves training stability; the Dropout layer randomly discards some neurons to prevent overfitting (the dropout rate can be set to 0.1); and the ReLU activation function introduces non-linear expressive power into the model. The output layer consists of a single neuron, and the Sigmoid activation function maps the output value to between 0 and 1, representing the predicted probability of customer delinquency.
[0064] Figure 4 A flowchart illustrating a training method for a credit risk assessment model according to an embodiment of this application is shown.
[0065] like Figure 4 As shown, the training method 400 for the credit risk assessment model according to an embodiment of this application may include steps S410 to S430.
[0066] In step S410, a historical sample dataset is obtained, which contains the feature data of the samples and their corresponding risk labels.
[0067] According to embodiments of this application, the acquisition of historical sample datasets includes multiple stages such as data collection, feature extraction, label definition, and preprocessing. First, customer samples that applied for and completed target financial services (such as auto loan installment payments) within a predetermined historical period (e.g., the past 36 months) are collected from the financial institution's internal business systems, customer management systems, and external legitimate credit data platforms. Each sample corresponds to a customer entity and includes multi-dimensional feature data provided by the customer at the time of application and subsequently recorded by the system. The type and content of the feature data must be consistent with the features acquired in the aforementioned risk assessment stage, typically covering categories such as business attribute information, customer static profiles, dynamic credit history, and existing debt status, to ensure consistency of the feature space during training and prediction. Further, a corresponding risk label is defined for each sample. This label is determined based on the customer's actual repayment behavior within a predetermined observation period (e.g., 24 months) after loan disbursement. For example, if a customer defaults for more than a certain number of days (e.g., 90 days) during the observation period, it is marked as a positive sample (risk label 1); otherwise, it is marked as a negative sample (risk label 0). After obtaining the raw data, a series of preprocessing operations need to be performed, including data cleaning, missing value imputation, outlier handling, classification feature encoding, and numerical feature standardization, to form a standardized, structured sample set that can be directly used by the model. To address the common problem of imbalanced data classes, oversampling, undersampling, or class weighting techniques can be used at this stage or in subsequent training phases to improve the model's ability to identify minority classes (i.e., high-risk customers).
[0068] In step S420, the historical sample dataset is divided into a training set and a validation set.
[0069] According to an embodiment of this application, step S420 involves dividing the preprocessed historical sample dataset into training and validation sets, respectively, for model training and performance monitoring and adjustment during the training process. Specifically, a stratified random sampling method is used to divide the entire dataset into a training set and a validation set according to a preset ratio, such as 8:2 or 7.5:2.5. Stratified sampling ensures that the ratio of positive and negative samples in the training and validation sets after the division is basically consistent with the ratio in the original dataset, thereby avoiding the distribution bias introduced by the division from affecting the balance of model training and the fairness of evaluation. The training set is used for learning and updating model parameters, while the validation set does not participate in parameter optimization. It is only used to periodically evaluate model performance during training, monitor for overfitting, and make early stopping judgments or hyperparameter adjustments accordingly. In addition, in actual implementation, a portion of the original data can be reserved as an independent test set for the final performance evaluation after model training is completed, to ensure the objectivity of the evaluation results and the reliable estimation of generalization ability.
[0070] In step S430, the credit risk assessment model is iteratively trained using the training set data to obtain a pre-trained credit risk assessment model.
[0071] According to an embodiment of this application, the iterative training in step S430 may specifically include: calculating the prediction error using a weighted loss function, wherein the weighted loss function is configured to assign a higher weight to the prediction error of high-risk category samples than to low-risk category samples; and updating the parameters of the credit risk assessment model using the AdamW optimizer.
[0072] According to embodiments of this application, high-risk category samples are overdue customers. Since the number of non-overdue customers in the training data far exceeds the number of overdue customers, the model is prone to bias towards the majority class, resulting in a low recall rate for overdue customers. To address this issue, when calculating the training loss, a higher weight can be assigned to the minority class to penalize misclassification of the minority class. Therefore, the weighted loss function can be a weighted binary cross-entropy loss function, where the weight coefficient of high-risk category samples is inversely proportional to the proportion of high-risk category samples in the training dataset. Binary cross-entropy loss function The formula is as follows:
[0073]
[0074] Where y represents the true label, y = 1 indicates the customer is overdue, and y = 0 indicates the customer is not overdue, p is the predicted probability, and w is the weight of the overdue customer, calculated using the following formula:
[0075]
[0076] in, This indicates the number of customers in the training set whose loans have not expired. This indicates the number of overdue customers in the training set.
[0077] According to embodiments of this application, the AdamW optimizer is used during training. By decoupling weight decay from gradient updates, the problem of incorrect scaling of the L2 regularization term in traditional Adam is avoided, thus achieving a more stable regularization effect. The initial learning rate of the model can be set to 3×10⁻⁶. -4 .
[0078] According to embodiments of this application, the iterative training process employs an early stopping strategy and / or a learning rate decay strategy for control, in order to optimize the training path, improve convergence stability, and enhance the model's generalization performance. Specifically, the early stopping strategy is implemented by continuously monitoring the model's loss function value or risk control-related performance indicators (such as F1 score) on the independent validation set during the training process. If the indicator does not improve within a preset patience threshold number of rounds, training is automatically terminated, and the model parameters are backtracked to the state where the validation set performance is optimal, thereby effectively suppressing the model's tendency to overfit on the training set. Simultaneously, the learning rate decay strategy dynamically adjusts the optimizer's learning rate according to the training progress. It can employ triggered decay based on validation set performance (e.g., reducing the learning rate by a fixed factor when the validation loss does not decrease continuously), or a preset scheduling method (e.g., piecewise constant decay or cosine annealing decay), allowing the model to quickly approach the optimal region with a larger step size in the early stages of training, and then fine-tuning with a smaller step size in the later stages, thereby improving the stability of convergence and final performance. Early stopping and learning rate decay strategies can be implemented independently or in combination. Their synergy not only significantly reduces the risk of overfitting and saves computational resources, but also enables the model to achieve better and more stable performance on the validation set. These strategies do not require changes to the model structure, are simple to implement, and highly adaptable. They are particularly suitable for credit risk modeling scenarios with imbalanced samples and high noise levels, providing important training process guarantees for building reliable, efficient, and well-generalized risk assessment models.
[0079] According to embodiments of this application, the method for training a credit risk assessment model further includes a step of determining a risk decision threshold based on a validation set. This step is used to convert the continuous risk probability values output by the model into classification judgments usable by the business. The method for training a credit risk assessment model also includes: evaluating the model's performance indicators under different candidate decision thresholds based on the validation set; and determining a risk decision threshold from different candidate decision thresholds according to a preset business optimization objective; wherein the preset business optimization objective is to maximize risk identification precision, maximize risk identification recall, or maximize the F1 score of the comprehensive assessment indicator. Precision measures the accuracy of a model's predictions. It is defined as the proportion of customers correctly predicted as overdue by the model who actually defaulted. The formula is Precision = TP / (TP + FP), where Precision represents precision, TP represents true positives (correctly predicted overdue customers), and FP represents false positives (incorrectly predicted non-overdue customers). Recall measures the model's ability to cover at-risk customers. It is defined as the proportion of customers who actually defaulted but were successfully identified by the model. The formula is Recall = TP / (TP + FN), where Recall represents recall and FN represents false negatives (missed overdue customers). The F1 score, the harmonic mean of precision and recall, is used to comprehensively evaluate the model's performance in balancing these two metrics. The formula is F1-Score = (2 × Precision × Recall) / (Precision + Recall), where Precision represents precision and Recall represents recall. The PR curve is plotted with recall on the horizontal axis and precision on the vertical axis. See [link to relevant documentation]. Figure 5 It can intuitively show the dynamic relationship between precision and recall under different classification thresholds, and comprehensively reflect the model's ability to identify overdue customers.
[0080] For model validation, a hierarchical K-fold cross-validation technique is employed. This method ensures that when dividing the dataset into K subsets (folds), the ratio of positive samples (overdue) to negative samples (non-overdue) in each subset remains consistent with the overall ratio of the original dataset, thereby guaranteeing the representativeness of the data distribution in each fold and making the model performance evaluation results more reliable and stable.
[0081] Return to reference Figure 2In step S230, the risk score is judged according to a preset risk decision threshold, and the final risk classification result of the object to be evaluated is output. Specifically, the risk decision threshold is a pre-set critical value used to convert continuous risk probability values into binary classification decisions. This threshold is usually determined during the model training phase based on validation set performance and business objectives. In implementation, the risk score obtained in step S220 is compared with this threshold: if the risk score is greater than or equal to the risk decision threshold, the object to be evaluated is classified as a high-risk category (e.g., "recommend rejection" or "requires key review"); conversely, if the risk score is less than the threshold, it is classified as a low-risk category (e.g., "recommend approval" or "routine review"). This judgment process realizes the transformation from the statistical probability predicted by the model to specific and actionable risk control decisions.
[0082] The determination of risk decision thresholds is closely related to business scenarios. Different threshold setting criteria can be selected based on different risk control strategies and business optimization goals: in scenarios focusing on controlling false positives and prioritizing the quality of approved clients (such as expanding high-quality customer groups), a threshold that maximizes accuracy is used; in scenarios focusing on improving risk detection rates and strictly preventing risk omissions (such as high-risk business review), a threshold that maximizes recall is used; and in scenarios requiring a comprehensive balance between false positives and omissions, a threshold that maximizes the F1 score is used. In this way, the same trained risk assessment model can flexibly adapt to different product lines, risk control stages, and risk preferences by adjusting a single threshold parameter, thereby meeting diverse actual business needs while ensuring the consistency of the model's core capabilities.
[0083] For example, in the auto loan approval scenario, the primary business strategy is to stabilize asset quality and control the bad debt rate. Therefore, risk control decisions tend to be conservative, aiming to minimize the false admission of high-risk customers. In this case, the threshold that maximizes precision on the validation set (e.g., 0.75) can be set as the risk decision threshold. This means that the model only outputs a high-risk assessment for customers with an extremely high probability of delinquency, thus strictly controlling the risk level of admitted customers at the source.
[0084] For example, in the scenario of personal credit card issuance and approval, business strategies may focus more on market expansion and customer acquisition, while needing to intercept obviously high-risk customers. Therefore, it is necessary to appropriately relax the admission criteria while keeping the risk under control. In this case, the threshold that maximizes the F1 score on the validation set (e.g., 0.35) can be set as the risk decision threshold. This threshold achieves a better balance between mistakenly rejecting high-quality customers and overlooking high-risk customers, allowing the model to intercept most high-risk applications while allowing a considerable proportion of marginal or medium-risk customers to undergo manual review or be granted lower credit limits, thereby supporting business growth goals.
[0085] This method combines the output of advanced machine learning models with interpretable and executable business rules. This not only enables automated risk decision-making and improves approval efficiency, but also endows risk control strategies with high flexibility and adaptability through the linkage of thresholds with business objectives. At the same time, the clear threshold decision-making mechanism enhances the transparency and controllability of the entire risk assessment process, facilitating monitoring, auditing, and strategy optimization by risk control personnel.
[0086] Based on the above-described credit risk assessment method, embodiments of this application also provide a credit risk assessment apparatus. The following will be combined with... Figure 6 The device is described in detail.
[0087] Figure 6 A schematic block diagram of a credit risk assessment apparatus according to an embodiment of this application is shown.
[0088] like Figure 6 As shown, the credit risk assessment device 600 of this embodiment includes a data acquisition module 610, a risk assessment module 620, and a result output module 630.
[0089] The data acquisition module 610 is used to acquire feature data of the object to be evaluated and to preprocess the feature data. In one embodiment, the data acquisition module 610 can be used to perform step S210 described above, which will not be repeated here.
[0090] The risk assessment module 620 is used to input preprocessed feature data into a pre-trained credit risk assessment model to obtain a risk score for the object to be assessed; wherein the credit risk assessment model is a feedforward neural network with an embedded attention mechanism. In one embodiment, the risk assessment module 620 can be used to perform step S220 described above, which will not be repeated here.
[0091] The result output module 630 is used to judge the risk score according to the preset risk decision threshold and output the final risk classification result of the object to be evaluated. In one embodiment, the result output module 630 can be used to execute the step S230 described above, which will not be repeated here.
[0092] According to embodiments of this application, the feature data includes at least one type of information from the following categories: application and processing information related to a specific financial transaction; personal identity and income information reflecting the basic attributes and financial status of the applicant; risk scoring and query record information provided by a credit reporting or risk control system; and credit limits, contract amounts, and balance information of the applicant at other financial institutions.
[0093] According to embodiments of this application, the credit risk assessment model includes the following structural layers connected in sequence: an input layer for receiving preprocessed feature vectors; an attention mechanism layer connected to the input layer for calculating the weights of each input feature and converting the feature vectors into weighted feature vectors; one or more hidden layers connected to the attention mechanism layer for performing nonlinear transformations on the weighted feature vectors to extract deep risk features, each hidden layer including a fully connected layer, a batch normalization layer, a random deactivation layer, and an activation function layer connected in sequence; and an output layer connected to the last hidden layer for outputting a score representing the probability of risk occurrence.
[0094] According to an embodiment of this application, the training method for a credit risk assessment model includes: acquiring a historical sample dataset, the dataset containing feature data of the samples and corresponding risk labels; dividing the historical sample dataset into a training set and a validation set; iteratively training the credit risk assessment model using the training set data to obtain a pre-trained credit risk assessment model; wherein, the iterative training includes: calculating the prediction error using a weighted loss function, the weighted loss function being configured to assign a higher weight to the prediction error of high-risk category samples than to low-risk category samples; and updating the parameters of the credit risk assessment model using the AdamW optimizer.
[0095] According to an embodiment of this application, the weighted loss function is a weighted binary cross-entropy loss function, wherein the weight coefficient of high-risk class samples is inversely proportional to the proportion of high-risk class samples in the training dataset.
[0096] According to embodiments of this application, the iterative training process is controlled using an early stopping strategy and / or a learning rate decay strategy.
[0097] According to an embodiment of this application, the method for training a credit risk assessment model further includes: evaluating the model's performance indicators under different candidate decision thresholds based on a validation set; determining a risk decision threshold from different candidate decision thresholds according to a preset business optimization objective; wherein the preset business optimization objective is to maximize the risk identification accuracy, maximize the risk identification recall, or maximize the comprehensive evaluation index F1 score.
[0098] According to embodiments of this application, any multiple modules among the data acquisition module 610, risk assessment module 620, and result output module 630 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this application, at least one of the data acquisition module 610, risk assessment module 620, and result output module 630 can be at least partially implemented as hardware circuitry, such as field-programmable gate arrays, programmable logic arrays, systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits, or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the data acquisition module 610, risk assessment module 620, and result output module 630 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0099] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a credit risk assessment method according to an embodiment of this application.
[0100] like Figure 7 As shown, an electronic device 700 according to an embodiment of this application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory 702 or a program loaded from a storage portion 708 into a random access memory 703. The processor 701 may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a dedicated microprocessor. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for executing different steps of the method flow according to an embodiment of this application.
[0101] Random access memory 703 stores various programs and data required for the operation of electronic device 700. Processor 701, read-only memory 702, and random access memory 703 are interconnected via bus 704. Processor 701 executes various steps of the method flow according to embodiments of this application by executing programs stored in read-only memory 702 and / or random access memory 703. It should be noted that programs may also be stored in one or more memories other than read-only memory 702 and random access memory 703. Processor 701 may also execute various steps of the method flow according to embodiments of this application by executing programs stored in one or more memories.
[0102] According to embodiments of this application, the electronic device 700 may further include an input / output interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube, liquid crystal display, etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card, such as a local area network card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0103] Embodiments of this application also provide a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0104] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof. According to embodiments of this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include the read-only memory 702, and / or random access memory 703, and / or one or more memories other than read-only memory 702 and random access memory 703 described above.
[0105] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this application.
[0106] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0107] According to embodiments of this application, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by processor 701, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0108] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0109] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0110] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A credit risk assessment method, characterized in that, The method includes: Send a data acquisition authorization request to the object to be evaluated; After obtaining authorization from the object to be evaluated, the feature data of the object to be evaluated is acquired and the feature data is preprocessed. The preprocessed feature data is input into a pre-trained credit risk assessment model to obtain the risk score of the object to be assessed; wherein, the credit risk assessment model is a feedforward neural network embedded with an attention mechanism; and Based on a preset risk decision threshold, the risk score is judged, and the final risk classification result of the object to be evaluated is output.
2. The method according to claim 1, characterized in that, The feature data includes at least one type of information from the following: Application and processing information related to specific financial transactions; Personal identity and income information that reflects the basic attributes and financial status of the individual; Risk scoring and query records provided by credit reporting or risk control systems; The information pertains to the credit limits, contract amounts, and outstanding balances of the subject at other financial institutions.
3. The method according to claim 1, characterized in that, The credit risk assessment model comprises the following structural layers connected in sequence: The input layer is used to receive the preprocessed feature vectors. An attention mechanism layer, connected to the input layer, is used to calculate the weights of each input feature and convert the feature vector into a weighted feature vector; One or more hidden layers, connected to the attention mechanism layer, are used to perform nonlinear transformations on the weighted feature vector to extract deep risk features. Each hidden layer includes a sequentially connected fully connected layer, a batch normalization layer, a random deactivation layer, and an activation function layer. The output layer, connected to the last hidden layer, is used to output a score representing the probability of the risk occurring.
4. The method according to any one of claims 1 to 3, characterized in that, The training methods for the credit risk assessment model include: Obtain a historical sample dataset, which contains the sample's feature data and corresponding risk labels; The historical sample dataset is divided into a training set and a validation set; The credit risk assessment model is iteratively trained using the training set data to obtain a pre-trained credit risk assessment model. The iterative training includes: The prediction error is calculated using a weighted loss function, which is configured to assign a higher weight to the prediction error of high-risk class samples than to low-risk class samples. The AdamW optimizer is used to update the parameters of the credit risk assessment model.
5. The method according to claim 4, characterized in that, The weighted loss function is a weighted binary cross-entropy loss function, where the weight coefficient of high-risk class samples is inversely proportional to the proportion of high-risk class samples in the training dataset.
6. The method according to claim 4, characterized in that, The iterative training process is controlled using an early stopping strategy and / or a learning rate decay strategy.
7. The method according to claim 4, characterized in that, The training methods for the credit risk assessment model include: Based on the validation set, the performance metrics of the model under different candidate decision thresholds are evaluated. Based on the preset business optimization objectives, the risk decision threshold is determined from the different candidate decision thresholds; The preset business optimization objectives are to maximize the risk identification accuracy, maximize the risk identification recall, or maximize the F1 score of the comprehensive evaluation index.
8. A credit risk assessment device, characterized in that, The device includes: The data acquisition module is used to acquire feature data of the object to be evaluated and to preprocess the feature data. A risk assessment module is used to input preprocessed feature data into a pre-trained credit risk assessment model to obtain a risk score for the object to be assessed; wherein the credit risk assessment model is a feedforward neural network with an embedded attention mechanism; and The result output module is used to judge the risk score according to the preset risk decision threshold and output the final risk classification result of the object to be evaluated.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.