Search

EP-4736068-A2 - SYSTEM, METHOD, AND COMPUTER PROGRAM PRODUCT FOR GENERATING COUNTERFACTUAL INSTANCES

EP4736068A2EP 4736068 A2EP4736068 A2EP 4736068A2EP-4736068-A2

Abstract

Systems, methods, and computer program products for generating counterfactual instances are provided. A system includes at least one processor configured to perturb a machine-learning model based on a plurality of input instances based on an outlier data point, determine that the perturbation based on the plurality of input instances has failed to change a result of the machine-learning model for the outlier data point, generate a plurality of query data points based on the outlier data point, create a training dataset based on each query data point of the plurality of query data points, train a candidate model derived from the machine-learning model based on the training dataset, perturb each candidate model of the plurality of candidate models based on a perturbation vector of a plurality of perturbation vectors, and generate a counterfactual output based on an output of at least one candidate model of the plurality of candidate models.

Inventors

  • LAI, KWEI-HERNG
  • YANG, FAN
  • WANG, LAN
  • MOHAN, Vineeth, Rakesh
  • YANG, HAO
  • DAS, MAHASHWETA

Assignees

  • Visa International Service Association

Dates

Publication Date
20260506
Application Date
20240701

Claims (1)

  1. Attorney Docket No.08223-2401553 (6662WO01) WHAT IS CLAIMED IS: 1. A system, comprising: at least one processor configured to: generate a plurality of initial classifications for a plurality of data records based on a first machine-learning model, the plurality of data records comprising a first plurality of data records for which respective initial classifications of the plurality of initial classifications are associated with a first class and a data record for which a respective initial classification of the plurality of initial classifications is associated with a second class; generate a perturbation vector; perturb the data record based on the perturbation vector to generate a first perturbed data record; generate a first classification for the first perturbed data record based on the first machine-learning model, the first classification associated with the second class; select a subset of the first plurality of data records; perturb the subset of the first plurality of data records to generate a plurality of synthesized data records; train a second machine-learning model based on the subset of the first plurality of data records and the plurality of synthesized data records; and generate a second classification for the first perturbed data record based on the second machine-learning model. 2. A computer-implemented method, comprising: generating, with at least one processor, a plurality of initial classifications for a plurality of data records based on a first machine-learning model, the plurality of data records comprising a first plurality of data records for which respective initial classifications of the plurality of initial classifications are associated with a first class and a data record for which a respective initial classification of the plurality of initial classifications is associated with a second class; generating, with at least one processor, a perturbation vector; 5VJ3146.DOCX Page 48 of 54 Attorney Docket No.08223-2401553 (6662WO01) perturbing, with at least one processor, the data record based on the perturbation vector to generate a first perturbed data record; generating, with at least one processor, a first classification for the first perturbed data record based on the first machine-learning model, the first classification associated with the second class; selecting, with at least one processor, a subset of the first plurality of data records; perturbing, with at least one processor, the subset of the first plurality of data records to generate a plurality of synthesized data records; training, with at least one processor, a second machine-learning model based on the subset of the first plurality of data records and the plurality of synthesized data records; and generating, with at least one processor, a second classification for the first perturbed data record based on the second machine-learning model. 3. A system, comprising: at least one processor configured to: perturb a machine-learning model based on a plurality of input instances based on an outlier data point; determine that the perturbation based on the plurality of input instances has failed to change a result of the machine-learning model for the outlier data point; in response to determining that the perturbation has failed, generate a plurality of query data points based on the outlier data point; create a training dataset based on each query data point of the plurality of query data points; train a candidate model derived from the machine-learning model based on the training dataset, resulting in a plurality of candidate models; perturb each candidate model of the plurality of candidate models based on a perturbation vector of a plurality of perturbation vectors; and generate a counterfactual output based on an output of at least one candidate model of the plurality of candidate models. 5VJ3146.DOCX Page 49 of 54 Attorney Docket No.08223-2401553 (6662WO01) 4. The system of claim 3, wherein the at least one processor is further programmed to configured to generate a perturbation vector for each input instance of a plurality of input instances, resulting in the plurality of perturbation vectors. 5. The system of claim 3, wherein the plurality of query data points are determined based on the outlier data point and a clustering or distance algorithm. 6. The system of claim 3, wherein each candidate model of the plurality of candidate models is generated separately, and wherein each subsequent candidate model is generated in response to the counterfactual output of the candidate model resulting in an unchanged predictive output. 7. The system of claim 3, wherein the at least one processor is further configured to: determine that a counterfactual output of at least one candidate model of the plurality of candidate models changes a predictive output of the machine- learning model; and in response to determining that the counterfactual output changes the predictive output, store the candidate model in a data structure for testing. 8. The system of claim 3, wherein the at least one processor is further configured to: determine that a counterfactual output of at least one candidate model of the plurality of candidate models changes a predictive output of the machine- learning model; and in response to determining that the counterfactual output changes the predictive output, calculate a certainty of the candidate model by perturbing a next candidate model with a next query point. 9. The system of claim 3, wherein the plurality of candidate models are stored in a stack data structure. 5VJ3146.DOCX Page 50 of 54 Attorney Docket No.08223-2401553 (6662WO01) 10. A computer-implemented method, comprising: perturbing, with at least one processor, a machine-learning model based on a plurality of input instances based on an outlier data point; determining, with at least one processor, that the perturbation based on the plurality of input instances has failed to change a result of the machine-learning model for the outlier data point; in response to determining that the perturbation has failed, generating, with at least one processor, a plurality of query data points based on the outlier data point; creating, with at least one processor, a training dataset based on each query data point of the plurality of query data points; training, with at least one processor, a candidate model derived from the machine-learning model based on the training dataset, resulting in a plurality of candidate models; perturbing, with at least one processor, each candidate model of the plurality of candidate models based on a perturbation vector of a plurality of perturbation vectors; and generating, with at least one processor, a counterfactual output based on an output of at least one candidate model of the plurality of candidate models. 11. The method of claim 10, further comprising generating a perturbation vector for each input instance of a plurality of input instances, resulting in the plurality of perturbation vectors. 12. The method of claim 10, wherein the plurality of query data points are determined based on the outlier data point and a clustering or distance algorithm. 13. The method of claim 10, wherein each candidate model of the plurality of candidate models is generated separately, and wherein each subsequent candidate model is generated in response to the counterfactual output of the candidate model resulting in an unchanged predictive output. 5VJ3146.DOCX Page 51 of 54 Attorney Docket No.08223-2401553 (6662WO01) 14. The method of claim 10, further comprising: determining that a counterfactual output of at least one candidate model of the plurality of candidate models changes a predictive output of the machine- learning model; and in response to determining that the counterfactual output changes the predictive output, storing the candidate model in a data structure for testing. 15. The method of claim 10, further comprising: determining that a counterfactual output of at least one candidate model of the plurality of candidate models changes a predictive output of the machine- earning model; and in response to determining that the counterfactual output changes the predictive output, calculating a certainty of the candidate model by perturbing a next candidate model with a next query point. 16. The method of claim 10, wherein the plurality of candidate models are stored in a stack data structure. 17. A computer program product comprising at least one non- transitory computer-readable medium including program instructions that, when executed by at least one processor, causes the at least one processor to perform any of the steps recited in claims 1-16. 18. A computer program product comprising at least one non- transitory computer-readable medium including program instructions that, when executed by at least one processor, causes the at least one processor to: generate a plurality of initial classifications for a plurality of data records based on a first machine-learning model, the plurality of data records comprising a first plurality of data records for which respective initial classifications of the plurality of initial classifications are associated with a first class and a data record for which a respective initial classification of the plurality of initial classifications is associated with a second class; generate a perturbation vector; 5VJ3146.DOCX Page 52 of 54 Attorney Docket No.08223-2401553 (6662WO01) perturb the data record based on the perturbation vector to generate a first perturbed data record; generate a first classification for the first perturbed data record based on the first machine-learning model, the first classification associated with the second class; select a subset of the first plurality of data records; perturb the subset of the first plurality of data records to generate a plurality of synthesized data records; train a second machine-learning model based on the subset of the first plurality of data records and the plurality of synthesized data records; and generate a second classification for the first perturbed data record based on the second machine-learning model. 19. A computer program product comprising at least one non- transitory computer-readable medium including program instructions that, when executed by at least one processor, causes the at least one processor to: perturb a machine-learning model based on a plurality of input instances based on an outlier data point; determine that the perturbation based on the plurality of input instances has failed to change a result of the machine-learning model for the outlier data point; in response to determining that the perturbation has failed, generate a plurality of query data points based on the outlier data point; create a training dataset based on each query data point of the plurality of query data points; train a candidate model derived from the machine-learning model based on the training dataset, resulting in a plurality of candidate models; perturb each candidate model of the plurality of candidate models based on a perturbation vector of a plurality of perturbation vectors; and generate a counterfactual output based on an output of at least one candidate model of the plurality of candidate models. 5VJ3146.DOCX Page 53 of 54

