CN116402597A - Method and device for predicting credit risk classification, method and device for training classification model and classification model - Google Patents

Method and device for predicting credit risk classification, method and device for training classification model and classification model Download PDF

Info

Publication number
CN116402597A
CN116402597A CN202310234737.9A CN202310234737A CN116402597A CN 116402597 A CN116402597 A CN 116402597A CN 202310234737 A CN202310234737 A CN 202310234737A CN 116402597 A CN116402597 A CN 116402597A
Authority
CN
China
Prior art keywords
credit
features
order
interaction
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310234737.9A
Other languages
Chinese (zh)
Inventor
郭延祥
曾海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202310234737.9A priority Critical patent/CN116402597A/en
Publication of CN116402597A publication Critical patent/CN116402597A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Artificial Intelligence (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Technology Law (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a method and a device for predicting credit risk classification, a method and a device for training a classification model and a classification model. The contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be obtained through the attention mechanism, for example, weights of different higher-order interaction features are obtained, for example, the higher-order interaction features with more contribution degrees are appropriately higher in weight, the higher-order interaction features with less positive influence are appropriately lower in weight, and the higher-order interaction features with negative influence are appropriately very lower in weight.

Description

Method and device for predicting credit risk classification, method and device for training classification model and classification model
Technical Field
The present application relates to the field of computer technology, and in particular, to a method for predicting credit risk classification, a device for predicting credit risk classification, a method for training a classification model, a device for training a classification model, and a classification model.
Background
With the rapid development of economies, credit requirements continue to grow. Credit institutions such as banks face the problem of predicting the credit risk of users applying for credit.
In the case where prediction of credit risk of a user is required, credit-related data of the user may be used to predict the credit risk classification of the user, however, the credit-related data of the user used is often incomplete, resulting in inaccurate credit risk classification of the predicted user, in the case where the credit risk classification of the predicted user is inaccurate, credit may be given to a poorly qualified user, final funds loss cannot be withdrawn, and credit may not be enjoyed for a well-qualified user.
Disclosure of Invention
The application shows a method and a device for predicting credit risk classification, a method and a device for training a classification model, and a classification model
In a first aspect, the present application shows a method of predicting credit risk classification, the method comprising:
acquiring a plurality of credit information of a user;
inputting a plurality of credit information of the user into a trained classification model to obtain credit risk classification of the user predicted by the classification model according to the plurality of credit information of the user;
the classification model predicts the credit risk classification of the user according to the plurality of credit information of the user, and comprises the following steps:
acquiring credit characteristics corresponding to each credit information of the user;
acquiring low-order interaction features among a plurality of credit features, acquiring a plurality of different-order high-order interaction features among the plurality of credit features, and acquiring attention weights corresponding to the high-order interaction features;
respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighted feature corresponding to each higher-order interaction feature;
and predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
In an optional implementation manner, the predicting the credit risk classification of the user according to the low-order interaction feature among the plurality of credit features and the weighted feature corresponding to each high-order interaction feature includes:
The low-order interaction features among the credit features and the weighting features corresponding to the high-order interaction features are aggregated to obtain aggregated features;
and predicting credit risk classification of the user according to the aggregation characteristics.
In an alternative implementation, the acquiring low-order interaction features between the plurality of credit features includes:
calculating a product between each two of the plurality of credit features;
at least the products between every two credit features are summed to obtain a low-order interaction feature.
In an alternative implementation, the acquiring a plurality of different orders of high-order interaction features between the plurality of credit features includes:
acquiring initialized interaction relation information among a plurality of credit features;
and sequentially carrying out multiple rounds of cyclic updating on the initialized interaction relation information among the plurality of credit features to obtain a plurality of high-order interaction features with different orders.
In an optional implementation manner, the obtaining the credit characteristics corresponding to the respective credit information of the user includes:
performing independent thermal coding on each credit information to obtain sparse features corresponding to each credit information;
embedding the sparse features corresponding to the credit information respectively to obtain dense features corresponding to the credit information respectively;
And carrying out multi-head self-attention weighting on the dense features corresponding to the credit information respectively to obtain the credit features corresponding to the credit information respectively.
In a second aspect, the present application shows a method of training a classification model, the method comprising:
acquiring a plurality of training data sets, wherein the training data sets comprise sample data and labeling data, and the sample data comprise a plurality of sample credit information of a sample user; the labeling data comprises labeling credit risk classification of the sample user;
training the model by using a plurality of training data sets until network parameters in a network structure of the model are converged to obtain a classification model;
the model comprises:
the system comprises a feature extraction network, a low-order feature interaction network, a high-order feature interaction network, an attention network and a classification prediction network;
the feature extraction network is used for obtaining sample credit features corresponding to the sample credit information of the sample user respectively;
the low-order feature interaction network is used for acquiring sample low-order interaction features among a plurality of sample credit features;
the high-order feature interaction network is used for acquiring a plurality of sample high-order interaction features of different orders among a plurality of sample credit features;
the attention network is used for acquiring sample attention weights corresponding to each sample high-order interaction characteristic; respectively weighting each sample high-order interaction feature by using the sample attention weight corresponding to each sample high-order interaction feature to obtain a sample weighting feature corresponding to each sample high-order interaction feature;
The classification prediction network is used for predicting credit risk classification of the sample user according to the sample low-order interaction characteristics among the plurality of sample credit characteristics and the sample weighting characteristics corresponding to each sample high-order interaction characteristic.
In a third aspect, the present application shows a classification model comprising:
the system comprises a feature extraction network, a low-order feature interaction network, a high-order feature interaction network, an attention network and a classification prediction network;
the feature extraction network is used for obtaining credit features corresponding to the credit information of the user respectively;
the low-order feature interaction network is used for acquiring low-order interaction features among the plurality of credit features;
the high-order feature interaction network is used for acquiring a plurality of high-order interaction features of different orders among the plurality of credit features;
the attention network is used for acquiring attention weights corresponding to the high-order interaction features; respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighted feature corresponding to each higher-order interaction feature;
the classification prediction network is used for predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
In an alternative implementation, the classification prediction network comprises: a feature aggregation layer and a classification prediction layer;
the feature aggregation layer is used for aggregating the low-order interaction features among the credit features and the weighting features corresponding to the high-order interaction features to obtain aggregation features;
the classification prediction layer is used for predicting credit risk classification of the user according to the aggregation characteristics.
In an alternative implementation, the low-order feature interaction network includes a product layer and a summation layer;
the product layer is used for calculating the product between every two credit features in the plurality of credit features;
the summation layer is used for summing products between at least every two credit features to obtain low-order interaction features.
In an alternative implementation, the high-order feature interaction network includes an interaction relationship information layer and a cyclic update layer;
the interactive relation information layer is used for acquiring initialized interactive relation information among a plurality of credit features;
the cyclic updating layer is used for sequentially carrying out cyclic updating on the initialized interaction relation information among the plurality of credit features for a plurality of rounds to obtain a plurality of high-order interaction features with different orders.
In an alternative implementation, the feature extraction network includes: a single thermal coding layer, an embedded layer, and a multi-headed self-attention layer;
The independent heat coding layer is used for respectively carrying out independent heat coding on each credit information to obtain sparse features respectively corresponding to each credit information;
the embedding layer is used for carrying out embedding operation on sparse features corresponding to each credit information respectively to obtain dense features corresponding to each credit information respectively;
and the multi-head self-attention layer carries out multi-head self-attention weighting on the dense features corresponding to the credit information respectively to obtain the credit features corresponding to the credit information respectively.
In a fourth aspect, the present application shows an apparatus for predicting credit risk classification, the apparatus comprising:
the first acquisition module is used for acquiring a plurality of credit information of the user;
the input module is used for inputting a plurality of credit information of the user into the trained classification model to obtain credit risk classification of the user predicted by the classification model according to the plurality of credit information of the user;
the classification model includes:
the first acquisition sub-module is used for acquiring credit characteristics corresponding to the credit information of the user respectively;
the system comprises a second acquisition sub-module, a third acquisition sub-module and a fourth acquisition sub-module, wherein the second acquisition sub-module is used for acquiring low-order interaction characteristics among a plurality of credit characteristics, the third acquisition sub-module is used for acquiring a plurality of different-order high-order interaction characteristics among the plurality of credit characteristics, and the fourth acquisition sub-module is used for acquiring attention weights corresponding to the high-order interaction characteristics;
The weighting sub-module is used for respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighting feature corresponding to each higher-order interaction feature;
and the prediction sub-module is used for predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
In an alternative implementation, the prediction submodule includes:
the aggregation unit is used for aggregating the low-order interaction features among the credit features and the weighting features corresponding to the high-order interaction features to obtain aggregation features;
and the prediction unit is used for predicting credit risk classification of the user according to the aggregation characteristics.
In an alternative implementation, the second obtaining submodule includes:
a calculation unit for calculating a product between each two of the plurality of credit features;
and the summation unit is used for summing products between every two credit features at least to obtain low-order interaction features.
In an alternative implementation, the third obtaining submodule includes:
the acquisition unit is used for acquiring initialized interaction relation information among the plurality of credit features;
And the cyclic updating unit is used for sequentially carrying out cyclic updating on the initialized interaction relation information among the plurality of credit features for a plurality of rounds to obtain a plurality of high-order interaction features with different orders.
In an alternative implementation, the first obtaining submodule includes:
the encoding unit is used for performing independent thermal encoding on each credit information to obtain sparse features corresponding to each credit information;
the embedding unit is used for carrying out embedding operation on the sparse features corresponding to the credit information respectively to obtain dense features corresponding to the credit information respectively;
and the weighting unit is used for carrying out multi-head self-attention weighting on the dense features corresponding to the credit information respectively to obtain the credit features corresponding to the credit information respectively.
In a fifth aspect, the present application shows an apparatus for training a classification model, the apparatus comprising:
the second acquisition module is used for acquiring a plurality of training data sets, wherein the training data sets comprise sample data and annotation data, and the sample data comprise a plurality of sample credit information of a sample user; the labeling data comprises labeling credit risk classification of the sample user;
the training module is used for training the model by using the plurality of training data sets until the network parameters in the network structure of the model are converged to obtain a classification model;
The model comprises:
the system comprises a feature extraction network, a low-order feature interaction network, a high-order feature interaction network, an attention network and a classification prediction network;
the feature extraction network is used for obtaining sample credit features corresponding to the sample credit information of the sample user respectively;
the low-order feature interaction network is used for acquiring sample low-order interaction features among a plurality of sample credit features;
the high-order feature interaction network is used for acquiring a plurality of sample high-order interaction features of different orders among a plurality of sample credit features;
the attention network is used for acquiring sample attention weights corresponding to each sample high-order interaction characteristic; respectively weighting each sample high-order interaction feature by using the sample attention weight corresponding to each sample high-order interaction feature to obtain a sample weighting feature corresponding to each sample high-order interaction feature;
the classification prediction network is used for predicting credit risk classification of the sample user according to the sample low-order interaction characteristics among the plurality of sample credit characteristics and the sample weighting characteristics corresponding to each sample high-order interaction characteristic.
In a sixth aspect, the present application shows an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the method as shown in any of the preceding aspects.
In a seventh aspect, the present application shows a non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method as set out in any of the preceding aspects.
In an eighth aspect, the present application shows a computer program product, which when executed by a processor of an electronic device, enables the electronic device to perform the method as described in any of the previous aspects.
Compared with the prior art, the application has the following advantages:
in the application, a plurality of credit information of a user is acquired; acquiring credit characteristics corresponding to each credit information of the user; acquiring low-order interaction features among a plurality of credit features, acquiring a plurality of different-order high-order interaction features among the plurality of credit features, and acquiring attention weights corresponding to the high-order interaction features; respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighted feature corresponding to each higher-order interaction feature; and predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
The contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be obtained through the attention mechanism, for example, the weight of each higher-order interaction feature is obtained, for example, the weight of each higher-order interaction feature with higher contribution degree is appropriately higher, so that the contribution degree of each higher-order interaction feature with higher positive influence to the credit risk classification of the predicted user is larger, the weight of each higher-order interaction feature with lower positive influence is appropriately lower, so that the contribution degree of each higher-order interaction feature with lower positive influence to the credit risk classification of the predicted user is smaller, for example, the weight of each higher-order interaction feature with lower negative influence can be appropriately lower, for example, 0 or close to 0, so that the contribution degree of each higher-order interaction feature with lower negative influence to the credit risk classification of the predicted user is extremely smaller, for example, the attention weight corresponding to each higher-order interaction feature is respectively weighted, so that the attention weight of each higher-order interaction feature with higher influence can be accurately provided, for example, the credit risk classification can be predicted by using the attention mechanism, and the accuracy of the credit risk classification can be improved according to the attention mechanism.
Drawings
FIG. 1 is a flow chart illustrating a method of training a classification model according to an exemplary embodiment of the present application.
Fig. 2 is a schematic structural diagram of a classification model according to an exemplary embodiment of the present application.
Fig. 3 is a schematic structural diagram of a classification model according to an exemplary embodiment of the present application.
Fig. 4 is a schematic structural diagram of a classification model according to an exemplary embodiment of the present application.
Fig. 5 is a schematic structural diagram of a classification model according to an exemplary embodiment of the present application.
Fig. 6 is a schematic structural diagram of a classification model according to an exemplary embodiment of the present application.
Fig. 7 is a flow chart illustrating a method for predicting credit risk classification according to an exemplary embodiment of the application.
Fig. 8 is a schematic diagram of a feature diagram according to an exemplary embodiment of the present application.
FIG. 9 is a schematic diagram of a loop iteration shown in an exemplary embodiment of the present application.
FIG. 10 is a schematic diagram of a loop iteration shown in an exemplary embodiment of the present application.
Fig. 11 is a block diagram illustrating an apparatus for predicting credit risk classification according to an exemplary embodiment of the application.
FIG. 12 is a block diagram illustrating an apparatus for training a classification model according to an exemplary embodiment of the present application.
Fig. 13 is a schematic structural view of an apparatus according to an exemplary embodiment of the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
In one way of credit risk prediction for a user, a conventional machine learning model may be used, such as a scoring card model or the like, including LR (Logistic Regression, logistic regression model) or the like. The model is then used to predict the credit risk classification of the user.
However, the inventors have performed statistical analysis on a large number of prediction results of predicting credit risk classifications of a large number of users using a model, and found that the accuracy of predicting credit risk classifications of users using a model is low.
Thus, a need has arisen to improve the accuracy of predicting a user's credit risk classification.
In order to achieve the object of improving the accuracy of predicting the credit risk classification of the user, the inventors analyzed the cause of the low accuracy of predicting the credit risk classification of the user using the model, and found that: in the above-described mode, the data related to the user's credit is input to the model, the model extracts the features corresponding to the data related to the user's credit, and predicts the credit risk classification of the user based on the features corresponding to the data, but the data related to the user's credit is discrete, resulting in a small amount of information of the extracted features and a low accuracy in predicting the credit risk classification of the user.
Therefore, the inventor thinks of another way, by interacting two features in the features corresponding to the respective data related to the user, a second order interaction feature with more information content can be obtained, for example, the features related to the user time and the features related to the amount of money are interacted, a second order interaction feature like "the order amount of the night time of the last N months" can be obtained, the information amount of the feature can be increased, the feature corresponding to the respective data related to the user and the second order interaction feature can be used for predicting the credit risk classification of the user, and the accuracy of the credit risk classification of the user predicted by using the feature corresponding to the respective data related to the user and the second order interaction feature is higher.
On the basis of another mode, the inventor also thinks of another mode, for example, by carrying out interaction on more than N features in the features corresponding to the respective data related to the credit of the user, N-order interaction features with more information content can be obtained, N comprises a positive integer greater than 2 (if N is equal to 3, N-order interaction features comprise 3-order interaction features, if N is equal to 4, N-order interaction features comprise 3-order interaction features, 4-order interaction features and 5-order interaction features, and the like), and then the credit risk classification of the user can be predicted by using the features corresponding to the respective data related to the credit of the user, the second-order interaction features and the N-order interaction features.
However, the inventors have found that the accuracy of the credit risk classification of the user predicted using the respective data related to the credit of the user, the second order interaction feature, and the N-order interaction feature is lower than the accuracy of the credit risk classification of the user predicted using the respective data related to the credit of the user, and the second order interaction feature.
The inventors have also tried to analyze the reasons for "the accuracy of the credit risk classification of the user predicted using the respective data of the credit-related to the user, the second-order interaction feature, and the N-order interaction feature is lower and lower than the accuracy of the credit risk classification of the user predicted using the respective data of the credit-related to the user, and the second-order interaction feature".
For example, the inventors use the respective corresponding features of the user's credit-related data and the different N-th (e.g., 3 rd order, 4 th order, 5 th order, etc.) interaction features to predict the user's credit risk classification, respectively.
And it is found through testing that: the accuracy of credit risk classification of the user, which is respectively predicted by using the corresponding characteristics of each data related to the credit of the user and the different N-order (including 3-order, 4-order, 5-order and the like) interaction characteristics, is different.
It can then be found that: the influence of different N-order (including 3-order, 4-order, 5-order and the like) interaction features on the accuracy of the credit risk classification of the predicted user is different, the influence of some N-order interaction features on the accuracy of the credit risk classification of the predicted user is positive and different from each other, and the influence of other N-order interaction features on the accuracy of the credit risk classification of the predicted user is negative and different from each other.
It can be seen that the negative effects of the other N-order interaction features negatively cancel the positive effects of some N-order interaction features, and even sometimes the negative effects of the total of other N-order interaction features are larger than the positive effects of the total of some N-order interaction features, so that the accuracy of the credit risk classification of the user predicted by the respective data related to the user's credit, the second-order interaction features and the N-order interaction features is lower than the accuracy of the credit risk classification of the user predicted by the respective data related to the user's credit and the second-order interaction features.
In view of this, the inventors contemplate the manner of the present application: weights may be set for different N-order interaction features, respectively, e.g., the weight of the N-order interaction feature with more positive influence may be set higher appropriately, so that the N-order interaction feature with more positive influence has a larger contribution to the credit risk classification of the predicted user, the weight of the N-order interaction feature with less positive influence may be set lower appropriately, so that the N-order interaction feature with less positive influence has a smaller contribution to the credit risk classification of the predicted user, the weight of the N-order interaction feature with negative influence may be set very low appropriately, e.g., 0 or close to 0, etc., so that the N-order interaction feature with negative influence has a smaller contribution to the credit risk classification of the predicted user, e.g., has no influence or close to no influence, etc., so that the accuracy of the credit risk classification of the predicted user may be improved.
Specifically, referring to fig. 1, a method for training a classification model is shown, where the method is applied to an electronic device, and the electronic device includes a terminal or a server. The terminal may include a desktop computer, a notebook computer, a tablet computer, a cell phone, or the like. The server may be a cloud server, and the server may include a server. Wherein the method comprises the following steps:
in step S101, a plurality of training data sets are acquired, wherein the training data sets include sample data and label data, and the sample data includes a plurality of sample credit information of a sample user; the annotation data comprises annotation credit risk classification of the sample user.
In the present application, the credit information of the user may include a credit attribute of the user, an attribute value of the credit attribute, and the like. The relationship between the credit attribute and the attribute value of the credit attribute may be key-value, or the like.
In one example, the credit attributes of the user may include attributes related to the user's credit or credit, etc., and may include, but are not limited to: the number of applications in the last three months (the number of applications indicating that the user has queried his own credit in the credit query mechanism in the last three months), the number of applications in the last nine months (the number of applications indicating that the user has queried his own credit in the credit query mechanism in the last nine months), the first loan duration (the duration indicating that the user has first been loaned in the loan mechanism from the current time, the duration may be represented in days, etc.), the consumption level (the consumption level indicating that the user has an account in a specific application), the resident province (the resident province indicating that the user has), the resident city (the resident city indicating that the user has), the VIP member (the VIP member indicating that the user has an account in a specific application) the VIP member remaining (the VIP member indicating that the user has an account in a specific application), the point of value (the point of time indicating that the user has a credit in a specific application), the favorite variety (the point of the user has liked in days, e.g., the user has liked a variety program in a specific application), the video has liked in the last half a day, the video has liked in a specific application, the video has been watched in a specific application, etc., the last half a day, the video has liked in a day, etc., the user has liked video has a video has liked in a particular time.
The specific application program may be related to the execution subject electronic device of the present application, for example, the execution subject electronic device of the present application is a service end of a manufacturer, and the manufacturer further develops and issues the application program to the outside, and then the specific application program may be an application program developed by the manufacturer, and so on.
It will be understood, of course, that the credit attribute of the user may be appropriately adjusted according to the actual situation, and other information may be included, without being limited thereto.
For example, for a real user, each credit attribute in the credit information of the real user has an attribute value, for example, assuming that the number of applications in the last three months is 6, the attribute value of the credit attribute "the number of applications in the last three months" is 6, "the number of applications in the last nine months is 12," the attribute value of the credit attribute "the number of applications in the last nine months" is 12, "the first loan duration is 365 days, the attribute value of the credit attribute" the first loan duration "is 365 days," the consumption level is a, "the attribute value of the credit attribute" consumption level "is" a, "the resident" is Jiangsu province, "the attribute value of the credit attribute" resident "is" Jiangsu province, "the resident" is Nanjing city, "the attribute value of the credit attribute" resident "is" Nanjing city ", the credit attribute" VIP member "has an attribute value of" yes ", the member rank is v5, the credit attribute" member rank "has an attribute value of" v5", the member remains for 100 days, the credit attribute" member remains "has an attribute value of" 100 days ", the integrated value is 900, the credit attribute" integrated value "has an attribute value of" 900", the favorite variety is a running bar and a limit challenge, the credit attribute" favorite variety "has an attribute value of" running bar "and a limit challenge", the video viewing time period per day is 6 to 10 hours, the credit attribute "video viewing time period per day" has an attribute value of "6 to 10 hours", the last half year consumption is 99 yuan, and the credit attribute "last half year consumption" has an attribute value of "99 yuan".
The credit attribute (or sample credit attribute) may be set in the electronic device in advance by a worker, or the like.
Thus, the electronic device can acquire the credit attribute set in the electronic device in advance by the staff and serve as the sample credit attribute.
Sample users may then be screened, including users who interacted with the electronic device during the history or interacted with the application program to form their own historical behavior data, and the like.
The attribute values of the sample credit attributes of the sample user can be obtained according to the historical behavior data of the user, and the sample credit information of the sample user is generated according to the sample credit attributes and the attribute values of the sample credit attributes of the sample user, for example, the sample credit attributes and the attribute values of the sample credit attributes of the sample user are combined to form the sample credit information of the sample user. Sample credit information of the sample user is then taken as sample data.
And, the labeling credit risk classification of the sample user may be obtained, and the labeling credit risk classification of the sample user may be manually labeled by a staff member, or the like, and it is understood that, without losing generality, the labeling credit risk classification of the sample user may also be automatically obtained by other manners, and the application is not limited thereto. The sample user's labeling credit risk may then be classified as labeling data.
A training data set may then be generated from the sample data and the annotation data.
Wherein one training data set uniquely corresponds to one sample user, i.e. different training data sets are training data sets of different sample users.
And training the model by using training data sets respectively corresponding to a plurality of sample users until the network parameters in the network structure of the model are converged to obtain a classification model.
The credit risk classification of the user may include two classifications or more, and in the case of two classifications, there may be no risk, and the like. Alternatively, in the case of more classifications, there may be included no risk, low risk, medium risk, high risk, and the like. The classification of the actual needs can be divided according to the actual situation, and the application is not limited to this.
In step S102, the model is trained using a plurality of training data sets until network parameters in the network structure of the model converge, resulting in a classification model.
In one embodiment of the present application, the present step may be implemented by the following procedure, including:
1021. the model is used to predict credit risk classifications of sample users based on the sample data.
For example, credit information of the sample user in the sample data is input into the model, so that the model processes the credit information to obtain credit risk classification of the sample user.
The specific process may be found in the following description and will not be described in detail herein.
1022. And determining a loss value according to the loss function, the predicted credit risk classification of the sample user and the labeling credit risk classification of the sample user.
Loss=loss_function(E,Label)。
Where Loss is a Loss value, E represents a predicted credit risk classification of the sample user, label represents a labeled credit risk classification of the sample user, loss_function () represents a Loss function, and may include a cross entropy Loss function, and the like.
1023. And adjusting the network parameters in the model according to the loss value until the network parameters are converged.
The network parameters in the model may be updated iteratively, etc., using a random gradient descent algorithm.
In one embodiment of the present application, referring to fig. 2, the model includes: a feature extraction network, a low-order feature interaction network, a high-order feature interaction network, an attention network, and a classification prediction network.
The input of the model comprises the input of the feature extraction network.
The output end of the feature extraction network is connected with the input end of the low-order feature interaction network, and the output end of the feature extraction network is connected with the input end of the high-order feature interaction network.
The output of the high-order feature interaction network is connected with the input of the attention network.
The output of the attention network is connected to the input of the classification prediction network.
The output end of the low-order characteristic interaction network is connected with the input end of the classification prediction network.
The output of the model comprises the output of the classification prediction network.
The feature extraction network is used for obtaining sample credit features corresponding to the sample credit information of the sample user.
The low-order feature interaction network is used for acquiring sample low-order interaction features among a plurality of sample credit features.
The high-order feature interaction network is used for acquiring a plurality of sample high-order interaction features of different orders among a plurality of sample credit features.
In this application, the lower order is different from the higher order.
In one example, the low order includes 2 orders, the high order includes 3 orders, 4 orders, 5 orders, orders greater than 5, and so on.
In one example, the low order includes 2 and 3 orders, the high order includes 4, 5, and more than 5 orders, etc.
The attention network is used for acquiring sample attention weights corresponding to each sample high-order interaction characteristic; and respectively weighting each sample high-order interaction feature by using the sample attention weight corresponding to each sample high-order interaction feature to obtain a sample weighting feature corresponding to each sample high-order interaction feature.
The classification prediction network is used for predicting credit risk classification of the sample user according to the sample low-order interaction characteristics among the plurality of sample credit characteristics and the sample weighting characteristics corresponding to each sample high-order interaction characteristic.
Sample attention weights corresponding to different sample high order interaction features are not all the same.
Included in the attention network is a graph importance aware layer (Graph Importance Aware Layer), etc.
Further, in another embodiment of the present application, referring to fig. 3, a classification prediction network includes: a feature aggregation layer and a classification prediction layer.
The input end of the classification prediction network comprises the input end of the characteristic aggregation layer, the output end of the characteristic aggregation layer is connected with the input end of the classification prediction layer, and the output end of the classification prediction network comprises the output end of the classification prediction layer.
The feature aggregation layer is used for aggregating sample low-order interaction features among the sample credit features and sample weighting features corresponding to the sample high-order interaction features to obtain sample aggregation features. Aggregation includes feature addition, feature end-to-end stitching, and the like.
The classification prediction layer is used for predicting credit risk classification of the sample user according to the sample aggregation characteristics.
The classification prediction layer may include a logistic regression function, a normalized exponential function, a fully connected layer or an activation function, etc., including sigmoid, softmax (soft max) or ReLU, etc., for example.
In one example, the classification prediction layer may process the aggregate features using MLP (Multilayer Perceptron, multi-layer perceptron) to obtain a first intermediate feature, then process the first intermediate feature using an activation function tanh to obtain a second intermediate feature, and then process the second intermediate feature using Softmax/Sigmoid or ReLU to obtain the credit risk classification of the sample user.
Further, in another embodiment of the present application, referring to fig. 4, the low-order feature interaction network includes a product layer and a summation layer.
The input of the low-order feature interaction network comprises the input of the product layer. The output end of the product layer is connected with the input end of the summation layer, and the output end of the low-order characteristic interaction network comprises the output end of the summation layer.
The product layer is used to calculate a product between each two of the plurality of sample credit features.
The summation layer is used for summing products between the credit features of at least every two samples to obtain the low-order interaction features of the samples.
The product between credit features includes an inner product (e.g., an inner product between vectors, etc.) or a Hadamard (Hadamard) product, etc.
Further, in another embodiment of the present application, referring to fig. 5, the feature extraction network includes: a single thermal coding layer, an embedded layer, and a multi-headed self-attention layer.
The input end of the characteristic extraction network comprises an input end of a single-heat coding layer, the output end of the single-heat coding layer is connected with the input end of an embedded layer, the output end of the embedded layer is connected with the input end of a multi-head self-attention layer, and the output end of the characteristic extraction network comprises the output end of the self-attention layer.
And the independent heat coding layer is used for respectively carrying out independent heat coding on the credit information of each sample to obtain sample sparse features respectively corresponding to the credit information of each sample.
The embedding layer is used for carrying out embedding operation on sample sparse features corresponding to the credit information of each sample to obtain sample dense features corresponding to the credit information of each sample.
And the multi-head self-attention layer carries out multi-head self-attention weighting on the sample dense features corresponding to the credit information of each sample respectively to obtain the credit features of the samples corresponding to the credit information of each sample respectively.
The one-hot encoded layer may include one-hot, etc.
The embedded layer may include Field-aware Embedding Layer, etc.
The Multi-headed Self-attention Layer may include a Multi-headed Self-attention Layer or the like.
Further, in another embodiment of the present application, referring to fig. 6, a high-level feature interaction network includes an interaction relationship information layer and a cyclic update layer.
The inputs of the high-order feature interaction network comprise inputs of an interaction relation information layer. The output end of the interactive relation information layer is connected with the input end of the cyclic update layer, and the output end of the high-order characteristic interactive network comprises the output end of the cyclic update layer.
The interactive relation information layer is used for acquiring sample initialization interactive relation information among a plurality of sample credit features.
The cyclic updating layer is used for sequentially carrying out cyclic updating on the sample initialization interaction relation information among the plurality of sample credit features for a plurality of rounds to obtain a plurality of sample high-order interaction features with different orders.
For example, the cyclic update layer is configured to sequentially perform multiple rounds of cyclic update on the sample initialization interaction relationship information between the plurality of sample credit features, so as to obtain sample interaction relationship information after each round of update, and respectively serve as sample high-order interaction features of different orders.
In the present application, the classification model obtained by training may be applied to different application scenarios (for example, take-away scenario, credit scenario, etc.), so in the present application, the network structure of the classification model may be constructed based on actual requirements, and the network structure of the classification model applicable to different application scenarios may be different.
In the present application, the network structure of the classification model shown in fig. 2-6 is illustrated, but is not intended to limit the scope of the present application.
In the present application, after the network structure of the classification model is obtained, the model may be trained from the training dataset. During the training process, the respective sample credit information of the sample user in one sample data may be input into the feature extraction network of the model.
The feature extraction network can acquire sample credit features corresponding to each sample credit information of the sample user respectively, and concretely, the independent heat coding layer in the feature extraction network can perform independent heat coding on each sample credit information respectively to acquire sample sparse features corresponding to each sample credit information respectively; the embedding layer in the feature extraction network can conduct embedding operation on sample sparse features corresponding to each sample credit information respectively to obtain sample dense features corresponding to each sample credit information respectively; the multi-head self-attention layer in the feature extraction network can carry out multi-head self-attention weighting on the sample dense features corresponding to the sample credit information respectively to obtain the sample credit features corresponding to the sample credit information respectively. And then respectively inputting the sample credit characteristics corresponding to the sample credit information of the sample user into the low-order characteristic interaction network and the high-order characteristic interaction network.
The low-level feature interaction network may obtain sample low-level interaction features between a plurality of sample credit features. Specifically, a product layer in the low-order feature interaction network may calculate a product between each two of the plurality of sample credit features of the sample user; the summation layer in the low-order feature interaction network may then sum the products between at least two sample credit features to obtain sample low-order interaction features. Low-order sample interaction features between the plurality of sample credit features are then input into the classification prediction network.
The high-order feature interaction network may obtain a plurality of different orders of sample high-order interaction features between a plurality of sample credit features. Specifically, the interaction relation information layer in the high-order feature interaction network can acquire sample initialization interaction relation information among a plurality of sample credit features; the cyclic updating layer in the high-order feature interaction network can sequentially perform cyclic updating on the sample initialization interaction relation information among the plurality of sample credit features for multiple rounds to obtain a plurality of sample high-order interaction features with different orders. Sample high-order interaction features of a plurality of different orders between the plurality of sample credit features are then entered into the attention network.
The attention network can acquire sample attention weights corresponding to each sample high-order interaction characteristic; respectively weighting each sample high-order interaction feature by using the sample attention weight corresponding to each sample high-order interaction feature to obtain a sample weighting feature corresponding to each sample high-order interaction feature; and inputting the sample weighted characteristics corresponding to the high-order interaction characteristics of each sample into the classification prediction network.
The classification prediction network may predict a credit risk classification of the sample user based on sample low-order interaction features between the plurality of sample credit features and sample weighted features corresponding to each sample high-order interaction feature. Specifically, a feature aggregation layer in the classification prediction network can aggregate sample low-order interaction features among the credit features of each sample and sample weighted features corresponding to the high-order interaction features of each sample to obtain sample aggregation features; a classification prediction layer in the classification prediction network may predict a credit risk classification for the sample user based on the sample aggregate characteristics.
The network parameters in the network structure in the model may then be adjusted by means of the loss function and based on the predicted credit risk classification of the sample user and the labeling credit risk classification of the sample user in the labeling data.
The contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be learned through the attention mechanism, so that the contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be set to be very low, for example, 0 or close to 0, for the contribution degree of each higher-order interaction feature with more contribution degree can be appropriately set to be higher, so that the contribution degree of each higher-order interaction feature with more positive effects to the credit risk classification of the predicted user is larger, the contribution degree of each higher-order interaction feature with less positive effects can be appropriately set to be lower, so that the contribution degree of each higher-order interaction feature with less positive effects to the credit risk classification of the predicted user is smaller, for example, 0 or close to 0, and the like, so that the contribution degree of each higher-order interaction feature with less negative effects to the credit risk classification of the predicted user is very small, for example, the contribution degree of each higher-order interaction feature with less negative effects can be sufficiently improved through the attention mechanism, and the accuracy of the credit risk classification can be further improved according to the attention mechanism.
After the classification model is obtained, the classification model can be used on line. For example, in a scenario where a user needs to pay a loan, it is necessary to determine a credit risk classification of the user, predict the credit risk classification of the user based on the credit risk classification of the user, and then decide whether to pay a loan to the user or not according to the credit risk classification of the user.
In the scenario of determining a credit risk classification for a user, credit information for the user may be obtained, which may include a plurality of credit attributes used and attribute values for the respective credit attributes, and then the credit risk classification for the user may be predicted based on the trained classification model and from the credit information, e.g., the plurality of credit information for the user may be input into the trained classification model resulting in a classification model predicting the credit risk classification for the user from the plurality of credit information for the user.
The process of predicting the credit risk classification of the user according to the multiple credit information of the user by the classification model can be referred to as an embodiment shown in fig. 7.
For example, referring to fig. 7, a method for predicting credit risk classification is shown, where the method is applied to an electronic device, and the electronic device includes a terminal or a server. The terminal may include a desktop computer, a notebook computer, a tablet computer, a cell phone, or the like. The terminal may be located in a financial institution with loans issued to the outside, and the server may be a cloud server or the like, and the server may include a server or the like. Wherein the method comprises the following steps:
In step S201, a plurality of credit information of the user is acquired.
One credit information of a user includes one or more credit attributes of the user and an attribute value of the credit attribute of the user.
The plurality of credit information of the user includes a plurality of credit attributes of the user and attribute values of the respective credit attributes of the user.
The plurality of credit attributes includes credit attributes of at least two credit authorities.
In this application, credit authorities include credit authorities and the like, e.g. credit authorities may include authorities and the like having the qualification to issue loans, e.g. banks or loan companies and the like.
For any credit institution, the credit attributes of the credit institution include: the credit agency needs to consider the credit attributes of the user when the credit agency needs to predict the credit risk classification of the user.
The credit attributes of different credit mechanisms may not be identical, so that the credit attributes of each credit mechanism may be collected in advance, then the credit attributes of each credit mechanism may be summarized, and the credit attributes of each credit mechanism may be aggregated and de-duplicated to implement statistics of the required credit attributes, so that a plurality of counted credit attributes may be obtained, then the attribute value of each counted credit attribute of the user may be obtained, and according to the attribute value of each counted credit attribute and the attribute value of each counted credit attribute of the user, a plurality of credit information of the user may be obtained, for example, the attribute value of each counted credit attribute and the attribute value of each counted credit attribute of the user may be combined into a plurality of credit information of the user.
For example, for any credit attribute that has been counted, the credit attribute may be combined with the attribute value of the credit attribute of the user to obtain one credit information of the user, and the same is true for each other credit attribute that has been counted.
Users include online users, e.g., users who need loans, etc.
The explanation about the credit attribute and the attribute value of the credit attribute can be found in the description of step S101 in the foregoing embodiment, and will not be described in detail here.
Because the classification model is trained and deployed on the line, in this step, in a scenario where the credit risk classification of the user needs to be predicted, the classification model may be used, for example, to input a plurality of pieces of credit information of the user into the classification model, so that the classification model predicts the credit risk classification of the user according to the plurality of pieces of credit information of the user, obtains the credit risk classification of the user, and outputs the credit risk classification of the user, and the electronic device may obtain the credit risk classification of the user output by the classification model.
The process of "predicting the credit risk classification of the user based on the plurality of credit information of the user" in the interior of the classification model may include the flow of steps S202 to S205.
In step S202, the credit characteristics corresponding to the respective credit information of the user are acquired.
In this application, this step may be implemented by the following procedure, including:
2021. and performing independent thermal coding on each credit information to obtain sparse features corresponding to each credit information.
For example, sparse vectors like [1,0, …,0], [0,1, … 0], [0,1, … 0], [0, … 1] are obtained, etc.
The one-hot encoding may include one-hot encoding, etc.
2022. And embedding the sparse features corresponding to the credit information respectively to obtain dense features corresponding to the credit information respectively.
The dense features may include dense vectors, etc.
The embedding operation may be performed using an embedding layer, which may include Field-aware Embedding Layer, etc.
The dense features corresponding to the respective credit information can be regarded as e= [ E1, E2, E3, …, em ]; "e1, e2, e3, …, em" are dense vectors corresponding to the respective credit information.
The embedding operation in the present application may refer to an embedding operation that already exists at present, and will not be described in detail herein.
2023. And carrying out multi-head self-attention weighting on the dense features corresponding to the credit information respectively to obtain the credit features corresponding to the credit information respectively.
Carrying out multi-head self-attention weighting on dense features corresponding to each credit information respectively to obtain hidden state features corresponding to each credit information respectively; and then obtaining the credit characteristics corresponding to the credit information according to the hidden state characteristics corresponding to the credit information.
Multi-headed self-attention may include: multi-head Self-section, etc.
The multi-headed self-attention weighting operation in this application may be referred to as a multi-headed self-attention weighting operation that is currently already present and will not be described in detail herein.
In step S203, low-order interaction features among the plurality of credit features are acquired, a plurality of different-order high-order interaction features among the plurality of credit features are acquired, and attention weights corresponding to the respective high-order interaction features are acquired respectively.
In one embodiment, in the case where the low order is 2 nd order, when obtaining the low order interaction feature between the plurality of credit features, a product between each two of the plurality of credit features may be calculated; at least the products between every two credit features are summed to obtain a low-order interaction feature. Alternatively, the multiple credit features and the products between every two credit features are summed to obtain the low-order interaction feature.
In another embodiment, in the case that the low order is 3 rd order, when the low order interaction feature between the plurality of credit features is acquired, a product between each two credit features of the plurality of credit features of the user may be calculated; calculating a product between each three of the plurality of credit features of the user; at least the products between every two credit features and the products between every three credit features are summed to obtain a low-order interaction feature. Alternatively, the multiple credit features, the product between every two credit features, and the product between every three credit features are summed to obtain the low-order interaction feature.
The product between credit features includes an inner product (e.g., an inner product between vectors, etc.) or a Hadamard (Hadamard) product, etc.
When a plurality of different-order high-order interaction features among a plurality of credit features are acquired, initializing interaction relation information among the plurality of credit features can be acquired; for example, a feature graph is constructed, each credit feature is a vertex in the graph, and an edge between two credit features represents interaction information between the two credit features. For example, in one example, assume that a number of credits is 4, each h 1 、h 2 、h 3 H 4 . The constructed signature may be as shown in fig. 8.
And then sequentially carrying out multiple rounds of cyclic updating on the initialized interaction relation information among the plurality of credit features to obtain a plurality of high-order interaction features with different orders.
For example, see fig. 9 and 10, which are illustrated as an example, but not as a limitation on the scope of the present application.
4 credit features h 1 、h 2 、h 3 H 4 State feature h= [ H ] constituting feature map 1 ,h 2 ,h 3 ,h 4 ]Which can also be regarded as a first order interaction feature
Figure BDA0004123205470000162
The lower corner mark represents the identification of the feature, and the upper corner mark represents the number of rounds of cyclic updating.
From first order interaction features
Figure BDA0004123205470000163
The process of starting a plurality of rounds of loop updates in sequence is shown in fig. 9.
Shown in FIG. 9 is a secondary first order interaction feature
Figure BDA0004123205470000164
Iteration is circulated to t-order interaction characteristics
Figure BDA0004123205470000165
From t-th order interaction feature->
Figure BDA0004123205470000166
Iteration is circularly carried out to t+1 order interaction characteristics->
Figure BDA0004123205470000167
From t+1 order interaction feature->
Figure BDA0004123205470000168
Iteration of the loop to T-th order interaction feature>
Figure BDA0004123205470000169
The loop iterations of the above examples are illustrated by one example, but are not limiting to the scope of the present application. For example, for the slave
Figure BDA00041232054700001610
Iterating through the loop to->
Figure BDA00041232054700001611
For the procedure of (a), see fig. 10. In fig. 10 +.>
Figure BDA00041232054700001612
And +.>
Figure BDA00041232054700001613
Calculate summary features- >
Figure BDA00041232054700001614
: to summarize features->
Figure BDA00041232054700001615
And->
Figure BDA00041232054700001616
Updating the features with the GRU (Gated Recueerent Unit, gating loop unit) for input; the initial state vector +.>
Figure BDA00041232054700001619
Adding the updated characteristics of the GRU to obtain +.>
Figure BDA00041232054700001617
. Finally, after iteration through a T-round loop, the +.>
Figure BDA00041232054700001618
As such, each credit feature interacts with other credit features by T rounds, respectively. In fig. 10, W1, W2, and W3 are parameter matrices and the like.
The present application uses loop iterations of feature maps to simulate higher order interactions.
In step S204, the attention weights corresponding to the higher-order interaction features are used to weight the higher-order interaction features, respectively, so as to obtain weighted features corresponding to the higher-order interaction features.
The attention weights corresponding to the various higher order interaction features may not be all the same.
Specifically, the high-order interaction features may be weighted according to the following formula to obtain weighted features GIA (H) m ):
Figure BDA0004123205470000161
Figure BDA0004123205470000171
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0004123205470000172
representing the respective credit features of feature i at the t-th round of graph network iteration, F () represents the feed-forward network function, k represents the unbedding dimension of the hidden vector,<>representing the vector inner product.
The feed-forward network functions include MLP functions, etc.
In step S205, the credit risk classification of the user is predicted according to the low-order interaction features among the plurality of credit features and the weighted features corresponding to the respective high-order interaction features.
In the application, the low-order interaction features among the credit features and the weighted features corresponding to the high-order interaction features can be aggregated to obtain the aggregated features, and then credit risk classification of the user is predicted according to the aggregated features.
In one embodiment, logistic regression functions, normalized exponential functions, full-join layer or activation functions, etc., may be used, including, for example, sigmoid, softmax (soft max) or ReLU, etc.
In one example, the aggregate features may be processed using MLP to obtain a first intermediate feature, then the first intermediate feature is processed using an activation function tanh to obtain a second intermediate feature, and then the second intermediate feature is processed using Softmax/Sigmoid or ReLU to obtain a credit risk classification for the user.
In the application, a plurality of credit information of a user is acquired; acquiring credit characteristics corresponding to each credit information of the user; acquiring low-order interaction features among a plurality of credit features, acquiring a plurality of different-order high-order interaction features among the plurality of credit features, and acquiring attention weights corresponding to the high-order interaction features; respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighted feature corresponding to each higher-order interaction feature; and predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
The contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be obtained through the attention mechanism, for example, the weight of each higher-order interaction feature is obtained, for example, the weight of each higher-order interaction feature with higher contribution degree is appropriately higher, so that the contribution degree of each higher-order interaction feature with higher positive influence to the credit risk classification of the predicted user is larger, the weight of each higher-order interaction feature with lower positive influence is appropriately lower, so that the contribution degree of each higher-order interaction feature with lower positive influence to the credit risk classification of the predicted user is smaller, for example, the weight of each higher-order interaction feature with lower negative influence can be appropriately lower, for example, 0 or close to 0, so that the contribution degree of each higher-order interaction feature with lower negative influence to the credit risk classification of the predicted user is extremely smaller, for example, the attention weight corresponding to each higher-order interaction feature is respectively weighted, so that the attention weight of each higher-order interaction feature with higher influence can be accurately provided, for example, the credit risk classification can be predicted by using the attention mechanism, and the accuracy of the credit risk classification can be improved according to the attention mechanism.
It should be noted that, for the sake of simplicity of description, the method embodiments are all described as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may take place in other order or simultaneously in accordance with the present application. Further, those skilled in the art will appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts referred to are not necessarily required for the present application.
Referring to fig. 11, there is shown a block diagram of an apparatus for predicting credit risk classification of the present application, the apparatus comprising:
a first obtaining module 11, configured to obtain a plurality of credit information of a user;
an input module 12, configured to input a plurality of credit information of the user into the trained classification model, to obtain a credit risk classification of the user predicted by the classification model according to the plurality of credit information of the user;
the classification model includes:
the first acquisition sub-module is used for acquiring credit characteristics corresponding to the credit information of the user respectively;
the system comprises a second acquisition sub-module, a third acquisition sub-module and a fourth acquisition sub-module, wherein the second acquisition sub-module is used for acquiring low-order interaction characteristics among a plurality of credit characteristics, the third acquisition sub-module is used for acquiring a plurality of different-order high-order interaction characteristics among the plurality of credit characteristics, and the fourth acquisition sub-module is used for acquiring attention weights corresponding to the high-order interaction characteristics;
The weighting sub-module is used for respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighting feature corresponding to each higher-order interaction feature;
and the prediction sub-module is used for predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
In an alternative implementation, the prediction submodule includes:
the aggregation unit is used for aggregating the low-order interaction features among the credit features and the weighting features corresponding to the high-order interaction features to obtain aggregation features;
and the prediction unit is used for predicting credit risk classification of the user according to the aggregation characteristics.
In an alternative implementation, the second obtaining submodule includes:
a calculation unit for calculating a product between each two of the plurality of credit features;
and the summation unit is used for summing products between every two credit features at least to obtain low-order interaction features.
In an alternative implementation, the third obtaining submodule includes:
the acquisition unit is used for acquiring initialized interaction relation information among the plurality of credit features;
And the cyclic updating unit is used for sequentially carrying out cyclic updating on the initialized interaction relation information among the plurality of credit features for a plurality of rounds to obtain a plurality of high-order interaction features with different orders.
In an alternative implementation, the first obtaining submodule includes:
the encoding unit is used for performing independent thermal encoding on each credit information to obtain sparse features corresponding to each credit information;
the embedding unit is used for carrying out embedding operation on the sparse features corresponding to the credit information respectively to obtain dense features corresponding to the credit information respectively;
and the weighting unit is used for carrying out multi-head self-attention weighting on the dense features corresponding to the credit information respectively to obtain the credit features corresponding to the credit information respectively.
In the application, a plurality of credit information of a user is acquired; acquiring credit characteristics corresponding to each credit information of the user; acquiring low-order interaction features among a plurality of credit features, acquiring a plurality of different-order high-order interaction features among the plurality of credit features, and acquiring attention weights corresponding to the high-order interaction features; respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighted feature corresponding to each higher-order interaction feature; and predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
The contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be obtained through the attention mechanism, for example, the weight of each higher-order interaction feature is obtained, for example, the weight of each higher-order interaction feature with higher contribution degree is appropriately higher, so that the contribution degree of each higher-order interaction feature with higher positive influence to the credit risk classification of the predicted user is larger, the weight of each higher-order interaction feature with lower positive influence is appropriately lower, so that the contribution degree of each higher-order interaction feature with lower positive influence to the credit risk classification of the predicted user is smaller, for example, the weight of each higher-order interaction feature with lower negative influence can be appropriately lower, for example, 0 or close to 0, so that the contribution degree of each higher-order interaction feature with lower negative influence to the credit risk classification of the predicted user is extremely smaller, for example, the attention weight corresponding to each higher-order interaction feature is respectively weighted, so that the attention weight of each higher-order interaction feature with higher influence can be accurately provided, for example, the credit risk classification can be predicted by using the attention mechanism, and the accuracy of the credit risk classification can be improved according to the attention mechanism.
Referring to fig. 12, there is shown a block diagram of an apparatus for training a classification model according to the present application, the apparatus comprising:
a second obtaining module 21, configured to obtain a plurality of training data sets, where the training data sets include sample data and label data, and the sample data includes a plurality of sample credit information of a sample user; the labeling data comprises labeling credit risk classification of the sample user;
a training module 22, configured to train the model using the plurality of training data sets until network parameters in a network structure of the model converge, to obtain a classification model;
the model comprises:
the system comprises a feature extraction network, a low-order feature interaction network, a high-order feature interaction network, an attention network and a classification prediction network;
the feature extraction network is used for obtaining sample credit features corresponding to the sample credit information of the sample user respectively;
the low-order feature interaction network is used for acquiring sample low-order interaction features among a plurality of sample credit features;
the high-order feature interaction network is used for acquiring a plurality of sample high-order interaction features of different orders among a plurality of sample credit features;
the attention network is used for acquiring sample attention weights corresponding to each sample high-order interaction characteristic; respectively weighting each sample high-order interaction feature by using the sample attention weight corresponding to each sample high-order interaction feature to obtain a sample weighting feature corresponding to each sample high-order interaction feature;
The classification prediction network is used for predicting credit risk classification of the sample user according to the sample low-order interaction characteristics among the plurality of sample credit characteristics and the sample weighting characteristics corresponding to each sample high-order interaction characteristic.
The contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be learned through the attention mechanism, so that the contribution degree of each higher-order interaction feature to the credit risk classification of the predicted user can be set to be very low, for example, 0 or close to 0, for the contribution degree of each higher-order interaction feature with more contribution degree can be appropriately set to be higher, so that the contribution degree of each higher-order interaction feature with more positive effects to the credit risk classification of the predicted user is larger, the contribution degree of each higher-order interaction feature with less positive effects can be appropriately set to be lower, so that the contribution degree of each higher-order interaction feature with less positive effects to the credit risk classification of the predicted user is smaller, for example, 0 or close to 0, and the like, so that the contribution degree of each higher-order interaction feature with less negative effects to the credit risk classification of the predicted user is very small, for example, the contribution degree of each higher-order interaction feature with less negative effects can be sufficiently improved through the attention mechanism, and the accuracy of the credit risk classification can be further improved according to the attention mechanism.
The embodiment of the application also provides a non-volatile readable storage medium, where one or more modules (programs) are stored, where the one or more modules are applied to a device, and the device may be caused to execute instructions (instractions) of each method step in the embodiment of the application.
Embodiments of the present application provide one or more machine-readable media having instructions stored thereon that, when executed by one or more processors, cause an electronic device to perform a method as in one or more of the embodiments described above. In the embodiment of the application, the electronic device includes a server, a gateway, a sub-device, and the sub-device is an internet of things device.
Embodiments of the present disclosure may be implemented as an apparatus for performing a desired configuration using any suitable hardware, firmware, software, or any combination thereof, which may include a server (cluster), a terminal device, such as an IoT device, or the like.
Fig. 13 schematically illustrates an example apparatus 1300 that may be used to implement various embodiments in the present application.
For one embodiment, fig. 13 illustrates an example apparatus 1300 having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM)/storage 1308 coupled to the control module 1304, one or more input/output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.
The processor 1302 may include one or more single-core or multi-core processors, and the processor 1302 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1300 can be used as a gateway or other server device in embodiments of the present application.
In some embodiments, the apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM/storage 1308) having instructions 1314 and one or more processors 1302 combined with the one or more computer-readable media configured to execute the instructions 1314 to implement the modules to perform actions in the present disclosure.
For one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1302 and/or any suitable device or component in communication with the control module 1304.
The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller modules may be hardware modules, software modules, and/or firmware modules.
Memory 1306 may be used to load and store data and/or instructions 1314 for device 1300, for example. For one embodiment, memory 1306 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1306 may include double data rate four synchronous dynamic random access memory (DDR 4 SDRAM).
For one embodiment, the control module 1304 may include one or more input/output controllers to provide interfaces to the NVM/storage 1308 and the input/output device(s) 1310.
For example, NVM/storage 1308 may be used to store data and/or instructions 1314. NVM/storage 1308 may include any suitable nonvolatile memory (e.g., flash memory) and/or may include any suitable nonvolatile storage device(s) (e.g., hard disk drive(s) (HDD), compact disk drive(s) (CD) and/or digital versatile disk drive (s)).
NVM/storage 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or may be accessible by the device without necessarily being part of the device. For example, NVM/storage 1308 may be accessed over a network via input/output device(s) 1310.
Input/output device(s) 1310 may provide an interface for apparatus 1300 to communicate with any other suitable device, input/output device 1310 may include a communication component, pinyin component, sensor component, and the like. The network interface 1312 may provide an interface for the device 1300 to communicate over one or more networks, and the device 1300 may communicate wirelessly with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic of one or more controllers (e.g., memory controller modules) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be packaged together with logic of one or more controllers of the control module 1304 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same mold as logic of one or more controllers of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with logic of one or more controllers of the control module 1304 to form a system on chip (SoC).
In various embodiments, apparatus 1300 may be, but is not limited to being: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, the apparatus 1300 may have more or fewer components and/or different architectures. For example, in some embodiments, apparatus 1300 includes one or more cameras, a keyboard, a Liquid Crystal Display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an Application Specific Integrated Circuit (ASIC), and a speaker.
The embodiment of the application provides electronic equipment, which comprises: one or more processors; and one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform the method as one or more of the present application.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable information processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information processing terminal apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable information processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present embodiments have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or terminal device comprising the element.
The above description of a method and apparatus for predicting credit risk classification, a method and apparatus for training a classification model, and a classification model provided in the present application applies specific examples to illustrate the principles and embodiments of the present application, where the above examples are only used to help understand the method and core ideas of the present application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the contents of the present specification should not be construed as limiting the present application in summary.

