# US 2022/0284299 A1 · Method and apparatus with neural network operation using sparsification

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

- Number: US 2022/0284299 A1
- Document ID: US20220284299A1
- Status: Published application
- Kind: A1
- Application number: 17/398,296
- Filed: 2021-08-10
- Published: 2022-09-08
- Earliest claimed: 2021-03-04
- Assignees: Samsung Electronics Co., Ltd.; Ulsan National Institute of Science and Technology
- Applicants: Samsung Electronics Co., Ltd.; Ulsan National Institute of Science and Technology
- Inventors: Sehwan LEE; Hyeon Uk SIM; Jongeun LEE
- Web page: https://patentgrep.com/patent/US20220284299A1

## CPC

- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06V 10/764: using classification, e.g. of video objects
- G06F 18/21345: {enforcing sparsity or involving a domain transformation}
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 18/217: {Validation; Performance evaluation; Active pattern learning techniques}
- G06N 3/045: Combinations of networks
- G06N 3/048: Activation functions
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processor-implemented neural network operation method includes: receiving a first activation gradient and a first threshold corresponding to a layer included in a neural network; sparsifying the first activation gradient based on the first threshold; determining a second activation gradient by performing a neural network operation based on the sparsified first activation gradient; determining a second threshold by updating the first threshold based on the second activation gradient; and performing a neural network operation based on the second activation gradient and the second threshold.

## Claims

### Claim 1

A processor-implemented neural network operation method, comprising:
receiving a first activation gradient and a first threshold corresponding to a layer included in a neural network;
sparsifying the first activation gradient based on the first threshold;
determining a second activation gradient by performing a neural network operation based on the sparsified first activation gradient;
determining a second threshold by updating the first threshold based on the second activation gradient; and
performing a neural network operation based on the second activation gradient and the second threshold.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first activation gradient and the second activation gradient comprise any one of a gradient with respect to input activation, a gradient with respect to weight, and a gradient with respect to output activation.

### Claim 3 (depends on 1)

The method of claim 1, wherein the determining of the second threshold comprises determining the second threshold by updating the first threshold over a predetermined number of iterations.

### Claim 4 (depends on 1)

The method of claim 1, wherein the determining of the second threshold comprises determining the second threshold by updating the first threshold based on a target sparsity and a sparsity corresponding to a current iteration.

### Claim 5 (depends on 4)

The method of claim 4, wherein the determining of the second threshold comprises determining the second threshold by multiplying the first threshold and a value of the target sparsity divided by the sparsity corresponding to the current iteration.

### Claim 6 (depends on 1)

The method of claim 1, wherein the determining of the second threshold comprises:
determining whether the second threshold exceeds a preset limited range; and
correcting the second threshold to a value within the limited range in response to the second threshold exceeding the limited range.

### Claim 7 (depends on 1)

The method of claim 1, wherein the determining of the second threshold comprises determining the second threshold by initializing the first threshold based on the second activation gradient.

### Claim 8 (depends on 1)

The method of claim 1, wherein the performing of the neural network operation based on the second activation gradient and the second threshold comprises:
generating sparse data by sparsifying the second activation gradient based on the second threshold; and
performing, using the sparse data and dense data, the neural network operation based on the second activation gradient and the second threshold.

### Claim 9 (depends on 8)

The method of claim 8, wherein the dense data are stored in parallelized dense buffers.

### Claim 10 (depends on 1)

The method of claim 1, wherein the performing of the neural network operation based on the second activation gradient and the second threshold comprises performing one or more multiply-accumulate (MAC) operations based on the second activation gradient.

### Claim 11 (depends on 1)

A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the method of claim 1.

### Claim 12

A neural network operation apparatus, comprising:
a receiver configured to receive a first activation gradient and a first threshold corresponding to a layer included in a neural network; and
a processor configured to
sparsify the first activation gradient based on the first threshold,
determine a second activation gradient by performing a neural network operation based on the sparsified first activation gradient,
determine a second threshold by updating the first threshold based on the second activation gradient, and
perform a neural network operation based on the second activation gradient and the second threshold.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the first activation gradient and the second activation gradient comprise any one of a gradient with respect to input activation, a gradient with respect to weight, and a gradient with respect to output activation.

### Claim 14 (depends on 12)

The apparatus of claim 12, wherein, for the determining of the second threshold, the processor is further configured to determine the second threshold by updating the first threshold over a predetermined number of iterations.

### Claim 15 (depends on 12)

The apparatus of claim 12, wherein, for the determining of the second threshold, the processor is further configured to determine the second threshold by updating the first threshold based on a target sparsity and a sparsity corresponding to a current iteration.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein, for the determining of the second threshold, the processor is further configured to determine the second threshold by multiplying the first threshold and a value of the target sparsity divided by the sparsity corresponding to the current iteration.

### Claim 17 (depends on 12)

The apparatus of claim 12, wherein, for the determining of the second threshold, the processor is further configured to:
determine whether the second threshold exceeds a preset limited range; and
correct the second threshold to a value within the limited range in response to the second threshold exceeding the limited range.

### Claim 18 (depends on 12)

The apparatus of claim 12, wherein, for the determining of the second threshold, the processor is further configured to determine the second threshold by initializing the first threshold based on the second activation gradient.

### Claim 19 (depends on 12)

The apparatus of claim 12, wherein, for the performing of the neural network operation based on the second activation gradient and the second threshold, the processor is further configured to:
generate sparse data by sparsifying the second activation gradient based on the second threshold; and
perform, using the sparse data and dense data, the neural network operation based on the second activation gradient and the second threshold.

### Claim 20 (depends on 19)

The apparatus of claim 19, wherein the dense data are stored in parallelized dense buffers.

### Claim 21 (depends on 12)

The apparatus of claim 12, wherein, for the performing of the neural network operation based on the second activation gradient and the second threshold, the processor is further configured to perform one or more multiply-accumulate (MAC) operations based on the second activation gradient.

### Claim 22

A processor-implemented neural network operation method, comprising:
sparsifying, based on a threshold, a first activation gradient corresponding to a layer included in a neural network;
determining a second activation gradient by performing a neural network operation based on the sparsified first activation gradient;
updating the threshold based on a sparsity of the second activation gradient and a target sparsity; and
performing a neural network operation based on the second activation gradient and the updated threshold.

### Claim 23 (depends on 22)

The method of claim 22, wherein
the determining of the second activation gradient corresponds to a backpropagation operation, and
the performing of the neural network operation based on the second activation gradient and the updated threshold corresponds to an image inference operation of a terminal.

### Claim 24 (depends on 22)

The method of claim 22, wherein the performing of the neural network operation based on the sparsified first activation gradient comprises one or more multiply-accumulate (MAC) operators receiving the sparsified first activation gradient from one or more sparse buffers and performing the neural network operation.
