# US 2022/0284260 A1 · Variable quantization for neural networks

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

- Number: US 2022/0284260 A1
- Document ID: US20220284260A1
- Status: Published application
- Kind: A1
- Application number: 17/194,158
- Filed: 2021-03-05
- Published: 2022-09-08
- Earliest claimed: 2021-03-05
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Chirag Sureshbhai PATEL; Tijmen Pieter Frederik BLANKEVOORT; Jonathan DeWitt WOLFE; Erich PLONDKE
- Web page: https://patentgrep.com/patent/US20220284260A1

## CPC

- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06N 3/10: Interfaces, programming languages or software development kits, e.g. for simulating neural networks
- G06N 3/047: Probabilistic or stochastic networks
- G06N 3/082: modifying the architecture, e.g. adding, deleting or silencing nodes or connections
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method for an artificial neural network includes receiving an input. A quantization threshold is determined based on the input, or a characteristic or type of the input. Neural network values, such as weights or activations, of one or more layers of the artificial neural network are quantized according to the quantization threshold. The artificial neural network generates an output based on the quantized neural network values.

## Claims

### Claim 1

A method for an artificial neural network (ANN), comprising:
receiving, by a first layer of the ANN, a set of input values;
determining a first quantization threshold based at least in part on the set of input values;
quantizing neural network values of one or more layers of the ANN according to the first quantization threshold; and
generating an output based on the quantized neural network values.

### Claim 2 (depends on 1)

The method of claim 1, in which each of the neural network values comprises a weight or an activation.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
determining a selection variable based on the set of input values; and
determining the first quantization threshold based on the selection variable.

### Claim 4 (depends on 3)

The method of claim 3, in which the selection variable comprises an input type or input characteristic.

### Claim 5 (depends on 4)

The method of claim 4, in which the input type comprises an end-of-sentence (EOS) token.

### Claim 6 (depends on 4)

The method of claim 4, in which the input characteristic includes one or more of an image scene type, an image brightness, or an image contrast.

### Claim 7 (depends on 1)

The method of claim 1, further comprising determining the first quantization threshold based on an intermediate activation.

### Claim 8 (depends on 1)

The method of claim 1, in which the first quantization threshold is dynamically determined during runtime.

### Claim 9 (depends on 1)

The method of claim 1, in which the output generated by the ANN relates to at least one of image processing, audio processing, or sensor-data processing.

### Claim 10

An apparatus for an artificial neural network (ANN), comprising:
a memory; and
at least one processor coupled to the memory, the at least one processor being configured:
to receive, via a first layer of the ANN, a set of input values;
to determine a first quantization threshold based at least in part on the set of input values;
to quantize neural network values of one or more layers of the ANN according to the first quantization threshold; and
to generate an output based on the quantized neural network values.

### Claim 11 (depends on 10)

The apparatus of claim 10, in which each of the neural network values comprises a weight or an activation.

### Claim 12 (depends on 10)

The apparatus of claim 10, in which the at least one processor is further configured:
to determine a selection variable based on the set of input values; and
to determine the first quantization threshold based on the selection variable.

### Claim 13 (depends on 12)

The apparatus of claim 12, in which the selection variable comprises an input type or input characteristic.

### Claim 14 (depends on 13)

The apparatus of claim 13, in which the input type comprises an end-of-sentence (EOS) token.

### Claim 15 (depends on 13)

The apparatus of claim 13, in which the input characteristic includes one or more of an image scene type, an image brightness, or an image contrast.

### Claim 16 (depends on 10)

The apparatus of claim 10, in which the at least one processor is further configured to determine the first quantization threshold based on an intermediate activation.

### Claim 17 (depends on 10)

The apparatus of claim 10, in which the at least one processor is further configured to dynamically determined the first quantization threshold during runtime.

### Claim 18 (depends on 10)

The apparatus of claim 10, in which the output relates to at least one of image processing, audio processing, or sensor-data processing.

### Claim 19

An apparatus for an artificial neural network (ANN), comprising:
means for receiving, via a first layer of the ANN, a set of input values;
means for determining a first quantization threshold based at least in part on the set of input values;
means for quantizing neural network values of one or more layers of the ANN according to the first quantization threshold; and
means for generating an output based on the quantized neural network values.

### Claim 20 (depends on 19)

The apparatus of claim 19, in which each of the neural network values comprises a weight or an activation.

### Claim 21 (depends on 19)

The apparatus of claim 19, further comprising:
means for determining a selection variable based on the set of input values; and
means for determining the first quantization threshold based on the selection variable.

### Claim 22 (depends on 21)

The apparatus of claim 21, in which the selection variable comprises an input type or input characteristic.

### Claim 23 (depends on 19)

The apparatus of claim 19, further comprising means for determining the first quantization threshold based on an intermediate activation.

### Claim 24 (depends on 19)

The apparatus of claim 19, further comprising means for dynamically determining the first quantization threshold during runtime.

### Claim 25

A non-transitory computer readable medium having encoded thereon program code for an artificial neural network (ANN), the program code being executed by a processor and comprising:
program code to receive, via a first layer of the ANN, a set of input values;
program code to determine a first quantization threshold based at least in part on the set of input values;
program code to quantize neural network values of one or more layers of the ANN according to the first quantization threshold; and
program code to generate an output based on the quantized neural network values.

### Claim 26 (depends on 25)

The non-transitory computer readable medium of claim 25, in which each of the neural network values comprises a weight or an activation.

### Claim 27 (depends on 25)

The non-transitory computer readable medium of claim 25, in which the at least one processor is further configured:
to determine a selection variable based on the set of input values; and
to determine the first quantization threshold based on one or more of the selection variable.

### Claim 28 (depends on 27)

The non-transitory computer readable medium of claim 27, in which the selection variable comprises an input type or input characteristic.

### Claim 29 (depends on 25)

The non-transitory computer readable medium of claim 25, further comprising program code to determine the first quantization threshold based on an intermediate activation.

### Claim 30 (depends on 25)

The non-transitory computer readable medium of claim 25, further comprising program code to dynamically determined the first quantization threshold during runtime.
