# US 11,308,398 B2 · Computation method

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

- Number: US 11,308,398 B2
- Document ID: US11308398B2
- Status: Granted
- Kind: B2
- Application number: 16/455,347
- Filed: 2019-06-27
- Published: 2019-10-17
- Granted: 2022-04-19
- Earliest claimed: 2016-12-28
- Assignees: Shanghai Cambricon Information Technology Co., Ltd.
- Applicants: Shanghai Cambricon Information Technology Co., Ltd.
- Inventors: Yunji Chen; Xinkai Song; Shaoli Liu; Tianshi Chen
- Web page: https://patentgrep.com/patent/US11308398B2

## CPC

- G06N 3/063: using electronic means
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06F 13/28: using burst mode transfer, e.g. direct memory access {DMA}, cycle steal (G06F13/32 takes precedence)
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/08: Learning methods
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Aspects of data modification for neural networks are described herein. The aspects may include a connection value generator configured to receive one or more groups of input data and one or more weight values and generate one or more connection values based on the one or more weight values. The aspects may further include a pruning module configured to modify the one or more groups of input data and the one or more weight values based on the connection values. Further still, the aspects may include a computing unit configured to update the one or more weight values and/or calculate one or more input gradients.

## Claims

### Claim 1

A neural network processor, comprising:
a connection value generator circuit of a data modifier circuit configured to:
receive one or more groups of input data and one or more weight values,
generate one or more connection values based on the one or more weight values,
wherein each of the connection values indicates whether one of the weight values satisfies a predetermined condition, and
wherein the connection values are respectively generated based on a distance between input nodes corresponding to the one or more groups of input data; and
a pruning circuit of the data modifier circuit configured to modify the one or more groups of input data and the one or more weight values based on the connection values.

### Claim 2 (depends on 1)

The neural network processor of claim 1, further comprising a computing circuit configured to:
multiply one or more output gradients with the modified input data to generate one or more weight differences, and
subtract the one or more weight differences from the one or more modified weight values to generate one or more updated weight values.

### Claim 3 (depends on 2)

The neural network processor of claim 2,
wherein the data modifier circuit is connected to a memory and a direct memory access (DMA) module,
wherein the data modifier circuit is configured to store the one or more output gradients and the modified input data in the memory, and
wherein the computing circuit is further configured to store the output gradients and the modified input data respectively in a weight cache and a data cache.

### Claim 4 (depends on 2)

The neural network processor of claim 2, wherein the computing circuit is further configured to:
multiply the one or more output gradients with the one or more modified weight values to generate one or more multiplication results,
add the one or more multiplication results to generate an intermediate sum,
multiply the intermediate sum with a learning rate to generate an intermediate multiplication result, and
apply a derivative of an activation function to the intermediate multiplication result to generate one or more input gradients.

### Claim 5 (depends on 4)

The neural network processor of claim 4,
wherein the data modifier circuit is connected to a memory and a direct memory access (DMA) module,
wherein the data modifier circuit is configured to store the modified weight values and the one or more output gradients in the memory, and
wherein the computing circuit is further configured to:
read the modified weight values and the one or more output gradients from the memory in response to an instruction received from a controller, and
store the one or more output gradients and the weight values respectively in a weight cache and a data cache.

### Claim 6 (depends on 1)

The neural network processor of claim 1, further comprising a computing circuit configured to respectively multiply the modified groups of input data with the modified weight values to generate one or more groups of output data.

### Claim 7 (depends on 1)

The neural network processor of claim 1,
wherein the data modifier circuit is connected to a weight cache and a data cache, and
wherein the data modifier circuit is configured to store the modified weight values and the modified input data respectively in the weight cache and the data cache.

### Claim 8

