WO2022171037A1 - Method and apparatus for interpreting artificial intelligence model, and system - Google Patents

Method and apparatus for interpreting artificial intelligence model, and system Download PDF

Info

Publication number
WO2022171037A1
WO2022171037A1 PCT/CN2022/075146 CN2022075146W WO2022171037A1 WO 2022171037 A1 WO2022171037 A1 WO 2022171037A1 CN 2022075146 W CN2022075146 W CN 2022075146W WO 2022171037 A1 WO2022171037 A1 WO 2022171037A1
Authority
WO
WIPO (PCT)
Prior art keywords
artificial intelligence
intelligence model
sample
result
interpretation
Prior art date
Application number
PCT/CN2022/075146
Other languages
French (fr)
Chinese (zh)
Inventor
王昱森
何雨璇
罗远飞
钟润兴
黄缨宁
涂威威
Original Assignee
第四范式(北京)技术有限公司
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 第四范式(北京)技术有限公司 filed Critical 第四范式(北京)技术有限公司
Publication of WO2022171037A1 publication Critical patent/WO2022171037A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present disclosure relates to the technical field of artificial intelligence, and more particularly, to a method, apparatus and system for interpreting an artificial intelligence model.
  • users who use artificial intelligence models need to clarify the decision-making basis of the artificial intelligence models.
  • explaining the artificial intelligence model can also help users to further improve the artificial intelligence model, optimize the characteristics of the artificial intelligence model, and improve the generalization of the artificial intelligence model.
  • An object of the present disclosure is to provide a new technical solution for interpreting artificial intelligence models.
  • a method for interpreting an artificial intelligence model comprising: obtaining a first interpretation result of the artificial intelligence model; the first interpretation result is obtained based on a feature field of the artificial intelligence model The interpretation result of the representation; obtain the association relationship between the feature field and the business meaning; based on the association relationship, replace the feature field in the first interpretation result with the associated business meaning, and obtain the artificial intelligence model.
  • a second interpretation result; based on the second interpretation result, an interpretation report of the artificial intelligence model is generated.
  • an apparatus for interpreting an artificial intelligence model comprising: a first interpretation result obtaining module configured to obtain a first interpretation result of the artificial intelligence model; the first interpretation result is Based on the interpretation results represented by the feature fields of the artificial intelligence model; an association relationship acquisition module is configured to obtain the association relationship between the feature fields and business meanings; a second interpretation result generation module is configured based on the association relationship. , replace the feature field in the first interpretation result with the associated business meaning, and obtain the second interpretation result of the artificial intelligence model; the interpretation report generation module is configured to generate, based on the second interpretation result, Interpretation report of the artificial intelligence model.
  • a system comprising at least one computing device and at least one storage device, wherein the at least one storage device is configured to store instructions that are stored by the at least one computing device At runtime, the at least one computing device is caused to perform the method of the first aspect of the present disclosure.
  • a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the method of the first aspect of the present disclosure.
  • the association relationship between the feature field and the business meaning in the first interpretation result of the artificial intelligence model is obtained; based on the obtained association relationship, the feature field that the user cannot understand in the first interpretation result is replaced with an association
  • the second interpretation result based on the business meaning is obtained; the interpretation report of the artificial intelligence model is generated based on the second interpretation result based on the business meaning and presented to the user, and the user can clearly understand the artificial intelligence model through the explanation report.
  • the basis of various prediction results improves the user's ability to understand the artificial intelligence model products, and at the same time, it can also optimize and adjust the business process based on the decision rules of the artificial intelligence model in the interpretation report.
  • FIG. 1 is a block diagram of one example of a hardware configuration of an electronic device that can be used to implement embodiments of the present disclosure
  • FIG. 2 is a schematic flowchart of a method for interpreting an artificial intelligence model according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of an example of a method for explaining an artificial intelligence model according to an embodiment of the present disclosure
  • FIG. 4 is a block schematic diagram of an apparatus for interpreting an artificial intelligence model according to an embodiment of the present disclosure
  • FIG. 5 is a block schematic diagram of a system according to an embodiment of the present disclosure.
  • FIG. 1 is a block diagram showing a hardware configuration of an electronic device 1000 that can implement an embodiment of the present disclosure.
  • the electronic device 1000 may be a laptop computer, a desktop computer, a cell phone, a tablet computer, or the like. As shown in FIG. 1 , the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like.
  • the processor 1100 may be a central processing unit CPU, a microprocessor MCU, or the like.
  • the memory 1200 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a nonvolatile memory such as a hard disk, and the like.
  • the interface device 1300 includes, for example, a USB interface, an earphone interface, and the like.
  • the communication device 1400 is capable of, for example, wired or wireless communication, and may specifically include Wifi communication, Bluetooth communication, 2G/3G/4G/5G communication, and the like.
  • the display device 1500 is, for example, a liquid crystal display, a touch display, or the like.
  • the input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The user can input/output voice information through the speaker 1700 and the microphone 1800 .
  • the electronic device shown in FIG. 1 is merely illustrative and in no way imply any limitation on the present disclosure, its application, or use.
  • the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to execute any one of the methods provided by the embodiments of the present disclosure.
  • the present disclosure may only relate to some of the apparatuses, for example, the electronic apparatus 1000 only relates to the processor 1100 and the storage apparatus 1200.
  • a skilled person can design instructions according to the solutions disclosed in the present disclosure. How the instruction controls the processor to operate is well known in the art, so it will not be described in detail here.
  • a method for interpreting an artificial intelligence model may be implemented by an electronic device.
  • the electronic device may be the electronic device 1000 shown in FIG. 1 .
  • the method for explaining an artificial intelligence model in this embodiment may include the following steps S2100 to S2400:
  • Step S2100 obtaining a first interpretation result of the artificial intelligence model; the first interpretation result is an interpretation result represented by a feature field based on the artificial intelligence model.
  • the artificial intelligence model in this embodiment may be specified by the user according to their own needs.
  • the framework of the artificial intelligence model may be Tensorflow, Spark, Lightgbm, Xgboost, Sklearn, Pytorch, Mxnet, PaddlePaddle, etc., which is not limited in this embodiment.
  • the first interpretation result in this embodiment may include an analysis result of the importance of the feature field and/or a decision rule.
  • the importance analysis result of the feature field may include the feature field and the reference weight of the feature field when the artificial intelligence model makes a decision.
  • the feature fields of the credit card fraud determination model may include “amt_10d_sum”, “amt_20d_sum”, “amt_30d_sum”, “Income”, “Age”, and “Sex”, etc. Feature fields, which are not listed one by one here.
  • the importance analysis results of some feature fields of the credit card fraud determination model are shown in Table 1.
  • a training sample for training an artificial intelligence model may be obtained, and by analyzing the training sample, a characteristic field of the artificial intelligence model may be extracted, and the characteristic field of the artificial intelligence model may be at least 1, the number of feature fields is not limited here.
  • the artificial intelligence model When the artificial intelligence model is used for decision analysis of the samples to be explained, the artificial intelligence model will extract the eigenvalues of each feature field from the samples to be explained, and obtain the decision results of the samples to be explained based on the eigenvalues of each feature field.
  • the reference weight of each feature field of the artificial intelligence model may be explained by an interpretability method.
  • the LIME Local Interpretable Model-Agnostic Explanations
  • LIME The main idea of LIME is to use interpretability models (such as linear models, decision trees) to approximate the predictions of artificial intelligence models locally, rather than globally.
  • interpretability models such as linear models, decision trees
  • acquiring the importance analysis result of the feature field of the artificial intelligence model includes steps S2111-S2118:
  • Step S2111 acquiring the feature fields of the artificial intelligence model.
  • a training sample for training an artificial intelligence model may be obtained, and feature fields of the artificial intelligence model may be extracted by analyzing the training sample.
  • Step S2112 select samples to be explained from the acquired training sample set of the artificial intelligence model; the samples to be explained include feature values of feature fields.
  • the sample to be explained may be a training sample randomly selected from the training sample set, or may be a training sample selected from the training sample set according to a preset selection rule.
  • the preset selection rules may be set in advance according to application scenarios or specific requirements.
  • the samples to be explained selected from the training sample set according to the preset selection rules may be the newly generated training samples in the training sample set as the samples to be explained, or the training samples in which the feature value of the specified feature field is selected as the specified value.
  • the sample is used as the sample to be explained, and the training sample with the specified label can also be selected as the sample to be explained.
  • Step S2113 based on the sample to be interpreted, generate a local sample and a sample weight of the local sample; the local sample includes the feature value of the feature field.
  • step S2113 generates local samples and sample weights of local samples based on the samples to be interpreted, including:
  • the preset transformation rules in this embodiment may be set in advance according to application scenarios or specific requirements. Different types of samples to be interpreted use different sample transformation methods. For the to-be-interpreted samples of the type of text data, the preset transformation rule may be to transform individual words one by one; for the to-be-interpreted samples of the type structured data, the preset transformation rule may be to change the feature value of one feature field individually each time .
  • the number of local samples is at least one, and the number of local samples is not limited here. The local samples are obtained by transforming the samples to be explained. Therefore, the local samples and the samples to be explained have the same feature fields, but the feature values of the feature fields are different.
  • the similarity between the local sample and the sample to be explained may be determined as the sample weight of the local sample.
  • the local samples and the samples to be explained can also be mapped to the vector space, and the distance between the local samples and the samples to be explained in the vector space is calculated; based on the distance between the local samples and the samples to be explained in the vector space, the sample weights.
  • Step S2114 input the local samples into the artificial intelligence model to obtain the decision results of the local samples.
  • Step S2115 perform machine learning training based on the local samples, the sample weights, and the decision results of the local samples, to obtain an explanation model for approximately fitting the artificial intelligence model.
  • different interpretation models may be considered as local approximate models of the artificial intelligence model, such as linear regression models, decision tree models, and Bayesian network models.
  • the interpretation model is trained based on local samples, and the local samples have the same feature fields as the samples to be explained. Therefore, the interpretation model trained based on the local samples has the same feature fields as the artificial intelligence model.
  • step S2116 the coefficient corresponding to the feature field in the interpretation model is used as the reference weight of the feature field when the artificial intelligence model makes a decision.
  • the interpretation model can approximately simulate the decision-making behavior of the artificial intelligence model near the sample to be explained. Therefore, the coefficients corresponding to each feature field in the interpretation model can be approximated as the reference weight of each feature field when the artificial intelligence model makes a decision on the sample to be explained.
  • Step S2117 sort the feature fields in descending order based on the reference weights of the feature fields to obtain the second sorting value of the feature fields.
  • Step S2118 Obtain an importance analysis result from the feature fields with the second sorting value within the second preset sorting range and the corresponding reference weights.
  • the second preset sorting range in this embodiment may be set in advance according to application scenarios or specific requirements.
  • the second preset sorting range may be [1, 5], that is, the feature fields with the second sorting values of 1, 2, 3, 4, and 5 and the corresponding reference weights are used as the importance analysis result.
  • the importance analysis results of the feature fields of the artificial intelligence model can also be obtained through SHAP (SHapley Additive exPlanation), and the interpretability method is not limited here.
  • the first interpretation result further includes a decision rule of the artificial intelligence model.
  • Step S2121 acquiring a training sample set of the artificial intelligence model.
  • the training sample set in this embodiment may include multiple training samples.
  • Step S2122 input the training sample set into the artificial intelligence model to obtain the decision result of the training sample set; the decision result includes the probability of the decision result appearing.
  • the decision result of the training sample set in this embodiment may be the decision result of each training sample in the training sample set.
  • the decision result of one of the training samples may be: 80% fraudulent, that is, the probability that the training sample is determined to be fraudulent is 80%.
  • Step S2123 perform machine learning training according to the training sample set and the decision result of the training sample set, and obtain a single decision tree model.
  • nodes in a single decision tree model There are two types of nodes in a single decision tree model: internal nodes and leaf nodes.
  • the internal node represents a feature field
  • the leaf node represents a decision result.
  • Step S2124 extracting the splitting condition corresponding to at least one decision result branch in the single decision tree model, to obtain the decision rule of the artificial intelligence model.
  • a decision tree can be regarded as a set of decision rules: a decision rule is constructed from each path from the root node of the decision tree to the leaf node; the feature fields of the internal nodes on the path correspond to the conditions of the decision rule, and the leaf nodes The dots correspond to the decision results.
  • the path of a decision tree is equivalent to the set of decision rules on its corresponding path, that is, each instance is covered by one path or one decision rule, and only by one decision rule.
  • a decision rule obtained according to the splitting condition corresponding to a decision result branch in a single decision tree model can be: Income>10w, and age>20y, and Sex -male, it is judged as non-fraud.
  • the method further includes steps S2131-S2138:
  • Step S2131 acquiring feature fields in the artificial intelligence model.
  • step S2111 For details, reference may be made to the aforementioned step S2111, which will not be repeated here.
  • Step S2132 select the sample to be explained in the training sample set of the acquired artificial intelligence model; the sample to be explained includes the feature value of the feature field.
  • step S2112 For details, reference may be made to the aforementioned step S2112, which will not be repeated here.
  • step S2133 the sample to be explained is input into a single decision tree model, and the decision result of the sample to be explained is obtained.
  • the decision result of the sample to be explained may be: 80% fraud, that is, the probability that the sample to be explained is determined to be fraud is 80%.
  • Step S2134 traverse the feature fields.
  • Step S2135 Transform the feature value of the feature field currently traversed in the sample to be interpreted to obtain the transformed sample corresponding to the feature field currently traversed.
  • a corresponding target value may be set in advance according to an application scenario or specific requirements, and the feature value of the feature field currently traversed in the sample to be interpreted is transformed into The corresponding target value is obtained, and the transformed sample corresponding to the currently traversed feature field is obtained.
  • the target value of the corresponding feature field may be determined according to the feature value of each feature field in the training samples other than the sample to be explained in the training sample set, and the current The eigenvalues of the traversed feature fields are transformed into corresponding target values, and the transformed samples corresponding to the currently traversed feature fields are obtained. Specifically, it can be determined that the eigenvalue of the feature field currently traversed is different from the sample to be explained, and the feature value of the feature field is used as the target value of the feature field; The average value of the feature values of the traversed feature fields is used as the target value of the currently traversed feature fields.
  • the current traversal feature field is Income
  • the feature value corresponding to the Income feature field in the sample to be explained is 5W
  • the target value corresponding to the Income feature field can be 10W
  • the feature values of other feature fields remain unchanged to obtain the transformed sample corresponding to the Income feature field.
  • Step S2136 input the transformed sample into a single decision tree model to obtain the decision result of the transformed sample.
  • the decision result of the transformed sample corresponding to the Income feature field is: fraud 30%, that is, the probability that the transformed sample is determined to be fraud is 30%.
  • Step S2137 Determine the difference between the probabilities in the decision results of the transformed sample and the sample to be explained, as the reference weight of the currently traversed feature field.
  • the difference between the probability in the transformed sample corresponding to the currently traversed feature field Income and the probability in the decision result of the sample to be explained is 50%, Then the reference weight of the currently traversed feature field Income is 50%, that is, 0.5.
  • Step S2138 when the traversal is completed, the importance analysis result is obtained based on the feature field and the reference weight of the feature field.
  • all feature fields and the reference weights of the feature fields may be directly used as the importance analysis result; or the importance analysis result may be obtained by referring to the aforementioned steps S2117 and S2118.
  • Step S2200 acquiring the association relationship between the feature field and the business meaning.
  • the association relationship in this embodiment may be set in advance according to an application scenario or specific requirements.
  • the relationship may be stored as an excel file or a csv file or a txt file.
  • the association relationship in the file can be in the form of a list, for example, the first column can be the feature field of the artificial intelligence model, the second column can be the business meaning, and the feature field and the corresponding business meaning are in one-to-one correspondence.
  • Step S2300 based on the association relationship, replace the feature field in the first interpretation result with the associated business meaning to obtain the second interpretation result of the artificial intelligence model.
  • the content of the decision rule in the second interpretation result may be: annual income>10W , and age > 20y, and gender - male, it is determined as non-fraud.
  • Step S2400 based on the second interpretation result, generate an interpretation report of the artificial intelligence model.
  • step S2400 generates an interpretation report of the artificial intelligence model based on the second interpretation result, which may include steps S2410-S2430:
  • Step S2410 obtain a reference report.
  • the reference report may be pre-set according to an application scenario or specific requirements, and pre-stored in the electronic device executing this embodiment.
  • Step S2420 using natural language processing tools to learn the text structure and writing paradigm in the reference report.
  • the text structure refers to the content contained in the reference report and the order in which the content is organized.
  • Paradigm refers to the way in which specific vocabulary and grammatical structures are used in the reference report.
  • the text structure and writing paradigm in the learning reference report include: what content should be included in the learning reference report, such as: model name, algorithm name, scene name, important feature name, important feature weight, important rules, etc.; After determining what content needs to be included, you need to learn the order of organization of the content in the reference report. For example, when generating the report content of important features, it will give priority to expressing "what time”, “what model”, “what data set”, and then expressing "there is” What are the important features”, and finally express the “weight of features”; learn how to use the proprietary vocabulary and grammatical structures in the reference report.
  • Step S2430 based on the learned text structure and writing paradigm, generate an interpretation report of the artificial intelligence model according to the second interpretation result.
  • the method of generating the interpretation report of the artificial intelligence model may include: synthesizing at least one sentence according to the text structure of the reference report with the content in the second interpretation result; synthesizing the combined sentence according to the grammatical structure learned in the reference report Add connectives between various information to form a complete sentence; according to the proprietary vocabulary learned in the reference report, further revise the vocabulary in the sentence to generate the final explanation report.
  • the method may further include:
  • the descriptive information in this embodiment may include at least one of the following: the name of the model, the description of the usage of the model, the application scenario of the model, the framework adopted by the model, the algorithm adopted by the model, the accuracy of the model, and the like.
  • the descriptive information of the model is as follows:
  • the size of the training dataset 500,000 rows and 100 columns;
  • the generated explanation report can be as follows:
  • the credit card fraud determination-2020 version model converts the problem of determining whether a credit card transaction has fraudulent behavior into a binary classification problem of artificial intelligence model decision-making scenarios. Applying the logistic regression algorithm in the GDBT framework, by analyzing the historical data of the training sample set with a total of 500,000 rows and 100 columns, an accuracy rate of 98% is achieved.
  • business personnel can clearly understand which important features are considered by the Credit Card Fraud Determination-2020 model when making decisions, and what are the rules for the model to make decisions, so that business personnel can clearly explain the decisions of the AI model to customers rule.
  • the business personnel can also judge whether there is fraud in a credit card transaction according to the decision rules of the Credit Card Fraud Judgment-2020 Model in the actual business execution process. The interpretation results of the model are applied to subsequent business processes to generate real business value.
  • the method before step S2400 is performed, the method further includes: optimizing the second interpretation result.
  • generating an interpretation report of the artificial intelligence model may include:
  • an interpretation report of the artificial intelligence model is generated.
  • optimizing the second interpretation result includes steps S2310-S2340:
  • Step S2310 construct an explanation graph based on the content corresponding to the importance analysis result in the second explanation result; wherein, the nodes in the explanation graph include business meaning and preset business type; the edges of the explanation graph represent the difference between the business meaning and the business type. mapping relationship between.
  • one of the business type nodes is "transaction amount”, and some business meaning nodes include "transaction amount in the first 10 days of the transaction", “transaction amount in the first 20 days of the transaction” and "transaction amount”.
  • Step S2320 determine at least one service meaning connected to each service type.
  • transaction amount as a business type node connects three business meaning nodes, namely: "sum of transaction amount in the first 10 days of the transaction", “sum of transaction amount in the first 20 days of the transaction” and "Sum of transaction amount for the first 30 days of the transaction”.
  • Step S2330 for each service type, sum the reference weights of the connected service meanings to obtain the reference weight of the corresponding service type.
  • the reference weight of the business meaning "the sum of the transaction amount in the first 10 days of the transaction” is 0.004
  • the reference weight of the business meaning “the sum of the transaction amount in the first 20 days of the transaction” is 0.003
  • the business meaning "the sum of the transaction amount in the first 30 days of the transaction” is 0.003.
  • the reference weight of "sum of daily transaction amount” is 0.001
  • Step S2340 according to the service type and the reference weight of the service type, obtain the content corresponding to the importance analysis result in the optimized second interpretation result.
  • all service types and the reference weight of each service type may be used as content corresponding to the importance analysis result in the optimized second interpretation result.
  • the content corresponding to the importance analysis result in the optimized second interpretation result is obtained, including steps S2341-S2342:
  • Step S2341 sort the service types in descending order based on the reference weights of the service types, and obtain the first sorting value of each service type.
  • Step S2342 Use the service types and corresponding reference weights with the first ranking value within the first preset ranking range as the content corresponding to the importance analysis result in the optimized second interpretation result.
  • the first preset sorting range in this embodiment may be set in advance according to application scenarios or specific requirements.
  • the first preset sorting range may be [1, 3], that is, the feature fields with the first sorting values of 1, 2, and 3 and the corresponding reference weights are used as the importance analysis result.
  • each service type is sorted in descending order based on the reference weights of the feature fields, and then The business types with the first ranking value in the first preset ranking range are filtered out, and the content corresponding to the importance analysis result in the optimized second interpretation result is generated.
  • part of the optimized second interpretation result corresponding to the importance analysis result is shown in Table 5.
  • FIG. 3 is a schematic flowchart of an example of a method for interpreting an artificial intelligence model according to an embodiment of the present disclosure.
  • the method may include:
  • Step S3001 obtaining a training sample set of the artificial intelligence model
  • Step S3002 input the training sample set into the artificial intelligence model to obtain the decision result of the training sample set; the decision result includes the probability of the decision result appearing;
  • Step S3003 performing machine learning training according to the training sample set and the decision result of the training sample set, to obtain a single decision tree model
  • Step S3004 extracting the splitting condition corresponding to at least one decision result branch in the single decision tree model, to obtain the decision rule of the artificial intelligence model.
  • Step S3005 acquiring feature fields in the artificial intelligence model
  • Step S3006 select a sample to be explained in the training sample set of the acquired artificial intelligence model; the sample to be explained includes the feature value of the feature field;
  • Step S3007 input the sample to be explained into a single decision tree model, and obtain the decision result of the sample to be explained;
  • Step S3008 traverse feature fields
  • Step S3009 transform the feature value of the feature field currently traversed in the sample to be interpreted, and obtain the transformed sample corresponding to the feature field currently traversed;
  • Step S3010 input the transformed sample into a single decision tree model to obtain a decision result of the transformed sample
  • Step S3011 determining the difference between the probabilities in the decision result of the transformed sample and the sample to be explained, as the reference weight of the currently traversed feature field;
  • Step S3012 when the traversal ends, obtain an importance analysis result based on the feature field and the reference weight of the feature field.
  • the decision rules and importance analysis results of the artificial intelligence model are the first interpretation results.
  • Step S3013 acquiring the association relationship between the feature field and the business meaning
  • Step S3014 based on the association relationship, replace the feature field in the decision rule and the feature field importance analysis result with the associated business meaning, and obtain the decision rule and feature field importance analysis result based on the business meaning representation.
  • the decision rule and feature field importance analysis result based on the business meaning representation is the second interpretation result.
  • Step S3015 constructing an interpretation graph based on the analysis result of the importance of the feature fields represented by the business meaning; wherein, the nodes in the interpretation graph include the business meaning and the preset business type; the edges of the interpretation graph represent the mapping between the business meaning and the business type relation;
  • Step S3016 determine at least one service meaning connected to each service type
  • Step S3017 for each service type, sum the reference weights of the connected service meanings to obtain the reference weight of the corresponding service type;
  • Step S3018 sort the service types in descending order based on the reference weights of the service types, to obtain the first sorting value of each service type;
  • step S3019 the service types with the first sorting value within the first preset sorting range and the corresponding reference weights are used as the optimized feature field importance analysis result.
  • Step S3020 obtaining a reference report
  • Step S3021 using natural language processing tools to learn the text structure and writing paradigm in the reference report
  • Step S3022 based on the learned text structure and writing paradigm, the descriptive information of the artificial intelligence model, the decision rules and the optimized feature field importance analysis results are obtained to generate an explanation report of the artificial intelligence model.
  • an apparatus 4000 for interpreting an artificial intelligence model including: a first interpretation result acquisition module 4100 , an association relationship acquisition module 4200 , a second interpretation result generation module 4300 and Explain report generation module 4400.
  • the first interpretation result acquisition module 4100 is configured to acquire the first interpretation result of the artificial intelligence model; the first interpretation result is the interpretation result represented by the feature field based on the artificial intelligence model;
  • the association relationship acquisition module 4200 is configured In order to obtain the association relationship between the feature field and the business meaning;
  • the second interpretation result generation module 4300 is configured to replace the feature field in the first interpretation result with the associated business meaning based on the association relationship, and obtain the second result of the artificial intelligence model.
  • the interpretation report generation module 4300 is configured to generate an interpretation report of the artificial intelligence model based on the second interpretation result.
  • the first interpretation result includes an importance analysis result of the feature field
  • the importance analysis results include feature fields and their reference weights when the AI model makes decisions.
  • it also includes:
  • an optimization module configured to optimize the second interpretation result
  • the explanation report generating module is further configured to generate an explanation report of the artificial intelligence model according to the optimized second explanation result.
  • the optimization module is configured to:
  • An explanation graph is constructed based on the content corresponding to the importance analysis result in the second explanation result;
  • the nodes in the explanation graph include business meanings and preset business types;
  • the edges of the explanation graph represent the mapping between business meanings and business types relation;
  • the content corresponding to the importance analysis result in the optimized second interpretation result is obtained.
  • the optimization module is configured to:
  • the service types and corresponding reference weights with the first ranking value within the first preset ranking range are taken as the content corresponding to the importance analysis result in the optimized second interpretation result.
  • the first interpretation result obtaining module is configured to:
  • the samples to be explained include the feature values of the feature fields;
  • the local samples include the feature values of the feature fields;
  • the coefficient corresponding to the feature field in the interpretation model will be used as the reference weight of the feature field when the artificial intelligence model makes a decision
  • the feature fields with the second ranking value within the second preset ranking range and the corresponding reference weights are used as the results of the importance analysis.
  • the first interpretation result obtaining module is configured to:
  • the first interpretation result further includes a decision rule of the artificial intelligence model
  • the first interpretation result acquisition module is also configured as:
  • the splitting conditions corresponding to at least one decision result branch in the single decision tree model are extracted, and the decision rules of the artificial intelligence model are obtained.
  • the first interpretation result obtaining module is further configured to:
  • the samples to be explained include the feature values of the feature fields;
  • the importance analysis result is obtained based on the feature field and the reference weight of the feature field.
  • the interpretation report generation module is configured to:
  • the interpretation report of the artificial intelligence model is generated according to the second interpretation result.
  • it also includes:
  • a descriptive information acquisition module configured to acquire descriptive information of the artificial intelligence model
  • the explanation report generation module is configured to integrate the descriptive information of the artificial intelligence model into the explanation report of the artificial intelligence model.
  • the apparatus 4000 for interpreting an artificial intelligence model can be implemented in various ways.
  • the apparatus 4000 for interpreting an artificial intelligence model may be implemented by configuring a processor with instructions.
  • the instructions may be stored in ROM, and when the device is started, the instructions may be read from the ROM into a programmable device to implement the apparatus 4000 for interpreting an artificial intelligence model.
  • the apparatus 4000 for interpreting an artificial intelligence model can be built into a dedicated device (eg, an ASIC).
  • the apparatus 4000 for interpreting an artificial intelligence model may be divided into mutually independent units, or they may be implemented by combining them together.
  • the apparatus 4000 for interpreting an artificial intelligence model may be implemented by one of the above-mentioned various implementation manners, or may be implemented by a combination of two or more of the above-mentioned various implementation manners.
  • the apparatus 4000 for interpreting an artificial intelligence model may have various implementation forms.
  • the apparatus 4000 for interpreting an artificial intelligence model may be run in any software product or application that provides interpretable model services function modules, or peripheral embedded parts, plug-ins, patches, etc. of these software products or applications, or these software products or applications themselves.
  • a system 5000 including at least one computing device 5100 and at least one storage device 5200 is also provided.
  • the at least one storage device 5200 is configured to store executable instructions; the instructions, when executed by the at least one computing device, cause the at least one computing device 5100 to perform a method according to any embodiment of the present disclosure.
  • the system 5000 may be a mobile phone, a tablet computer, a palmtop computer, a desktop computer, a notebook computer, a workstation, a game console, etc., or a distributed system composed of multiple devices.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method according to any embodiment of the present disclosure.
  • the present disclosure may be an apparatus, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer readable program instructions.
  • Computer readable program instructions are executed to implement various aspects of the present disclosure.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation in hardware, implementation in software, and implementation in a combination of software and hardware are all equivalent.
  • the association relationship between the feature field and the business meaning in the first interpretation result of the artificial intelligence model is obtained; based on the obtained association relationship, the feature field that the user cannot understand in the first interpretation result is replaced with an association
  • the second interpretation result based on the business meaning is obtained; the interpretation report of the artificial intelligence model is generated based on the second interpretation result based on the business meaning and presented to the user, and the user can clearly understand the artificial intelligence model through the explanation report.
  • the basis of various prediction results improves the user's ability to understand the artificial intelligence model products, and at the same time, it can also optimize and adjust the business process based on the decision rules of the artificial intelligence model in the interpretation report. Therefore, the present disclosure has strong industrial applicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method and apparatus for interpreting an artificial intelligence model, and a system. The method comprises: acquiring a first interpretation result of an artificial intelligence model, wherein the first interpretation result is an interpretation result represented on the basis of a feature field of the artificial intelligence model; acquiring an association relationship between a feature field and a service meaning; replacing a feature field in the first interpretation result with an associated service meaning on the basis of the association relationship, so as to obtain a second interpretation result of the artificial intelligence model; and generating an interpretation report of the artificial intelligence model on the basis of the second interpretation result.

