IP Library Granted Patent US 12,725,022
Granted Patent B2
US 12,725,022 · App. 17/893,450 · Granted Sep 1, 2026

Iterative reduction of quantization error in neural network model

Inventors: Sangjeong Lee (Suwon-si, KR); Jihun Oh (Suwon-si, KR); Meejeong Park (Suwon-si, KR)
Assignee: SAMSUNG ELECTRONICS CO., LTD.
G06N3/063G06F5/012
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,725,022
App. No.
17/893,450
Granted
Sep 1, 2026
Kind
B2
Abstract

An electronic device and a controlling method of an electronic device are provided. An electronic device recursively determines a plurality of layers of a neural network model. Weight data of first model information is recursively quantized to obtain a second neural network model. The recursive quantization begins with the weight data and determines an iteration count of a recursion. The recursion operates on error data, quantized weight data, scale data and quantized error data to obtain the iteration count. A first bit-width of the weight data is reduced to a second bit-width of the quantized weight data. The recursion may be performed on a per-layer basis. The weight data may be formulated in a floating-point format and the quantized weight data may be formulated in a fixed point format with an integer number of bits.

Claims (73)

1 . An electronic device comprising:

a memory configured to store first model information including information on a plurality of layers of a neural network model and first weight data expressed in a first bit-width; and

a processor configured to:

identify an iteration count of quantization of error data for each layer of the plurality of layers, based on the first model information and an iteration-related loss value,

acquire quantization information including second weight data corresponding to each of the first weight data and expressed in an integer of a second bit-width smaller than the first bit-width by performing recursive quantization according to the iteration count, and

acquire second model information on a reconfigured neural network model by reconfiguring the neural network model based on the first model information, the iteration count, and the second weight data;

acquire temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to an initial iteration count,

acquire a first loss value by performing a feedforward process of the neural network model based on the temporary weight data,

acquire a second loss value for latency of hardware by performing a simulation on the hardware for driving the neural network model based on the temporary weight data, and

identify the iteration count by updating a current iteration count such that a third loss value is decreased, wherein the third loss value is a combination of the first loss value and the second loss value, wherein the third loss value is the iteration-related loss value,

acquire first temporary weight data expressed in the first bit-width by performing first quantization including a quantization and an inverse quantization of the first weight data expressed in the first bit-width,

acquire first error data expressed in the first bit-width based on the first weight data and the first temporary weight data expressed in the first bit-width,

acquire second error data expressed in the second bit-width by performing second quantization including a quantization and an inverse quantization of the first error data expressed in the first bit-width,

determine, as the temporary weight data, second temporary weight data by summing the first temporary weight data, the first error data, and the second error data,

acquire third temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to a first iteration count value acquired by rounding down the current iteration count, and acquire fourth temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to a second iteration count acquired by rounding up the current iteration count, when the current iteration count is not an integer,

interpolate weights corresponding to each other among the third temporary weight data and the fourth temporary weight data, and

determine temporary weight data acquired according to a result of the interpolation as the second temporary weight data.

2 . The electronic device as claimed in claim 1 , wherein the processor is further configured to:

acquire temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to the iteration count,

acquire a loss value by performing a feedforward process of the neural network model based on the temporary weight data, and

acquire the second weight data by updating the first weight data so that the loss value is reduced.

3 . The electronic device as claimed in claim 1 , wherein the quantization information includes first information on the second weight data, first scale information corresponding to the second weight data, second information on second error data corresponding to the second weight data, and second scale information corresponding to the second error data, and

the processor is further configured to acquire the second model information by:

allocating the information on the second weight data and the first scale information to a first operator, and

allocating the information on the second error data and the second scale information to a plurality of second operators.

4 . The electronic device as claimed in claim 1 , wherein the first weight data is implemented through a zero-sum filter having a characteristic that a total sum of first weight values constituting the zero-sum filter is 0, and

when the recursive quantization is performed according to the iteration count, an error value corresponding to each of the first weight values is reflected to a quantization result of each of the first weight values, such that the total sum converges to 0.

5 . The electronic device according to claim 1 , wherein the reconfiguring the neural network model based on the first model information includes adding one or more operators to at least one layer of the plurality of layers of the neural network model.

6 . The electronic device according to claim 4 , wherein the zero-sum filter is a Laplacian filter.

7 . A controlling method of an electronic device, the controlling method comprising:

identifying, based on an iteration-related loss value, an iteration count of quantization for error data for each of a plurality of layers, based on first model information including information on the plurality of layers of a neural network model and first weight data expressed in a first bit-width;