Claims (13)

1. A method of predicting credit risk classification, the method comprising:
acquiring a plurality of credit information of a user;
inputting a plurality of credit information of the user into a trained classification model to obtain credit risk classification of the user predicted by the classification model according to the plurality of credit information of the user;
the classification model predicts the credit risk classification of the user according to the plurality of credit information of the user, and comprises the following steps:
acquiring credit characteristics corresponding to each credit information of the user;
acquiring low-order interaction features among a plurality of credit features, acquiring a plurality of different-order high-order interaction features among the plurality of credit features, and acquiring attention weights corresponding to the high-order interaction features;
respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighted feature corresponding to each higher-order interaction feature;
and predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
2. The method according to claim 1, wherein predicting the credit risk classification of the user based on the low-order interaction features among the plurality of credit features and the weighted features corresponding to the respective high-order interaction features comprises:
The low-order interaction features among the credit features and the weighting features corresponding to the high-order interaction features are aggregated to obtain aggregated features;
and predicting credit risk classification of the user according to the aggregation characteristics.
3. The method of claim 1, wherein the obtaining low-level interaction features between a plurality of credit features comprises:
calculating a product between each two of the plurality of credit features;
at least the products between every two credit features are summed to obtain a low-order interaction feature.
4. The method of claim 1, wherein the obtaining a plurality of different orders of higher order interaction features between a plurality of credit features comprises:
acquiring initialized interaction relation information among a plurality of credit features;
and sequentially carrying out multiple rounds of cyclic updating on the initialized interaction relation information among the plurality of credit features to obtain a plurality of high-order interaction features with different orders.
5. The method according to claim 1, wherein the obtaining the credit characteristics corresponding to the respective credit information of the user includes:
performing independent thermal coding on each credit information to obtain sparse features corresponding to each credit information;
Embedding the sparse features corresponding to the credit information respectively to obtain dense features corresponding to the credit information respectively;
and carrying out multi-head self-attention weighting on the dense features corresponding to the credit information respectively to obtain the credit features corresponding to the credit information respectively.
6. A method of training a classification model, the method comprising:
acquiring a plurality of training data sets, wherein the training data sets comprise sample data and labeling data, and the sample data comprise a plurality of sample credit information of a sample user; the labeling data comprises labeling credit risk classification of the sample user;
training the model by using a plurality of training data sets until network parameters in a network structure of the model are converged to obtain a classification model;
the model comprises:
the system comprises a feature extraction network, a low-order feature interaction network, a high-order feature interaction network, an attention network and a classification prediction network;
the feature extraction network is used for obtaining sample credit features corresponding to the sample credit information of the sample user respectively;
the low-order feature interaction network is used for acquiring sample low-order interaction features among a plurality of sample credit features;
the high-order feature interaction network is used for acquiring a plurality of sample high-order interaction features of different orders among a plurality of sample credit features;
The attention network is used for acquiring sample attention weights corresponding to each sample high-order interaction characteristic; respectively weighting each sample high-order interaction feature by using the sample attention weight corresponding to each sample high-order interaction feature to obtain a sample weighting feature corresponding to each sample high-order interaction feature;
the classification prediction network is used for predicting credit risk classification of the sample user according to the sample low-order interaction characteristics among the plurality of sample credit characteristics and the sample weighting characteristics corresponding to each sample high-order interaction characteristic.
7. A classification model, the classification model comprising:
the system comprises a feature extraction network, a low-order feature interaction network, a high-order feature interaction network, an attention network and a classification prediction network;
the feature extraction network is used for obtaining credit features corresponding to the credit information of the user respectively;
the low-order feature interaction network is used for acquiring low-order interaction features among the plurality of credit features;
the high-order feature interaction network is used for acquiring a plurality of high-order interaction features of different orders among the plurality of credit features;
the attention network is used for acquiring attention weights corresponding to the high-order interaction features; respectively weighting each higher-order interaction feature by using the attention weight corresponding to each higher-order interaction feature to obtain a weighted feature corresponding to each higher-order interaction feature;
The classification prediction network is used for predicting the credit risk classification of the user according to the low-order interaction features among the plurality of credit features and the weighting features corresponding to the high-order interaction features.
8. The classification model of claim 7, wherein the classification prediction network comprises: a feature aggregation layer and a classification prediction layer;
the feature aggregation layer is used for aggregating the low-order interaction features among the credit features and the weighting features corresponding to the high-order interaction features to obtain aggregation features;
the classification prediction layer is used for predicting credit risk classification of the user according to the aggregation characteristics.
9. The classification model of claim 7, wherein the low-order feature interaction network comprises a product layer and a summation layer;
the product layer is used for calculating the product between every two credit features in the plurality of credit features;
the summation layer is used for summing products between at least every two credit features to obtain low-order interaction features.
10. The classification model of claim 7, wherein the high-order feature interaction network comprises an interaction relationship information layer and a cyclic update layer;
the interactive relation information layer is used for acquiring initialized interactive relation information among a plurality of credit features;
The cyclic updating layer is used for sequentially carrying out cyclic updating on the initialized interaction relation information among the plurality of credit features for a plurality of rounds to obtain a plurality of high-order interaction features with different orders.
11. The classification model of claim 7, wherein the feature extraction network comprises: a single thermal coding layer, an embedded layer, and a multi-headed self-attention layer;
the independent heat coding layer is used for respectively carrying out independent heat coding on each credit information to obtain sparse features respectively corresponding to each credit information;
the embedding layer is used for carrying out embedding operation on sparse features corresponding to each credit information respectively to obtain dense features corresponding to each credit information respectively;
and the multi-head self-attention layer carries out multi-head self-attention weighting on the dense features corresponding to the credit information respectively to obtain the credit features corresponding to the credit information respectively.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 6 when the program is executed by the processor.
13. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN202310234737.9A 2023-03-10 2023-03-10 Method and device for predicting credit risk classification, method and device for training classification model and classification model Pending CN116402597A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310234737.9A CN116402597A (en) 2023-03-10 2023-03-10 Method and device for predicting credit risk classification, method and device for training classification model and classification model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310234737.9A CN116402597A (en) 2023-03-10 2023-03-10 Method and device for predicting credit risk classification, method and device for training classification model and classification model