Description

用于解释人工智能模型的方法、装置及系统Method, apparatus and system for interpreting artificial intelligence models
本公开要求于2021年02月09日提交中国专利局,申请号为202110176552.8,申请名称为“用于解释人工智能模型的方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure claims the priority of the Chinese patent application with the application number 202110176552.8 and the application title "Method, Apparatus and System for Interpreting Artificial Intelligence Models" filed with the China Patent Office on February 09, 2021, the entire contents of which are by reference Incorporated in this disclosure.
技术领域technical field
本公开涉及人工智能技术领域,更具体地,涉及一种用于解释人工智能模型的方法、装置及系统。The present disclosure relates to the technical field of artificial intelligence, and more particularly, to a method, apparatus and system for interpreting an artificial intelligence model.
背景技术Background technique
随着大数据和人工智能技术的不断发展,人工智能模型得到了广泛的应用,但模型的深度和复杂度远远超出了人类理解的范畴,或者称之为黑盒。当一个人工智能模型的泛化性能很好时,可以通过交叉验证,验证其准确性,并将其应用在生产环境中。但是,用户很难去感知这个模型在进行决策时考虑了哪些重要特征,基于什么样的判断逻辑做出最终的决策。With the continuous development of big data and artificial intelligence technology, artificial intelligence models have been widely used, but the depth and complexity of the models are far beyond the scope of human understanding, or black boxes. When an AI model generalizes well, it can be cross-validated to verify its accuracy and apply it in a production environment. However, it is difficult for users to perceive which important features are considered by this model when making decisions, and what judgment logic is based on which to make the final decision.
在很多场景下,使用人工智能模型的用户需要明确人工智能模型的决策依据。另外,对人工智能模型进行解释也可以帮助用户进一步改善人工智能模型,优化人工智能模型的特征,提高人工智能模型的泛化性。In many scenarios, users who use artificial intelligence models need to clarify the decision-making basis of the artificial intelligence models. In addition, explaining the artificial intelligence model can also help users to further improve the artificial intelligence model, optimize the characteristics of the artificial intelligence model, and improve the generalization of the artificial intelligence model.
因此,提出一种能够解释人工智能模型的方案是十分有价值的。Therefore, it is very valuable to propose a scheme that can explain the artificial intelligence model.
发明内容SUMMARY OF THE INVENTION
本公开的一个目的是提供一种用于解释人工智能模型的新技术方案。An object of the present disclosure is to provide a new technical solution for interpreting artificial intelligence models.
根据本公开的第一方面,提供了一种用于解释人工智能模型的方法,包括:获取人工智能模型的第一解释结果;所述第一解释结果为基于所述人工智能模型的特征字段所表示的解释结果;获取所述特征字段与业务含义的关联关系;基于所述关联关系,将所述第一解释结果中的所述特征字段替换成关联的业务含义,得到所述人工智能模型的第二解释结果;基于所述第二解释结果,生成所述人工智能模型的解释报告。According to a first aspect of the present disclosure, there is provided a method for interpreting an artificial intelligence model, comprising: obtaining a first interpretation result of the artificial intelligence model; the first interpretation result is obtained based on a feature field of the artificial intelligence model The interpretation result of the representation; obtain the association relationship between the feature field and the business meaning; based on the association relationship, replace the feature field in the first interpretation result with the associated business meaning, and obtain the artificial intelligence model. A second interpretation result; based on the second interpretation result, an interpretation report of the artificial intelligence model is generated.
根据本公开的第二方面,提供了一种用于解释人工智能模型的装置,包括:第一解释结果获取模块,被配置为获取人工智能模型的第一解释结果;所述第一解释结果为基于所述人工智能模型的特征字段所表示的解释结果;关联关系获取模块,被配置为获取所述特征字段与业务含义的关联关系;第二解释结果生成模块,被配置为基于所述关联关系,将所述第一解释结果中的所述特征字段替换成关联的业务含义,得到所述人工智能模型的第二解释结果;解释报告生成模块,被配置为基于所述第二解释结果,生成所述人工智能模型的解释报告。According to a second aspect of the present disclosure, there is provided an apparatus for interpreting an artificial intelligence model, comprising: a first interpretation result obtaining module configured to obtain a first interpretation result of the artificial intelligence model; the first interpretation result is Based on the interpretation results represented by the feature fields of the artificial intelligence model; an association relationship acquisition module is configured to obtain the association relationship between the feature fields and business meanings; a second interpretation result generation module is configured based on the association relationship. , replace the feature field in the first interpretation result with the associated business meaning, and obtain the second interpretation result of the artificial intelligence model; the interpretation report generation module is configured to generate, based on the second interpretation result, Interpretation report of the artificial intelligence model.
根据本公开的第三方面,提供了一种包括至少一个计算装置和至少一个存储装置的系统,其中,所述至少一个存储装置被配置为存储指令,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行本公开第一方面所述的方法。According to a third aspect of the present disclosure, there is provided a system comprising at least one computing device and at least one storage device, wherein the at least one storage device is configured to store instructions that are stored by the at least one computing device At runtime, the at least one computing device is caused to perform the method of the first aspect of the present disclosure.
根据本公开的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器执行时实现本公开的第一方面所述的方法。According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the method of the first aspect of the present disclosure.
通过本公开的方法,获取人工智能模型的第一解释结果中特征字段与业务含义的关联关系;基于获取的关联关系,将所述第一解释结果中的用户看不懂的特征字段替 换成关联的业务含义,得到基于业务含义表示的第二解释结果;将基于业务含义表示的第二解释结果,生成人工智能模型的解释报告呈现给用户,用户通过解释报告可以清晰的了解人工智能模型做出各种预测结果的依据,提升了用户对人工智能模型产品的理解能力,同时也可以基于解释报告中人工智能模型的决策规则对业务流程进行优化和调整。Through the method of the present disclosure, the association relationship between the feature field and the business meaning in the first interpretation result of the artificial intelligence model is obtained; based on the obtained association relationship, the feature field that the user cannot understand in the first interpretation result is replaced with an association The second interpretation result based on the business meaning is obtained; the interpretation report of the artificial intelligence model is generated based on the second interpretation result based on the business meaning and presented to the user, and the user can clearly understand the artificial intelligence model through the explanation report. The basis of various prediction results improves the user's ability to understand the artificial intelligence model products, and at the same time, it can also optimize and adjust the business process based on the decision rules of the artificial intelligence model in the interpretation report.
通过以下参照附图对本公开的示例性实施例的详细描述,本公开的其它特征及其优点将会变得清楚。Other features of the present disclosure and advantages thereof will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings.
附图说明Description of drawings
被结合在说明书中并构成说明书的一部分的附图示出了本公开的实施例,并且连同其说明一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure.
图1为可用于实现本公开的实施例的电子设备的硬件配置的一个例子的框图;1 is a block diagram of one example of a hardware configuration of an electronic device that can be used to implement embodiments of the present disclosure;
图2根据本公开实施例的用于解释人工智能模型的方法的流程示意图;2 is a schematic flowchart of a method for interpreting an artificial intelligence model according to an embodiment of the present disclosure;
图3根据本公开实施例的用于解释人工智能模型的方法的一个例子的流程示意图;3 is a schematic flowchart of an example of a method for explaining an artificial intelligence model according to an embodiment of the present disclosure;
图4是根据本公开实施例的用于解释人工智能模型的装置的方框原理图;4 is a block schematic diagram of an apparatus for interpreting an artificial intelligence model according to an embodiment of the present disclosure;
图5是根据本公开实施例的系统的方框原理图。5 is a block schematic diagram of a system according to an embodiment of the present disclosure.
具体实施方式Detailed ways
现在将参照附图来详细描述本公开的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application or uses in any way.
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such techniques, methods, and apparatus should be considered part of the specification.
在这里示出和讨论的所有例子中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它例子可以具有不同的值。In all examples shown and discussed herein, any specific values should be construed as illustrative only and not limiting. Accordingly, other instances of the exemplary embodiment may have different values.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further discussion in subsequent figures.
下面,参照附图描述根据本公开实施例的各个实施例和例子。Hereinafter, various embodiments and examples according to embodiments of the present disclosure will be described with reference to the accompanying drawings.
<硬件配置><Hardware configuration>
图1是示出可以实现本公开的实施例的电子设备1000的硬件配置的框图。FIG. 1 is a block diagram showing a hardware configuration of an electronic device 1000 that can implement an embodiment of the present disclosure.
电子设备1000可以是便携式电脑、台式计算机、手机、平板电脑等。如图1所示,电子设备1000可以包括处理器1100、存储器1200、接口装置1300、通信装置1400、显示装置1500、输入装置1600、扬声器1700、麦克风1800等等。其中,处理器1100可以是中央处理器CPU、微处理器MCU等。存储器1200例如包括ROM(只读存储器)、RAM(随机存取存储器)、诸如硬盘的非易失性存储器等。接口装置1300例如包括USB接口、耳机接口等。通信装置1400例如能够进行有线或无线通信,具体地可以包括Wifi通信、蓝牙通信、2G/3G/4G/5G通信等。显示装置1500例如是液晶显示屏、触摸显示屏等。输入装置1600例如可以包括触摸屏、键盘、体感输入等。用户可以通过扬声器1700和麦克风1800输入/输出语音信息。The electronic device 1000 may be a laptop computer, a desktop computer, a cell phone, a tablet computer, or the like. As shown in FIG. 1 , the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, or the like. The memory 1200 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, an earphone interface, and the like. The communication device 1400 is capable of, for example, wired or wireless communication, and may specifically include Wifi communication, Bluetooth communication, 2G/3G/4G/5G communication, and the like. The display device 1500 is, for example, a liquid crystal display, a touch display, or the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. The user can input/output voice information through the speaker 1700 and the microphone 1800 .
图1所示的电子设备仅仅是说明性的并且决不意味着对本公开、其应用或使用的任何限制。应用于本公开的实施例中,电子设备1000的存储器1200用于存储指令,所述指令用于控制处理器1100进行操作以执行本公开实施例提供的任意一项方法。本领域技术人员应当理解,尽管在图1中对电子设备1000示出了多个装置,但是,本公 开可以仅涉及其中的部分装置,例如,电子设备1000只涉及处理器1100和存储装置1200。技术人员可以根据本公开所公开方案设计指令。指令如何控制处理器进行操作,这是本领域公知,故在此不再详细描述。The electronic device shown in FIG. 1 is merely illustrative and in no way imply any limitation on the present disclosure, its application, or use. Applied to the embodiments of the present disclosure, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to execute any one of the methods provided by the embodiments of the present disclosure. Those skilled in the art should understand that although a plurality of apparatuses are shown for the electronic device 1000 in FIG. 1 , the present disclosure may only relate to some of the apparatuses, for example, the electronic apparatus 1000 only relates to the processor 1100 and the storage apparatus 1200. A skilled person can design instructions according to the solutions disclosed in the present disclosure. How the instruction controls the processor to operate is well known in the art, so it will not be described in detail here.
<方法实施例><Method Example>
在本实施例中,提供了一种用于解释人工智能模型的方法。该用于解释人工智能模型的方法可以是由电子设备实施。该电子设备可以是如图1所示的电子设备1000。In this embodiment, a method for interpreting an artificial intelligence model is provided. The method for interpreting an artificial intelligence model may be implemented by an electronic device. The electronic device may be the electronic device 1000 shown in FIG. 1 .
根据图2所示,本实施例的用于解释人工智能模型的方法可以包括如下步骤S2100~S2400:As shown in FIG. 2 , the method for explaining an artificial intelligence model in this embodiment may include the following steps S2100 to S2400:
步骤S2100,获取人工智能模型的第一解释结果;第一解释结果为基于人工智能模型的特征字段所表示的解释结果。Step S2100, obtaining a first interpretation result of the artificial intelligence model; the first interpretation result is an interpretation result represented by a feature field based on the artificial intelligence model.
本实施例中的人工智能模型可以是由用户根据自身需求所指定的。该人工智能模型的框架可以是Tensorflow、Spark、Lightgbm、Xgboost、Sklearn、Pytorch、Mxnet、PaddlePaddle等,在本实施例中不做限定。The artificial intelligence model in this embodiment may be specified by the user according to their own needs. The framework of the artificial intelligence model may be Tensorflow, Spark, Lightgbm, Xgboost, Sklearn, Pytorch, Mxnet, PaddlePaddle, etc., which is not limited in this embodiment.
本实施例中的第一解释结果,可以包括征字段的重要性分析结果和/或决策规则。其中,特征字段的重要性分析结果可以包括特征字段以及特征字段在人工智能模型进行决策时的参考权重。The first interpretation result in this embodiment may include an analysis result of the importance of the feature field and/or a decision rule. The importance analysis result of the feature field may include the feature field and the reference weight of the feature field when the artificial intelligence model makes a decision.
在人工智能模型为信用卡欺诈判定模型的实施例中,该信用卡欺诈判定模型的特征字段可以包括“amt_10d_sum”、“amt_20d_sum”、“amt_30d_sum”、“Income”、“Age”和“Sex”等多个特征字段,在此不再逐一列举。该信用卡欺诈判定模型的部分特征字段的重要性分析结果如表1所示。In the embodiment in which the artificial intelligence model is a credit card fraud determination model, the feature fields of the credit card fraud determination model may include “amt_10d_sum”, “amt_20d_sum”, “amt_30d_sum”, “Income”, “Age”, and “Sex”, etc. Feature fields, which are not listed one by one here. The importance analysis results of some feature fields of the credit card fraud determination model are shown in Table 1.
表1:Table 1:
FeatureFeature WeightWeight
amt_10d_sumamt_10d_sum 0.0040.004
amt_20d_sumamt_20d_sum 0.0030.003
amt_30d_sumamt_30d_sum 0.0010.001
IncomeIncome 0.50.5
AgeAge 0.20.2
SexSex 0.20.2
在本公开的一个实施例中,可以是获取用于对人工智能模型进行训练的训练样本,通过对训练样本进行分析,可以提取出该人工智能模型的特征字段,人工智能模型的特征字段至少为1个,在此不对特征字段的个数进行限定。In an embodiment of the present disclosure, a training sample for training an artificial intelligence model may be obtained, and by analyzing the training sample, a characteristic field of the artificial intelligence model may be extracted, and the characteristic field of the artificial intelligence model may be at least 1, the number of feature fields is not limited here.
采用人工智能模型对待解释样本进行决策分析时,人工智能模型将在待解释样本中提取出各个特征字段的特征值,并基于各个特征字段的特征值,得到待解释样本的决策结果。When the artificial intelligence model is used for decision analysis of the samples to be explained, the artificial intelligence model will extract the eigenvalues of each feature field from the samples to be explained, and obtain the decision results of the samples to be explained based on the eigenvalues of each feature field.
在本公开的一个实施例中,可以是通过可解释性方法对人工智能模型各个特征字段的参考权重进行解释。In an embodiment of the present disclosure, the reference weight of each feature field of the artificial intelligence model may be explained by an interpretability method.
在第一解释结果包括特征字段的重要性分析结果的实施例中,可以采用LIME(Local Interpretable Model-Agnostic Explanations)算法对人工智能模型进行解释,得到解释该解释样本时各个特征字段的重要性分析结果。In the embodiment where the first interpretation result includes the importance analysis result of the feature field, the LIME (Local Interpretable Model-Agnostic Explanations) algorithm can be used to interpret the artificial intelligence model, and the importance analysis of each feature field when interpreting the interpretation sample is obtained. result.
LIME的主要思想是利用可解释性模型(如线性模型,决策树)局部近似人工智能模型的预测,而不是全局近似。The main idea of LIME is to use interpretability models (such as linear models, decision trees) to approximate the predictions of artificial intelligence models locally, rather than globally.
具体的,获取人工智能模型的特征字段的重要性分析结果,包括步骤S2111~S2118:Specifically, acquiring the importance analysis result of the feature field of the artificial intelligence model includes steps S2111-S2118:
步骤S2111,获取人工智能模型的特征字段。Step S2111, acquiring the feature fields of the artificial intelligence model.
具体的,可以是获取用于对人工智能模型进行训练的训练样本,通过对训练样本进行分析,可以提取出该人工智能模型的特征字段。Specifically, a training sample for training an artificial intelligence model may be obtained, and feature fields of the artificial intelligence model may be extracted by analyzing the training sample.
步骤S2112,在获取的人工智能模型的训练样本集中选取待解释样本;待解释样本包括特征字段的特征值。Step S2112, select samples to be explained from the acquired training sample set of the artificial intelligence model; the samples to be explained include feature values of feature fields.
在本实施例中,待解释样本可以是从训练样本集中随机选取的一个训练样本,也可以是根据预设的选取规则从训练样本集中所选取的训练样本。其中,预设的选取规则可以是预先根据应用场景或具体需求所设定好的。例如,根据预设的选取规则从训练样本集中选取的待解释样本,可以是选取训练样本集中最新生成的训练样本作为待解释样本,还可以是选取指定的特征字段的特征值为指定值的训练样本作为待解释样本,还可以选取标签为指定标签的训练样本作为待解释样本。In this embodiment, the sample to be explained may be a training sample randomly selected from the training sample set, or may be a training sample selected from the training sample set according to a preset selection rule. The preset selection rules may be set in advance according to application scenarios or specific requirements. For example, the samples to be explained selected from the training sample set according to the preset selection rules may be the newly generated training samples in the training sample set as the samples to be explained, or the training samples in which the feature value of the specified feature field is selected as the specified value. The sample is used as the sample to be explained, and the training sample with the specified label can also be selected as the sample to be explained.
步骤S2113,基于待解释样本,生成局部样本和局部样本的样本权重;局部样本包括特征字段的特征值。Step S2113, based on the sample to be interpreted, generate a local sample and a sample weight of the local sample; the local sample includes the feature value of the feature field.
在本公开的一个实施例中,步骤S2113基于待解释样本,生成局部样本和局部样本的样本权重,包括:In an embodiment of the present disclosure, step S2113 generates local samples and sample weights of local samples based on the samples to be interpreted, including:
按照预设的变换规则对待解释样本进行变换,得到局部样本。Transform the samples to be interpreted according to preset transformation rules to obtain local samples.
本实施例中预设的变换规则可以是预先根据应用场景或具体需求所设定的。不同类型的待解释样本采用的样本变换方式不同。对于类型为文本数据的待解释样本,预设的变换规则可以是对单个单词逐一变换;对于类型结构化数据的待解释样本,预设的变换规则可以是每次单独改变一个特征字段的特征值。局部样本的数量为至少一个,这里不对局部样本的数量作限定。局部样本基于待解释样本变换得到,因此,局部样本与待解释样本具有相同的特征字段,只是特征字段的特征值不同。The preset transformation rules in this embodiment may be set in advance according to application scenarios or specific requirements. Different types of samples to be interpreted use different sample transformation methods. For the to-be-interpreted samples of the type of text data, the preset transformation rule may be to transform individual words one by one; for the to-be-interpreted samples of the type structured data, the preset transformation rule may be to change the feature value of one feature field individually each time . The number of local samples is at least one, and the number of local samples is not limited here. The local samples are obtained by transforming the samples to be explained. Therefore, the local samples and the samples to be explained have the same feature fields, but the feature values of the feature fields are different.
本实施例中,可以是确定局部样本与待解释样本之间的相似度,作为局部样本的样本权重。In this embodiment, the similarity between the local sample and the sample to be explained may be determined as the sample weight of the local sample.
在本实施例中,也可以将局部样本与待解释样本映射到向量空间,计算局部样本与待解释样本在向量空间的距离;基于局部样本与待解释样本在向量空间的距离,确定局部样本的样本权重。局部样本的向量与待解释样本的向量距离越近,则局部样本对应的样本权重越大。计算局部样本的样本权重,以便在对解释模型进行训练时,同时考虑到局部样本的重要性,以确保解释模型对与待解释样本距离越近的局部样本拟合度越好,因而越能很好地近似人工智能模型在待解释样本附近的决策行为。In this embodiment, the local samples and the samples to be explained can also be mapped to the vector space, and the distance between the local samples and the samples to be explained in the vector space is calculated; based on the distance between the local samples and the samples to be explained in the vector space, the sample weights. The closer the vector of the local sample is to the vector of the sample to be explained, the greater the sample weight corresponding to the local sample. Calculate the sample weight of the local samples, so that when training the interpretation model, the importance of the local samples is taken into account, so as to ensure that the interpretation model fits the local samples that are closer to the sample to be explained. A good approximation of the decision-making behavior of an artificial intelligence model near the sample to be explained.
步骤S2114,将局部样本输入人工智能模型,得到局部样本的决策结果。Step S2114, input the local samples into the artificial intelligence model to obtain the decision results of the local samples.
步骤S2115,基于局部样本、样本权重以及局部样本的决策结果进行机器学习训练,得到用于对人工智能模型进行近似拟合的解释模型。Step S2115 , perform machine learning training based on the local samples, the sample weights, and the decision results of the local samples, to obtain an explanation model for approximately fitting the artificial intelligence model.
本实施例中,可以考虑采用不同的解释模型作为人工智能模型的局部近似模型,例如:线型回归模型、决策树模型,贝叶斯网络模型。In this embodiment, different interpretation models may be considered as local approximate models of the artificial intelligence model, such as linear regression models, decision tree models, and Bayesian network models.
解释模型是基于局部样本训练得到的,局部样本与待解释样本具有相同的特征字段,因此,基于局部样本训练得到的解释模型与人工智能模型具有相同的特征字段。The interpretation model is trained based on local samples, and the local samples have the same feature fields as the samples to be explained. Therefore, the interpretation model trained based on the local samples has the same feature fields as the artificial intelligence model.
经过机器学习训练可以得到解释模型中各个特征字段对应的系数。After machine learning training, the coefficients corresponding to each feature field in the explanation model can be obtained.
步骤S2116,将解释模型中特征字段对应的系数,作为特征字段在人工智能模型进行决策时的参考权重。In step S2116, the coefficient corresponding to the feature field in the interpretation model is used as the reference weight of the feature field when the artificial intelligence model makes a decision.
解释模型可以近似模拟人工智能模型在待解释样本附近的决策行为,因此,解释模型中各个特征字段对应的系数,可以近似为人工智能模型对待解释样本进行决策时,各个特征字段的参考权重。The interpretation model can approximately simulate the decision-making behavior of the artificial intelligence model near the sample to be explained. Therefore, the coefficients corresponding to each feature field in the interpretation model can be approximated as the reference weight of each feature field when the artificial intelligence model makes a decision on the sample to be explained.
步骤S2117,基于特征字段的参考权重对特征字段进行降序排序,得到特征字段的第二排序值。Step S2117, sort the feature fields in descending order based on the reference weights of the feature fields to obtain the second sorting value of the feature fields.
步骤S2118,将第二排序值在第二预设排序范围内的特征字段及对应的参考权重,得到重要性分析结果。Step S2118: Obtain an importance analysis result from the feature fields with the second sorting value within the second preset sorting range and the corresponding reference weights.
本实施例中的第二预设排序范围可以是预先根据应用场景或具体需求所设定好的。例如,该第二预设排序范围可以是[1,5],即将第二排序值为1,2,3,4,5的特征字段及对应的参考权重,作为重要性分析结果。The second preset sorting range in this embodiment may be set in advance according to application scenarios or specific requirements. For example, the second preset sorting range may be [1, 5], that is, the feature fields with the second sorting values of 1, 2, 3, 4, and 5 and the corresponding reference weights are used as the importance analysis result.
人工智能模型的特征字段数量很多,以用于进行信用卡欺诈判定的人工智能模型为例,在信用卡欺诈判定的人工智能模型的训练样本集中可以提取出12万个特征字段,对该人工智能模型进行解释时,用户只关注参考权重较大的特征字段,因此,基于特征字段的参考权重对各个特征字段进行降序排序,进而筛选出第二排序值在第二预设排序范围的特征字段,生成重要性分析结果。There are a lot of feature fields in the artificial intelligence model. Taking the artificial intelligence model used for credit card fraud judgment as an example, 120,000 feature fields can be extracted from the training sample set of the artificial intelligence model for credit card fraud judgment. When explaining, the user only pays attention to the feature fields with larger reference weights. Therefore, the feature fields are sorted in descending order based on the reference weights of the feature fields, and then the feature fields whose second sorting value is in the second preset sorting range are screened out. Sexual analysis results.
除了LIME算法,还可以通过SHAP(SHapley Additive exPlanation)得到人工智能模型的特征字段的重要性分析结果,在此不对可解释性方法进行限定。In addition to the LIME algorithm, the importance analysis results of the feature fields of the artificial intelligence model can also be obtained through SHAP (SHapley Additive exPlanation), and the interpretability method is not limited here.
在本公开的一个实施例中,第一解释结果还包括人工智能模型的决策规则。In an embodiment of the present disclosure, the first interpretation result further includes a decision rule of the artificial intelligence model.
获取人工智能模型的决策规则,包括步骤S2121~S2124:Obtain the decision rules of the artificial intelligence model, including steps S2121-S2124:
步骤S2121,获取人工智能模型的训练样本集。Step S2121, acquiring a training sample set of the artificial intelligence model.
本实施例中的训练样本集中可以包括多个训练样本。The training sample set in this embodiment may include multiple training samples.
步骤S2122,将训练样本集输入人工智能模型,得到训练样本集的决策结果;决策结果包含决策结果出现的概率。Step S2122, input the training sample set into the artificial intelligence model to obtain the decision result of the training sample set; the decision result includes the probability of the decision result appearing.
本实施例中训练样本集的决策结果,可以是训练样本集中每条训练样本的决策结果。The decision result of the training sample set in this embodiment may be the decision result of each training sample in the training sample set.
以用于进行信用卡欺诈判定的人工智能模型为例,其中一条训练样本的决策结果可以为:欺诈80%,即该训练样本被判定为欺诈的概率为80%。Taking an artificial intelligence model for credit card fraud determination as an example, the decision result of one of the training samples may be: 80% fraudulent, that is, the probability that the training sample is determined to be fraudulent is 80%.
步骤S2123,根据训练样本集和训练样本集的决策结果进行机器学习训练,得到单棵决策树模型。Step S2123, perform machine learning training according to the training sample set and the decision result of the training sample set, and obtain a single decision tree model.
在单棵决策树模型中有两类节点:内部节点和叶节点,内部节点表示一个特征字段,叶节点表示一个决策结果。分类的时候,从根节点开始,对实例的某一个特征字段进行测试,根据测试结果,将实例分配到其子结点;此时,每一个子结点对应着该特征字段的一个特征值。如此递归向下移动,直至达到叶结点,最后将实例分配到叶结点的决策结果中。There are two types of nodes in a single decision tree model: internal nodes and leaf nodes. The internal node represents a feature field, and the leaf node represents a decision result. When classifying, start from the root node, test a feature field of the instance, and assign the instance to its child nodes according to the test result; at this time, each child node corresponds to a feature value of the feature field. This recursively moves downward until a leaf node is reached, and finally the instance is assigned to the decision result of the leaf node.
步骤S2124,提取单棵决策树模型中至少一个决策结果分支所对应的分裂条件,得到人工智能模型的决策规则。Step S2124, extracting the splitting condition corresponding to at least one decision result branch in the single decision tree model, to obtain the decision rule of the artificial intelligence model.
决策树可以看成一个决策规则的集合:由决策树的根结点到叶结点的每一条路径构建一条决策规则;路径上的内部结点的特征字段对应着决策规则的条件,而叶结点对应着决策结果。决策树的路径和其对应路径上的决策规则集合是等效的,即每一个实例都被一条路径或一条决策规则所覆盖,而且只被一条决策规则所覆盖。A decision tree can be regarded as a set of decision rules: a decision rule is constructed from each path from the root node of the decision tree to the leaf node; the feature fields of the internal nodes on the path correspond to the conditions of the decision rule, and the leaf nodes The dots correspond to the decision results. The path of a decision tree is equivalent to the set of decision rules on its corresponding path, that is, each instance is covered by one path or one decision rule, and only by one decision rule.
以用于进行信用卡欺诈判定的人工智能模型为例,根据单棵决策树模型中一个决策结果分支所对应的分裂条件所得到的一条决策规则可以为:Income>10w,且age>20y,且Sex-male,则判定为非欺诈。Taking the artificial intelligence model for credit card fraud determination as an example, a decision rule obtained according to the splitting condition corresponding to a decision result branch in a single decision tree model can be: Income>10w, and age>20y, and Sex -male, it is judged as non-fraud.
在本实施例的基础上,该方法还包括步骤S2131~S2138:On the basis of this embodiment, the method further includes steps S2131-S2138:
步骤S2131,获取人工智能模型中的特征字段。Step S2131, acquiring feature fields in the artificial intelligence model.
具体可以参照前述的步骤S2111,在此不再赘述。For details, reference may be made to the aforementioned step S2111, which will not be repeated here.
步骤S2132,在获取的人工智能模型的训练样本集中选取待解释样本;待解释样本 包括特征字段的特征值。Step S2132, select the sample to be explained in the training sample set of the acquired artificial intelligence model; the sample to be explained includes the feature value of the feature field.
具体可以参照前述的步骤S2112,在此不再赘述。For details, reference may be made to the aforementioned step S2112, which will not be repeated here.
步骤S2133,将待解释样本输入单棵决策树模型,得到待解释样本的决策结果。In step S2133, the sample to be explained is input into a single decision tree model, and the decision result of the sample to be explained is obtained.
本实施例中,以用于进行信用卡欺诈判定的人工智能模型为例,待解释样本的决策结果可以为:欺诈80%,即该待解释样本被判定为欺诈的概率为80%。In this embodiment, taking an artificial intelligence model for credit card fraud determination as an example, the decision result of the sample to be explained may be: 80% fraud, that is, the probability that the sample to be explained is determined to be fraud is 80%.
步骤S2134,遍历特征字段。Step S2134, traverse the feature fields.
步骤S2135,对待解释样本中当前遍历到的特征字段的特征值进行变换,得到与当前遍历到的特征字段所对应的变换样本。Step S2135: Transform the feature value of the feature field currently traversed in the sample to be interpreted to obtain the transformed sample corresponding to the feature field currently traversed.
在本公开的一个实施例中,可以是预先针对每一特征字段,预先根据应用场景或具体需求来设定对应的目标值,并将待解释样本中当前遍历到的特征字段的特征值变换为对应的目标值,得到与当前遍历到的特征字段所对应的变换样本。In an embodiment of the present disclosure, for each feature field, a corresponding target value may be set in advance according to an application scenario or specific requirements, and the feature value of the feature field currently traversed in the sample to be interpreted is transformed into The corresponding target value is obtained, and the transformed sample corresponding to the currently traversed feature field is obtained.
在本公开的另一个实施例中,可以是根据训练样本集中除待解释样本以外的其他训练样本中每一特征字段的特征值,来确定对应特征字段的目标值,并将待解释样本中当前遍历到的特征字段的特征值变换为对应的目标值,得到与当前遍历到的特征字段所对应的变换样本。具体的,可以是确定当前遍历到的特征字段的特征值与待解释样本不同的任一个其他样本中,该特征字段的特征值,作为该特征字段的目标值;也可以是将其他样本中当前遍历到的特征字段的特征值的平均值,作为当前遍历到的特征字段的目标值。In another embodiment of the present disclosure, the target value of the corresponding feature field may be determined according to the feature value of each feature field in the training samples other than the sample to be explained in the training sample set, and the current The eigenvalues of the traversed feature fields are transformed into corresponding target values, and the transformed samples corresponding to the currently traversed feature fields are obtained. Specifically, it can be determined that the eigenvalue of the feature field currently traversed is different from the sample to be explained, and the feature value of the feature field is used as the target value of the feature field; The average value of the feature values of the traversed feature fields is used as the target value of the currently traversed feature fields.
以用于进行信用卡欺诈判定的人工智能模型为例,当前遍历特征字段为Income,待解释样本中Income特征字段对应的特征值为5W,Income特征字段所对应的目标值可以是10W,那么,可以是将待解释样本中Income特征字段对应的5W替换为10W,其它特征字段的特征值保持不变,得到与Income特征字段所对应的变换样本。Taking the artificial intelligence model for credit card fraud determination as an example, the current traversal feature field is Income, the feature value corresponding to the Income feature field in the sample to be explained is 5W, and the target value corresponding to the Income feature field can be 10W, then, it can be It is to replace the 5W corresponding to the Income feature field in the sample to be explained with 10W, and the feature values of other feature fields remain unchanged to obtain the transformed sample corresponding to the Income feature field.
步骤S2136,将变换样本输入单棵决策树模型,得到变换样本的决策结果。Step S2136, input the transformed sample into a single decision tree model to obtain the decision result of the transformed sample.
本实施例中,以用于进行信用卡欺诈判定的人工智能模型为例,Income特征字段所对应的变换样本的决策结果为:欺诈30%,即该变换样本被判定为欺诈的概率为30%。In this embodiment, taking the artificial intelligence model for credit card fraud determination as an example, the decision result of the transformed sample corresponding to the Income feature field is: fraud 30%, that is, the probability that the transformed sample is determined to be fraud is 30%.
步骤S2137,确定变换样本和待解释样本的决策结果中的概率之间的差值,作为当前遍历到的特征字段的参考权重。Step S2137: Determine the difference between the probabilities in the decision results of the transformed sample and the sample to be explained, as the reference weight of the currently traversed feature field.
以用于进行信用卡欺诈判定的人工智能模型为例,与当前遍历到的特征字段Income所对应的变换样本中的概率,和待解释样本的决策结果中的概率之间的差值为50%,则当前遍历到的特征字段Income的参考权重为50%,即0.5。Taking an artificial intelligence model for credit card fraud determination as an example, the difference between the probability in the transformed sample corresponding to the currently traversed feature field Income and the probability in the decision result of the sample to be explained is 50%, Then the reference weight of the currently traversed feature field Income is 50%, that is, 0.5.
步骤S2138,遍历结束的情况下,基于特征字段及特征字段的参考权重,得到重要性分析结果。Step S2138, when the traversal is completed, the importance analysis result is obtained based on the feature field and the reference weight of the feature field.
本实施例中,可以是直接将所有特征字段及特征字段的参考权重,作为重要性分析结果;也可以是参照前述的步骤S2117和步骤S2118,来得到重要性分析结果。In this embodiment, all feature fields and the reference weights of the feature fields may be directly used as the importance analysis result; or the importance analysis result may be obtained by referring to the aforementioned steps S2117 and S2118.
步骤S2200,获取特征字段与业务含义的关联关系。Step S2200, acquiring the association relationship between the feature field and the business meaning.
本实施例中的关联关系可以是预先根据应用场景或具体需求所设定的。The association relationship in this embodiment may be set in advance according to an application scenario or specific requirements.
在一个例子中,关联关系可以是存储为excel文件或csv文件或txt文件。文件中的关联关系可以是列表的形式,例如,第一列可以为人工智能模型的特征字段,第二列为业务含义,特征字段和对应的业务含义二者一一对应。In one example, the relationship may be stored as an excel file or a csv file or a txt file. The association relationship in the file can be in the form of a list, for example, the first column can be the feature field of the artificial intelligence model, the second column can be the business meaning, and the feature field and the corresponding business meaning are in one-to-one correspondence.
以用于进行信用卡欺诈判定的人工智能模型为例,其中部分特征字段与业务含义的关联关系可以是如表2所示。Taking an artificial intelligence model for credit card fraud determination as an example, the relationship between some feature fields and business meanings can be as shown in Table 2.
表2:Table 2:
特征字段Feature field 业务含义Business Implications
amt_10d_sumamt_10d_sum 交易前10天交易金额Transaction amount in the 10 days before the transaction
amt_20d_sumamt_20d_sum 交易前20天交易金额Transaction amount in the 20 days before the transaction
amt_30d_sumamt_30d_sum 交易前30天交易金额Transaction amount 30 days before the transaction
IncomeIncome 年收入Annual income
AgeAge 年龄age
SexSex 性别gender
步骤S2300,基于关联关系,将第一解释结果中的特征字段替换成关联的业务含义,得到人工智能模型的第二解释结果。Step S2300, based on the association relationship, replace the feature field in the first interpretation result with the associated business meaning to obtain the second interpretation result of the artificial intelligence model.
以用于进行信用卡欺诈判定的人工智能模型为例,在重要性分析结果如表1所示,特征字段与业务含义的关联关系如表2所示的情况下,第二解释结果中特征字段的重要性分析结果中的部分内容可以是如表3所示。Taking the artificial intelligence model for credit card fraud determination as an example, when the importance analysis results are shown in Table 1, and the relationship between feature fields and business meanings is shown in Table 2, the second interpretation result of the feature fields is Part of the content of the importance analysis results can be as shown in Table 3.
表3:table 3:
特征字段Feature field 参考权重Reference weight
交易前10天交易金额Transaction amount in the 10 days before the transaction 0.0040.004
交易前20天交易金额Transaction amount in the 20 days before the transaction 0.0030.003
交易前30天交易金额Transaction amount 30 days before the transaction 0.0010.001
年收入Annual income 0.50.5
年龄age 0.20.2
性别gender 0.20.2
在第一解释结果中的决策规则为Income>10w,且age>20y,且Sex-male,则判定为非欺诈的实施例中,第二解释结果中决策规则的内容可以为:年收入>10W,且年龄>20y,且性别-男性,则判定为非欺诈。In the embodiment where the decision rule in the first interpretation result is Income>10w, age>20y, and Sex-male, it is determined as non-fraud, the content of the decision rule in the second interpretation result may be: annual income>10W , and age > 20y, and gender - male, it is determined as non-fraud.
步骤S2400,基于第二解释结果,生成人工智能模型的解释报告。Step S2400, based on the second interpretation result, generate an interpretation report of the artificial intelligence model.
在本公开的一个实施例中,步骤S2400基于第二解释结果,生成人工智能模型的解释报告,可以包括步骤S2410~S2430:In an embodiment of the present disclosure, step S2400 generates an interpretation report of the artificial intelligence model based on the second interpretation result, which may include steps S2410-S2430:
步骤S2410,获取参考报告。Step S2410, obtain a reference report.
该参考报告可以是预先根据应用场景或具体需求所设定好的、并预先存储在执行本实施例的电子设备中的。The reference report may be pre-set according to an application scenario or specific requirements, and pre-stored in the electronic device executing this embodiment.
步骤S2420,采用自然语言处理工具,学习参考报告中的文本结构和行文范式。Step S2420, using natural language processing tools to learn the text structure and writing paradigm in the reference report.
其中,文本结构指参考报告中包含的内容以及内容的组织顺序。行文范式指参考报告中专有词汇以及语法结构的运用方式。Among them, the text structure refers to the content contained in the reference report and the order in which the content is organized. Paradigm refers to the way in which specific vocabulary and grammatical structures are used in the reference report.
本实施例中,学习参考报告中的文本结构和行文范式包括:需要学习参考报告中应该包含哪些内容,例如:模型名称、算法名称、场景名称、重要特征名称、重要特征权重、重要规则等;确定需要包含哪些内容后,需要学习参考报告中内容的组织顺序,例如:在生成重要特征的报告内容时,会优先表达「什么时间」「什么模型」「什么数据集」,然后再表达「有哪些重要特征」,最后表达「特征的权重」;学习参考 报告中专有词汇以及语法结构的运用方式。In this embodiment, the text structure and writing paradigm in the learning reference report include: what content should be included in the learning reference report, such as: model name, algorithm name, scene name, important feature name, important feature weight, important rules, etc.; After determining what content needs to be included, you need to learn the order of organization of the content in the reference report. For example, when generating the report content of important features, it will give priority to expressing "what time", "what model", "what data set", and then expressing "there is" What are the important features”, and finally express the “weight of features”; learn how to use the proprietary vocabulary and grammatical structures in the reference report.
步骤S2430,基于学习到的文字结构和行文范式,根据第二解释结果生成人工智能模型的解释报告。Step S2430, based on the learned text structure and writing paradigm, generate an interpretation report of the artificial intelligence model according to the second interpretation result.
本实施例中,生成人工智能模型的解释报告的方式可以包括:将第二解释结果中的内容按照参考报告的文本结构合成至少一个句子;将合并后的句子按照参考报告中学习到的语法结构在各种信息之间加连接词,形成完整的句子;按照参考报告中学习到的专有词汇,对句子中词汇进一步修订,生成最后的解释报告。In this embodiment, the method of generating the interpretation report of the artificial intelligence model may include: synthesizing at least one sentence according to the text structure of the reference report with the content in the second interpretation result; synthesizing the combined sentence according to the grammatical structure learned in the reference report Add connectives between various information to form a complete sentence; according to the proprietary vocabulary learned in the reference report, further revise the vocabulary in the sentence to generate the final explanation report.
在本公开的一个实施例中,该方法还可以包括:In an embodiment of the present disclosure, the method may further include:
获取人工智能模型的描述性信息;并将人工智能模型的描述性信息,整合到人工智能模型的解释报告中。Obtain the descriptive information of the artificial intelligence model; and integrate the descriptive information of the artificial intelligence model into the explanation report of the artificial intelligence model.
本实施例中的描述性信息可以包括如下至少一项:模型的名称、模型的用途描述、模型的应用场景、模型所采用的框架、模型所采用的算法和模型的准确率等。以进行信用卡欺诈判定的人工智能模型为例,该模型的描述性信息如下:The descriptive information in this embodiment may include at least one of the following: the name of the model, the description of the usage of the model, the application scenario of the model, the framework adopted by the model, the algorithm adopted by the model, the accuracy of the model, and the like. Taking the artificial intelligence model for credit card fraud determination as an example, the descriptive information of the model is as follows:
模型的名称:信用卡欺诈判定-2020版模型;The name of the model: Credit Card Fraud Determination-2020 Model;
模型的用途描述:判定一笔信用卡交易是否存在欺诈行为;Description of the purpose of the model: determine whether a credit card transaction is fraudulent;
模型的应用场景:二分类;The application scenario of the model: two classification;
模型所采用的框架:GDBT;The framework adopted by the model: GDBT;
模型所采用的算法:逻辑回归;The algorithm used in the model: logistic regression;
训练数据集的大小:50万行100列;The size of the training dataset: 500,000 rows and 100 columns;
模型的准确率:98%。Accuracy of the model: 98%.
以用于进行信用卡欺诈判定的人工智能模型为例,生成的解释报告可以是如下所示:Taking the artificial intelligence model for credit card fraud determination as an example, the generated explanation report can be as follows:
信用卡欺诈判定-2020版模型,将判定一笔信用卡交易是否存在欺诈行为的问题,转换为人工智能模型决策类场景的二分类问题。应用GDBT框架中的逻辑回归算法,通过分析总计50万行100列训练样本集的历史数据,实现了准确率98%的效果。The credit card fraud determination-2020 version model converts the problem of determining whether a credit card transaction has fraudulent behavior into a binary classification problem of artificial intelligence model decision-making scenarios. Applying the logistic regression algorithm in the GDBT framework, by analyzing the historical data of the training sample set with a total of 500,000 rows and 100 columns, an accuracy rate of 98% is achieved.
对信用卡欺诈判定-2020版模型训练样本集的历史数据进行分析,提取出该人工智能模型的12万个特征字段,其中3个特征字段的参考权重较高,参考权重较高的3个特征字段和对应的参考权重可以是如表4所示。Analyze the historical data of the credit card fraud determination-2020 version model training sample set, and extract 120,000 feature fields of the artificial intelligence model, of which 3 feature fields have higher reference weights, and 3 feature fields with higher reference weights and the corresponding reference weights can be as shown in Table 4.
表4:Table 4:
特征字段Feature field 参考权重Reference weight
年收入Annual income 0.50.5
年龄age 0.20.2
性别gender 0.20.2
并提炼出如下决策规则:年收入>10万,且年龄>20岁,且性别为男性,则判定为非欺诈。And extract the following decision-making rules: annual income > 100,000, and age > 20 years old, and the gender is male, it is judged as non-fraud.
在对单个案例的分析中,由于待解释样本具备年收入>10万,且年龄>20岁,且性别为男性的条件,因此判定待解释样本对应的信用卡交易不存在欺诈行为。In the analysis of a single case, since the sample to be explained has an annual income > 100,000, an age > 20 years, and a male gender, it is determined that the credit card transaction corresponding to the sample to be explained is not fraudulent.
业务人员根据上述报告,可以清晰地理解信用卡欺诈判定-2020版模型在进行决策时考虑了哪些重要特征,以及模型进行决策的规则是什么,这样业务人员可以向客户清晰解释该人工智能模型的决策规则。同时,业务人员根据报告中该人工智能模型的决策规则,也可以在实际业务执行过程中根据信用卡欺诈判定-2020版模型的决策规则,去判断一笔信用卡交易是否存在欺诈行为,真正将人工智能模型的解释结果应用到后 续的业务流程中,产生真正的业务价值。Based on the above report, business personnel can clearly understand which important features are considered by the Credit Card Fraud Determination-2020 model when making decisions, and what are the rules for the model to make decisions, so that business personnel can clearly explain the decisions of the AI model to customers rule. At the same time, according to the decision rules of the artificial intelligence model in the report, the business personnel can also judge whether there is fraud in a credit card transaction according to the decision rules of the Credit Card Fraud Judgment-2020 Model in the actual business execution process. The interpretation results of the model are applied to subsequent business processes to generate real business value.
在本公开的一个实施例中,在执行步骤S2400之前该方法还包括:对第二解释结果进行优化。In an embodiment of the present disclosure, before step S2400 is performed, the method further includes: optimizing the second interpretation result.
在本实施例的基础上,基于第二解释结果,生成人工智能模型的解释报告可以包括:On the basis of this embodiment, based on the second interpretation result, generating an interpretation report of the artificial intelligence model may include:
根据优化后的第二解释结果,生成人工智能模型的解释报告。According to the optimized second interpretation result, an interpretation report of the artificial intelligence model is generated.
在本公开的一个实施例中,对第二解释结果进行优化包括步骤S2310~S2340:In an embodiment of the present disclosure, optimizing the second interpretation result includes steps S2310-S2340:
步骤S2310,基于第二解释结果中与重要性分析结果对应的内容,构建解释图谱;其中,解释图谱中的节点包括业务含义和预设的业务类型;解释图谱的边表示业务含义与业务类型之间的映射关系。Step S2310, construct an explanation graph based on the content corresponding to the importance analysis result in the second explanation result; wherein, the nodes in the explanation graph include business meaning and preset business type; the edges of the explanation graph represent the difference between the business meaning and the business type. mapping relationship between.
以用于进行信用卡欺诈判定的人工智能模型为例,其中一个业务类型节点为“交易金额”,部分业务含义节点包括“交易前10天交易金额”、“交易前20天交易金额”和“交易前30天交易金额”;其中将“交易金额”节点和“交易前10天交易金额的总和”节点连接起来的边表示的两个节点之间的映射关系即“过去10天,求和”;其中将“交易金额”节点“交易前20天交易金额的总和”节点连接起来的边表示的两个节点之间的映射关系即“过去20天,求和”;其中将“交易金额”节点“交易前30天交易金额的总和”节点连接起来的边表示的两个节点之间的映射关系即“过去30天,求和”,即得到解释图谱。Taking the artificial intelligence model for credit card fraud determination as an example, one of the business type nodes is "transaction amount", and some business meaning nodes include "transaction amount in the first 10 days of the transaction", "transaction amount in the first 20 days of the transaction" and "transaction amount". Transaction amount in the previous 30 days"; the mapping relationship between the two nodes represented by the edge connecting the "transaction amount" node and the "sum of transaction amount in the previous 10 days" node is "the past 10 days, sum"; The mapping relationship between the two nodes represented by the edge connecting the "transaction amount" node "the sum of the transaction amount in the first 20 days of the transaction" node is "the past 20 days, sum"; in which the "transaction amount" node " The sum of the transaction amount in the first 30 days of the transaction" The mapping relationship between the two nodes represented by the edge connected by the nodes is "the past 30 days, sum", that is, the interpretation graph is obtained.
步骤S2320,根据解释图谱,确定每一业务类型所连接的至少一个业务含义。Step S2320, according to the interpretation map, determine at least one service meaning connected to each service type.
在前述的解释图谱的例子中,“交易金额”作为一个业务类型节点连接了三个业务含义节点,分别为:“交易前10天交易金额的总和”、“交易前20天交易金额的总和”和“交易前30天交易金额的总和”。In the above example of the explanation graph, "transaction amount" as a business type node connects three business meaning nodes, namely: "sum of transaction amount in the first 10 days of the transaction", "sum of transaction amount in the first 20 days of the transaction" and "Sum of transaction amount for the first 30 days of the transaction".
步骤S2330,对于每一业务类型,对所连接的业务含义的参考权重求和,得到对应业务类型的参考权重。Step S2330, for each service type, sum the reference weights of the connected service meanings to obtain the reference weight of the corresponding service type.
前述的解释图谱的例子中,业务含义“交易前10天交易金额的总和”的参考权重为0.004、业务含义“交易前20天交易金额的总和”的参考权重为0.003,业务含义“交易前30天交易金额的总和”的参考权重为0.001,那么,“交易金额”这个业务类型对应的参考权重可以为:0.004+0.003+0.001=0.008。In the example of the aforementioned interpretation graph, the reference weight of the business meaning "the sum of the transaction amount in the first 10 days of the transaction" is 0.004, the reference weight of the business meaning "the sum of the transaction amount in the first 20 days of the transaction" is 0.003, and the business meaning "the sum of the transaction amount in the first 30 days of the transaction" is 0.003. The reference weight of "sum of daily transaction amount" is 0.001, then, the reference weight corresponding to the business type of "transaction amount" can be: 0.004+0.003+0.001=0.008.
步骤S2340,根据业务类型和业务类型的参考权重,得到优化后的第二解释结果中与重要性分析结果对应的内容。Step S2340, according to the service type and the reference weight of the service type, obtain the content corresponding to the importance analysis result in the optimized second interpretation result.
在本公开的一个实施例中,可以是将所有业务类型和每个业务类型的参考权重,作为优化后的第二解释结果中与重要性分析结果对应的内容。In an embodiment of the present disclosure, all service types and the reference weight of each service type may be used as content corresponding to the importance analysis result in the optimized second interpretation result.
在本公开的另一个实施例中,In another embodiment of the present disclosure,
根据业务类型和业务类型的参考权重,得到优化后的第二解释结果中与重要性分析结果对应的内容,包括步骤S2341~S2342:According to the service type and the reference weight of the service type, the content corresponding to the importance analysis result in the optimized second interpretation result is obtained, including steps S2341-S2342:
步骤S2341,基于业务类型的参考权重对业务类型进行降序排序,得到每一业务类型的第一排序值。Step S2341 , sort the service types in descending order based on the reference weights of the service types, and obtain the first sorting value of each service type.
步骤S2342,将第一排序值在第一预设排序范围内的业务类型和对应的参考权重,作为优化后的第二解释结果中与重要性分析结果对应的内容。Step S2342: Use the service types and corresponding reference weights with the first ranking value within the first preset ranking range as the content corresponding to the importance analysis result in the optimized second interpretation result.
本实施例中的第一预设排序范围可以是预先根据应用场景或具体需求所设定好的。例如,该第一预设排序范围可以是[1,3],即将第一排序值为1,2,3的特征字段及对应的参考权重,作为重要性分析结果。The first preset sorting range in this embodiment may be set in advance according to application scenarios or specific requirements. For example, the first preset sorting range may be [1, 3], that is, the feature fields with the first sorting values of 1, 2, and 3 and the corresponding reference weights are used as the importance analysis result.
本实施例中的业务类型的数量可能很多,在对人工智能模型进行解释时,用户可能只关注参考权重较大的业务类型,因此,基于特征字段的参考权重对各个业务类型 进行降序排序,进而筛选出第一排序值在第一预设排序范围的业务类型,生成优化后的第二解释结果中与重要性分析结果对应的内容。There may be a large number of service types in this embodiment. When interpreting the artificial intelligence model, the user may only pay attention to the service types with larger reference weights. Therefore, each service type is sorted in descending order based on the reference weights of the feature fields, and then The business types with the first ranking value in the first preset ranking range are filtered out, and the content corresponding to the importance analysis result in the optimized second interpretation result is generated.
在一个例子中,优化后的第二解释结果中与重要性分析结果对应的部分内容如表5所示。In an example, part of the optimized second interpretation result corresponding to the importance analysis result is shown in Table 5.
表5:table 5:
特征字段Feature field 参考权重Reference weight
交易金额Amount of the transaction 0.0080.008
年收入Annual income 0.50.5
年龄age 0.20.2
性别gender 0.20.2
<例子><Example>
图3为根据本公开实施例的用于解释人工智能模型的方法的一个例子的流程示意图。3 is a schematic flowchart of an example of a method for interpreting an artificial intelligence model according to an embodiment of the present disclosure.
如图3所示,该方法可以包括:As shown in Figure 3, the method may include:
步骤S3001,获取人工智能模型的训练样本集;Step S3001, obtaining a training sample set of the artificial intelligence model;
步骤S3002,将训练样本集输入人工智能模型,得到训练样本集的决策结果;决策结果包含决策结果出现的概率;Step S3002, input the training sample set into the artificial intelligence model to obtain the decision result of the training sample set; the decision result includes the probability of the decision result appearing;
步骤S3003,根据训练样本集和训练样本集的决策结果进行机器学习训练,得到单棵决策树模型;Step S3003, performing machine learning training according to the training sample set and the decision result of the training sample set, to obtain a single decision tree model;
步骤S3004,提取单棵决策树模型中至少一个决策结果分支所对应的分裂条件,得到人工智能模型的决策规则。Step S3004, extracting the splitting condition corresponding to at least one decision result branch in the single decision tree model, to obtain the decision rule of the artificial intelligence model.
步骤S3005,获取人工智能模型中的特征字段;Step S3005, acquiring feature fields in the artificial intelligence model;
步骤S3006,在获取的人工智能模型的训练样本集中选取待解释样本;待解释样本包括特征字段的特征值;Step S3006, select a sample to be explained in the training sample set of the acquired artificial intelligence model; the sample to be explained includes the feature value of the feature field;
步骤S3007,将待解释样本输入单棵决策树模型,得到待解释样本的决策结果;Step S3007, input the sample to be explained into a single decision tree model, and obtain the decision result of the sample to be explained;
步骤S3008,遍历特征字段;Step S3008, traverse feature fields;
步骤S3009,对待解释样本中当前遍历到的特征字段的特征值进行变换,得到与当前遍历到的特征字段所对应的变换样本;Step S3009, transform the feature value of the feature field currently traversed in the sample to be interpreted, and obtain the transformed sample corresponding to the feature field currently traversed;
步骤S3010,将变换样本输入单棵决策树模型,得到变换样本的决策结果;Step S3010, input the transformed sample into a single decision tree model to obtain a decision result of the transformed sample;
步骤S3011,确定变换样本和待解释样本的决策结果中的概率之间的差值,作为当前遍历到的特征字段的参考权重;Step S3011, determining the difference between the probabilities in the decision result of the transformed sample and the sample to be explained, as the reference weight of the currently traversed feature field;
步骤S3012,在遍历结束的情况下,基于特征字段及特征字段的参考权重,得到重要性分析结果。Step S3012, when the traversal ends, obtain an importance analysis result based on the feature field and the reference weight of the feature field.
人工智能模型的决策规则和重要性分析结果即为第一解释结果。The decision rules and importance analysis results of the artificial intelligence model are the first interpretation results.
步骤S3013,获取特征字段与业务含义的关联关系;Step S3013, acquiring the association relationship between the feature field and the business meaning;
步骤S3014,基于关联关系,将决策规则和特征字段重要性分析结果中的特征字段替换成关联的业务含义,得到基于业务含义表示的决策规则和特征字段重要性分析结果。Step S3014, based on the association relationship, replace the feature field in the decision rule and the feature field importance analysis result with the associated business meaning, and obtain the decision rule and feature field importance analysis result based on the business meaning representation.
基于业务含义表示的决策规则和特征字段重要性分析结果即为第二解释结果。The decision rule and feature field importance analysis result based on the business meaning representation is the second interpretation result.
步骤S3015,基于业务含义表示的特征字段重要性分析结果,构建解释图谱;其中,解释图谱中的节点包括业务含义和预设的业务类型;解释图谱的边表示业务含义与业务类型之间的映射关系;Step S3015, constructing an interpretation graph based on the analysis result of the importance of the feature fields represented by the business meaning; wherein, the nodes in the interpretation graph include the business meaning and the preset business type; the edges of the interpretation graph represent the mapping between the business meaning and the business type relation;
步骤S3016,根据解释图谱,确定每一业务类型所连接的至少一个业务含义;Step S3016, according to the interpretation map, determine at least one service meaning connected to each service type;
步骤S3017,对于每一业务类型,对所连接的业务含义的参考权重求和,得到对应业务类型的参考权重;Step S3017, for each service type, sum the reference weights of the connected service meanings to obtain the reference weight of the corresponding service type;
步骤S3018,基于业务类型的参考权重对业务类型进行降序排序,得到每一业务类型的第一排序值;Step S3018, sort the service types in descending order based on the reference weights of the service types, to obtain the first sorting value of each service type;
步骤S3019,将第一排序值在第一预设排序范围内的业务类型和对应的参考权重,作为优化后的特征字段重要性分析结果。In step S3019, the service types with the first sorting value within the first preset sorting range and the corresponding reference weights are used as the optimized feature field importance analysis result.
步骤S3020,获取参考报告;Step S3020, obtaining a reference report;
步骤S3021,采用自然语言处理工具,学习参考报告中的文本结构和行文范式;Step S3021, using natural language processing tools to learn the text structure and writing paradigm in the reference report;
步骤S3022,基于学习到的文字结构和行文范式,将获取人工智能模型的描述性信息、决策规则和优化后的特征字段重要性分析结果生成人工智能模型的解释报告。Step S3022, based on the learned text structure and writing paradigm, the descriptive information of the artificial intelligence model, the decision rules and the optimized feature field importance analysis results are obtained to generate an explanation report of the artificial intelligence model.
<装置实施例><Apparatus Example>
在本实施例中,提供了一种用于解释人工智能模型的装置4000,如图4所示,包括:第一解释结果获取模块4100、关联关系获取模块4200、第二解释结果生成模块4300和解释报告生成模块4400。该第一解释结果获取模块4100,被配置为获取人工智能模型的第一解释结果;该第一解释结果为基于人工智能模型的特征字段所表示的解释结果;该关联关系获取模块4200,被配置为获取特征字段与业务含义的关联关系;该第二解释结果生成模块4300,被配置为基于关联关系,将第一解释结果中的特征字段替换成关联的业务含义,得到人工智能模型的第二解释结果;该解释报告生成模块4300,被配置为基于第二解释结果,生成人工智能模型的解释报告。In this embodiment, an apparatus 4000 for interpreting an artificial intelligence model is provided, as shown in FIG. 4 , including: a first interpretation result acquisition module 4100 , an association relationship acquisition module 4200 , a second interpretation result generation module 4300 and Explain report generation module 4400. The first interpretation result acquisition module 4100 is configured to acquire the first interpretation result of the artificial intelligence model; the first interpretation result is the interpretation result represented by the feature field based on the artificial intelligence model; the association relationship acquisition module 4200 is configured In order to obtain the association relationship between the feature field and the business meaning; the second interpretation result generation module 4300 is configured to replace the feature field in the first interpretation result with the associated business meaning based on the association relationship, and obtain the second result of the artificial intelligence model. Interpretation result; the interpretation report generation module 4300 is configured to generate an interpretation report of the artificial intelligence model based on the second interpretation result.
在本公开的一个实施例中,第一解释结果包括特征字段的重要性分析结果;In an embodiment of the present disclosure, the first interpretation result includes an importance analysis result of the feature field;
重要性分析结果包括特征字段以及特征字段在人工智能模型进行决策时的参考权重。The importance analysis results include feature fields and their reference weights when the AI model makes decisions.
在本公开的一个实施例中,还包括:In an embodiment of the present disclosure, it also includes:
优化模块,被配置为对第二解释结果进行优化;an optimization module, configured to optimize the second interpretation result;
解释报告生成模块,还被配置为根据优化后的第二解释结果,生成人工智能模型的解释报告。The explanation report generating module is further configured to generate an explanation report of the artificial intelligence model according to the optimized second explanation result.
在本公开的一个实施例中,优化模块被配置为:In one embodiment of the present disclosure, the optimization module is configured to:
基于第二解释结果中与重要性分析结果对应的内容,构建解释图谱;其中,解释图谱中的节点包括业务含义和预设的业务类型;解释图谱的边表示业务含义与业务类型之间的映射关系;An explanation graph is constructed based on the content corresponding to the importance analysis result in the second explanation result; the nodes in the explanation graph include business meanings and preset business types; the edges of the explanation graph represent the mapping between business meanings and business types relation;
根据解释图谱,确定每一业务类型所连接的至少一个业务含义;According to the interpretation map, determine at least one business meaning connected to each business type;
对于每一业务类型,对所连接的业务含义的参考权重求和,得到对应业务类型的参考权重;For each service type, sum the reference weights of the connected service meanings to obtain the reference weight of the corresponding service type;
根据业务类型和业务类型的参考权重,得到优化后的第二解释结果中与重要性分析结果对应的内容。According to the business type and the reference weight of the business type, the content corresponding to the importance analysis result in the optimized second interpretation result is obtained.
在本公开的一个实施例中,优化模块被配置为:In one embodiment of the present disclosure, the optimization module is configured to:
基于业务类型的参考权重对业务类型进行降序排序,得到每一业务类型的第一排序值;Sort the business types in descending order based on the reference weights of the business types, and obtain the first sorting value of each business type;
将第一排序值在第一预设排序范围内的业务类型和对应的参考权重,作为优化后的第二解释结果中与重要性分析结果对应的内容。The service types and corresponding reference weights with the first ranking value within the first preset ranking range are taken as the content corresponding to the importance analysis result in the optimized second interpretation result.
在本公开的一个实施例中,第一解释结果获取模块被配置为:In an embodiment of the present disclosure, the first interpretation result obtaining module is configured to:
获取人工智能模型中的特征字段;Get the feature fields in the artificial intelligence model;
在获取的人工智能模型的训练样本集中选取待解释样本;待解释样本包括特征字段的特征值;Select the samples to be explained in the training sample set of the acquired artificial intelligence model; the samples to be explained include the feature values of the feature fields;
基于待解释样本,生成局部样本和局部样本的样本权重;局部样本包括特征字段的特征值;Based on the samples to be explained, generate local samples and sample weights of the local samples; the local samples include the feature values of the feature fields;
将局部样本输入人工智能模型,得到局部样本的决策结果;Input the local samples into the artificial intelligence model to obtain the decision results of the local samples;
基于局部样本、样本权重以及局部样本的决策结果进行机器学习训练,得到被配置为对人工智能模型进行近似拟合的解释模型;Carry out machine learning training based on local samples, sample weights, and decision results of local samples, and obtain an explanation model configured to approximate the artificial intelligence model;
将解释模型中特征字段对应的系数,作为特征字段在人工智能模型进行决策时的参考权重;The coefficient corresponding to the feature field in the interpretation model will be used as the reference weight of the feature field when the artificial intelligence model makes a decision;
基于特征字段的参考权重对特征字段进行降序排序,得到特征字段的第二排序值;Sort the feature fields in descending order based on the reference weights of the feature fields to obtain the second sorting value of the feature fields;
将第二排序值在第二预设排序范围内的特征字段及对应的参考权重,作为重要性分析结果。The feature fields with the second ranking value within the second preset ranking range and the corresponding reference weights are used as the results of the importance analysis.
在本公开的一个实施例中,第一解释结果获取模块被配置为:In an embodiment of the present disclosure, the first interpretation result obtaining module is configured to:
按照预设的变换规则对待解释样本进行变换,得到局部样本;Transform the samples to be interpreted according to the preset transformation rules to obtain local samples;
确定局部样本与待解释样本之间的相似度,作为局部样本的样本权重。Determine the similarity between the local sample and the sample to be explained as the sample weight of the local sample.
在本公开的一个实施例中,第一解释结果还包括人工智能模型的决策规则;In an embodiment of the present disclosure, the first interpretation result further includes a decision rule of the artificial intelligence model;
第一解释结果获取模块还被配置为:The first interpretation result acquisition module is also configured as:
获取人工智能模型的训练样本集;Obtain the training sample set of the artificial intelligence model;
将训练样本集输入人工智能模型,得到训练样本集的决策结果;决策结果包含决策结果出现的概率;Input the training sample set into the artificial intelligence model to get the decision result of the training sample set; the decision result includes the probability of the decision result appearing;
根据训练样本集和训练样本集的决策结果进行机器学习训练,得到单棵决策树模型;Perform machine learning training according to the training sample set and the decision results of the training sample set to obtain a single decision tree model;
提取单棵决策树模型中至少一个决策结果分支所对应的分裂条件,得到人工智能模型的决策规则。The splitting conditions corresponding to at least one decision result branch in the single decision tree model are extracted, and the decision rules of the artificial intelligence model are obtained.
在本公开的一个实施例中,第一解释结果获取模块还被配置为:In an embodiment of the present disclosure, the first interpretation result obtaining module is further configured to:
获取人工智能模型中的特征字段;Get the feature fields in the artificial intelligence model;
在获取的人工智能模型的训练样本集中选取待解释样本;待解释样本包括特征字段的特征值;Select the samples to be explained in the training sample set of the acquired artificial intelligence model; the samples to be explained include the feature values of the feature fields;
将待解释样本输入单棵决策树模型,得到待解释样本的决策结果;Input the sample to be explained into a single decision tree model to obtain the decision result of the sample to be explained;
遍历特征字段;Traverse feature fields;
对待解释样本中当前遍历到的特征字段的特征值进行变换,得到与当前遍历到的特征字段所对应的变换样本;Transform the feature value of the feature field currently traversed in the sample to be interpreted, and obtain the transformed sample corresponding to the feature field currently traversed;
将变换样本输入单棵决策树模型,得到变换样本的决策结果;Input the transformed sample into a single decision tree model to obtain the decision result of the transformed sample;
确定变换样本和待解释样本的决策结果中的概率之间的差值,作为当前遍历到的特征字段的参考权重;Determine the difference between the probability in the decision result of the transformed sample and the sample to be explained, as the reference weight of the feature field currently traversed;
在遍历结束的情况下,基于特征字段及特征字段的参考权重,得到重要性分析结果。When the traversal ends, the importance analysis result is obtained based on the feature field and the reference weight of the feature field.
在本公开的一个实施例中,解释报告生成模块被配置为:In one embodiment of the present disclosure, the interpretation report generation module is configured to:
获取参考报告;obtain reference reports;
采用自然语言处理工具,学习参考报告中的文本结构和行文范式;Use natural language processing tools to learn text structure and writing paradigms in reference reports;
基于学习到的文字结构和行文范式,根据第二解释结果生成人工智能模型的解释报告。Based on the learned text structure and writing paradigm, the interpretation report of the artificial intelligence model is generated according to the second interpretation result.
在本公开的一个实施例中,还包括:In an embodiment of the present disclosure, it also includes:
描述信息获取模块,被配置为获取人工智能模型的描述性信息;a descriptive information acquisition module, configured to acquire descriptive information of the artificial intelligence model;
解释报告生成模块被配置为将人工智能模型的描述性信息,整合到人工智能模型的解释报告中。The explanation report generation module is configured to integrate the descriptive information of the artificial intelligence model into the explanation report of the artificial intelligence model.
本领域技术人员应当明白,可以通过各种方式来实现用于解释人工智能模型的装置4000。例如,可以通过指令配置处理器来实现用于解释人工智能模型的装置4000。例如,可以将指令存储在ROM中,并且当启动设备时,将指令从ROM读取到可编程器件中来实现用于解释人工智能模型的装置4000。例如,可以将用于解释人工智能模型的装置4000固化到专用器件(例如ASIC)中。可以将用于解释人工智能模型的装置4000分成相互独立的单元,或者可以将它们合并在一起实现。用于解释人工智能模型的装置4000可以通过上述各种实现方式中的一种来实现,或者可以通过上述各种实现方式中的两种或更多种方式的组合来实现。Those skilled in the art should understand that the apparatus 4000 for interpreting an artificial intelligence model can be implemented in various ways. For example, the apparatus 4000 for interpreting an artificial intelligence model may be implemented by configuring a processor with instructions. For example, the instructions may be stored in ROM, and when the device is started, the instructions may be read from the ROM into a programmable device to implement the apparatus 4000 for interpreting an artificial intelligence model. For example, the apparatus 4000 for interpreting an artificial intelligence model can be built into a dedicated device (eg, an ASIC). The apparatus 4000 for interpreting an artificial intelligence model may be divided into mutually independent units, or they may be implemented by combining them together. The apparatus 4000 for interpreting an artificial intelligence model may be implemented by one of the above-mentioned various implementation manners, or may be implemented by a combination of two or more of the above-mentioned various implementation manners.
在本实施例中,用于解释人工智能模型的装置4000可以具有多种实现形式,例如,用于解释人工智能模型的装置4000可以是任何的提供可解释模型服务的软件产品或者应用程序中运行的功能模块,或者是这些软件产品或者应用程序的外设嵌入件、插件、补丁件等,还可以是这些软件产品或者应用程序本身。In this embodiment, the apparatus 4000 for interpreting an artificial intelligence model may have various implementation forms. For example, the apparatus 4000 for interpreting an artificial intelligence model may be run in any software product or application that provides interpretable model services function modules, or peripheral embedded parts, plug-ins, patches, etc. of these software products or applications, or these software products or applications themselves.
<系统实施例><System Example>
在本实施例中,如图5所示,还提供一种至少一个计算装置5100和至少一个存储装置5200的系统5000。该至少一个存储装置5200用于存储可执行的指令;该指令在被所述至少一个计算装置运行时,促使至少一个计算装置5100执行根据本公开任意实施例的方法。In this embodiment, as shown in FIG. 5 , a system 5000 including at least one computing device 5100 and at least one storage device 5200 is also provided. The at least one storage device 5200 is configured to store executable instructions; the instructions, when executed by the at least one computing device, cause the at least one computing device 5100 to perform a method according to any embodiment of the present disclosure.
在本实施例中,该系统5000可以是手机、平板电脑、掌上电脑、台式机、笔记本电脑、工作站、游戏机等设备,也可以是由多个设备构成的分布式系统。In this embodiment, the system 5000 may be a mobile phone, a tablet computer, a palmtop computer, a desktop computer, a notebook computer, a workstation, a game console, etc., or a distributed system composed of multiple devices.
<计算机可读存储介质><Computer-readable storage medium>
在本实施例中,还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序在被处理器执行时实现如本公开任意实施例的方法。In this embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, implements the method according to any embodiment of the present disclosure.
本公开可以是设备、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be an apparatus, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编 程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation in hardware, implementation in software, and implementation in a combination of software and hardware are all equivalent.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。本公开的范围由所附权利要求来限定。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.
工业实用性Industrial Applicability
通过本公开实施例,获取人工智能模型的第一解释结果中特征字段与业务含义的关联关系;基于获取的关联关系,将所述第一解释结果中的用户看不懂的特征字段替换成关联的业务含义,得到基于业务含义表示的第二解释结果;将基于业务含义表示 的第二解释结果,生成人工智能模型的解释报告呈现给用户,用户通过解释报告可以清晰的了解人工智能模型做出各种预测结果的依据,提升了用户对人工智能模型产品的理解能力,同时也可以基于解释报告中人工智能模型的决策规则对业务流程进行优化和调整。因此本公开具有很强的工业实用性。Through the embodiment of the present disclosure, the association relationship between the feature field and the business meaning in the first interpretation result of the artificial intelligence model is obtained; based on the obtained association relationship, the feature field that the user cannot understand in the first interpretation result is replaced with an association The second interpretation result based on the business meaning is obtained; the interpretation report of the artificial intelligence model is generated based on the second interpretation result based on the business meaning and presented to the user, and the user can clearly understand the artificial intelligence model through the explanation report. The basis of various prediction results improves the user's ability to understand the artificial intelligence model products, and at the same time, it can also optimize and adjust the business process based on the decision rules of the artificial intelligence model in the interpretation report. Therefore, the present disclosure has strong industrial applicability.