acquiring quantization information including second weight data corresponding to each of the first weight data and expressed in a second bit-width smaller than the first bit-width by performing recursive quantization according to the iteration count; and

acquiring second model information on a reconfigured neural network model by reconfiguring the neural network model based on the first model information, the iteration count, and the second weight data,

wherein the identifying of the iteration count includes:

acquiring temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to an initial iteration count;

acquiring a first loss value by performing a feedforward process of the neural network model based on the temporary weight data;

acquiring a second loss value for latency of hardware by performing a simulation on the hardware for driving the neural network model based on the temporary weight data; and

identifying the iteration count by updating a current iteration count such that a third loss value is decreased, wherein the third loss value is a combination of the first loss value and the second loss value, wherein the third loss value is the iteration-related loss value,

wherein the acquiring of the temporary weight data comprises:

acquiring first temporary weight data expressed in the first bit-width by performing first quantization including a quantization and an inverse quantization of the first weight data expressed in the first bit-width,

acquiring first error data expressed in the first bit-width based on the first weight data and the first temporary weight data expressed in the first bit-width,

acquiring second error data expressed in the second bit-width by performing second quantization including a quantization and an inverse quantization of the first error data expressed in the first bit-width,

determining, as the temporary weight data, second temporary weight data by summing the first temporary weight data, the first error data, and the second error data,

acquiring third temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to a first iteration count acquired by rounding down the current iteration count, and acquiring fourth temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to a second iteration count acquired by rounding up the current iteration count, when the iteration count is not an integer;

interpolating weights corresponding to each other among the third temporary weight data and the fourth temporary weight data; and

determining temporary weight data acquired according to a result of the interpolation as the second temporary weight data.

8 . The controlling method as claimed in claim 7 , wherein the acquiring quantization information further comprises:

acquiring temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to the iteration count,

acquiring a loss value by performing a feedforward process of the neural network model based on the temporary weight data, and

acquiring the second weight data by updating the first weight data so that the loss value is reduced.

9 . The controlling method as claimed in claim 7 , wherein the quantization information includes first information on the second weight data, first scale information corresponding to the second weight data, second information on second error data corresponding to the second weight data, and second scale information corresponding to the error data, and

the acquiring of the second model information further comprises:

allocating the information on the second weight data and the first scale information to a first operator, and

allocating the information on the second error data and the second scale information to a plurality of second operators.

10 . The controlling method as claimed in claim 7 , wherein the first weight data is implemented through a zero-sum filter having a characteristic that a total sum of first weight values constituting the zero-sum filter becomes 0, and

when the recursive quantization is performed according to the iteration count, an error value corresponding to each of the first weight values is reflected to a quantization result of each of the first weight values, such that the total sum converges to 0.

11 . A non-transitory computer readable recording medium including a program for executing a controlling method of an electronic device, wherein the controlling method of the electronic device includes:

identifying an iteration count of quantization for error data for each of a plurality of layers, based on first model information and an iteration-related loss value, including information on the plurality of layers of a neural network model and first weight data expressed in a first bit-width;

acquiring quantization information including second weight data corresponding to each of the first weight data and expressed in a second bit-width smaller than the first bit-width by performing recursive quantization according to the iteration count; and

acquiring second model information on a reconfigured neural network model by reconfiguring the neural network model based on the first model information, the iteration count, and the second weight data,

wherein the identifying of the iteration count includes:

acquiring temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to an initial iteration count;

acquiring a first loss value by performing a feedforward process of the neural network model based on the temporary weight data;

acquiring a second loss value for latency of hardware by performing a simulation on the hardware for driving the neural network model based on the temporary weight data; and

identifying the iteration count by updating a current iteration count such that a third loss value is decreased, wherein the third loss value is a combination of the first loss value and the second loss value, wherein the third loss value is the iteration-related loss value,

wherein the acquiring of the temporary weight data comprises:

acquiring first temporary weight data expressed in the first bit-width by performing first quantization including a quantization and an inverse quantization of the first weight data expressed in the first bit-width,

acquiring first error data expressed in the first bit-width based on the first weight data and the first temporary weight data expressed in the first bit-width,

acquiring second error data expressed in the second bit-width by performing second quantization including a quantization and an inverse quantization of the first error data expressed in the first bit-width,

determining, as the temporary weight data, second temporary weight data by summing the first temporary weight data, the first error data, and the second error data,

