Method, apparatus and device for explaining model and computer storage medium
AssigneeBoe Technology Group Co., Ltd.
InventorYusi CHEN
Life of this patent
Estimating the term…
Abstract
Disclosed is a method for explaining a model. The method comprises: transforming a target input sample from an original feature space to an embedding space; generating a perturbation data set in the embedding space; acquiring a weight of a neighborhood vector in the perturbation data set; after that, transforming the perturbation data set back to the original feature space; acquiring an explainable model of a target data analysis model by training based on the acquired data; and acquiring an explanation result based on the explainable model.
Claims21
A method for explaining a model, comprising:
- acquiring a target input sample of a target data analysis model, the target input sample comprising a plurality of features;
- acquiring an embedding vector by transforming the target input sample from an original feature space to an embedding space, the original feature space being a feature space where the target input sample is disposed;
- generating a neighborhood perturbation data set based on the embedding vector, the neighborhood perturbation data set comprising a plurality of first neighborhood vectors in a neighborhood of the embedding vector;
- determining a weight of each of the first neighborhood vectors based on a distance between the first neighborhood vector and the embedding vector, the distance being negatively correlated with the weight of the first neighborhood vector;
- acquiring an original perturbation data set by transforming the neighborhood perturbation data set into the original feature space, the original perturbation data set comprising a plurality of second neighborhood vectors;
- acquiring a plurality of output vectors by inputting the plurality of second neighborhood vectors into the target data analysis model;
- acquiring an explainable model by training a to-be-trained explainable model, by taking the plurality of second neighborhood vectors, the plurality of output vectors, and the weight of each of the first neighborhood vectors as training samples;
- and
- acquiring, based on the explainable model, weights of the plurality of features in the target input sample.
An apparatus for explaining a model, comprising:
- a processor;
- and
- a memory configured to store one or more instructions executable by the processor;
- wherein the processor, when loading and executing the one or more instructions, is caused to perform:
- acquiring a target input sample of a target data analysis model, the target input sample comprising a plurality of features;
- acquiring an embedding vector by transforming the target input sample from an original feature space to an embedding space, the original feature space being a feature space where the target input sample is disposed;
- generating a neighborhood perturbation data set based on the embedding vector, the neighborhood perturbation data set comprising a plurality of first neighborhood vectors in a neighborhood of the embedding vector;
- determining a weight of each of the first neighborhood vectors based on a distance between the first neighborhood vector and the embedding vector, the distance being negatively correlated with the weight of the first neighborhood vector;
- acquiring an original perturbation data set by transforming the neighborhood perturbation data set into the original feature space, the original perturbation data set comprising a plurality of second neighborhood vectors;
- acquiring a plurality of output vectors by inputting the plurality of second neighborhood vectors into the target data analysis model;
- acquiring an explainable model by training a to-be-trained explainable model, by taking the plurality of second neighborhood vectors, the plurality of output vectors, and the weight of each of the first neighborhood vectors as training samples;
- and
- acquiring, based on the explainable model, weights of the plurality of features in the target input sample.
(canceled)
A non-transient computer storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set, when loaded and executed by a processor, causes the processor to perform a method for explaining the model comprising:
- acquiring a target input sample of a target data analysis model, the target input sample comprising a plurality of features;
- acquiring an embedding vector by transforming the target input sample from an original feature space to an embedding space, the original feature space being a feature space where the target input sample is disposed;
- generating a neighborhood perturbation data set based on the embedding vector, the neighborhood perturbation data set comprising a plurality of first neighborhood vectors in a neighborhood of the embedding vector;
- determining a weight of each of the first neighborhood vectors based on a distance between the first neighborhood vector and the embedding vector, the distance being negatively correlated with the weight of the first neighborhood vector;
- acquiring an original perturbation data set by transforming the neighborhood perturbation data set into the original feature space, the original perturbation data set comprising a plurality of second neighborhood vectors;
- acquiring a plurality of output vectors by inputting the plurality of second neighborhood vectors into the target data analysis model;
- acquiring an explainable model by training a to-be-trained explainable model, by taking the plurality of second neighborhood vectors, the plurality of output vectors, and the weight of each of the first neighborhood vectors as training samples;
- and
- acquiring, based on the explainable model, weights of the plurality of features in the target input sample of the target data analysis model.
Dependencies are inferred from the claim text.