Claims (34)

  1. 一种用于解释人工智能模型的方法,包括:A method for interpreting artificial intelligence models, including:
    获取人工智能模型的第一解释结果;所述第一解释结果为基于所述人工智能模型的特征字段所表示的解释结果;Obtain a first interpretation result of the artificial intelligence model; the first interpretation result is an interpretation result represented by a feature field based on the artificial intelligence model;
    获取所述特征字段与业务含义的关联关系;Obtain the association relationship between the feature field and the business meaning;
    基于所述关联关系,将所述第一解释结果中的所述特征字段替换成关联的业务含义,得到所述人工智能模型的第二解释结果;Based on the association relationship, replace the feature field in the first interpretation result with the associated business meaning to obtain the second interpretation result of the artificial intelligence model;
    基于所述第二解释结果,生成所述人工智能模型的解释报告。Based on the second interpretation result, an interpretation report of the artificial intelligence model is generated.
  2. 根据权利要求1所述的方法,其中,所述第一解释结果包括所述特征字段的重要性分析结果;The method according to claim 1, wherein the first interpretation result comprises an importance analysis result of the feature field;
    所述重要性分析结果包括所述特征字段以及所述特征字段在所述人工智能模型进行决策时的参考权重。The importance analysis result includes the feature field and the reference weight of the feature field when the artificial intelligence model makes a decision.
  3. 根据权利要求2所述的方法,其中,The method of claim 2, wherein,
    所述基于所述第二解释结果,生成所述人工智能模型的解释报告前,所述方法还包括:对所述第二解释结果进行优化;Before generating the interpretation report of the artificial intelligence model based on the second interpretation result, the method further includes: optimizing the second interpretation result;
    所述基于所述第二解释结果,生成所述人工智能模型的解释报告包括:The generating an explanation report of the artificial intelligence model based on the second explanation result includes:
    根据优化后的第二解释结果,生成所述人工智能模型的解释报告。According to the optimized second interpretation result, an interpretation report of the artificial intelligence model is generated.
  4. 根据权利要求3所述的方法,其中,所述对所述第二解释结果进行优化包括:The method of claim 3, wherein the optimizing the second interpretation result comprises:
    基于所述第二解释结果中与所述重要性分析结果对应的内容,构建解释图谱;其中,所述解释图谱中的节点包括所述业务含义和预设的业务类型;所述解释图谱的边表示所述业务含义与所述业务类型之间的映射关系;An explanation graph is constructed based on the content corresponding to the importance analysis result in the second explanation result; wherein, the nodes in the explanation graph include the business meaning and the preset business type; the edges of the explanation graph Indicates the mapping relationship between the business meaning and the business type;
    根据所述解释图谱,确定每一业务类型所连接的至少一个业务含义;According to the interpretation map, determine at least one service meaning connected to each service type;
    对于每一所述业务类型,对所连接的业务含义的参考权重求和,得到对应业务类型的参考权重;For each of the service types, the reference weights of the connected service meanings are summed to obtain the reference weights of the corresponding service types;
    根据所述业务类型和所述业务类型的参考权重,得到所述优化后的第二解释结果中与所述重要性分析结果对应的内容。According to the service type and the reference weight of the service type, the content corresponding to the importance analysis result in the optimized second interpretation result is obtained.
  5. 根据权利要求4所述的方法,其中,所述根据所述业务类型和所述业务类型的参考权重,得到所述优化后的第二解释结果中与所述重要性分析结果对应的内容,包括:The method according to claim 4, wherein obtaining the content corresponding to the importance analysis result in the optimized second interpretation result according to the service type and the reference weight of the service type, comprising: :
    基于所述业务类型的参考权重对所述业务类型进行降序排序,得到每一所述业务类型的第一排序值;Sorting the service types in descending order based on the reference weights of the service types to obtain a first ranking value of each of the service types;
    将第一排序值在第一预设排序范围内的业务类型和对应的参考权重,作为所述优化后的第二解释结果中与所述重要性分析结果对应的内容。The service types and corresponding reference weights with the first ranking value within the first preset ranking range are taken as the content corresponding to the importance analysis result in the optimized second interpretation result.
  6. 根据权利要求2至5中任一项所述的方法,其中,获取所述人工智能模型的所述特征字段的重要性分析结果,包括:The method according to any one of claims 2 to 5, wherein acquiring the importance analysis result of the feature field of the artificial intelligence model comprises:
    获取所述人工智能模型中的所述特征字段;obtaining the feature field in the artificial intelligence model;
    在获取的所述人工智能模型的训练样本集中选取待解释样本;所述待解释样本包括所述特征字段的特征值;Select the sample to be explained in the acquired training sample set of the artificial intelligence model; the sample to be explained includes the feature value of the feature field;
    基于所述待解释样本,生成局部样本和所述局部样本的样本权重;所述局部样本包括所述特征字段的特征值;generating a local sample and a sample weight of the local sample based on the to-be-interpreted sample; the local sample includes the feature value of the feature field;
    将所述局部样本输入所述人工智能模型,得到所述局部样本的决策结果;Inputting the local samples into the artificial intelligence model to obtain the decision results of the local samples;
    基于所述局部样本、所述样本权重以及所述局部样本的决策结果进行机器学习训练,得到用于对所述人工智能模型进行近似拟合的解释模型;Perform machine learning training based on the local samples, the sample weights and the decision results of the local samples, to obtain an explanation model for approximately fitting the artificial intelligence model;
    将所述解释模型中所述特征字段对应的系数,作为所述特征字段在所述人工智能模型进行决策时的参考权重;Taking the coefficient corresponding to the feature field in the interpretation model as the reference weight of the feature field when the artificial intelligence model makes a decision;
    基于所述特征字段的参考权重对所述特征字段进行降序排序,得到所述特征字段的第二排序值;Sort the feature fields in descending order based on the reference weights of the feature fields to obtain a second sorting value of the feature fields;
    将所述第二排序值在第二预设排序范围内的特征字段及对应的参考权重,作为所述重要性分析结果。The feature fields with the second sorting value within the second preset sorting range and the corresponding reference weights are used as the importance analysis result.
  7. 根据权利要求6所述的方法,其中,所述基于所述待解释样本,生成局部样本和所述局部样本的样本权重,包括:The method according to claim 6, wherein the generating a partial sample and a sample weight of the partial sample based on the to-be-interpreted sample comprises:
    按照预设的变换规则对所述待解释样本进行变换,得到所述局部样本;Transform the to-be-interpreted sample according to a preset transformation rule to obtain the local sample;
    确定所述局部样本与所述待解释样本之间的相似度,作为所述局部样本的样本权重。The similarity between the local samples and the to-be-interpreted samples is determined as a sample weight of the local samples.
  8. 根据权利要求2至7中任一项所述的方法,其中,所述第一解释结果还包括所述人工智能模型的决策规则;The method according to any one of claims 2 to 7, wherein the first interpretation result further comprises a decision rule of the artificial intelligence model;
    获取所述人工智能模型的决策规则,包括:Obtain the decision rules of the artificial intelligence model, including:
    获取所述人工智能模型的训练样本集;obtaining a training sample set of the artificial intelligence model;
    将所述训练样本集输入所述人工智能模型,得到所述训练样本集的决策结果;所述决策结果包含所述决策结果出现的概率;Inputting the training sample set into the artificial intelligence model to obtain a decision result of the training sample set; the decision result includes the probability of the decision result occurring;
    根据所述训练样本集和所述训练样本集的决策结果进行机器学习训练,得到单棵决策树模型;Carry out machine learning training according to the training sample set and the decision result of the training sample set to obtain a single decision tree model;
    提取所述单棵决策树模型中至少一个决策结果分支所对应的分裂条件,得到所述人工智能模型的决策规则。Extracting the splitting condition corresponding to at least one decision result branch in the single decision tree model, to obtain the decision rule of the artificial intelligence model.
  9. 根据权利要求8所述的方法,其中,还包括:The method of claim 8, further comprising:
    获取所述人工智能模型中的所述特征字段;obtaining the feature field in the artificial intelligence model;
    在获取的所述人工智能模型的训练样本集中选取待解释样本;所述待解释样本包括所述特征字段的特征值;Select the sample to be explained in the acquired training sample set of the artificial intelligence model; the sample to be explained includes the feature value of the feature field;
    将所述待解释样本输入所述单棵决策树模型,得到所述待解释样本的决策结果;Inputting the sample to be explained into the single decision tree model to obtain the decision result of the sample to be explained;
    遍历所述特征字段;traverse the feature field;
    对所述待解释样本中当前遍历到的特征字段的特征值进行变换,得到与所述当前遍历到的特征字段所对应的变换样本;Transform the feature value of the feature field currently traversed in the to-be-interpreted sample to obtain a transformed sample corresponding to the feature field currently traversed;
    将所述变换样本输入所述单棵决策树模型,得到所述变换样本的决策结果;Inputting the transformed sample into the single decision tree model to obtain the decision result of the transformed sample;
    确定所述变换样本和所述待解释样本的决策结果中的概率之间的差值,作为所述当前遍历到的特征字段的参考权重;determining the difference between the probabilities in the decision result of the transformed sample and the sample to be explained, as the reference weight of the currently traversed feature field;
    在遍历结束的情况下,基于所述特征字段及所述特征字段的参考权重,得到所述重要性分析结果。When the traversal ends, the importance analysis result is obtained based on the feature field and the reference weight of the feature field.
  10. 根据权利要求1至9中任一项所述的方法,其中,所述基于所述第二解释结果,生成所述人工智能模型的解释报告,包括:The method according to any one of claims 1 to 9, wherein the generating an explanation report of the artificial intelligence model based on the second explanation result comprises:
    获取参考报告;obtain reference reports;
    采用自然语言处理工具,学习所述参考报告中的文本结构和行文范式;Use natural language processing tools to learn the text structure and writing paradigm in the reference report;
    基于学习到的所述文字结构和行文范式,根据所述第二解释结果生成所述人工智能模型的解释报告。Based on the learned text structure and writing paradigm, an interpretation report of the artificial intelligence model is generated according to the second interpretation result.
  11. 根据权利要求1至10中任一项所述的方法,其中,还包括:The method according to any one of claims 1 to 10, wherein, further comprising:
    获取所述人工智能模型的描述性信息;obtain descriptive information of the artificial intelligence model;
    将所述人工智能模型的描述性信息,整合到所述人工智能模型的解释报告中。Integrate the descriptive information of the artificial intelligence model into the interpretation report of the artificial intelligence model.
  12. 一种用于解释人工智能模型的装置,包括:An apparatus for interpreting artificial intelligence models, including:
    第一解释结果获取模块,被配置为获取人工智能模型的第一解释结果;所述第一解释结果为基于所述人工智能模型的特征字段所表示的解释结果;a first interpretation result acquisition module, configured to acquire a first interpretation result of the artificial intelligence model; the first interpretation result is an interpretation result represented by a feature field based on the artificial intelligence model;
    关联关系获取模块,被配置为获取所述特征字段与业务含义的关联关系;an association relationship obtaining module, configured to obtain the association relationship between the feature field and the business meaning;
    第二解释结果生成模块,被配置为基于所述关联关系,将所述第一解释结果中的所述特征字段替换成关联的业务含义,得到所述人工智能模型的第二解释结果;A second interpretation result generating module, configured to replace the feature field in the first interpretation result with the associated business meaning based on the association relationship, to obtain a second interpretation result of the artificial intelligence model;
    解释报告生成模块,被配置为基于所述第二解释结果,生成所述人工智能模型的解释报告。An interpretation report generating module is configured to generate an interpretation report of the artificial intelligence model based on the second interpretation result.
  13. 根据权利要求12所述的装置,其中,所述第一解释结果包括所述特征字段的重要性分析结果;The apparatus of claim 12, wherein the first interpretation result comprises an importance analysis result of the feature field;
    所述重要性分析结果包括所述特征字段以及所述特征字段在所述人工智能模型进行决策时的参考权重。The importance analysis result includes the feature field and the reference weight of the feature field when the artificial intelligence model makes a decision.
  14. 根据权利要求13所述的装置,其中,还包括:The apparatus of claim 13, further comprising:
    优化模块,被配置为对所述第二解释结果进行优化;an optimization module configured to optimize the second interpretation result;
    所述解释报告生成模块,还被配置为根据优化后的第二解释结果,生成所述人工智能模型的解释报告。The interpretation report generating module is further configured to generate an interpretation report of the artificial intelligence model according to the optimized second interpretation result.
  15. 根据权利要求14所述的装置,其中,所述优化模块被配置为:The apparatus of claim 14, wherein the optimization module is configured to:
    基于所述第二解释结果中与所述重要性分析结果对应的内容,构建解释图谱;其中,所述解释图谱中的节点包括所述业务含义和预设的业务类型;所述解释图谱的边表示所述业务含义与所述业务类型之间的映射关系;An explanation graph is constructed based on the content corresponding to the importance analysis result in the second explanation result; wherein, the nodes in the explanation graph include the business meaning and the preset business type; the edges of the explanation graph Indicates the mapping relationship between the business meaning and the business type;
    根据所述解释图谱,确定每一业务类型所连接的至少一个业务含义;According to the interpretation map, determine at least one service meaning connected to each service type;
    对于每一所述业务类型,对所连接的业务含义的参考权重求和,得到对应业务类型的参考权重;For each of the service types, the reference weights of the connected service meanings are summed to obtain the reference weights of the corresponding service types;
    根据所述业务类型和所述业务类型的参考权重,得到所述优化后的第二解释结果中与所述重要性分析结果对应的内容。According to the service type and the reference weight of the service type, the content corresponding to the importance analysis result in the optimized second interpretation result is obtained.
  16. 根据权利要求15所述的装置,其中,所述优化模块被配置为:The apparatus of claim 15, wherein the optimization module is configured to:
    基于所述业务类型的参考权重对所述业务类型进行降序排序,得到每一所述业务类型的第一排序值;Sorting the service types in descending order based on the reference weights of the service types to obtain a first ranking value of each of the service types;
    将第一排序值在第一预设排序范围内的业务类型和对应的参考权重,作为所述优化后的第二解释结果中与所述重要性分析结果对应的内容。The service types and corresponding reference weights with the first ranking value within the first preset ranking range are taken as the content corresponding to the importance analysis result in the optimized second interpretation result.
  17. 根据权利要求13至16中任一项所述的装置,其中,所述第一解释结果获取模块被配置为:The apparatus according to any one of claims 13 to 16, wherein the first interpretation result acquisition module is configured to:
    获取所述人工智能模型中的所述特征字段;obtaining the feature field in the artificial intelligence model;
    在获取的所述人工智能模型的训练样本集中选取待解释样本;所述待解释样本包括所述特征字段的特征值;Select the sample to be explained in the acquired training sample set of the artificial intelligence model; the sample to be explained includes the feature value of the feature field;
    基于所述待解释样本,生成局部样本和所述局部样本的样本权重;所述局部样本包括所述特征字段的特征值;Based on the to-be-interpreted sample, a partial sample and a sample weight of the partial sample are generated; the partial sample includes the feature value of the feature field;
    将所述局部样本输入所述人工智能模型,得到所述局部样本的决策结果;Inputting the local samples into the artificial intelligence model to obtain the decision results of the local samples;
    基于所述局部样本、所述样本权重以及所述局部样本的决策结果进行机器学习训练,得到用于对所述人工智能模型进行近似拟合的解释模型;Perform machine learning training based on the local samples, the sample weights and the decision results of the local samples, to obtain an explanation model for approximately fitting the artificial intelligence model;
    将所述解释模型中所述特征字段对应的系数,作为所述特征字段在所述人工智能模型进行决策时的参考权重;Taking the coefficient corresponding to the feature field in the interpretation model as the reference weight of the feature field when the artificial intelligence model makes a decision;
    基于所述特征字段的参考权重对所述特征字段进行降序排序,得到所述特征字段的第二排序值;Sort the feature fields in descending order based on the reference weights of the feature fields to obtain a second sorting value of the feature fields;
    将所述第二排序值在第二预设排序范围内的特征字段及对应的参考权重,作为所 述重要性分析结果。The feature fields with the second sorting value within the second preset sorting range and the corresponding reference weights are used as the result of the importance analysis.
  18. 根据权利要求17所述的装置,其中,所述第一解释结果获取模块被配置为:The apparatus according to claim 17, wherein the first interpretation result obtaining module is configured to:
    按照预设的变换规则对所述待解释样本进行变换,得到所述局部样本;Transform the to-be-interpreted sample according to a preset transformation rule to obtain the local sample;
    确定所述局部样本与所述待解释样本之间的相似度,作为所述局部样本的样本权重。The similarity between the local samples and the to-be-interpreted samples is determined as a sample weight of the local samples.
  19. 根据权利要求12至18中任一项所述的装置,其中,An apparatus according to any one of claims 12 to 18, wherein,
    所述第一解释结果还包括所述人工智能模型的决策规则;The first interpretation result further includes the decision rule of the artificial intelligence model;
    所述第一解释结果获取模块被配置为:The first interpretation result acquisition module is configured to:
    获取所述人工智能模型的训练样本集;obtaining a training sample set of the artificial intelligence model;
    将所述训练样本集输入所述人工智能模型,得到所述训练样本集的决策结果;所述决策结果包含所述决策结果出现的概率;Inputting the training sample set into the artificial intelligence model to obtain a decision result of the training sample set; the decision result includes the probability of the decision result occurring;
    根据所述训练样本集和所述训练样本集的决策结果进行机器学习训练,得到单棵决策树模型;Carry out machine learning training according to the training sample set and the decision result of the training sample set to obtain a single decision tree model;
    提取所述单棵决策树模型中至少一个决策结果分支所对应的分裂条件,得到所述人工智能模型的决策规则。Extracting the splitting condition corresponding to at least one decision result branch in the single decision tree model, to obtain the decision rule of the artificial intelligence model.
  20. 根据权利要求19所述的装置,其中,所述第一解释结果获取模块被配置为:The apparatus of claim 19, wherein the first interpretation result acquisition module is configured to:
    获取所述人工智能模型中的所述特征字段;obtaining the feature field in the artificial intelligence model;
    在获取的所述人工智能模型的训练样本集中选取待解释样本;所述待解释样本包括所述特征字段的特征值;Select the sample to be explained in the acquired training sample set of the artificial intelligence model; the sample to be explained includes the feature value of the feature field;
    将所述待解释样本输入所述单棵决策树模型,得到所述待解释样本的决策结果;Inputting the sample to be explained into the single decision tree model to obtain the decision result of the sample to be explained;
    遍历所述特征字段;traverse the feature field;
    对所述待解释样本中当前遍历到的特征字段的特征值进行变换,得到与所述当前遍历到的特征字段所对应的变换样本;Transform the feature value of the feature field currently traversed in the to-be-interpreted sample to obtain a transformed sample corresponding to the feature field currently traversed;
    将所述变换样本输入所述单棵决策树模型,得到所述变换样本的决策结果;Inputting the transformed sample into the single decision tree model to obtain the decision result of the transformed sample;
    确定所述变换样本和所述待解释样本的决策结果中的概率之间的差值,作为所述当前遍历到的特征字段的参考权重;determining the difference between the probabilities in the decision result of the transformed sample and the sample to be explained, as the reference weight of the currently traversed feature field;
    在遍历结束的情况下,基于所述特征字段及所述特征字段的参考权重,得到所述重要性分析结果。When the traversal ends, the importance analysis result is obtained based on the feature field and the reference weight of the feature field.
  21. 根据权利要求12至20中任一项所述的装置,其中,所述解释报告生成模块被配置为:The apparatus of any one of claims 12 to 20, wherein the interpretation report generation module is configured to:
    获取参考报告;obtain reference reports;
    采用自然语言处理工具,学习所述参考报告中的文本结构和行文范式;Use natural language processing tools to learn the text structure and writing paradigm in the reference report;
    基于学习到的所述文字结构和行文范式,根据所述第二解释结果生成所述人工智能模型的解释报告。Based on the learned text structure and writing paradigm, an interpretation report of the artificial intelligence model is generated according to the second interpretation result.
  22. 根据权利要求12至21中任一项所述的装置,其中,还包括:The apparatus of any one of claims 12 to 21, further comprising:
    描述信息获取模块,被配置为获取所述人工智能模型的描述性信息;a descriptive information acquisition module, configured to acquire descriptive information of the artificial intelligence model;
    所述解释报告生成模块被配置为将所述人工智能模型的描述性信息,整合到所述人工智能模型的解释报告中。The explanation report generation module is configured to integrate the descriptive information of the artificial intelligence model into an explanation report of the artificial intelligence model.
  23. 一种包括至少一个计算装置和至少一个存储装置的系统,其中,所述至少一个存储装置被配置为存储指令,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行关于用于解释人工智能模型的如下步骤:A system comprising at least one computing device and at least one storage device, wherein the at least one storage device is configured to store instructions that, when executed by the at least one computing device, cause the at least one computing device Perform the following steps for explaining the artificial intelligence model:
    获取人工智能模型的第一解释结果;所述第一解释结果为基于所述人工智能模型的特征字段所表示的解释结果;Obtain a first interpretation result of the artificial intelligence model; the first interpretation result is an interpretation result represented by a feature field based on the artificial intelligence model;
    获取所述特征字段与业务含义的关联关系;Obtain the association relationship between the feature field and the business meaning;
    基于所述关联关系,将所述第一解释结果中的所述特征字段替换成关联的业务含义,得到所述人工智能模型的第二解释结果;Based on the association relationship, replace the feature field in the first interpretation result with the associated business meaning to obtain the second interpretation result of the artificial intelligence model;
    基于所述第二解释结果,生成所述人工智能模型的解释报告。Based on the second interpretation result, an interpretation report of the artificial intelligence model is generated.
  24. 根据权利要求23所述的系统,其中,所述第一解释结果包括所述特征字段的重要性分析结果;The system of claim 23, wherein the first interpretation result comprises an importance analysis result of the feature field;
    所述重要性分析结果包括所述特征字段以及所述特征字段在所述人工智能模型进行决策时的参考权重。The importance analysis result includes the feature field and the reference weight of the feature field when the artificial intelligence model makes a decision.
  25. 根据权利要求24所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:25. The system of claim 24, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    对所述第二解释结果进行优化;optimizing the second interpretation result;
    所述基于所述第二解释结果,生成所述人工智能模型的解释报告包括:The generating an explanation report of the artificial intelligence model based on the second explanation result includes:
    根据优化后的第二解释结果,生成所述人工智能模型的解释报告。According to the optimized second interpretation result, an interpretation report of the artificial intelligence model is generated.
  26. 根据权利要求25所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:26. The system of claim 25, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    基于所述第二解释结果中与所述重要性分析结果对应的内容,构建解释图谱;其中,所述解释图谱中的节点包括所述业务含义和预设的业务类型;所述解释图谱的边表示所述业务含义与所述业务类型之间的映射关系;根据所述解释图谱,确定每一业务类型所连接的至少一个业务含义;An explanation graph is constructed based on the content corresponding to the importance analysis result in the second explanation result; wherein, the nodes in the explanation graph include the business meaning and the preset business type; the edges of the explanation graph representing the mapping relationship between the business meaning and the business type; according to the interpretation map, determine at least one business meaning connected to each business type;
    对于每一所述业务类型,对所连接的业务含义的参考权重求和,得到对应业务类型的参考权重;For each of the service types, the reference weights of the connected service meanings are summed to obtain the reference weights of the corresponding service types;
    根据所述业务类型和所述业务类型的参考权重,得到所述优化后的第二解释结果中与所述重要性分析结果对应的内容。According to the service type and the reference weight of the service type, the content corresponding to the importance analysis result in the optimized second interpretation result is obtained.
  27. 根据权利要求26所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:27. The system of claim 26, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    基于所述业务类型的参考权重对所述业务类型进行降序排序,得到每一所述业务类型的第一排序值;Sorting the service types in descending order based on the reference weights of the service types to obtain a first ranking value of each of the service types;
    将第一排序值在第一预设排序范围内的业务类型和对应的参考权重,作为所述优化后的第二解释结果中与所述重要性分析结果对应的内容。The service types and corresponding reference weights with the first ranking value within the first preset ranking range are taken as the content corresponding to the importance analysis result in the optimized second interpretation result.
  28. 根据权利要求24至27中任一项所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:27. The system of any one of claims 24 to 27, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    获取所述人工智能模型中的所述特征字段;obtaining the feature field in the artificial intelligence model;
    在获取的所述人工智能模型的训练样本集中选取待解释样本;所述待解释样本包括所述特征字段的特征值;Select the sample to be explained in the acquired training sample set of the artificial intelligence model; the sample to be explained includes the feature value of the feature field;
    基于所述待解释样本,生成局部样本和所述局部样本的样本权重;所述局部样本包括所述特征字段的特征值;generating a local sample and a sample weight of the local sample based on the to-be-interpreted sample; the local sample includes the feature value of the feature field;
    将所述局部样本输入所述人工智能模型,得到所述局部样本的决策结果;Inputting the local samples into the artificial intelligence model to obtain the decision results of the local samples;
    基于所述局部样本、所述样本权重以及所述局部样本的决策结果进行机器学习训练,得到用于对所述人工智能模型进行近似拟合的解释模型;Perform machine learning training based on the local samples, the sample weights and the decision results of the local samples, to obtain an explanation model for approximately fitting the artificial intelligence model;
    将所述解释模型中所述特征字段对应的系数,作为所述特征字段在所述人工智能模型进行决策时的参考权重;Taking the coefficient corresponding to the feature field in the interpretation model as the reference weight of the feature field when the artificial intelligence model makes a decision;
    基于所述特征字段的参考权重对所述特征字段进行降序排序,得到所述特征字段的第二排序值;Sort the feature fields in descending order based on the reference weights of the feature fields to obtain a second sorting value of the feature fields;
    将所述第二排序值在第二预设排序范围内的特征字段及对应的参考权重,作为所述重要性分析结果。The feature fields with the second sorting value within the second preset sorting range and the corresponding reference weights are used as the importance analysis result.
  29. 根据权利要求28所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:The system of claim 28, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    按照预设的变换规则对所述待解释样本进行变换,得到所述局部样本;Transform the to-be-interpreted sample according to a preset transformation rule to obtain the local sample;
    确定所述局部样本与所述待解释样本之间的相似度,作为所述局部样本的样本权重。The similarity between the local samples and the to-be-interpreted samples is determined as a sample weight of the local samples.
  30. 根据权利要求24至29中任一项所述的系统,其中,所述第一解释结果还包括所述人工智能模型的决策规则;The system of any one of claims 24 to 29, wherein the first interpretation result further comprises decision rules for the artificial intelligence model;
    所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:The instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the following steps:
    获取所述人工智能模型的训练样本集;obtaining a training sample set of the artificial intelligence model;
    将所述训练样本集输入所述人工智能模型,得到所述训练样本集的决策结果;所述决策结果包含所述决策结果出现的概率;Inputting the training sample set into the artificial intelligence model to obtain a decision result of the training sample set; the decision result includes the probability of the decision result occurring;
    根据所述训练样本集和所述训练样本集的决策结果进行机器学习训练,得到单棵决策树模型;Carry out machine learning training according to the training sample set and the decision result of the training sample set to obtain a single decision tree model;
    提取所述单棵决策树模型中至少一个决策结果分支所对应的分裂条件,得到所述人工智能模型的决策规则。Extracting the splitting condition corresponding to at least one decision result branch in the single decision tree model, to obtain the decision rule of the artificial intelligence model.
  31. 根据权利要求30所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:The system of claim 30, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    获取所述人工智能模型中的所述特征字段;obtaining the feature field in the artificial intelligence model;
    在获取的所述人工智能模型的训练样本集中选取待解释样本;所述待解释样本包括所述特征字段的特征值;Select the sample to be explained in the acquired training sample set of the artificial intelligence model; the sample to be explained includes the feature value of the feature field;
    将所述待解释样本输入所述单棵决策树模型,得到所述待解释样本的决策结果;Inputting the sample to be explained into the single decision tree model to obtain the decision result of the sample to be explained;
    遍历所述特征字段;traverse the feature field;
    对所述待解释样本中当前遍历到的特征字段的特征值进行变换,得到与所述当前遍历到的特征字段所对应的变换样本;Transform the feature value of the feature field currently traversed in the to-be-interpreted sample to obtain a transformed sample corresponding to the feature field currently traversed;
    将所述变换样本输入所述单棵决策树模型,得到所述变换样本的决策结果;Inputting the transformed sample into the single decision tree model to obtain the decision result of the transformed sample;
    确定所述变换样本和所述待解释样本的决策结果中的概率之间的差值,作为所述当前遍历到的特征字段的参考权重;determining the difference between the probabilities in the decision result of the transformed sample and the sample to be explained, as the reference weight of the currently traversed feature field;
    在遍历结束的情况下,基于所述特征字段及所述特征字段的参考权重,得到所述重要性分析结果。When the traversal ends, the importance analysis result is obtained based on the feature field and the reference weight of the feature field.
  32. 根据权利要求23至31中任一项所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:31. The system of any one of claims 23 to 31, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    获取参考报告;obtain reference reports;
    采用自然语言处理工具,学习所述参考报告中的文本结构和行文范式;Use natural language processing tools to learn the text structure and writing paradigm in the reference report;
    基于学习到的所述文字结构和行文范式,根据所述第二解释结果生成所述人工智能模型的解释报告。Based on the learned text structure and writing paradigm, an interpretation report of the artificial intelligence model is generated according to the second interpretation result.
  33. 根据权利要求23至32中任一项所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行如下步骤:32. The system of any one of claims 23 to 32, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the steps of:
    获取所述人工智能模型的描述性信息;obtain descriptive information of the artificial intelligence model;
    将所述人工智能模型的描述性信息,整合到所述人工智能模型的解释报告中。Integrate the descriptive information of the artificial intelligence model into the interpretation report of the artificial intelligence model.
  34. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器执行时实现如权利要求1至11中任一项所述的方法。A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of claims 1 to 11.
