# US 2021/0279517 A1 · Distance-based learning confidence model

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

- Number: US 2021/0279517 A1
- Document ID: US20210279517A1
- Status: Published application
- Kind: A1
- Application number: 17/031,144
- Filed: 2020-09-24
- Published: 2021-09-09
- Earliest claimed: 2019-09-24
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Sercan Omer Arik; Chen Xing; Zizhao Zhang; Tomas Jon Pfister
- Web page: https://patentgrep.com/patent/US20210279517A1

## CPC

- G06N 3/08: Learning methods
- G06F 18/2148: {characterised by the process organisation or structure, e.g. boosting cascade}
- G06F 18/2413: based on distances to training or reference patterns
- G06F 18/2431: Multiple classes
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for jointly training a classification model and a confidence model. The method includes receiving a training data set including a plurality of training data subsets. From two or more training data subsets in the training data set, the method includes selecting a support set of training examples and a query set of training examples. The method includes determining, using the classification model, a centroid value for each respective class. For each training example in the query set of training examples, the method includes generating, using the classification model, a query encoding, determining a class distance measure, determining a ground-truth distance, and updating parameters of the classification model. For each training example in the query set of training examples identified as being misclassified, the method further includes generating a standard deviation value, sampling a new query, and updating parameters of the confidence model based on the new query encoding.

## Claims

### Claim 1

A method for jointly training a classification model and a confidence model, the method comprising:
receiving, at data processing hardware, a training data set comprising a plurality of training data subsets, each training data subset associated with a different respective class and having a plurality of corresponding training examples that belong to the respective class;
from two or more training data subsets in the training data set:
selecting, by the data processing hardware, a support set of training examples, the support set of training examples comprising K number of training examples sampled from each of the two or more training data subsets; and
selecting, by the data processing hardware, a query set of training examples, the query set of training examples comprising training examples sampled from each of the two or more training data subsets that are not included in the support set of training examples;
for each respective class associated with the two or more training data subsets, determining, by the data processing hardware, using the classification model, a centroid value by averaging K number of support encodings associated with the K number of training examples in the support set of training examples that belong to the respective class;
for each training example in the query set of training examples:
generating, by the data processing hardware, using the classification model, a query encoding;
determining, by the data processing hardware, a class distance measure representing a respective distance between the query encoding and the centroid value determined for each respective class;
determining, by the data processing hardware, a ground-truth distance between the query encoding and a ground-truth label associated with the corresponding training example in the query set of training examples; and
updating, by the data processing hardware, parameters of the classification model based on the class distance measure and the ground-truth distance; and
for each training example in the query set of training examples identified as being misclassified:
generating, by the data processing hardware, using the confidence model, a standard deviation value for the query encoding generated by the classification model for the corresponding misclassified training example;
sampling, by the data processing hardware, using the standard deviation value and the query encoding, a new query encoding for the corresponding misclassified training example; and
updating, by the data processing hardware, parameters of the confidence model based on the new query encoding.

### Claim 2 (depends on 1)

The method of claim 1, wherein the ground-truth label comprises a ground-truth centroid value within a distance-based representation space.

### Claim 3 (depends on 1)

The method of claim 1, wherein updating the parameters of the classification model based on the class distance measure and the ground-truth distance trains the classification model to minimize intra-class distances and maximize inter-class distances.

### Claim 4 (depends on 1)

The method of claim 1, wherein the confidence model is trained to maximize the standard deviation value for larger ground-truth distances and sample new query encodings close to respective ground-truth centroid values within a distance-based representation space.

### Claim 5 (depends on 1)

The method of claim 1, wherein any training examples in the query set of training examples identified as being misclassified comprise any training examples in the query set of training examples that include ground-truth distances failing to satisfy a distance threshold.

### Claim 6 (depends on 1)

The method of claim 1, wherein the confidence model is not trained on training examples in the query set of training examples that include ground-truth distances satisfying a distance threshold.

### Claim 7 (depends on 1)

The method of claim 1, wherein updating parameters of confidence model comprises updating the parameters of the confidence model to encourage the confidence model to output larger standard deviation values for query encodings associated with larger class distance measures.

### Claim 8 (depends on 1)

The method of claim 1, wherein the training examples comprise image data.

### Claim 9 (depends on 1)

The method of claim 1, wherein the classification model comprises a deep neural network (DNN).

### Claim 10 (depends on 1)

The method of claim 1, wherein the confidence model comprises a deep neural network (DNN).

### Claim 11

A system for jointly training a classification model and a confidence model, the system comprising:
data processing hardware; and
memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:
receiving a training data set comprising a plurality of training data subsets, each training data subset associated with a different respective class and having a plurality of corresponding training examples that belong to the respective class;
from two or more training data subsets in the training data set:
selecting a support set of training examples, the support set of training examples comprising K number of training examples sampled from each of the two or more training data subsets; and
selecting a query set of training examples, the query set of training examples comprising training examples sampled from each of the two or more training data subsets that are not included in the support set of training examples;
for each respective class associated with the two or more training data subsets, determining, using the classification model, a centroid value by averaging K number of support encodings associated with the K number of training examples in the support set of training examples that belong to the respective class;
for each training example in the query set of training examples:
generating, using the classification model, a query encoding;
determining a class distance measure representing a respective distance between the query encoding and the centroid value determined for each respective class;
determining a ground-truth distance between the query encoding and a ground-truth label associated with the corresponding training example in the query set of training examples; and
updating parameters of the classification model based on the class distance measure and the ground-truth distance; and
for each training example in the query set of training examples identified as being misclassified:
generating, using the confidence model, a standard deviation value for the query encoding generated by the classification model for the corresponding misclassified training example;
sampling, using the standard deviation value and the query encoding, a new query encoding for the corresponding misclassified training example; and
updating parameters of the confidence model based on the new query encoding.

### Claim 12 (depends on 11)

The system of claim 11, wherein the ground-truth label comprises a ground-truth centroid value within a distance-based representation space.

### Claim 13 (depends on 11)

The system of claim 11, wherein updating the parameters of the classification model based on the class distance measure and the ground-truth distance trains the classification model to minimize intra-class distances and maximize inter-class distances.

### Claim 14 (depends on 11)

The system of claim 11, wherein the confidence model is trained to maximize the standard deviation value for larger ground-truth distances and sample new query encodings close to respective ground-truth centroid values within a distance-based representation space.

### Claim 15 (depends on 11)

The system of claim 11, wherein any training examples in the query set of training examples identified as being misclassified comprise any training examples in the query set of training examples that include ground-truth distances failing to satisfy a distance threshold.

### Claim 16 (depends on 11)

The system of claim 11, wherein the confidence model is not trained on training examples in the query set of training examples that include ground-truth distances satisfying a distance threshold.

### Claim 17 (depends on 11)

The system of claim 11, wherein updating parameters of confidence model comprises updating the parameters of the confidence model to encourage the confidence model to output larger standard deviation values for query encodings associated with larger class distance measures.

### Claim 18 (depends on 11)

The system of claim 11, wherein the training examples comprise image data.

### Claim 19 (depends on 11)

The system of claim 11, wherein the classification model comprises a deep neural network (DNN).

### Claim 20 (depends on 11)

The system of claim 11, wherein the confidence model comprises a deep neural network (DNN).
