# US 2025/0094822 A1 · Tensor-Based Continual Learning Method and Apparatus

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

- Number: US 2025/0094822 A1
- Document ID: US20250094822A1
- Status: Published application
- Kind: A1
- Application number: 18/963,964
- Filed: 2024-11-29
- Published: 2025-03-20
- Earliest claimed: 2022-06-01
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Yinchuan Li; Yunfeng Shao
- Web page: https://patentgrep.com/patent/US20250094822A1

## CPC

- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N 3/096: Transfer learning
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/063: using electronic means
- G06N 3/08: Learning methods
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/098: Distributed learning, e.g. federated learning
- G06N 20/00: Machine learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

This application discloses a tensor-based continual learning method and apparatus. The method includes: obtaining input data; and inputting the input data into a first neural network to obtain a data processing result. After training of an ith task ends, the neural network includes A tensor cores, the A tensor cores are divided into B tensor layers, and each of the B tensor layers includes data of all of the A tensor cores in a same dimension. In training of an (i+1)th task, C tensor cores and/or D tensor layers are added to the first neural network, and parameters in the C tensor cores and/or parameters at the D tensor layers are updated. According to this application, an anti-forgetting capability of a model can be effectively improved, and an increase in a scale of the model is small, to effectively reduce storage and communication overheads.

## Claims

### Claim 1

A tensor-based continual learning method, wherein the method comprises:
obtaining input data, wherein the input data comprises one or more of the following: a video, an image, a text, or speech; and
inputting the input data into a first neural network to obtain a data processing result, wherein
the first neural network is obtained through training of m tasks, and after training of an ith task ends, the neural network comprises A tensor cores, the A tensor cores are divided into B tensor layers, and each of the B tensor layers comprises data of all of the A tensor cores in a same dimension; and after training of an (i+1)th task ends, C tensor cores and/or D tensor layers are added to the first neural network, and in the training of the (i+1)th task, parameters in the C tensor cores and/or parameters at the D tensor layers are updated, wherein m is a positive integer, and i is a positive integer less than or equal to m−1.

### Claim 2 (depends on 1)

The method according to claim 1, wherein
after the training of the (i+1)th task ends, a parameter in a part or all of the A tensor cores remains unchanged, or a parameter at a part or all of the B tensor layers remains unchanged.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the method further comprises:
after the training of the ith task ends, performing tensor combination on the A tensor cores to obtain one or more tensors; and
before the training of the (i+1)th task is performed, performing tensor decomposition on the one or more tensors to obtain the A tensor cores.

### Claim 4 (depends on 1)

The method according to claim 1, wherein a training process of the (i+1)th task comprises:
training an ith backup tensor network by using an (i+1)th batch of datasets, to obtain a trained ith backup tensor network; and
training the first neural network by using the (i+1)th batch of datasets, wherein a loss function of the first neural network comprises difference between an output of the first neural network and an output of a trained jth backup tensor network, or a loss function of the first neural network comprises a degree of difference between a model parameter of the first neural network and a model parameter of a trained jth backup tensor network, j is equal to 1 to i−1, and j is a positive integer less than or equal to i−1.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the first neural network is one of a plurality of neural networks, the plurality of neural networks are located on different user equipments, the first neural network is located on a first user equipment, and the method further comprises:
after training of each task ends, sending, by the first user equipment, the model parameter of the first neural network to a server, so that the server updates a second neural network on the server based on a model parameter of each of the plurality of neural networks, wherein the model parameter of the first neural network comprises the tensor core comprised in the first neural network.

### Claim 6 (depends on 1)

The method according to claim 1, wherein
the task comprises image recognition, target detection, image segmentation, or speech semantic recognition.

### Claim 7

A tensor-based continual learning method, wherein the method comprises:
obtaining input data, wherein the input data comprises one or more of the following: a video, an image, a text, or speech; and
inputting the input data into a first neural network to obtain a data processing result, wherein
the first neural network is obtained through training of m tasks, and after training of an ith task ends, the neural network comprises A tensor cores, the A tensor cores comprise B tensor layers, and each of the B tensor layers comprises data of all of the A tensor cores in a same dimension; and after training of an (i+1)th task ends, a parameter in a part or all of the A tensor cores remains unchanged, or a parameter at a part of the B tensor layers remains unchanged, wherein m is a positive integer, and i is a positive integer less than or equal to m−1.