Description

Attorney Docket No.08223-2401553 (6662WO01) SYSTEM, METHOD, AND COMPUTER PROGRAM PRODUCT FOR GENERATING COUNTERFACTUAL INSTANCES CROSS REFERENCE TO RELATED APPLICATION [0001] This application claims priority to United States Provisional Patent Application No. 63/523,959, filed June 29, 2023, the disclosure of which is hereby incorporated by reference in its entirety. BACKGROUND 1. Technical Field [0002] This disclosure relates generally to machine-learning and, in some non- limiting embodiments or aspects, to systems, methods, and computer program products for generating counterfactual instances. 2. Technical Considerations [0003] Detecting anomalies is a significant and challenging task that has various practical applications. Since anomalies are rare occurrences, the labels used for detection often contain noise and are unreliable. Consequently, existing anomaly detection algorithms focus on modeling the majority distribution of data in an unsupervised manner. The objective of such algorithms is to identify data points that deviate from the established distribution, thus indicating anomalies. Given the complex structures present in real-world data, advanced techniques, such as deep neural networks and non-linear kernel methods, have emerged to address this problem. [0004] However, as the models become more complex, the interpretability decreases. This means that users have limited ability to understand the decisions made by these models or to diagnose any issues they may have. For example, industries like healthcare and finance, which involve high-stakes applications, place great importance on model interpretability. SUMMARY [0005] Accordingly, provided are improved systems, methods, and computer program products for generating counterfactual instances. [0006] According to non-limiting embodiments or aspects, provided is a system comprising at least one processor configured to: generate a plurality of initial classifications for a plurality of data records based on a first machine-learning model, the plurality of data records comprising a first plurality of data records for which respective initial classifications of the plurality of initial classifications are associated with a first class and a data record for which a respective initial classification of the 5VJ3146.DOCX Page 1 of 54 Attorney Docket No.08223-2401553 (6662WO01) plurality of initial classifications is associated with a second class; generate a perturbation vector; perturb the data record based on the perturbation vector to generate a first perturbed data record; generate a first classification for the first perturbed data record based on the first machine-learning model, the first classification associated with the second class; select a subset of the first plurality of data records; perturb the subset of the first plurality of data records to generate a plurality of synthesized data records; train a second machine-learning model based on the subset of the first plurality of data records and the plurality of synthesized data records; and generate a second classification for the first perturbed data record based on the second machine-learning model. [0007] According to non-limiting embodiments or aspects, provided is a computer- implemented method, comprising: generating, with at least one processor, a plurality of initial classifications for a plurality of data records based on a first machine-learning model, the plurality of data records comprising a first plurality of data records for which respective initial classifications of the plurality of initial classifications are associated with a first class and a data record for which a respective initial classification of the plurality of initial classifications is associated with a second class; generating, with at least one processor, a perturbation vector; perturbing, with at least one processor, the data record based on the perturbation vector to generate a first perturbed data record; generating, with at least one processor, a first classification for the first perturbed data record based on the first machine-learning model, the first classification associated with the second class; selecting, with at least one processor, a subset of the first plurality of data records; perturbing, with at least one processor, the subset of the first plurality of data records to generate a plurality of synthesized data records; training, with at least one processor, a second machine-learning model based on the subset of the first plurality of data records and the plurality of synthesized data records; and generating, with at least one processor, a second classification for the first perturbed data record based on the second machine-learning model. [0008] According to non-limiting embodiments or aspects, provided is a system comprising at least one processor configured to: perturb a machine-learning model based on a plurality of input instances based on an outlier data point; determine that the pertur