# US 2022/0284300 A1 · Techniques to tune scale parameter for activations in binary 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/0284300 A1
- Document ID: US20220284300A1
- Status: Published application
- Kind: A1
- Application number: 17/636,023
- Filed: 2019-09-19
- Published: 2022-09-08
- Earliest claimed: 2019-09-19
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Konstantin RODYUSHKIN; Alexey KRUGLOV
- Web page: https://patentgrep.com/patent/US20220284300A1

## CPC

- G06N 3/063: using electronic means
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/048: Activation functions
- G06N 3/0495: Quantised networks; Sparse networks; Compressed networks
- G06N 3/09: Supervised learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Various embodiments are generally directed to techniques to tune a scale parameter for activations in binary neural networks, such as based on estimating a gradient for the scale parameter using quantization error, for instance. Some embodiments are particularly directed to tuning the scale parameter for activations by estimating the gradient for the scale parameter using a first “force” based on quantization error and a second, opposing, “force” based on clipping error. For instance, the first “force” based on the quantization error may give a gradient for the scale parameter that pushes the scale parameter lower to reduce the quantization error and the second “force” based on the clipping error may give a gradient for the scale parameter that moves the scale parameter higher to reduce the number of activations that are higher than a current scale parameter.

## Claims

### Claim at position 1

1-25. (canceled)

### Claim 26

An apparatus, comprising:
a processor; and
memory comprising instructions that when executed by the processor cause the processor to:
determine a quantization error and a clipping error associated with generation of a neural network, the neural network comprising at least one binary activation layer;
estimate a gradient for a scale parameter based on the quantization error and the clipping error, the scale parameter associated with activations in the neural network; and
tune the scale parameter based on the gradient estimated for the scale parameter.

### Claim 27 (depends on 26)

The apparatus of claim 26, the memory comprising instructions that when executed by the processor cause the processor to tune the scale parameter as part of a stochastic gradient descent optimization loop.

### Claim 28 (depends on 26)

The apparatus of claim 26, wherein the scale parameter defines a binary level for at least one activation in the neural network.

### Claim 29 (depends on 26)

The apparatus of claim 26, wherein the neural network comprises a convolutional neural network.

### Claim 30 (depends on 26)

The apparatus of claim 26, the memory comprising instructions that when executed by the processor cause the processor to:
compare an activation value to a threshold; and
map the activation value to a binary system based on comparison of the activation value to the threshold.

### Claim 31 (depends on 30)

The apparatus of claim 30, the memory comprising instructions that when executed by the processor cause the processor to utilize a sigmoid function to parameterize the threshold.

### Claim 32 (depends on 26)

The apparatus of claim 26, the memory comprising instructions that when executed by the processor cause the processor to utilize one or more of an exponentiation function and a logarithmic function to generate the scale parameter.

### Claim 33 (depends on 26)

The apparatus of claim 26, the memory comprising instructions that when executed by the processor cause the processor to utilize the scale parameter to train a binary neural network.

### Claim 34 (depends on 26)

The apparatus of claim 26, the memory comprising instructions that when executed by the processor cause the processor to estimate a gradient for a scale parameter based on the quantization error and the clipping error with:
Δ
⁢
L
/
Δ
⁢
S
ln
=
{
0
for
X
≤
0
(
Y
b
-
X
)
·
Δ
⁢
L
/
Δ
⁢
Y
b
for
0
<
X
<
S
S
·
Δ
⁢
L
/
Δ
⁢
Y
b
for
X
≥
S

### Claim 35 (depends on 26)

The apparatus of claim 26, the memory comprising instructions that when executed by the processor cause the processor to parameterize scale to make optimization adjustment size proportional to scale value.

### Claim 36 (depends on 26)

The apparatus of claim 26, the memory comprising instructions that when executed by the processor cause the processor to parameterize threshold to make optimization adjustments larger for threshold values closer to 0.5 than 0 and 1 and smaller for threshold values closer to 0 or 1 than 0.5.

### Claim 37

At least one non-transitory computer-readable medium comprising a set of instructions that, in response to being executed by a processor circuit, cause the processor circuit to:
determine a quantization error associated with generation of a neural network, the neural network comprising at least one binary activation layer;
estimate a gradient for a scale parameter based on the quantization error, the scale parameter associated with activations in the neural network; and
tune the scale parameter based on the gradient estimated for the scale parameter.

### Claim 38 (depends on 37)

The at least one non-transitory computer-readable medium of claim 37, comprising instructions that, in response to being executed by the processor circuit cause the processor circuit to:
determine a clipping error associated with generation of the neural network; and
estimate the gradient for the scale parameter based on the quantization error and the clipping error.

### Claim 39 (depends on 38)

The at least one non-transitory computer-readable medium of claim 38, comprising instructions that, in response to being executed by the processor circuit cause the processor circuit to estimate the gradient for the scale parameter based on the quantization error and the clipping error with:
Δ
⁢
L
/
Δ
⁢
S
ln
=
{
0
for
X
≤
0
(
Y
b
-
X
)
·
Δ
⁢
L
/
Δ
⁢
Y
b
for
0
<
X
<
S
S
·
Δ
⁢
L
/
Δ
⁢
Y
b
for
X
≥
S

### Claim 40 (depends on 37)

The at least one non-transitory computer-readable medium of claim 37, comprising instructions that, in response to being executed by the processor circuit cause the processor circuit to tune the scale parameter as part of a stochastic gradient descent optimization loop.

### Claim 41 (depends on 37)

The at least one non-transitory computer-readable medium of claim 37, wherein the scale parameter defines a binary level for at least one activation in the neural network.

### Claim 42 (depends on 37)

The at least one non-transitory computer-readable medium of claim 37, comprising instructions that, in response to being executed by the processor circuit cause the processor circuit to parameterize scale to make optimization adjustment size proportional to scale value.

### Claim 43

A computer-implemented method, comprising:
determining a quantization error associated with generation of a neural network, the neural network comprising at least one binary activation layer;
estimating a gradient for a scale parameter based on the quantization error, the scale parameter associated with activations in the neural network; and
tuning the scale parameter based on the gradient estimated for the scale parameter.

### Claim 44 (depends on 43)

The computer-implemented method of claim 43, comprising:
determining a clipping error associated with generation of the neural network; and
estimating the gradient for the scale parameter based on the quantization error and the clipping error.

### Claim 45 (depends on 44)

The computer-implemented method of claim 44, comprising estimating the gradient for the scale parameter based on the quantization error and the clipping error with:
Δ
⁢
L
/
Δ
⁢
S
ln
=
{
0
for
X
≤
0
(
Y
b
-
X
)
·
Δ
⁢
L
/
Δ
⁢
Y
b
for
0
<
X
<
S
S
·
Δ
⁢
L
/
Δ
⁢
Y
b
for
X
≥
S
