IP Library Granted Patent US 12,299,565
Granted Patent B2
US 12,299,565 · App. 17/135,793 · Granted May 13, 2025

Data processing method and device for bit-number reduction in a neural network by establishing bit upper bound and bit lower bound using distribution information

Inventors: Chao-Hung Chen (Tainan, TW); Ming-Chun Hsyu (Taipei, TW); Chien-Chih Huang (Taoyuan, TW); Wen-Pin Hsu (New Taipei, TW); Chun-Te Yu (Yunlin County, TW)
Assignee: INDUSTRIAL TECHNOLOGY RESEARCH INSTITUTE
G06N3/08G06F7/50G06F7/523G06F18/2193
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,299,565
App. No.
17/135,793
Filed
Dec 28, 2020
Granted
May 13, 2025
Kind
B2
Examiner
CHEN, ALAN S
Art Unit
2125
USPC
706/15
Abstract

A data processing method used in neural network computing is provided. During a training phase of a neural network model, a feedforward procedure based on a calibration data is performed to obtain distribution information of a feedforward result for at least one layer of the neural network model. During the training phase of the neural network model, a bit upper bound of a partial sum is generated based on the distribution information of the feedforward result. During an inference phase of the neural network model, a bit-number reducing process is performed on an original operation result of an input data and a weight for the neural network model according to the bit upper bound of the partial sum to obtain an adjusted operation result.

Claims (31)

1. A data processing method used in neural network computing, comprising:

during a training phase of a neural network model, performing a feedforward procedure based on a calibration data to obtain a distribution information of a feedforward result for at least one layer of the neural network model;

during the training phase of the neural network model, generating a bit upper bound of a partial sum based on the distribution information of the feedforward result; and

generating a bit lower bound of the partial sum by deducting a bit width of an accumulator from the bit upper bound of the partial sum;

wherein during an inference phase of the neural network model, a bit-number reducing process is performed on an original operation result of an input data and a weight for the neural network model according to the bit upper bound of the partial sum to obtain an adjusted operation result.

2. The method according to claim 1 , wherein the neural network model used for performing feedforward procedure based on the calibration data to obtain the distribution information of the feedforward result is a pre-trained neural network model.

3. The method according to claim 1 , wherein the distribution information of the feedforward result at least comprises a mean and a standard deviation, the bit upper bound of the partial sum is determined according to the mean and the standard deviation.

4. The method according to claim 3 , wherein the bit upper bound of the partial sum is related to a binary logarithm of a value which is the mean plus N times of the standard deviation, N is an integer.

5. The method according to claim 1 , further comprising:

training the neural network model again by using the bit upper bound of the partial sum to perform saturation procedure to a training operation result of a training data through a training unit.

6. The method according to claim 1 , further comprising:

training the neural network model again by using the bit upper bound and the bit lower bound of the partial sum to perform saturation procedure to a training operation result of a training data.

7. The method according to claim 1 , further comprising:

measuring accuracy by using an evaluation unit with testing data, and training the neural network model again by using the bit upper bound and the bit lower bound of the partial sum to perform saturation procedure to a training operation result of a training data when the accuracy is lower than a threshold.

8. The method according to claim 1 , wherein the input data and the weight are in a form of integer, the original operation result, the adjusted operation result are in the form of integer, and the original operation result of the input data and the weight is the result of at least one of convolution operation, multiplication operation, matrix multiplication operation, dot product operation, and accumulation operation for the input data and the weight.

9. The method according to claim 1 , wherein a value of the bit upper bound is equal or smaller than a bit width of an accumulator in hardware.

10. A data processing device used in neural network computing, comprising:

a first operation circuit, for receiving an input data and a weight for a neural network model and outputting a first operation result;

an adjusting circuit, for performing bit-number reduced operation on the first operation result according to a bit upper bound of a partial sum to obtain a second operation result during an inference phase of the neural network model;

a second operation circuit, for receiving the second operation result and a third operation result to generate a fourth operation result; and

a storing circuit, for storing the fourth operation result;

wherein the bit upper bound of the partial sum is generated based on distribution information of a feedforward result obtained by performing feedforward procedure based on calibration data for at least one layer of the neural network model during a training phase of the neural network model;

wherein the adjusting circuit comprises a first saturation circuit for performing saturation procedure on the first operation result according to the bit upper bound of the partial sum;

wherein the adjusting circuit further comprises a shifting circuit for performing shifting operation on an output of the first saturation circuit, the shifting operation is performed according to a bit lower bound of the partial sum which is generated by deducting a bit width of an accumulator from the bit upper bound of the partial sum.

