# US 2022/0284262 A1 · Neural network operation apparatus and quantization method

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

- Number: US 2022/0284262 A1
- Document ID: US20220284262A1
- Status: Published application
- Kind: A1
- Application number: 17/368,470
- Filed: 2021-07-06
- Published: 2022-09-08
- Earliest claimed: 2021-03-04
- Assignees: Samsung Electronics Co., Ltd.; Unist (Ulsan National Institute of Science and Technology)
- Applicants: Samsung Electronics Co., Ltd.; Unist(Ulsan National Institute of Science and Technology)
- Inventors: Sehwan LEE; Hyeonuk SIM; Jongeun LEE
- Web page: https://patentgrep.com/patent/US20220284262A1

## CPC

- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/063: using electronic means
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A neural network operation apparatus and method implementing quantization is disclosed. The neural network operation method may include receiving a weight of a neural network, a candidate set of quantization points, and a bitwidth for representing the weight, extracting a subset of quantization points from the candidate set of quantization points based on the bitwidth, calculating a quantization loss based on the weight of the neural network and the subset of quantization points, and generating a target subset of quantization points based on the quantization loss.

## Claims

### Claim 1

A processor-implemented neural network operation method, comprising:
receiving a weight of a neural network, a candidate set of quantization points, and a bitwidth that represents the received weight;
extracting a subset of quantization points from the candidate set of quantization points based on the bitwidth;
calculating a quantization loss based on the received weight and the subset of quantization points; and
generating a target subset of quantization points based on the calculated quantization loss.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
generating the candidate set of quantization points based on log-scale quantization.

### Claim 3 (depends on 2)

The method of claim 2, wherein the generating of the candidate set of quantization points comprises:
obtaining a first quantization point based on the log-scale quantization;
obtaining a second quantization point based on the log-scale quantization; and
generating the candidate set of quantization points based on a sum of the first quantization point and the second quantization point.

### Claim 4 (depends on 1)

The method of claim 1, wherein the extracting of the subset of quantization points comprises:
determining a number of elements of the subset based on the bitwidth; and
extracting a subset corresponding to the number of elements from the candidate set of quantization points.

### Claim 5 (depends on 1)

The method of claim 1, wherein the calculating of the quantization loss comprises calculating the quantization loss based on the received weight of the neural network and a weight quantized by the quantization points included in the extracted subset of quantization points.

### Claim 6 (depends on 5)

The method of claim 5, wherein the calculating of the quantization loss based on the received weight of the neural network and the weight quantized by the quantization points included in the extracted subset of quantization points comprises calculating an L2 loss or an L4 loss for a difference between the received weight of the neural network and the quantized weight as the quantization loss.

### Claim 7 (depends on 1)

The method of claim 1, wherein the generating of the target subset of quantization points comprises determining a subset of quantization points that minimizes the quantization loss to be the target subset.

### Claim 8 (depends on 1)

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

### Claim 9

A neural network operation apparatus, comprising:
a memory, configured to store a weight of a neural network and a target subset of quantization points extracted from a candidate set of quantization points to quantize the weight of the neural network;
a decoder, configured to select a target quantization point from the target subset of quantization points based on the weight of the neural network;
a shifter, configured to perform a multiplication operation based on the target quantization point; and
an accumulator, configured to accumulate an output of the shifter.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the target subset is generated based on the weight of the neural network, and a quantization loss for a subset of quantization points extracted from the candidate set.

### Claim 11 (depends on 9)

The apparatus of claim 9, wherein the shifter comprises:
a first shifter, configured to perform a first multiplication operation for input data based on a first quantization point included in the target quantization point; and
a second shifter, configured to perform a second multiplication operation for the input data based on a second quantization point included in the target quantization point.

### Claim 12 (depends on 9)

The apparatus of claim 9, wherein the decoder comprises a multiplexer, configured to multiplex the target quantization point using the weight as a selector.

### Claim 13 (depends on 9)

The apparatus of claim 9, wherein the target quantization point is shared between multiply-accumulate (MAC) operators.

### Claim 14

A neural network operation apparatus, comprising:
a receiver, configured to receive a weight of a neural network, a candidate set of quantization points, and a bitwidth that represents the weight; and
one or more processors, configured to extract a subset of quantization points from the candidate set of quantization points based on the bitwidth, calculate a quantization loss based on the weight of the neural network and the subset of quantization points, and generate a target subset of quantization points based on the calculated quantization loss.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the one or more processors are further configured to generate the candidate set based on log-scale quantization.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the one or more processors are further configured to obtain a first quantization point based on the log-scale quantization, obtain a second quantization point based on the log-scale quantization, and generate the candidate set of quantization points based on a sum of the first quantization point and the second quantization point.

### Claim 17 (depends on 14)

The apparatus of claim 14, wherein the one or more processors are further configured to determine a number of elements of the subset based on the bitwidth, and extract a subset corresponding to the number of elements from the candidate set of quantization points.

### Claim 18 (depends on 14)

The apparatus of claim 14, wherein the one or more processors are further configured to calculate the quantization loss based on the weight of the neural network and a weight quantized by the quantization points included in the subset.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the one or more processors are further configured to calculate an L2 loss or an L4 loss for a difference between the weight of the neural network and the quantized weight as the quantization loss.

### Claim 20 (depends on 14)

The apparatus of claim 14, wherein the one or more processors are further configured to determine a subset that minimizes the quantization loss to be the target subset.
