CN114187009A - Feature interpretation method, device, equipment and medium of transaction risk prediction model - Google Patents
Feature interpretation method, device, equipment and medium of transaction risk prediction model Download PDFInfo
- Publication number
- CN114187009A CN114187009A CN202111559577.2A CN202111559577A CN114187009A CN 114187009 A CN114187009 A CN 114187009A CN 202111559577 A CN202111559577 A CN 202111559577A CN 114187009 A CN114187009 A CN 114187009A
- Authority
- CN
- China
- Prior art keywords
- features
- target
- prediction model
- transaction risk
- feature
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/401—Transaction verification
- G06Q20/4016—Transaction verification involving fraud or risk level assessment in transaction processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Accounting & Taxation (AREA)
- General Physics & Mathematics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computer Security & Cryptography (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a feature interpretation method and a feature interpretation device of a transaction risk prediction model, wherein the method comprises the following steps: acquiring a transaction risk prediction model after training and input characteristics of all training samples corresponding to the transaction risk prediction model; preprocessing the input features to screen out candidate features needing to be explained; determining a first influence of a target feature on a prediction result of the transaction risk prediction model according to a first distribution condition between the target feature relative to all other non-target features in the candidate features; and determining a second influence of a second distribution between any one of the target features relative to any other non-target feature on a prediction result of the transaction risk prediction model.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a characteristic interpretation method, a characteristic interpretation device, characteristic interpretation equipment and characteristic interpretation media of a transaction risk prediction model.
Background
The rapid development of network economy and electronic commerce is convenient for people, and the characteristics of concealment and rapidness are easy to become an important way for transferring illegal funds. Therefore, the method has important significance for identifying and preventing the anti-money laundering problem of the network financial activity. In the prior art, a machine learning model or a neural network model can be trained for predicting transaction risks, but most models belong to 'black box' models, prediction results can be output in a general mode only according to input variables, but an interpretable explanation is lacking on an internal mechanism of how the input variables act on the prediction results of the models in a prediction process, so that theoretical guidance beneficial to model optimization cannot be provided, and the output accuracy of the transaction risk prediction model is influenced.
Disclosure of Invention
The invention aims to provide a technical scheme capable of clearly explaining different influences of input features of a transaction risk prediction model on output prediction results so as to solve the problems in the prior art.
In order to achieve the above object, the present invention provides a feature interpretation method of a transaction risk prediction model, comprising:
acquiring a transaction risk prediction model after training and input characteristics of all training samples corresponding to the transaction risk prediction model;
preprocessing the input features to screen out candidate features needing to be explained;
determining a first influence of a target feature on a prediction result of the transaction risk prediction model according to a first distribution condition between the target feature relative to all other non-target features in the candidate features; and
and determining a second influence of the second distribution situation on the prediction result of the transaction risk prediction model according to a second distribution situation between any one target characteristic relative to any other non-target characteristic.
According to the feature interpretation method provided by the invention, the step of preprocessing the input features to screen out candidate features needing interpretation comprises the following steps:
calculating correlation coefficients among different input features, and deleting the input features of which the correlation coefficients are larger than a first coefficient threshold value;
performing L1 regularization calculation between different input features, and obtaining the sparsification weight of the input features;
and determining the candidate features according to the importance degree of the residual input features.
According to the feature interpretation method provided by the present invention, the step of determining the candidate feature according to the degree of importance of the remaining input features comprises:
determining the degree of importance ranking of the remaining input features to the predictive model using a plurality of feature evaluation algorithms to obtain a plurality of ranked lists;
selecting the top ranked input features from the plurality of ranked lists as the candidate features.
According to the feature interpretation method provided by the invention, the step of determining the first influence effect of the target feature on the prediction result of the transaction risk prediction model according to the first distribution condition between the target feature in the candidate features relative to all other non-target features comprises the following steps:
acquiring a second probability of a second value corresponding to each non-target feature under the first probability of the first value of the target feature;
averaging the second probabilities to obtain second averaged probabilities, and calculating expected values of the first probabilities relative to the second averaged probabilities;
taking the first value and the second value as input data of the transaction risk prediction model to obtain a first prediction result output by the transaction risk prediction model;
and determining the first influence according to the first value and the first prediction result.
According to the feature interpretation method provided by the present invention, the step of determining the first influence according to the first value and the first prediction result includes:
drawing a trend graph according to the first value and the first prediction result;
and determining the marginal effect of the target characteristics on the transaction risk prediction model according to the trend of the trend graph.
According to the feature interpretation method provided by the invention, the step of determining a second influence effect of a second distribution situation on the prediction result of the transaction risk prediction model according to the second distribution situation between any one target feature relative to any other non-target feature comprises the following steps:
obtaining the second distribution according to the training sample, wherein the second distribution comprises the first distribution interval of any one of the target features and the second distribution interval of any one of the other non-target features;
respectively taking the first distribution interval and the second distribution interval as two-dimensional coordinate axes, and drawing a bubble map between any one of the target features and any one of the other non-target features; the area of each bubble represents the corresponding sample number, and the gray value of each bubble represents the prediction result of the transaction risk prediction model;
and determining the causal action relation of the second distribution situation on the prediction result of the transaction risk prediction model according to the bubble map.
According to the feature interpretation method provided by the invention, the method further comprises the following steps:
obtaining a target training sample of interest from all the training samples;
disturbing and sampling the target training sample to obtain a neighborhood training sample;
taking the neighborhood training sample as input data of the transaction risk prediction model to obtain a third prediction result output by the transaction risk prediction model;
and determining a third influence of the target training sample on the prediction result of the transaction risk prediction model according to the third prediction result.
In order to achieve the above object, the present invention further provides a feature interpretation apparatus for a transaction risk prediction model, including:
the characteristic acquisition module is suitable for acquiring a transaction risk prediction model after training and the input characteristics of all training samples corresponding to the transaction risk prediction model;
the preprocessing module is suitable for preprocessing the input features to screen out candidate features needing to be explained;
the marginal influence module is suitable for determining a first influence effect of the target feature on a prediction result of the transaction risk prediction model according to a first distribution condition of the target feature relative to all other non-target features in the candidate features; and
and the interaction influence module is suitable for determining a second influence of a second distribution condition on the prediction result of the transaction risk prediction model according to the second distribution condition of any one target characteristic relative to any other non-target characteristic.
To achieve the above object, the present invention further provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above method.
The characteristic interpretation method, the characteristic interpretation device, the characteristic interpretation equipment and the characteristic interpretation medium of the transaction risk prediction model can realize the quantification and visualization of characteristic influence and provide a technical scheme for deeply understanding a model decision mechanism. The invention can display the marginal effect of any one or more characteristics on the prediction result output by the prediction model by determining the first influence action of the target characteristics on the transaction risk prediction model, thereby explaining whether the relation between the target characteristics and the prediction result is linear, monotonous or other more complex forms. Further, the causal action relation of different distributions between two characteristics to the prediction result can be displayed by determining the second influence action of the second distribution condition between any two characteristics to the prediction result output by the prediction model. By explaining the internal action mechanism of the characteristics, the method can provide effective quantitative guidance for model optimization, so that the prediction accuracy of the transaction risk prediction model is improved.
Drawings
FIG. 1 is a flow chart of a first embodiment of a method for characterizing a transaction risk prediction model according to the present invention;
FIG. 2 is a schematic flow chart illustrating the determination of candidate features according to one embodiment of the present invention;
FIG. 3 is a schematic flow chart of the first effect determination according to the first embodiment of the present invention;
FIG. 4 is a first trend graph of the effect of the first embodiment of the present invention;
FIG. 5 is a bubble diagram of a second influencing action of the first embodiment of the present invention;
FIG. 6 is a flowchart illustrating a process of local training samples according to a first embodiment of the present invention;
FIG. 7 is a schematic diagram of program modules of a first embodiment of a feature interpretation apparatus of the invention;
fig. 8 is a schematic diagram of a hardware configuration of a first embodiment of a feature interpretation apparatus according to the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, the present embodiment provides a feature interpretation method of a transaction risk prediction model, including the following steps:
and S100, acquiring the trained transaction risk prediction model and the input characteristics of all training samples corresponding to the transaction risk prediction model.
The transaction risk prediction model in this embodiment may be obtained based on any existing linear model, decision tree model, or neural network model training. Wherein for a linear model, the weight distribution can be interpreted according to the formula of the model itself; for the tree model, different split points and leaf nodes may be interpreted. The training sample may include a user order record obtained from any e-commerce website, and different information in the order record, such as user age, user gender, user geographic location, transaction product type, transaction amount, etc., may be used as the input feature of this embodiment.
And S200, preprocessing the input features to screen out candidate features needing to be explained.
The purpose of preprocessing the input features is to remove features with high correlation and features with low importance degree, so as to ensure the mutual difference of the model input features, and further select candidate features with more explanatory significance for the subsequent steps. FIG. 2 shows a schematic flow chart of determining candidate features according to an embodiment of the present invention. As shown in fig. 2, step S200 may include:
and S210, calculating correlation coefficients among different input features, and deleting the input features of which the correlation coefficients are larger than a first coefficient threshold value. The correlation coefficient can be estimated using an existing coefficient of Variance (VIF), which is a measure of the severity of complex (multiple) collinearity in a multiple linear regression model and represents the ratio of the variance of the regression coefficient estimate to the variance given the non-linear correlation between the arguments. A first coefficient threshold value may be set as needed, and when the correlation coefficient between two input features is greater than the first coefficient threshold value, any one of the input features is deleted.
And S220, performing L1 regularization calculation among different input features, and obtaining the sparsification weight of the input features. Particularly for the linear model, by selecting a proper L1 regular pattern, one of the two features with strong correlation can be set to 0, so as to obtain the sparsity weight. Obviously, when the weight is set to zero, it is equivalent to that the corresponding input feature is no longer functional, thereby further filtering the input features.
And S230, determining the candidate features according to the importance degrees of the remaining input features.
A plurality of feature evaluation algorithms may be utilized to determine the degree of importance ranking of the remaining input features to the predictive model to obtain a plurality of ranked lists, and further to select top ranked input features from the plurality of ranked lists as the candidate features. For example, if the transaction risk prediction model is obtained by training using a neural network model, the importance degree of the input features relative to the convolutional neural network may be ranked by using the existing feature evaluation methods such as LIME and Shaply; if the transaction risk prediction model is obtained by training using a decision tree model, such as a lightGBM model or a castboost model, the importance degree ranking table directly output by the decision tree model itself in the training process can be used. Further, the candidate features may be obtained by screening according to the feature ranking order in the plurality of ranking lists, for example, the first 50 features in the ranking list may be selected as the candidate features.
By only reserving the features with high importance as the candidate features, the correlation among the candidate features can be further reduced, and clear and intuitive visual explanation can be obtained.
And S300, determining a first influence of the target feature on the prediction result of the transaction risk prediction model according to a first distribution condition of the target feature relative to all other non-target features in the candidate features.
The target feature may be any one or several candidate features, for example, when the sample includes a plurality of candidate features such as user age, user gender, user geographic location, transaction days, transaction product type, transaction amount, etc., one of the candidate features, for example, transaction days, is selected as the target feature. The step is used for explaining the marginal effect of the target characteristic relative to the transaction risk prediction model, namely the change rule of the contribution degree of the target characteristic to the model prediction result as the data of the target characteristic increases. FIG. 3 shows a schematic flow chart of the determination of the first effect of an embodiment of the invention. As shown in fig. 3, step S300 may include:
s310, acquiring a second probability of a second value corresponding to each non-target feature under the first probability of the first value of the target feature.
In one example, the candidate features include feature 1, feature 2, … …, feature n. Assuming that the feature m (m < n) is selected as the target feature, n-1 features other than the feature m are non-target features. It will be appreciated that the feature m has different values in the plurality of training samples. And acquiring all possible values of the feature m in all training samples, and calculating the probability that m is m1 in all the possible values, namely the first probability. Likewise, each non-target feature, such as feature p, also has a different value in the plurality of training samples. And acquiring all possible values of the feature p in all training samples, and calculating the probability that p is p1 in all the possible values, namely the second probability.
S320, averaging the second probability to obtain a second average probability, and calculating an expected value of the first probability relative to the second average probability.
It will be appreciated that for n-1 non-target features, n-1 second probabilities may be obtained. And averaging the n-1 second probabilities to obtain a second average probability. On this basis, expected values of the first probabilities with respect to the second average probabilities are calculated.
S330, taking the first value and the second value as input data of the transaction risk prediction model to obtain a first prediction result output by the transaction risk prediction model.
Training samples with characteristics m-m 1 and characteristics p-p 1 are selected, input into a transaction risk prediction model, and a first prediction result output by the prediction model can be obtained. Therefore, all values of the features m and the features p are traversed, and a plurality of first prediction results are obtained correspondingly.
S340, determining the first influence according to the first value and the first prediction result.
And respectively drawing a trend graph by taking different first values and first prediction results as coordinate axes, and determining the marginal effect of the target characteristics on the transaction risk prediction model according to the trend of the trend graph. Fig. 4 shows a first influence trend chart according to the first embodiment of the present invention. As shown in fig. 4, the abscissa is the number of transaction days as the target feature, and the ordinate is the risk probability of the output of the prediction model, where a positive value represents the probability of risk, and a negative value represents the probability of risk not being present. The transaction risk is in a downward trend as the transaction days increase, and the transaction days increase to a certain extent with the transaction risk being substantially unchanged.
And S400, determining a second influence of the second distribution situation on the prediction result of the transaction risk prediction model according to the second distribution situation of any one target feature relative to any other non-target feature.
This step is used to explain the influence of the interaction distribution between the two features on the prediction model. The second distribution in this embodiment includes a first distribution of segments for any of the target features and a second distribution of segments for any of the other non-target features. When the target feature is transaction days, the corresponding first distribution interval may include [ 0, 30 ], [ 30, 60 ], [ 60, 90 ], [ 90, 120 ], and the above values represent different transaction days. Further, when the other non-target feature is the age of the user, the corresponding second distribution interval may include [ 7, 10 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 16 ], [ 16, 17 ], [ 17, 29 ]), where the different values represent different ages of the user.
Further, the bubble map may be plotted with the first distribution section of the target feature and the second distribution section of the other non-target feature as two-dimensional coordinate axes, respectively. The area of each bubble represents the corresponding sample number, and the gray value of each bubble represents a prediction result obtained by inputting the sample data in the corresponding section into the transaction risk prediction model. Fig. 5 shows a bubble diagram of a second influencing action of the first embodiment of the invention. As can be seen from fig. 5, the sample data of the second distribution block (user age) in the block [ 14, 16) is more, while the sample data of the second distribution block in the block [ 7, 10) and the transaction days in the block [ 0, 30) has the greatest influence on the prediction result.
Through the steps, the influence degree of the training samples in different sections on the prediction model can be explained, so that the selection of proper training samples to optimize the prediction model is facilitated.
In another example, the feature interpretation method of the present embodiment may further include a step of interpreting the effect of the local training samples. As shown in fig. 6, the method for interpreting the local training sample includes:
and S610, obtaining interested target training samples from all the training samples, such as the training samples related to a specific user ID.
And S620, disturbing and sampling the target training sample to obtain a neighborhood training sample.
In the step, the disturbance refers to the random generation of sampling points which accord with a preset distribution rule in the centroid neighborhood of the target training sample. It can be understood that the target training sample includes a plurality of sampling points, the centroid position of the plurality of sampling points is calculated, and the sampling points conforming to a certain preset distribution rule, such as a normal distribution rule, a gaussian distribution rule, and the like, are generated within a preset radius range with the centroid position as the center of circle. The newly generated sampling points and the original sampling points in the target training samples have the same or similar distribution relationship, so that the number of the target training samples can be increased on the basis of keeping the original distribution rule.
And S630, taking the neighborhood training sample as input data of the transaction risk prediction model to obtain a third prediction result output by the transaction risk prediction model.
And S640, determining a third influence of the target training sample on the prediction result of the transaction risk prediction model according to the third prediction result.
According to the probability value of the third prediction result, whether the influence of the target training sample on the prediction model is positive or negative can be determined, so that the more appropriate training sample can be selected in the model training process.
The above explanation process of the present embodiment may be implemented by LIME algorithm or SHAP algorithm. The LIME can explain a single case as a local explanation, or analyze outliers; this can be relatively reasonably interpreted on less sparse features. The SHAP algorithm can perform multiple feature interpretations based on Shapley value aggregation, and since Shapley values exhibit a fair allocation effect, the difference between predicted values and average predicted values can be distributed fairly among feature values of instances N times.
In addition, the output distribution threshold of the prediction model may also be adjusted in this embodiment. Generally speaking, the lower the threshold value, the higher the recall rate, the more false alarms, so that a reasonable balance point can be selected to reduce the false alarm rate. Taking a typical binary model as an example, the machine learning output usually defaults to a threshold of 0.5, but 0.5 is not necessarily the best choice, for example, we can use a threshold higher than 0.5, and the false alarm rate may be lower without a significant reduction in the recall rate. Through the distribution of the prediction result, the probability interval corresponding to the distribution of the prediction result can be obtained, thereby being beneficial to optimizing the output precision of the prediction model.
With continued reference to fig. 7, a feature interpretation apparatus for a transaction risk prediction model is shown, in this embodiment, the feature interpretation apparatus 70 may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the feature interpretation method and implement the feature interpretation method. The program modules referred to herein are defined as a series of computer program instruction segments that perform particular functions and are more suitable than the program itself for describing the execution of the feature interpretation means 70 on a storage medium. The following description will specifically describe the functions of the program modules of the present embodiment:
the feature obtaining module 71 is adapted to obtain a trained transaction risk prediction model and input features of all training samples corresponding to the transaction risk prediction model;
a preprocessing module 72 adapted to preprocess the input features to screen out candidate features therein that need to be interpreted;
a marginal influence module 73, adapted to determine a first influence effect of a target feature on a prediction result of the transaction risk prediction model according to a first distribution of the target feature relative to all other non-target features in the candidate features; and
an interaction influence module 74 adapted to determine a second influence of a second distribution of any of the target features relative to any other non-target features on the predicted outcome of the transaction risk prediction model.
According to the feature interpretation apparatus 70 provided by the present invention, the preprocessing module 72 includes:
a correlation coefficient unit 721 adapted to calculate a correlation coefficient between different input features, and delete an input feature having a correlation coefficient greater than a first coefficient threshold;
the weight unit 722 is adapted to perform L1 regularization calculation between different input features, and obtain a sparse weight of the input features;
a candidate feature unit 723 adapted to determine the candidate features according to the degree of importance of the remaining input features.
According to the feature interpretation apparatus 70 provided by the present invention, the candidate feature unit 723 includes:
a ranking subunit 7231 adapted to determine a ranking of the importance of the remaining input features to the prediction model using a plurality of feature evaluation algorithms to obtain a plurality of ranked lists;
an order selection subunit 7232 adapted to select, from the plurality of ordered lists, an input feature that is ordered top as the candidate feature.
According to the feature interpretation device 70 provided by the present invention, the step of determining the first influence effect of the target feature on the prediction result of the transaction risk prediction model according to the first distribution situation between the target feature in the candidate features relative to all other non-target features comprises:
acquiring a second probability of a second value corresponding to each non-target feature under the first probability of the first value of the target feature;
averaging the second probabilities to obtain second averaged probabilities, and calculating expected values of the first probabilities relative to the second averaged probabilities;
taking the first value and the second value as input data of the transaction risk prediction model to obtain a first prediction result output by the transaction risk prediction model;
and determining the first influence according to the first value and the first prediction result.
According to the feature interpretation apparatus 70 provided by the present invention, wherein the marginal influence module 73 comprises:
a trend graph unit 731, adapted to plot a trend graph according to the first value and the first prediction result;
a margin determination unit 732, adapted to determine a margin effect of the target feature on the transaction risk prediction model according to the trend of the trend graph.
According to the feature interpretation apparatus 70 provided by the present invention, the interaction influence module 74 comprises:
a second distribution unit 741 adapted to obtain the second distribution according to the training sample, wherein the second distribution includes a first distribution section of any one of the target features and a second distribution section of any one of the other non-target features;
a bubble map unit 742 adapted to map bubbles between said any one of said target features and said any one of said other non-target features using said first and second distributed sections, respectively, as two-dimensional axes; the area of each bubble represents the corresponding sample number, and the gray value of each bubble represents the prediction result of the transaction risk prediction model;
a causal determination unit 743 adapted to determine a causal action relation of the second distribution on the prediction result of the transaction risk prediction model from the bubble map.
By the device, the influence degree of the training samples in different sections on the prediction model can be explained, so that the prediction model can be optimized by selecting proper training samples.
The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. The computer device 80 of the present embodiment includes at least, but is not limited to: a memory 81, a processor 82, which may be communicatively coupled to each other via a system bus, as shown in FIG. 8. It is noted that fig. 8 only shows a computer device 80 with components 81-82, but it is to be understood that not all shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the memory 81 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 81 may be an internal storage unit of the computer device 80, such as a hard disk or a memory of the computer device 80. In other embodiments, the memory 81 may be an external storage device of the computer device 80, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the computer device 80. Of course, the memory 81 may also include both internal and external storage devices of the computer device 80. In this embodiment, the memory 81 is generally used for storing an operating system and various application software installed on the computer device 80, such as the program code of the feature interpretation apparatus 70 of the first embodiment. Further, the memory 81 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 82 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 82 is generally used to control the overall operation of the computer device 80. In this embodiment, the processor 82 is configured to execute the program codes stored in the memory 81 or process data, for example, execute the feature interpretation apparatus 70, so as to implement the feature interpretation method of the first embodiment.
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing a feature interpretation apparatus 70, and when being executed by a processor, the feature interpretation method of the first embodiment is implemented.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example" or "some examples" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A feature interpretation method of a transaction risk prediction model is characterized by comprising the following steps:
acquiring a transaction risk prediction model after training and input characteristics of all training samples corresponding to the transaction risk prediction model;
preprocessing the input features to screen out candidate features needing to be explained;
determining a first influence of a target feature on a prediction result of the transaction risk prediction model according to a first distribution condition between the target feature relative to all other non-target features in the candidate features; and
and determining a second influence of the second distribution situation on the prediction result of the transaction risk prediction model according to a second distribution situation between any one target characteristic relative to any other non-target characteristic.
2. The feature interpretation method according to claim 1, wherein the step of preprocessing the input features to screen out candidate features in which interpretation is required comprises:
calculating correlation coefficients among different input features, and deleting the input features of which the correlation coefficients are larger than a first coefficient threshold value;
performing L1 regularization calculation between different input features, and obtaining the sparsification weight of the input features;
and determining the candidate features according to the importance degree of the residual input features.
3. The feature interpretation method according to claim 2, wherein the step of determining the candidate features according to the degree of importance of the remaining input features comprises:
determining the degree of importance ranking of the remaining input features to the predictive model using a plurality of feature evaluation algorithms to obtain a plurality of ranked lists;
selecting the top ranked input features from the plurality of ranked lists as the candidate features.
4. The feature interpretation method according to any one of claims 1 to 3, wherein the step of determining a first influence of the target feature on the prediction result of the transaction risk prediction model based on a first distribution of the target feature relative to all other non-target features in the candidate features comprises:
acquiring a second probability of a second value corresponding to each non-target feature under the first probability of the first value of the target feature;
averaging the second probabilities to obtain second averaged probabilities, and calculating expected values of the first probabilities relative to the second averaged probabilities;
taking the first value and the second value as input data of the transaction risk prediction model to obtain a first prediction result output by the transaction risk prediction model;
and determining the first influence according to the first value and the first prediction result.
5. The feature interpretation method according to claim 4, wherein the step of determining the first influence based on the first value and the first prediction result comprises:
drawing a trend graph according to the first value and the first prediction result;
and determining the marginal effect of the target characteristics on the transaction risk prediction model according to the trend of the trend graph.
6. The feature interpretation method according to any one of claims 1 to 3, wherein the step of determining a second influence of a second distribution between any one of the target features relative to any other non-target feature on the prediction result of the transaction risk prediction model based on the second distribution comprises:
obtaining the second distribution according to the training sample, wherein the second distribution comprises the first distribution interval of any one of the target features and the second distribution interval of any one of the other non-target features;
respectively taking the first distribution interval and the second distribution interval as two-dimensional coordinate axes, and drawing a bubble map between any one of the target features and any one of the other non-target features; the area of each bubble represents the corresponding sample number, and the gray value of each bubble represents the prediction result of the transaction risk prediction model;
and determining the causal action relation of the second distribution situation on the prediction result of the transaction risk prediction model according to the bubble map.
7. The feature interpretation method according to claim 1, further comprising:
obtaining a target training sample of interest from all the training samples;
disturbing and sampling the target training sample to obtain a neighborhood training sample;
taking the neighborhood training sample as input data of the transaction risk prediction model to obtain a third prediction result output by the transaction risk prediction model;
and determining a third influence of the target training sample on the prediction result of the transaction risk prediction model according to the third prediction result.
8. A feature interpretation apparatus for a transaction risk prediction model, comprising:
the characteristic acquisition module is suitable for acquiring a transaction risk prediction model after training and the input characteristics of all training samples corresponding to the transaction risk prediction model;
the preprocessing module is suitable for preprocessing the input features to screen out candidate features needing to be explained;
the marginal influence module is suitable for determining a first influence effect of the target feature on a prediction result of the transaction risk prediction model according to a first distribution condition of the target feature relative to all other non-target features in the candidate features; and
and the interaction influence module is suitable for determining a second influence of a second distribution condition on the prediction result of the transaction risk prediction model according to the second distribution condition of any one target characteristic relative to any other non-target characteristic.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111559577.2A CN114187009A (en) | 2021-12-20 | 2021-12-20 | Feature interpretation method, device, equipment and medium of transaction risk prediction model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111559577.2A CN114187009A (en) | 2021-12-20 | 2021-12-20 | Feature interpretation method, device, equipment and medium of transaction risk prediction model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114187009A true CN114187009A (en) | 2022-03-15 |
Family
ID=80605642
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111559577.2A Pending CN114187009A (en) | 2021-12-20 | 2021-12-20 | Feature interpretation method, device, equipment and medium of transaction risk prediction model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114187009A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115829755A (en) * | 2023-02-07 | 2023-03-21 | 支付宝(杭州)信息技术有限公司 | Interpretation method and device for prediction result of transaction risk |
CN115953248A (en) * | 2023-03-01 | 2023-04-11 | 支付宝(杭州)信息技术有限公司 | Wind control method, device, equipment and medium based on Shapril additive interpretation |
-
2021
- 2021-12-20 CN CN202111559577.2A patent/CN114187009A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115829755A (en) * | 2023-02-07 | 2023-03-21 | 支付宝(杭州)信息技术有限公司 | Interpretation method and device for prediction result of transaction risk |
CN115953248A (en) * | 2023-03-01 | 2023-04-11 | 支付宝(杭州)信息技术有限公司 | Wind control method, device, equipment and medium based on Shapril additive interpretation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103502899B (en) | Dynamic prediction Modeling Platform | |
CN110598845A (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN110647696B (en) | Business object sorting method and device | |
CN113570396A (en) | Time series data abnormity detection method, device, equipment and storage medium | |
CN111814910B (en) | Abnormality detection method, abnormality detection device, electronic device, and storage medium | |
CN114187009A (en) | Feature interpretation method, device, equipment and medium of transaction risk prediction model | |
CN111125529A (en) | Product matching method and device, computer equipment and storage medium | |
CN112668238B (en) | Rainfall processing method, rainfall processing device, rainfall processing equipment and storage medium | |
CN112801773A (en) | Enterprise risk early warning method, device, equipment and storage medium | |
CN112015909A (en) | Knowledge graph construction method and device, electronic equipment and storage medium | |
US20090276290A1 (en) | System and method of optimizing commercial real estate transactions | |
Khosravi et al. | Performance evaluation of machine learning regressors for estimating real estate house prices | |
CN112508692A (en) | Resource recovery risk prediction method and device based on convolutional neural network and electronic equipment | |
CN111815435A (en) | Visualization method, device, equipment and storage medium for group risk characteristics | |
CN116862658A (en) | Credit evaluation method, apparatus, electronic device, medium and program product | |
CN116664306A (en) | Intelligent recommendation method and device for wind control rules, electronic equipment and medium | |
CN115795345A (en) | Information processing method, device, equipment and storage medium | |
CN114418207A (en) | Time series trend prediction method and device | |
CN113159877B (en) | Data processing method, device, system and computer readable storage medium | |
CN113656702A (en) | User behavior prediction method and device | |
CN113052604A (en) | Object detection method, device, equipment and storage medium | |
CN114928477B (en) | Network intrusion detection method and device, readable storage medium and terminal equipment | |
CN116385130A (en) | Risk identification method, risk identification device, electronic equipment and storage medium thereof | |
CN114239985A (en) | Exchange rate prediction method and device, electronic equipment and storage medium | |
CN114187154A (en) | Anti-money laundering identification method and device, computer equipment and storage medium |
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 |