### Claim 8 (depends on 7)

The method according to claim 7, wherein
after the training of the (i+1)th task ends, C tensor cores and/or D tensor layers are added to the first neural network, and in the training of the (i+1)th task, parameters in the C tensor cores and/or parameters at the D tensor layers are updated.

### Claim 9

A tensor-based continual learning method, wherein the method comprises:
receiving a plurality of model parameters sent by a plurality of user equipments respectively, wherein the plurality of user equipments comprise a first user equipment, and a model parameter sent by the first user equipment comprises a tensor core comprised in a first neural network; and
updating a second neural network based on the plurality of model parameters, and processing to-be-processed data based on an updated second neural network to obtain a data processing result, wherein the to-be-processed data comprises one or more of the following: a picture, a video, speech, or a text; and
the first neural network is obtained through training of m tasks, and after training of an ith task ends, the neural network comprises A tensor cores, the A tensor cores are divided into B tensor layers, and each of the B tensor layers comprises data of all of the A tensor cores in a same dimension; and after training of an (i+1)th task ends, C tensor cores and/or D tensor layers are added to the first neural network, and in the training of the (i+1)th task, parameters in the C tensor cores and/or parameters at the D tensor layers are updated, wherein m is a positive integer, and i is a positive integer less than or equal to m−1.

### Claim 10 (depends on 9)

The method according to claim 9, wherein
after the training of the (i+1)th task ends, a parameter in a part or all of the A tensor cores remains unchanged, or a parameter at a part or all of the B tensor layers remains unchanged.

### Claim 11

An electronic device, wherein the electronic device comprises at least one processor, a memory, and an interface circuit, the memory, the interface circuit, and the at least one processor are interconnected through a line, the memory stores instructions, the instructions instruct, when executed by the at least one processor, the at least one processor to perform the following operations:
obtaining input data, wherein the input data comprises one or more of the following: a video, an image, a text, or speech; and
inputting the input data into a first neural network to obtain a data processing result, wherein
the first neural network is obtained through training of m tasks, and after training of an ith task ends, the neural network comprises A tensor cores, the A tensor cores are divided into B tensor layers, and each of the B tensor layers comprises data of all of the A tensor cores in a same dimension; and after training of an (i+1)th task ends, C tensor cores and/or D tensor layers are added to the first neural network, and in the training of the (i+1)th task, parameters in the C tensor cores and/or parameters at the D tensor layers are updated, wherein m is a positive integer, and i is a positive integer less than or equal to m−1.

### Claim 12 (depends on 11)

The device according to claim 11, wherein
after the training of the (i+1)th task ends, a parameter in a part or all of the A tensor cores remains unchanged, or a parameter at a part or all of the B tensor layers remains unchanged.

### Claim 13 (depends on 11)

The device according to claim 11, wherein the operations further comprises:
after the training of the ith task ends, performing tensor combination on the A tensor cores to obtain one or more tensors; and
before the training of the (i+1)th task is performed, performing tensor decomposition on the one or more tensors to obtain the A tensor cores.

### Claim 14 (depends on 11)

The device according to claim 11 wherein a training process of the (i+1)th task comprises:
training an ith backup tensor network by using an (i+1)th batch of datasets, to obtain a trained ith backup tensor network; and
training the first neural network by using the (i+1)th batch of datasets, wherein a loss function of the first neural network comprises difference between an output of the first neural network and an output of a trained jth backup tensor network, or a loss function of the first neural network comprises a degree of difference between a model parameter of the first neural network and a model parameter of a trained jth backup tensor network, j is equal to 1 to i−1, and j is a positive integer less than or equal to i−1.

### Claim 15 (depends on 11)

The device according to claim 11, wherein the first neural network is one of a plurality of neural networks, the plurality of neural networks are located on different user equipments, the first neural network is located on a first user equipment, and the operations further comprises:
after training of each task ends, sending, by the first user equipment, the model parameter of the first neural network to a server, so that the server updates a second neural network on the server based on a model parameter of each of the plurality of neural networks, wherein the model parameter of the first neural network comprises the tensor core comprised in the first neural network.

### Claim 16 (depends on 11)

The device according to claim 11, wherein
the task comprises image recognition, target detection, image segmentation, or speech semantic recognition.
