# US 2024/0202515 A1 · Class-incremental learning of a classifier

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

- Number: US 2024/0202515 A1
- Document ID: US20240202515A1
- Status: Published application
- Kind: A1
- Application number: 18/060,987
- Filed: 2022-12-02
- Published: 2024-06-20
- Earliest claimed: 2022-12-02
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Kumudu Geethan Karunaratne; Michael Andreas Hersche; Giovanni Cherubini; Abu Sebastian; Abbas Rahimi
- Web page: https://patentgrep.com/patent/US20240202515A1

## CPC

- G06N 3/08: Learning methods
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure relates to training a classifier. The classifier includes a controller and an explicit memory. The training may include iteratively receiving one or more second training datasets, each comprising second data samples of a set of one or more associated novel classes, adding to the explicit memory one or more second output vectors indicative of the set of one or more associated novel classes, in response to providing the one or more second training datasets to the classifier, retraining the classifier using the one or more second training datasets and the first training dataset by minimizing a distance between the one or more second output vectors and the one or more prototype vectors, determining a set of updated prototype vectors indicative of first training dataset and the one or more second training datasets, and updating the explicit memory with the set of updated prototype vectors.

## Claims

### Claim 1

A method for continual training of a classifier, the classifier comprising a controller and an explicit memory, the method comprising:
pre-training the classifier using a first training dataset comprising first data samples of a set of one or more associated base classes;
using a set of first output vectors provided by the controller, in response to the controller receiving the first training dataset, to determine one or more prototype vectors indicative of the set of one or more associated base classes;
storing the one or more prototype vectors in the explicit memory;
receiving one or more second training datasets, each comprising second data samples of a set of one or more associated novel classes;
adding to the explicit memory one or more second output vectors indicative of the set of one or more associated novel classes, in response to providing the one or more second training datasets to the classifier;
retraining the classifier using the one or more second training datasets and the first training dataset by minimizing a distance between the one or more second output vectors and the one or more prototype vectors;
determining a set of updated prototype vectors indicative of first training dataset and the one or more second training datasets; and
updating the explicit memory with the set of updated prototype vectors.

### Claim 2 (depends on 1)

The method of claim 1, wherein the controller comprises a feature extractor and a classification head.

### Claim 3 (depends on 2)

The method of claim 2, wherein the feature extractor receives the first data sample and provides a first extracted feature vector, and wherein the classification head receives the first extracted feature vector and provides the set of first output vectors to indicate the one or more associated base classes of the first data sample.

### Claim 4 (depends on 3)

The method of claim 3, wherein the controller is a convolutional neural network controller comprising multiple nonlinear layers for the feature extractor and the classification head being an output layer of the convolutional neural network.

### Claim 5 (depends on 4)

The method of claim 4, wherein the retraining the classifier comprises:
inferring the feature extractor using the second training datasets and storing in an activation memory second extracted feature vectors of each of the second data samples of the second training datasets;
training the classification head using all stored extracted feature vectors; and
wherein the training of the classification head is performed by minimizing a distance between the one or more second output vectors and the set of updated prototype vectors.

### Claim 6 (depends on 5)

