# US 2022/0067506 A1 · Systems and methods for partially supervised learning with momentum prototypes

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

- Number: US 2022/0067506 A1
- Document ID: US20220067506A1
- Status: Published application
- Kind: A1
- Application number: 17/005,763
- Filed: 2020-08-28
- Published: 2022-03-03
- Earliest claimed: 2020-08-28
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Junnan Li; Chu Hong Hoi
- Web page: https://patentgrep.com/patent/US20220067506A1

## CPC

- G06N 3/08: Learning methods
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06F 18/2148: {characterised by the process organisation or structure, e.g. boosting cascade}
- G06F 18/217: {Validation; Performance evaluation; Active pattern learning techniques}
- G06F 18/2431: Multiple classes
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/096: Transfer learning
- G06V 10/7715: {Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods}
- G06V 10/7753: {Incorporation of unlabelled data, e.g. multiple instance learning [MIL]}
- G06V 10/82: using neural networks
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A learning mechanism with partially-labeled web images is provided while correcting the noise labels during the learning. Specifically, the mechanism employs a momentum prototype that represents common characteristics of a specific class. One training objective is to minimize the difference between the normalized embedding of a training image sample and the momentum prototype of the corresponding class. Meanwhile, during the training process, the momentum prototype is used to generate a pseudo label for the training image sample, which can then be used to identify and remove out of distribution (OOD) samples to correct the noisy labels from the original partially-labeled training images. The momentum prototype for each class is in turn constantly updated based on the embeddings of new training samples and their pseudo labels.

## Claims

### Claim 1

A system for partially-supervised learning, the system comprising:
a non-transitory memory storing a neural network model and a training dataset comprising a set of partially-labeled data samples, each data sample having a noisy training label that belongs to a plurality of classes; and
one or more hardware processors coupled to the non-transitory memory and configured to read instructions from the non-transitory memory to cause the system to perform operations comprising:
generating, for each partially-labeled data sample, an augmented data sample by varying data content of the respective labeled partially-data sample;
inputting the augmented data sample to the neural network model;
generating, by the neural network model, a pseudo label corresponding to the augmented data sample based at least in part on at least one current momentum prototype associated with at least one class from the plurality of classes;
computing a prototypical contrastive loss by comparing a normalized embedding generated from the augmented data sample with the at least one momentum prototype;
updating the at least one momentum prototype based on the normalized embedding when the normalized embedding and the at least one momentum prototype correspond to a same class; and
updating the neural network model by minimizing at least the prototypical contrastive loss.

### Claim 2 (depends on 1)

The system of claim 1, wherein the at least one momentum prototype is calculated as a moving average of the normalized embedding when the augmented data sample that is used to generate the normalized embedding has a pseudo label having the same class with the at least one momentum prototype.

### Claim 3 (depends on 1)

The system of claim 1, wherein the neural network model comprises:
an encoder configured to map the augmented data sample to a representation vector; and
a projection network configured to map the representation vector to the normalized embedding.

### Claim 4 (depends on 3)

The system of claim 3, wherein the neural network model further comprises:
a classifier configured to generate classification probabilities corresponding to the representation vector.

### Claim 5 (depends on 4)

The system of claim 4, wherein the operations further comprise:
generating a different version of augmented data sample from the respective partially-labeled data sample, and
wherein the neural network model further comprises:
a momentum encoder and a momentum decoder configured to generate a momentum embedding from the different version of augmented data sample,
wherein the momentum encoder and the momentum decoder have parameters derived from parameters associated with the encoder and the projection network, respectively.

### Claim 6 (depends on 4)

The system of claim 4, wherein the operations further comprise:
generating a soft pseudo label based on the classification probabilities and the normalized embedding; and
converting the soft pseudo label to the pseudo label by:
determining whether the partially-labeled data sample is an out-of-distribution sample by comparing the soft pseudo label with a unified distribution; and
determining whether the noisy label is to be corrected by comparing the soft pseudo label with a threshold.

### Claim 7 (depends on 6)

The system of claim 6, wherein the operations further comprise:
in response to determining that the partially-labeled data sample is out-of-distribution based on the pseudo label, removing the partially-labeled data sample from computation of the prototypical contrastive loss.

### Claim 8 (depends on 6)

The system of claim 6, wherein the operations further comprise:
in response to determining that the noisy label is to be corrected, generating the pseudo label as a class corresponding to a highest soft pseudo label among the plurality of classes.