PCT/CN2022/075146 2021-02-09 2022-01-30 Method and apparatus for interpreting artificial intelligence model, and system WO2022171037A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110176552.8A CN112766415B (en) 2021-02-09 2021-02-09 Method, device and system for explaining artificial intelligence model
CN202110176552.8 2021-02-09

Publications (1)

Publication Number Publication Date
WO2022171037A1 true WO2022171037A1 (en) 2022-08-18

Family

ID=75705433

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075146 WO2022171037A1 (en) 2021-02-09 2022-01-30 Method and apparatus for interpreting artificial intelligence model, and system

Country Status (2)

Country Link
CN (2) CN116304702A (en)
WO (1) WO2022171037A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115471108A (en) * 2022-09-27 2022-12-13 陈浩川 Data analysis decision method and system and big data resource center

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116304702A (en) * 2021-02-09 2023-06-23 第四范式(北京)技术有限公司 Method, device and system for explaining artificial intelligence model

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334221A (en) * 2019-07-18 2019-10-15 桂林电子科技大学 A kind of interpretation recommended method in knowledge based map path
CN111768040A (en) * 2020-07-01 2020-10-13 深圳前海微众银行股份有限公司 Model interpretation method, device, equipment and readable storage medium
CN111797995A (en) * 2020-06-29 2020-10-20 第四范式(北京)技术有限公司 Method and device for generating interpretation report of model prediction sample
US20200356891A1 (en) * 2019-05-06 2020-11-12 Sap Se Generating explanations of machine learning predictions in matching problems
CN112612872A (en) * 2020-12-17 2021-04-06 第四范式(北京)技术有限公司 Method, device, equipment and storage medium for realizing artificial intelligence interpretability
CN112766415A (en) * 2021-02-09 2021-05-07 第四范式(北京)技术有限公司 Method, device and system for explaining artificial intelligence model

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108960434B (en) * 2018-06-28 2021-07-20 第四范式(北京)技术有限公司 Method and device for analyzing data based on machine learning model interpretation
WO2020013726A1 (en) * 2018-07-13 2020-01-16 Публичное Акционерное Общество "Сбербанк России" Method for interpreting artificial neural networks
CN111046926B (en) * 2019-11-26 2023-09-19 山东浪潮科学研究院有限公司 Computer vision image classification integrated learning method
CN111340356A (en) * 2020-02-24 2020-06-26 支付宝(杭州)信息技术有限公司 Method and apparatus for evaluating model interpretation tools
CN111553389B (en) * 2020-04-08 2023-06-13 哈尔滨工程大学 Decision tree generation method for understanding deep learning model target classification decision mechanism

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200356891A1 (en) * 2019-05-06 2020-11-12 Sap Se Generating explanations of machine learning predictions in matching problems
CN110334221A (en) * 2019-07-18 2019-10-15 桂林电子科技大学 A kind of interpretation recommended method in knowledge based map path
CN111797995A (en) * 2020-06-29 2020-10-20 第四范式(北京)技术有限公司 Method and device for generating interpretation report of model prediction sample
CN111768040A (en) * 2020-07-01 2020-10-13 深圳前海微众银行股份有限公司 Model interpretation method, device, equipment and readable storage medium
CN112612872A (en) * 2020-12-17 2021-04-06 第四范式(北京)技术有限公司 Method, device, equipment and storage medium for realizing artificial intelligence interpretability
CN112766415A (en) * 2021-02-09 2021-05-07 第四范式(北京)技术有限公司 Method, device and system for explaining artificial intelligence model

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115471108A (en) * 2022-09-27 2022-12-13 陈浩川 Data analysis decision method and system and big data resource center
CN115471108B (en) * 2022-09-27 2023-09-01 中交西北投资发展有限公司 Data analysis decision-making method, system and large data resource center