acquiring third temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to a first iteration count acquired by rounding down the current iteration count, and acquiring fourth temporary weight data expressed in the first bit-width by performing the recursive quantization on the first weight data according to a second iteration count acquired by rounding up the current iteration count, when the iteration count is not an integer;

interpolating weights corresponding to each other among the third temporary weight data and the fourth temporary weight data; and

determining temporary weight data acquired according to a result of the interpolation as the second temporary weight data.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2022
From: LEE, SANGJEONG; OH, JIHUN; PARK, MEEJEONG
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 060869/0944 →
Priority Claims (1)
KR 10-2021-0083107 · Jun 25, 2021 · national
Continuity (2)
Continuation PCTKR2022008456 · Jun 15, 2022
Related Publication 20220405561A1 · Dec 22, 2022
References Cited (38)
US 10474430B2 · Diril et al. · 2019 [cited by applicant]
US 10853067B2 · Henry et al. · 2020 [cited by applicant]
US 11392825B2 · Ji et al. · 2022 [cited by applicant]
US 11418215B2 · Kim et al. · 2022 [cited by applicant]
US 11625577B2 · Lee et al. · 2023 [cited by applicant]
US 11748615B1 · Wu · 2023 [cited by examiner]
US 20170308789A1 · Langford et al. · 2017 [cited by applicant]
US 20200193273A1 · Chung et al. · 2020 [cited by applicant]
US 20200193274A1 · Darvish Rouhani et al. · 2020 [cited by applicant]
US 20200218962A1 · Lee et al. · 2020 [cited by applicant]
US 20200226444A1 · Sharma et al. · 2020 [cited by applicant]
US 20200226473A1 · Sharma et al. · 2020 [cited by applicant]
US 20200234112A1 · Wang et al. · 2020 [cited by applicant]
US 20200302283A1 · Zhu et al. · 2020 [cited by applicant]
US 20200394523A1 · Liu · 2020 [cited by examiner]
US 20210081802A1 · Sakai · 2021 [cited by applicant]
US 20210089898A1 · Park et al. · 2021 [cited by applicant]
US 20210192349A1 · Lian et al. · 2021 [cited by applicant]
US 20210193120A1 · Matuso · 2021 [cited by applicant]
US 20210211141A1 · Kim et al. · 2021 [cited by applicant]
US 20230206031A1 · Lee et al. · 2023 [cited by applicant]
CN 108288087A · 2018 [cited by applicant]
JP 202143905A · 2021 [cited by applicant]
KR 1020200086581A · 2020 [cited by applicant]
KR 1020210023912A · 2021 [cited by applicant]
KR 1020210035702A · 2021 [cited by applicant]
KR 1020210089487A · 2021 [cited by applicant]
WO 2020131390A1 · 2020 [cited by applicant]
WO 2020190526A1 · 2020 [cited by applicant]
WO 2020258071A1 · 2020 [cited by applicant]
Lee, Dongsoo, and Byeongwook Kim. “Retraining-based iterative weight quantization for deep neural networks.” 32nd Annual Conference on Neural Information Processing Systems, arXiv:1805.11233 (2018). (Year: 2018). [cited by examiner]
Yang et al., “FracBits: Mixed Precision Quantization via Fractional Bit-Widths”, The Thirty-Fifth AAAI Conference on Artificial Intelligence (AAAI-21), 2021, (9 total pages). [cited by applicant]
Umuroglu et al., “BISMO: A Scalable Bit-Serial Matrix Multiplication Overlay for Reconfigurable Computing”, arXiv:1806.08862v1 [cs.AR] Jun. 22, 2018, https://www.researchgate.net/publication/325986678, (9 total pages). [cited by applicant]
Lin, “Mixed-Precision NN Accelerator with Neural-Hardware Architecture Search”, Massachusetts Institute of Technology, May 15, 2020, (65 pages total). [cited by applicant]
Xu et al., “Alternating Multi-Bit Quantization for Recurrent Neural Networks”, Published as a conference paper at ICLR 2018, (13 pages total). [cited by applicant]
International Search Report (PCT/ISA/210) dated Sep. 21, 2022 issued by the Int. Searching Authority in App No. PCT/KR2022/008456. [cited by applicant]
International Written Opinion (PCT/ISA/237) dated Sep. 21, 2022 issued by the Int. Searching Authority in App No. PCT/KR2022/008456. [cited by applicant]
Sanghyun Seo et al., “Efficient Weights Quantization of Convolutional Neural Networks Using Kernel Density Estimation based Non-uniform Quantizer”, applied sciences, 2019, 13 Pages Total. [cited by applicant]