11. The data processing device according to claim 10 , wherein the first operation circuit comprises a multiplier, the first operation result is the multiplication of the input data and the weight.

12. The data processing device according to claim 10 , wherein the distribution information of the feedforward result at least comprises a mean and a standard deviation, and the bit upper bound of the partial sum is determined according to the mean and the standard deviation.

13. The data processing device according to claim 12 , wherein the bit upper bound of the partial sum is related to a binary logarithm of a value which is the mean plus N times of the standard deviation, Nis an integer.

14. The data processing device according to claim 10 , wherein the input data and the weight are in a form of integer, the first operation result, the second operation result, the third operation result, and the fourth operation result are in the form of integer.

15. The data processing device according to claim 10 , wherein a value of the bit upper bound is equal or smaller than a bit width of an accumulator in hardware.

16. The data processing device according to claim 10 , wherein the second operation circuit comprises an adder which adding the second operation result and the third operation result.

17. The data processing device according to claim 16 , wherein the second operation circuit further comprises a second saturation circuit which performs saturation procedure on an output of the adder.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 29, 2020
From: CHEN, CHAO-HUNG; HSYU, MING-CHUN; HUANG, CHIEN-CHIH; HSU, WEN-PIN; YU, CHUN-TE
To: INDUSTRIAL TECHNOLOGY RESEARCH INSTITUTE
Reel/Frame 054770/0412 →
Continuity (1)
Related Publication 20220207346A1 · Jun 30, 2022
References Cited (25)
US 9916531B1 · Zivkovic et al. · 2018 [cited by applicant]
US 10373050B2 · Lin et al. · 2019 [cited by applicant]
US 10592799B1 · Kim et al. · 2020 [cited by applicant]
US 10621486B2 · Yao · 2020 [cited by applicant]
US 10678508B2 · Vantrease et al. · 2020 [cited by applicant]
US 20170286830A1 · El-Yaniv et al. · 2017 [cited by applicant]
US 20190340492A1 · Burger et al. · 2019 [cited by applicant]
US 20190347550A1 · Jung · 2019 [cited by examiner]
US 20190354842A1 · Louizos et al. · 2019 [cited by applicant]
US 20200026986A1 · Ha et al. · 2020 [cited by applicant]
US 20200193270A1 · Wu et al. · 2020 [cited by applicant]
CN 109389219A · 2019 [cited by applicant]
CN 110009101A · 2019 [cited by applicant]
TW 201933193A · 2019 [cited by applicant]
TW 202022798A · 2020 [cited by applicant]
Tanenbaum, Structured Computer Organization, 2nd Edition; Publisher: Prentice-Hall, Inc.; 1984; Total pp. 4 (Year: 1984). [cited by examiner]
Bilaniuk et al., Bit-Slicing FPGA Accelerator for Quantized Neural Networks, IEEE, 2019; Total pp. 5 (Year: 2019). [cited by examiner]
Hubara et al., Quantized Neural Networks: Training Neural Networks with Low Precision Weights and Activations, Journal of Machine Learning Research 18 (2018); pp. 1-30 (Year: 2018). [cited by examiner]
Yu et al., Low-bit Quantization Needs Good Distribution, Computer Vision Foundation, 2020; pp. 1-10 (Year: 2020). [cited by examiner]
de Bruin et al., “Quantization of Deep Neural Networks for Accumulator-constrained Processors”, arXiv:2004.11783v1 [cs.CV] Apr. 24, 2020, 20 pages. [cited by applicant]
Han et al., “Deep Compression: Compressing Deep Neural Networks With Pruning, Trained Quantization and Huffman Coding”, Published as a conference paper at ICLR 2016, arXiv:1510.00149v5 [cs.CV] Feb. 15, 2016, 14 pages. [cited by applicant]
Hubara et al., “Quantized Neural Networks: Training Neural Networks with Low Precision Weights and Activations”, arXiv:1609.07061v1 [cs.NE] Sep. 22, 2019, 29 pages. [cited by applicant]
Jacob et al., “Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference”, arXiv:1712.05877v1 [cs.LG] Dec. 15, 2017, 14 pages. [cited by applicant]
Lin et al., “Fixed Point Quantization of Deep Convolutional Networks”, Proceedings of the 33rd International Conference on Machine Leaming, New York, JMLR: W&CP vol. 48, Jun. 2, 2016, 10 pages. [cited by applicant]
Louizos et al., “Relaxed Quantization for Discretized Neural Networks”, arXiv:1810.01875v1 [cs.LG] Oct. 3, 2018, 14 pages. [cited by applicant]