Also Published As

Publication number Publication date
CN116304702A (en) 2023-06-23
CN112766415A (en) 2021-05-07
CN112766415B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
US10929614B2 (en) Automated contextual dialog generation for cognitive conversation
Ferrara Should chatgpt be biased? challenges and risks of bias in large language models
Lu et al. Machine learning for synthetic data generation: a review
US10599686B1 (en) Method and system for extracting information from graphs
WO2022171037A1 (en) Method and apparatus for interpreting artificial intelligence model, and system
US20190354850A1 (en) Identifying transfer models for machine learning tasks
US11901047B2 (en) Medical visual question answering
CN111368996A (en) Retraining projection network capable of delivering natural language representation
US10067935B2 (en) Prediction and optimized prevention of bullying and other counterproductive interactions in live and virtual meeting contexts
US11250219B2 (en) Cognitive natural language generation with style model
US10678855B2 (en) Generating descriptive text contemporaneous to visual media
CN110377913A (en) A kind of sentiment analysis method and device thereof, electronic equipment and storage medium
EP3377983A1 (en) Generating feature embeddings from a co-occurrence matrix
US20220207384A1 (en) Extracting Facts from Unstructured Text
WO2022121515A1 (en) Mixup data augmentation for knowledge distillation framework
US11687709B2 (en) Domain knowledge based feature extraction for enhanced text representation
US20210065019A1 (en) Using a dialog system for learning and inferring judgment reasoning knowledge
Corchado et al. Generative artificial intelligence: fundamentals
Singh et al. AI-based personality prediction for human well-being from text data: a systematic review
US20220100962A1 (en) Word sense disambiguation using a deep logico-neural network
Akman et al. Audio Explainable Artificial Intelligence: A Review
Sharp et al. Grounding gradable adjectives through crowdsourcing
Raji et al. Explainable Machine Learning Prediction for the Academic Performance of Deaf Scholars
Picco et al. Learning insurance benefit rules from policy texts with small labeled data
Denisenko et al. Analysis of attributional modeling methods in marketing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22752198

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22752198

Country of ref document: EP

Kind code of ref document: A1