# US 2024/0202587 A1 · Un-learning of training data for machine learning models

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0202587 A1
- Document ID: US20240202587A1
- Status: Published application
- Kind: A1
- Application number: 18/344,419
- Filed: 2023-06-29
- Published: 2024-06-20
- Earliest claimed: 2022-12-15
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Vinayshekhar Bannihatti Kumar; Rashmi Gangadharaiah; Dan Roth
- Web page: https://patentgrep.com/patent/US20240202587A1

## CPC

- G06N 20/00: Machine learning
- G06F 9/50: Allocation of resources, e.g. of the central processing unit [CPU]
- G06F 40/00: Handling natural language data (speech analysis or synthesis, speech recognition G10L)
- G06F 40/30: Semantic analysis
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and systems are disclosed for a machine learning (ML) model training system that can remove the influence of specific data points in an efficient way. An ML training system can train multiple instances of a machine learning model on disjoint shards of data. Upon receiving a request to remove a specific data point, the ML training system can expunge the data point from its corresponding shard and only retrain the model instance for that specific shard. Each shard can be further divided into data slices, with each slice containing a portion of the data from the shard. During the training of each instance of the machine learning model, the ML training system can save model checkpoints after completion of training for each slice. Upon receiving a removal request, the related data point is removed from its respective slice, and the relevant model instance can be retrained starting from the last checkpoint before that slice had been previously used for training.

## Claims

### Claim 1

A computer-implemented method, comprising:
receiving a request to remove a data sample from a dataset, the dataset comprising a plurality of shards each corresponding to a portion of the dataset, training data in the plurality of shards used to train a respective plurality of instances of a language model;
identifying an instance of the language model that is trained using a shard that contains the data sample;
identifying a slice of the shard that contains the data sample, the shard comprising a plurality of slices of the training data each corresponding to a checkpoint set during training;
removing the data sample from the identified slice of the dataset;
retraining the identified instance of the language model using a set of adapter weights and starting from the checkpoint that was most recently set before the identified instance was trained using the data in the slice; and
providing the retrained instance with the other instances, of the plurality of instances of the language model, to generate a plurality of inferences to be used to generate a consensus inference output.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein generating the updated inference output further comprising:
determining the consensus inference output based on a majority vote based on the plurality of inferences.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the data samples are positioned in the slices of a shard of the dataset based at least in part on a likelihood that a request will be received to remove the data samples from the dataset.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the plurality of instances of the language model are trained using a set of the adapter weights and a set of base weights.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein a subset of the adapter weights is stored for each slice and the instance of the language model is retrained using a respective set of the adapter weights without modifying the base weights.

### Claim 6

A computer-implemented method, comprising:
receiving a request to remove a data sample from a dataset used to train a plurality instances of a language model, the plurality of instances trained using respective portions of the dataset;
identifying an instance of the language model that was trained using a portion of the dataset including the data sample;
removing the data sample from the dataset;
retraining the identified instance of the language model using the portion of the dataset with the data sample removed; and
providing the retrained instance for use in the plurality of instances to generate inferences to be aggregated into a single inference output.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein each portion of the dataset corresponds to a shard and each shard comprises a plurality of slices, each slice comprising a portion of data samples in a respective shard.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, wherein generating the updated inference output further comprises:
generating an inference for each shard of the plurality of shards using a respective instance of the plurality of instances; and
determining the single inference output based on a majority vote from the inferences.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7, wherein each slice corresponds to a checkpoint set after training of a respective instance of the language model.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, further comprising:
determining a slice that contains the data sample to be removed, the slice corresponding to a checkpoint;
removing the data sample from the slice; and
retraining the instance of the language model from a checkpoint that was most recently set before the slice was used to train the identified instance.

### Claim 11 (depends on 7)

The computer-implemented method of claim 7, wherein the data samples are positioned in the slices of a shard of the dataset based on a determined ranking of the data samples.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11 wherein data samples with a higher likelihood of being removed from the dataset are placed in slices used for training after data samples with a lower likelihood of being removed.

### Claim 13 (depends on 11)

The computer-implemented method of claim 11 wherein data samples associated with a higher determined importance are placed in slices used for training before data samples associated with a lower determined importance.

### Claim 14 (depends on 6)

The computer-implemented method of claim 6, wherein the language model is trained based on a set of adapter weights and a set of base weights.

### Claim 15 (depends on 14)

The computer-implemented method of claim 14, wherein a respective subset of the adapter weights is stored for each shard, and wherein only the respective subset of the adapter weights is modified during the retraining.

### Claim 16

A system, comprising:
a processor; and
a memory device including instructions that, when executed by the processor, cause the processor to:
receive a request to remove a data sample from a dataset used to train a plurality instances of a machine learning model, the plurality of instances trained using respective portions of the dataset;
identify an instance of the machine learning model that was trained using a portion of the dataset including the data sample;
remove the data sample from the dataset;
retrain the identified instance of the machine learning model using a set of adapter weights and the portion of the dataset with the data sample removed; and
provide the retrained instance for use in the plurality of instances to generate inferences to be aggregated into a single inference output.

### Claim 17 (depends on 16)

The system of claim 16, wherein each portion of the dataset corresponds to a shard and each shard comprises a plurality of slices, each slice comprising a portion of data samples in a respective shard.

### Claim 18 (depends on 17)

The system of claim 17, wherein the instructions, when executed by the processor, further cause the processor to:
generate an inference for each shard of the plurality of shards using a respective instance of the plurality of instances; and
determine the single inference output based on a majority vote from the inferences.

### Claim 19 (depends on 17)

The system of claim 17, wherein each slice corresponds to a checkpoint set after training of a respective instance of the machine learning model, and wherein the instructions, when executed by the processor, further cause the processor to:
determine a slice that contains the data sample to be removed, the slice corresponding to a checkpoint;
remove the data sample from the slice; and
retrain the instance of the machine learning model from a checkpoint that was most recently set before the slice was used to train the identified instance.

### Claim 20 (depends on 16)

The system of claim 16, wherein the machine learning model is trained based on a set of adapter weights and a set of base weights, wherein a respective subset of the adapter weights is stored for each shard, and wherein only the respective subset of the adapter weights is modified during the retraining.
