# US 2025/0094819 A1 · Few-shot continual learning with task-specific parameter selection

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

- Number: US 2025/0094819 A1
- Document ID: US20250094819A1
- Status: Published application
- Kind: A1
- Application number: 18/471,184
- Filed: 2023-09-20
- Published: 2025-03-20
- Earliest claimed: 2023-09-20
- Assignees: NVIDIA Corporation
- Applicants: Nvidia Corporation
- Inventors: Wonmin BYEON; Sudarshan BABU; Shalini DE MELLO; Jan KAUTZ
- Web page: https://patentgrep.com/patent/US20250094819A1

## CPC

- G06N 3/096: Transfer learning
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

One embodiment of the present invention sets forth a technique for executing a transformer neural network. The technique includes executing a first attention unit included in the transformer neural network to convert a first input token into a first query, a first key, and a first plurality of values, where each value included in the first plurality of values represents a sub-task associated with the transformer neural network. The technique also includes computing a first plurality of outputs associated with the first input token based on the first query, the first key, and the first plurality of values. The technique further includes performing a task associated with an input corresponding to the first input token based on the first input token and the first plurality of outputs.

## Claims

### Claim 1

A computer-implemented method for executing a transformer neural network, the method comprising:
executing a first attention unit included in the transformer neural network to convert a first input token into a first query, a first key, and a first plurality of values, wherein each value included in the first plurality of values represents a sub-task associated with the transformer neural network;
computing a first plurality of outputs associated with the first input token based on the first query, the first key, and the first plurality of values; and
performing a task associated with an input corresponding to the first input token based on the first input token and the first plurality of outputs.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein performing the task comprises:
determining a plurality of keys associated with the first plurality of outputs; and
generating an output token based on the plurality of keys and the first plurality of outputs.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein generating the output token comprises:
computing a plurality of scores based on the plurality of keys and a task token associated with the first input token; and
computing the output token based on the plurality of scores and the first plurality of outputs.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein computing the output token comprises scaling the first plurality of outputs based on the plurality of scores.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein performing the task comprises:
executing a second attention unit included in the transformer neural network to convert the first input token and a first task token into a second task token; and
generating an output token based on the second task token and the first plurality of outputs.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein executing the second attention unit comprises:
converting the first input token and the first task token into a second query, a second key, and a value; and
computing the second task token based on the value and an attention score associated with the second query and the second key.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein performing the task comprises:
generating a latent representation of a data sample associated with the first input token based on the first plurality of outputs; and
performing the task based on the latent representation.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, wherein performing the task comprises:
generating a second input token based on the first plurality of outputs;
executing a second attention unit included in the transformer neural network to convert the second input token into an output token; and
performing the task based on the output token.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, wherein computing the first plurality of outputs comprises:
converting the first query and the first key into a plurality of attention scores; and
computing the first plurality of outputs based on the plurality of attention scores and the first plurality of values.

### Claim 10 (depends on 1)

The computer-implemented method of claim 1, wherein performing the task comprises generating a prediction of a class for a data sample associated with the first input token.

### Claim 11

One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of:
executing a first attention unit included in a transformer neural network to convert a first input token into a first query, a first key, and a first plurality of values, wherein each value included in the first plurality of values represents a sub-task associated with the transformer neural network;
computing a first plurality of outputs associated with the first input token based on the first query, the first key, and the first plurality of values; and
performing a task associated with an input corresponding to the first input token based on the first input token and the first plurality of outputs.

### Claim 12 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein performing the task comprises:
determining a plurality of keys associated with the first plurality of outputs; and
generating an output token based on the plurality of keys and the first plurality of outputs.

### Claim 13 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein generating the output token comprises:
executing a second attention unit included in the transformer neural network to convert the first input token and a first task token into a second task token;
computing a plurality of scores based on the plurality of keys and the second task token; and
computing the output token based on the plurality of scores and the first plurality of outputs.

### Claim 14 (depends on 13)

The one or more non-transitory computer-readable media of claim 13, wherein the output token is computed by weighting the first plurality of outputs using the plurality of scores.

### Claim 15 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein performing the task comprises:
generating a second input token based on the first plurality of outputs;
executing a second attention unit included in the transformer neural network to convert the second input token into an output token; and
performing the task based on the output token.

### Claim 16 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein performing the task based on the output token comprises generating a prediction based on the output token.

### Claim 17 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein computing the first plurality of outputs comprises:
converting the first query and the first key into a plurality of attention scores; and
computing the first plurality of outputs based on the plurality of attention scores and the first plurality of values.

### Claim 18 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the transformer neural network is included in a representation learning network that generates a latent representation of a data sample associated with the first input token.

### Claim 19 (depends on 18)

The one or more non-transitory computer-readable media of claim 18, wherein performing the task comprises executing a prediction learning network to convert the latent representation of the data sample into a prediction of a class for the data sample.

### Claim 20

A system, comprising:
one or more memories that store instructions, and
one or more processors that are coupled to the one or more memories and, when executing the instructions, are configured to perform the steps of:
executing a first attention unit included in a transformer neural network to convert a first input token into a first query, a first key, and a first plurality of values, wherein each value included in the first plurality of values represents a sub-task associated with the transformer neural network;
computing a first plurality of outputs associated with the first input token based on the first query, the first key, and the first plurality of values; and
performing a task associated with an input corresponding to the first input token based on the first input token and the first plurality of outputs.