Publications (1)

Publication Number Publication Date
CN116402597A true CN116402597A (en) 2023-07-07

Family

ID=87011474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310234737.9A Pending CN116402597A (en) 2023-03-10 2023-03-10 Method and device for predicting credit risk classification, method and device for training classification model and classification model

Country Status (1)

Country Link
CN (1) CN116402597A (en)

Similar Documents

Publication Publication Date Title
JP7399269B2 (en) Computer-based systems, computer components and computer objects configured to implement dynamic outlier bias reduction in machine learning models
CN110366734B (en) Optimizing neural network architecture
WO2021120677A1 (en) Warehousing model training method and device, computer device and storage medium
CN110852447A (en) Meta learning method and apparatus, initialization method, computing device, and storage medium
US20210303970A1 (en) Processing data using multiple neural networks
US10783442B1 (en) Demand forecasting via direct quantile loss optimization
CN109993627B (en) Recommendation method, recommendation model training device and storage medium
CN107545301B (en) Page display method and device
US11423051B2 (en) Sensor signal prediction at unreported time periods
CN111401940A (en) Feature prediction method, feature prediction device, electronic device, and storage medium
CN111783810A (en) Method and apparatus for determining attribute information of user
CN111322716A (en) Air conditioner temperature automatic setting method, air conditioner, equipment and storage medium
CN114359563A (en) Model training method and device, computer equipment and storage medium
CN108475346B (en) Neural random access machine
CN112966754B (en) Sample screening method, sample screening device and terminal equipment
CN116542673B (en) Fraud identification method and system applied to machine learning
CN116894721A (en) Index prediction method and device and computer equipment
CN115688002A (en) Classification method and device, method and device for training classification model and classification model
CN116402597A (en) Method and device for predicting credit risk classification, method and device for training classification model and classification model
US20230022253A1 (en) Fast and accurate prediction methods and systems based on analytical models
CN114708081A (en) Credit risk prediction method and device, electronic equipment and readable storage medium
CN115063145A (en) Transaction risk factor prediction method and device, electronic equipment and storage medium
CN114757700A (en) Article sales prediction model training method, article sales prediction method and apparatus
CN114219184A (en) Product transaction data prediction method, device, equipment, medium and program product
CN113361621A (en) Method and apparatus for training a model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination