Correcting a machine learning model
A computer-implemented method includes receiving an incorrect prediction output by a trained machine learning model, which has been trained using training data items. The method includes identifying a training data item used to train the model that is a cause of the incorrect prediction, by determining an impact on performance of the trained machine learning model associated with removing the training data item from the plurality of training data. The trained model can then be updated to remove the effect of the identified training data item, allowing the model to be automatically corrected in view of poor quality training data.
1 . A system for saving computational resource and memory usage while ensuring that a previous property of a trained machine learning model is retained, the system comprising a processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, cause the system to:
receive an incorrect prediction of the trained machine learning model, the trained machine learning model based on a plurality of training data items;
select a training data item of the plurality of training data items;
calculate an estimate of an impact on performance of the trained machine learning model in respect of the incorrect prediction, the impact caused by removing the selected training data item from the plurality of training data items, wherein the estimate of the impact is calculated by:
calculating a first posterior probability distribution corresponding to the trained machine learning model;
calculating a second posterior distribution corresponding to the trained machine learning model with the selected training data item removed; and
comparing the first posterior probability distribution and second posterior probability distribution to determine the estimate of the impact;
determine that the impact on performance indicates an improvement in performance of the trained machine learning model;
identify the selected training data item as a cause of the incorrect prediction based on the calculated estimate of the impact on performance indicating improvement in performance of the trained machine learning model; and
automatically correct the trained machine learning model to remove an effect of the selected training data item without requiring entire retraining of the trained machine learning model.
2 . The system of claim 1 , wherein the computer-readable instructions that cause the system to calculate the estimate of the impact on performance of the trained machine learning model comprises instructions that, when executed by the processor, determine an impact on the first posterior probability distribution of the trained machine learning model.
3 . The system of claim 1 , wherein the trained machine learning model is corrected by unlearning datapoints in the selected training data item.
4 . The system of claim 1 , comprising instructions that, when executed by the processor, cause the system to:
determine a detrimental impact on performance of the trained machine learning model of each training data item in the plurality of training data items, and
select one or more of the plurality of training data items with greatest detrimental impact as the cause of the incorrect prediction.
5 . The system of claim 4 , wherein the computer-readable instructions that cause the system to determine the detrimental impact of each training data item comprises instructions that, when executed by the processor, cause the system to:
calculate a third posterior distribution corresponding to the trained machine learning model with the incorrect prediction added to the plurality of training data items,
wherein the third posterior distribution is estimated from the first posterior probability distribution corresponding to the trained machine learning model.
6 . The system of claim 5 , comprising instructions that, when executed by the processor, cause the system to estimate the third posterior distribution using a linear influence function.
7 . The system of claim 3 , wherein the datapoints in the selected training data item are unlearned while using the first posterior probability distribution as a prior.
8 . A computer-implemented method for saving computational resource and memory usage while ensuring that a previous property of a trained machine learning model is retained, the method comprising:
receiving an incorrect prediction of the trained machine learning model, the trained machine learning model based on a plurality of training data items;
selecting a training data item of the plurality of training data items;
calculating an estimate of an impact on performance of the trained machine learning model in respect of the incorrect prediction, the impact caused by removing the selected training data item from the plurality of training data items, wherein the estimate of the impact is calculated by:
calculating a first posterior probability distribution corresponding to the trained machine learning model;
calculating a second posterior distribution corresponding to the trained machine learning model with the selected training data item removed; and
comparing the first posterior probability distribution and second posterior probability distribution to determine the estimate of the impact;
determining that the impact on performance indicates an improvement in performance of the trained machine learning model;
identifying the selected training data item as a cause of the incorrect prediction based on the calculated estimate of the impact on performance indicating improvement in performance of the trained machine learning model; and
automatically correcting the trained machine learning model to remove an effect of the selected training data item without requiring entire retraining of the trained machine learning model.
9 . The method of claim 8 , wherein the trained machine learning model is one of an image analysis model, an audio analysis model, or a text processing model.
10 . The method of claim 8 , wherein calculating the estimate of the impact on performance of the trained machine learning model comprises determining an impact on the first posterior probability distribution of the trained machine learning model.
11 . The method of claim 8 , wherein the trained machine learning model is corrected by unlearning datapoints in the selected training data item.
12 . The method of claim 11 , wherein the datapoints in the selected training data item are unlearned while using the first posterior probability distribution as a prior.
13 . The method of claim 8 , wherein correcting the trained machine learning model comprises fine tuning the trained machine learning model on the identified selected training data item.
14 . The method of claim 8 , wherein correcting the trained machine learning model comprises:
calculating a third posterior distribution corresponding to the trained machine learning model with the identified selected training data item removed from the plurality of training data items,
wherein the third posterior distribution is estimated from the first posterior probability distribution corresponding to the trained machine learning model.
15 . The method of claim 8 , comprising:
receiving an input data item, and
using the corrected trained machine learning model to generate a prediction from the input data item.
16 . A tangible non-transient computer-readable storage medium for saving computational resource and memory usage while ensuring that a previous property of a trained machine learning model is retained, the computer-readable storage medium having recorded thereon instructions that, when executed by a computer device cause the computer device to:
receive an incorrect prediction of the trained machine learning model, the trained machine learning model based on a plurality of training data items;
select a training data item of the plurality of training data items;
calculate an estimate of an impact on performance of the trained machine learning model in respect of the incorrect prediction, the impact caused by removing the selected training data item from the plurality of training data items, wherein the estimate of the impact is calculated by:
calculating a first posterior probability distribution corresponding to the trained machine learning model;
calculating a second posterior distribution corresponding to the trained machine learning model with the selected training data item removed; and
comparing the first posterior probability distribution and second posterior probability distribution to determine the estimate of the impact;
determine that the impact on performance indicates an improvement in performance of the trained machine learning model;
identify the selected training data item as a cause of the incorrect prediction based on the calculated estimate of the impact on performance indicating improvement in performance of the trained machine learning model; and
automatically correct the trained machine learning model to remove an effect of the selected training data item without requiring entire retraining of the trained machine learning model.
17 . The tangible non-transient computer-readable storage medium of claim 16 , wherein the trained machine learning model is one of an image analysis model, an audio analysis model, or a text processing model.
18 . The tangible non-transient computer-readable storage medium of claim 16 , wherein calculating the estimate of the impact on performance of the trained machine learning model comprises determining an impact on the first posterior probability distribution of the trained machine learning model.
19 . The tangible non-transient computer-readable storage medium of claim 16 , wherein the trained machine learning model is corrected by unlearning datapoints in the selected training data item.
20 . The tangible non-transient computer-readable storage medium of claim 16 , comprising instructions to:
determine a detrimental impact on performance of the trained machine learning model of each training data item in the plurality of training data items, and
select one or more of the plurality of training data items with greatest detrimental impact as the cause of the incorrect prediction.