A method for modifying data for neural networks, comprising:
receiving, by a connection value generator circuit of a data modifier circuit, one or more groups of input data and one or more weight values;
generating, by the connection value generator circuit of the data modifier circuit, one or more connection values based on the one or more weight values,
wherein each of the connection values indicates whether one of the weight values satisfies a predetermined condition,
wherein the connection values are respectively generated based on a distance between input nodes corresponding to the one or more groups of input data; and
modifying, by a pruning circuit of the data modifier circuit, the one or more groups of input data and the one or more weight values based on the connection values.

### Claim 9 (depends on 8)

The method of claim 8, further comprising
multiplying, by a computing circuit, the one or more output gradients with the modified input data to generate one or more weight differences; and
subtracting, by the computing circuit, the one or more weight differences from the one or more modified weight values to generate one or more updated weight values.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
storing, by the data modifier circuit, the one or more output gradients and the modified input data in a memory, wherein the data modifier circuit is connected to the memory and a direct memory access (DMA) module, and
storing, by the computing circuit, the output gradients and the modified input data respectively in a weight cache and a data cache.

### Claim 11 (depends on 9)

The method of claim 9, further comprising:
multiplying, by the computing circuit, the one or more output gradients with the one or more modified weight values to generate one or more multiplication results,
adding, by the computing circuit, the one or more multiplication results to generate an intermediate sum,
multiplying, by the computing circuit, the intermediate sum with a learning rate to generate an intermediate multiplication result, and
applying, by the computing circuit, a derivative of an activation function to the intermediate multiplication result to generate the one or more input gradients.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
storing, by the data modifier circuit, the modified weight values and the one or more output gradients in a memory, wherein the data modifier circuit is connected to the memory and a direct memory access (DMA) module,
reading, by the computing circuit, the modified weight values and the one or more output gradients from the memory in response to an instruction received from a controller, and
storing, by the computing circuit, the one or more output gradients and the weight values respectively in a weight cache and a data cache.

### Claim 13 (depends on 8)

The method of claim 8, further comprising multiplying, by a computing circuit, the modified groups of input data with the modified weight values respectively to generate one or more groups of output data.

### Claim 14 (depends on 8)

The method of claim 8, further comprising storing, by the data modifier circuit, the modified weight values and the modified input data respectively in a weight cache and a data cache, wherein the data modifier circuit is directly connected to the weight cache and the data cache.

### Claim 15

A neural network processor for training neural networks, comprising:
a connection value generator circuit of a data modifier circuit configured to:
receive one or more groups of input data and one or more weight values at one or more input nodes of a current layer,
generate one or more connection values based on the one or more weight values,
wherein each of the connection values indicates whether one of the weight values satisfies a predetermined condition, and
wherein the connection values are respectively generated based on a distance between input nodes corresponding to the one or more groups of input data;
a pruning circuit of the data modifier circuit configured to modify the one or more groups of input data and the one or more weight values based on the connection values; and
a computing circuit configured to:
update the one or more modified weight values of the current layer based on the modified input data and one or more output gradients received at one or more output nodes of the current layer from a next layer,
calculate one or more input gradients of the current layer based on the modified weight values and the one or more output gradients, and
respectively multiply the modified input data with the modified weight values to generate one or more groups of output data at the one or more output nodes of the current layer.

### Claim 16 (depends on 15)

The neural network processor of claim 15,
wherein the data modifier circuit is connected to a memory and a direct memory access (DMA) module,
wherein the data modifier circuit is configured to store the one or more output gradients received at the one or more output nodes from the next layer and the modified input data in the memory, and
wherein the computing circuit is further configured to store the output gradients and the modified input data respectively in a weight cache and a data cache.

### Claim 17 (depends on 15)

The neural network processor of claim 15,
wherein the data modifier circuit is connected to a memory and a direct memory access (DMA) module,
wherein the data modifier circuit is configured to store the modified weight values and the one or more output gradients in the memory, and
wherein the computing circuit is further configured to:
read the modified weight values and the one or more output gradients from the memory in response to an instruction received from a controller, and
store the one or more output gradients and the weight values respectively in a weight cache and a data cache.