The method of claim 5, wherein the multiple nonlinear layers with parameter set θ1 and the classification head with the parameter set θ2 produce the one or more second output vectors and predicts a probability p over a combined set of the set of one or more associated base classes and the set of one or more associated novel classes, wherein the distance between the one or more second output vectors and the updated prototype vectors is minimized by using:
θ
2
(
t
+
1
)
=
θ
2
(
t
)
-
β
⁢
∂
(
ℒ
F
(
θ
2
(
t
)
,
K
*
,
A
)
)
∂
θ
2
(
t
)
,
where F=−Σi=1csh(ki*, gθ2(t)(ai), where ki* is the updated prototype vectors in association with an ith class, and ai is an associated extracted feature vector of the classification head for the ith class.

### Claim 7 (depends on 6)

The method of claim 6, wherein the one or more prototype vectors p* * * is defined for the ith class as follows: p*i=gθ2(T)(ai).

### Claim 8 (depends on 1)

The method of claim 1, further comprising: prior to retraining the classifier, modifying the one or more prototype vectors thereby determining associated quasi-orthogonal prototype vectors and resultantly updating the explicit memory with the quasi-orthogonal prototype vectors.

### Claim 9 (depends on 8)

The method of claim 8, wherein determining the quasi-orthogonal prototype vectors comprises backpropagation using a loss function as follows: by
k
i
(
u
+
1
)
=
k
i
(
u
)
-
α
⁢
∂
(
ℒ
O
(
K
u
)
)
+
∂
(
ℒ
M
(
K
u
,
P
)
)
∂
k
i
(
u
)
,
where
ℒ𝒪
=
,
=
1
⁢
𝒪
=
O
=
∑
i
,
j
=
1
;
i
≠
j
c
⁢
exp
⁡
(
s
h
(
k
i
(
U
)
,
k
i
(
U
)
)
)
,
=
1
;
≠
c
⁢
e
(
(
𝒰
,
𝒰
)
)
O
=
∑
i
,
j
=
1
;
i
≠
j
c
⁢
exp
⁡
(
s
h
(
k
i
(
U
)
,
k
i
(
U
)
)
)
;
≠
c
⁢
e
(
(
𝒰
,
𝒰
)
)
O
=
∑
i
,
j
=
1
;
i
≠
j
c
⁢
exp
⁡
(
s
h
(
k
i
(
U
)
,
k
i
(
U
)
)
)
,
=
1
;
≠
c
⁢
e
(
(
𝒰
,
𝒰
)
)
O
=
∑
i
,
j
=
1
;
i
≠
j
c
⁢
exp
⁡
(
s
h
(
k
i
(
U
)
,
k
i
(
U
)
)
)
⁢
and
⁢
ℒ
M
=
-
∑
i
=
1
c
⁢
s
h
(
k
i
(
U
)
,
p
i
)
,
where ki(u) is an quasi-orthogonal prototype vector obtained in iteration number u for the ith class, and pi is a prototype vector stored in the explicit memory in association with the ith class, and sh denotes a soft hamming distance, where the initial quasi-orthogonalized prototypes are given by ki(0)=pi.

### Claim 10 (depends on 2)

The method of claim 2, further comprising:
providing an activation memory for accumulating the extracted feature vectors of the feature extractor;
wherein the classification head is configured to receive an input extracted feature vector from the activation memory.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
receiving a query vector; and
performing a similarity search between the query vector and the one or more prototype vectors in the explicit memory for determining a class represented by the query vector.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
providing an in-memory computing core comprising a crossbar array structure comprising row lines and column lines and resistive memory elements coupled between the row lines and the column lines at junctions formed by the row and column lines;
programming the resistive memory elements of each column line to represent values of the one or more prototype vectors; and
inputting to the crossbar array the query vector for performing the similarity search.

### Claim 13 (depends on 1)

The method of claim 1, wherein the retraining the classifier is a few shot learning performed upon the set of one or more associated novel classes.

### Claim 14 (depends on 1)

The method of claim 1, wherein the retraining the classifier comprises retraining a part of the classifier and freezing another pretrained part of the classifier.

### Claim 15 (depends on 1)

The method of claim 1, wherein the prototype vector comprises a set of elements each indicating a probability that a respective class of the one or more associated base classes is a class of the one or more prototype vectors.

### Claim 16

A computer program product comprising a computer-readable storage medium having computer-readable program code embodied therewith, wherein when the computer-readable program code is called by a processor causes the processor to:
pre-train the classifier using a first training dataset comprising first data samples of a set of one or more associated base classes;
use a set of first output vectors provided by the controller, in response to the controller receiving the first training dataset, to determine one or more prototype vectors indicative of the set of one or more associated base classes;
store the one or more prototype vectors in the explicit memory;
receive one or more second training datasets, each comprising second data samples of a set of one or more associated novel classes;
add to the explicit memory one or more second output vectors indicative of the set of one or more associated novel classes, in response to providing the one or more second training datasets to the classifier;
retrain the classifier using the one or more second training datasets and the first training dataset by minimizing a distance between the one or more second output vectors and the one or more prototype vectors;
determine a set of updated prototype vectors indicative of first training dataset and the one or more second training datasets; and
update the explicit memory with the set of updated prototype vectors.

### Claim 17

A computer system for continual training of a classifier, the classifier comprising a controller and an explicit memory, the computer system comprising a processor and a computer-readable storage medium having computer-readable program code embodied therewith, wherein when the computer-readable program code is called by the processor causes the processor to:
pre-train the classifier using a first training dataset comprising first data samples of a set of one or more associated base classes;
use a set of first output vectors provided by the controller, in response to the controller receiving the first training dataset, to determine one or more prototype vectors indicative of the set of one or more associated base classes;
store the one or more prototype vectors in the explicit memory;
receive one or more second training datasets, each comprising second data samples of a set of one or more associated novel classes;
add to the explicit memory one or more second output vectors indicative of the set of one or more associated novel classes, in response to providing the one or more second training datasets to the classifier;
retrain the classifier using the one or more second training datasets and the first training dataset by minimizing a distance between the one or more second output vectors and the one or more prototype vectors;
determine a set of updated prototype vectors indicative of first training dataset and the one or more second training datasets; and
update the explicit memory with the set of updated prototype vectors.

### Claim 18 (depends on 17)

The computer system of claim 17, wherein the computer system further comprises:
a crossbar array structure comprising row lines and column lines and resistive memory elements coupled between the row lines and the column lines at junctions formed by the row and column lines, the resistive memory elements of each column line representing values of a respective prototype vector, the crossbar array being configured to receive elements of a query vector through the row lines respectively and to perform a vector matrix multiplication at the crossbar array for computing a similarity of the query vector with the one or more prototype vectors, thereby determining a class of the query vector.
