# US 2026/0310950 A1 · Method for neural network with weight quantization

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

- Number: US 2026/0310950 A1
- Document ID: US20260310950A1
- Status: Published application
- Kind: A1
- Application number: 19/711,792
- Filed: 2026-06-17
- Published: 2026-10-08
- Earliest claimed: 2022-04-12
- Assignees: Taiwan Semiconductor Manufacturing Company, Ltd.; National Tsing Hua University
- Applicants: Taiwan Semiconductor Manufacturing Company, Ltd.; National Tsing Hua University
- Inventors: Kea Tiong TANG; YuHsiang CHENG
- Web page: https://patentgrep.com/patent/US20260310950A1

## CPC

- G06N 3/049: Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
- G06N 3/045: Combinations of networks
- G06N 3/048: Activation functions
- G06N 3/08: Learning methods
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method is provided and includes operations as below: training a spiking neural network (SNN) in a first device to generate multiple first weight values of M bits; calculating multiple second weight values of N bits corresponding to the first weight values according to a threshold value, the number M, and the first weight values, wherein the number N is smaller than the number M; retraining the spiking neural network with the second weight values to update the second weight values; and performing a write operation to save the updated plurality of second weight values in a memory in a second device for performing a spiking neural network operation in the second device.

## Claims

### Claim 1

A method, comprising:
training a neural network in a first device to generate a plurality of first weight values of M bits;
calculating a plurality of second weight values corresponding to the plurality of first weight values based on an equation below,
W
q
=
⌈
W
r
V
th
×
2
N
-
1
⌋
wherein Wq is a corresponding one of the plurality of second weight values, Wr is a corresponding one of the plurality of first weight values, and Vth is a threshold value; and
performing a write operation to save the plurality of second weight values in a memory in a second device for performing a neural network operation in the second device, wherein each of the plurality of second weight values saved in the second device has N bits, wherein N is different from M.

### Claim 2 (depends on 1)

The method of claim 1, wherein a maximum value of the plurality of second weight values equals to (2N-1), and
a minimum value of the plurality of second weight values equals to −(2N-1).

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
retraining the neural network with the plurality of second weight values to update the plurality of second weight values.

### Claim 4 (depends on 1)

The method of claim 1, wherein the threshold value is configured to be compared with a membrane potential of a neuron of the neural network to determine whether the neuron fires an output spike.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
applying training data on an input of a layer in the neural network;
generating the membrane potential according to the training data and the plurality of second weight values;
comparing the membrane potential with the threshold value to generate output data; and
in response to the comparison between the output data and desire data corresponding to the training data, updating the plurality of second weight values as optimized plurality of second weight values.

### Claim 6

A computer program product comprising a computer readable memory having program codes stored thereon to implement a first spiking neural network, wherein the program codes are executable by a processor to perform operations comprising:
calculating, according to a plurality of first weight values in a first datatype and a threshold value of the first spiking neural network, a plurality of second weight values and storing the plurality of second weight values in the computer readable memory, wherein the calculating comprises:
calculating each of the plurality of second weight values based on equation below,
W
q
=
V
th
×
⌈
W
ri
γ
×
2
N
-
1
⌋
γ
=
V
th
×
2
⌈
log
2
⁢
(
max
(
W
r
)
V
th
)
⌋
wherein Wq is a corresponding one of the plurality of second weight values, Wr is a corresponding one of the plurality of first weight values, and Vth is the threshold value;
retraining the first spiking neural network with the plurality of second weight values and the threshold value of the first spiking neural network to update the plurality of second weight values; and
outputting the updated plurality of second weight values in a second datatype for a second spiking neural network corresponding to the first spike neural network, wherein bit resolutions of the first and second datatype are different.

### Claim 7 (depends on 6)

The computer program product of claim 6, wherein the program codes are executable by the processor to perform operations further comprising:
training the first spiking neural network to obtain the plurality of first weight values and the threshold value,
wherein the plurality of first weight values are of M bits and the threshold value, and the plurality of second weight values are of N bits, M being greater than N.

### Claim 8 (depends on 6)

The computer program product of claim 6, wherein the plurality of second weight values are of N bits.

### Claim 9 (depends on 6)

The computer program product of claim 6, wherein the threshold value of the first spiking neural network is compared with a membrane potential of a neuron of the first spiking neural network to determine whether the neuron fires an output spike.

### Claim 10 (depends on 9)

The computer program product of claim 9, wherein the retraining the first spiking neural network with the plurality of second weight values and the threshold value comprises:
applying training data on the first spiking neural network;
generating the membrane potential according to the training data and the plurality of second weight values;
generating the output spike by comparing the membrane potential with the threshold value; and
after generating the output spike, setting the membrane potential to have the threshold value.

### Claim 11 (depends on 6)

The computer program product of claim 6, wherein the program codes are executable by the processor to perform operations further comprising:
storing the plurality of second weight values in the computer readable memory.

### Claim 12 (depends on 6)

The computer program product of claim 6, wherein the retraining the first spiking neural network with the plurality of second weight values comprises:
generating a training factor K in the first spiking neural network based on a comparison between output data and desire data corresponding to training data for retraining the first spiking neural network,
wherein the threshold value is of (N+K) bits.

### Claim 13 (depends on 12)

The computer program product of claim 12, wherein the retraining the first spiking neural network with the plurality of second weight values further comprises:
generating a membrane potential according to the training data and the plurality of second weight values;
comparing a (N+K+1)-th bit of the membrane potential with 0; and
in response to the comparison, generating an output spike.

### Claim 14

A method, comprising:
generating a plurality of first weight values of M bits by training a spiking neural network in a first device;
generating, a plurality of second weight values of N bits based on an equation below,
W
q
=
⌈
W
r
V
th
×
2
N
-
1
⌋
wherein Wq is a corresponding one of the plurality of second weight values, Wr is a corresponding one of the plurality of first weight values, and Vth is a threshold value; and
outputting the plurality of second weight values to a second device for the second device to store the plurality of second weight of N bits in a memory of the second device and perform an inference operation with the second weight values, wherein N is smaller than M.

### Claim 15 (depends on 14)

The method of claim 14, wherein the plurality of second weight values range from a first value to a second value, wherein the first and second values are associated with the number N.

### Claim 16 (depends on 14)

The method of claim 14, wherein the threshold value is of N bits.

### Claim 17 (depends on 14)

The method of claim 14, wherein a maximum value of the plurality of second weight values equals to (2N-1), and
a minimum value of the plurality of second weight values equals to −(2N-1).

### Claim 18 (depends on 14)

The method of claim 14, further comprising:
retraining the spiking neural network with the plurality of second weight values to update the plurality of second weight values.

### Claim 19 (depends on 14)

The method of claim 14, wherein the threshold value is compared with a membrane potential of a neuron of the spiking neural network to determine whether the neuron fires an output spike.

### Claim 20 (depends on 19)

The method of claim 19, further comprising:
generating the membrane potential according to inference data and the plurality of second weight values; and
comparing the membrane potential with the threshold value to generate output data.