### Claim 9 (depends on 6)

The system of claim 6, wherein the operations further comprise:
computing a cross-entropy loss based on the classification probabilities and the pseudo label when the partially-labeled data sample is not out-of-distribution; and
computing an instance contrastive loss based on the momentum embedding and the normalized embedding.

### Claim 10 (depends on 8)

The system of claim 8, wherein the operations further comprise:
computing a combined loss based on a weighted sum of the cross-entropy loss, the instance contrastive loss and the prototypical contrastive loss; and
update the neural network model by minimizing the combined loss.

### Claim 11

A method for partially-supervised learning, the method comprising:
obtaining, via a data interface, a training dataset comprising a set of partially-labeled data samples, each data sample having a noisy training label that belongs to a plurality of classes;
generating, for each partially-labeled data sample, an augmented data sample by varying data content of the respective labeled partially-data sample;
inputting the augmented data sample to the neural network model;
generating, by a neural network model, a pseudo label corresponding to the augmented data sample based at least in part on at least one current momentum prototype associated with at least one class from the plurality of classes;
computing a prototypical contrastive loss by comparing a normalized embedding generated from the augmented data sample with the at least one momentum prototype;
updating the at least one momentum prototype based on the normalized embedding when the normalized embedding and the at least one momentum prototype correspond to a same class; and
updating the neural network model by minimizing at least the prototypical contrastive loss.

### Claim 12 (depends on 11)

The method of claim 11, wherein the at least one momentum prototype is calculated as a moving average of the normalized embedding when the augmented data sample that is used to generate the normalized embedding has a pseudo label having the same class with the at least one momentum prototype.

### Claim 13 (depends on 11)

The method of claim 11, wherein the neural network model comprises:
an encoder configured to map the augmented data sample to a representation vector; and
a projection network configured to map the representation vector to the normalized embedding.

### Claim 14 (depends on 13)

The method of claim 13, wherein the neural network model further comprises:
a classifier configured to generate classification probabilities corresponding to the representation vector.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
generating a different version of augmented data sample from the respective partially-labeled data sample, and
wherein the neural network model further comprises:
a momentum encoder and a momentum decoder configured to generate a momentum embedding from the different version of augmented data sample,
wherein the momentum encoder and the momentum decoder have parameters derived from parameters associated with the encoder and the projection network, respectively.

### Claim 16 (depends on 14)

The method of claim 14, further comprising:
generating a soft pseudo label based on the classification probabilities and the normalized embedding; and
converting the soft pseudo label to the pseudo label by:
determining whether the partially-labeled data sample is an out-of-distribution sample by comparing the soft pseudo label with a unified distribution; and
determining whether the noisy label is to be corrected by comparing the soft pseudo label with a threshold.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
in response to determining that the partially-labeled data sample is out-of-distribution based on the pseudo label, removing the partially-labeled data sample from computation of the prototypical contrastive loss; and
in response to determining that the noisy label is to be corrected, generating the pseudo label as a class corresponding to a highest soft pseudo label among the plurality of classes.

### Claim 18 (depends on 16)

The method of claim 16, further comprising:
computing a cross-entropy loss based on the classification probabilities and the pseudo label when the partially-labeled data sample is not out-of-distribution; and
computing an instance contrastive loss based on the momentum embedding and the normalized embedding.

### Claim 19 (depends on 18)

The method of claim 18, further comprising:
computing a combined loss based on a weighted sum of the cross-entropy loss, the instance contrastive loss and the prototypical contrastive loss; and
update the neural network model by minimizing the combined loss.

### Claim 20

A non-transitory processor-readable medium storing processor-executable instructions for partially-labeled learning, the instructions being processor-executable by a processor to perform operations comprising:
obtaining a training dataset comprising a set of partially-labeled data samples, each data sample having a noisy training label that belongs to a plurality of classes; and
generating, for each partially-labeled data sample, an augmented data sample by varying data content of the respective labeled partially-data sample;
inputting the augmented data sample to a neural network model;
generating, by the neural network model, a pseudo label corresponding to the augmented data sample based at least in part on at least one current momentum prototype associated with at least one class from the plurality of classes;
computing a prototypical contrastive loss by comparing a normalized embedding generated from the augmented data sample with the at least one momentum prototype;
updating the at least one momentum prototype based on the normalized embedding when the normalized embedding and the at least one momentum prototype correspond to a same class; and
updating the neural network model by minimizing at least the prototypical contrastive loss.
