IP Library Granted Patent US 12,293,274
Granted Patent B2
US 12,293,274 · App. 17/365,367 · Granted May 6, 2025

Method and apparatus for unification based coding for neural network model compression

Inventors: Wei Wang (Palo Alto, CA); Wei Jiang (Palo Alto, CA); Shan Liu (Palo Alto, CA)
Assignee: TENCENT AMERICA LLC
G06N3/04H03M7/30H03M7/6011
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,293,274
App. No.
17/365,367
Granted
May 6, 2025
Kind
B2
Abstract

A method of unification based coding for neural network model compression is performed by at least one processor and includes receiving a layer uniform flag indicating whether a quantized weight of an input neural network is encoded using a uniform coding method, and determining whether the quantized weight is encoded using the uniform coding method, based on the received layer uniform flag. The method further includes, based on the quantized weight being determined to be encoded using the uniform coding method, encoding the quantized weight, using the uniform coding method, and based on the quantized weight being determined to not be encoded using the uniform coding method, encoding the quantized weight, using a non-uniform coding method.

Claims (48)

1. A method of unification based coding for neural network model compression, the method being performed by at least one processor, and the method comprising:

receiving a layer uniform flag indicating whether a quantized weight of an input neural network is encoded using a uniform coding method;

determining whether the quantized weight is encoded using the uniform coding method, based on the received layer uniform flag;

based on the quantized weight being determined to be encoded using the uniform coding method, encoding the quantized weight using the uniform coding method; and

based on the quantized weight being determined to not be encoded using the uniform coding method, encoding the quantized weight using a non-uniform coding method.

2. The method of claim 1 , wherein the encoding the quantized weight, using the uniform coding method, comprises:

partitioning the quantized weight of the input neural network into a plurality of three-dimensional coding tree units (CTU3Ds);

receiving a CTU3D uniform flag indicating whether a quantized weight of one of the plurality of CTU3Ds is encoded using the uniform coding method;

determining whether the quantized weight of the one of the plurality of CTU3Ds is encoded using the uniform coding method, based on the received CTU3D uniform flag;

based on the quantized weight of the one of the plurality of CTU3Ds being determined to be encoded using the uniform coding method, encoding the quantized weight of the one of the plurality of CTU3Ds, using the uniform coding method; and

based on the quantized weight of the one of the plurality of CTU3Ds being determined to not be encoded using the uniform coding method, encoding the quantized weight of the one of the plurality of CTU3Ds, using the non-uniform coding method.

3. The method of claim 2 , wherein the encoding the quantized weight of the one of the plurality of CTU3Ds, using the uniform coding method, comprises encoding the quantized weight of the one of the plurality of CTU3Ds, using a 3D-Unitree coding method.

4. The method of claim 3 , further comprising, based on the quantized weight of the one of the plurality of CTU3Ds being encoded, using the 3D-Unitree coding method, encoding a sign flag indicating whether the quantized weight of the one of the plurality of CTU3Ds is positive or negative.

5. The method of claim 3 , further comprising, based on a quantized weight of each of the plurality of CTU3Ds being encoded, using the 3D-Unitree coding method, encoding a sign flag indicating whether the quantized weight of each of the plurality of CTU3Ds is positive or negative.

6. The method of claim 2 , wherein the encoding the quantized weight of the one of the plurality of CTU3Ds, using the non-uniform coding method, comprises encoding the quantized weight of the one of the plurality of CTU3Ds, using a 3D-Tagtree coding method.

7. The method of claim 6 , further comprising, based on the quantized weight of the one of the plurality of CTU3Ds being encoded, using the 3D-Tagtree coding method, encoding a sign flag indicating whether the quantized weight of the one of the plurality of CTU3Ds is positive or negative.

8. The method of claim 6 , further comprising, based on a quantized weight of each of the plurality of CTU3Ds being encoded, using the 3D-Tagtree coding method, encoding a sign flag indicating whether the quantized weight of each of the plurality of CTU3Ds is positive or negative.

9. An apparatus for unification based coding for neural network model compression, the apparatus comprising:

at least one memory configured to store program code; and

at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:

receiving code configured to cause the at least one processor to receive a layer uniform flag indicating whether a quantized weight of an input neural network is encoded using a uniform coding method;

determining code configured to cause the at least one processor to determine whether the quantized weight is encoded using the uniform coding method, based on the received layer uniform flag;

first encoding code configured to cause the at least one processor to, based on the quantized weight being determined to be encoded using the uniform coding method, encode the quantized weight, using the uniform coding method; and

second encoding code configured to cause the at least one processor to, based on the quantized weight being determined to not be encoded using the uniform coding method, encode the quantized weight, using a non-uniform coding method.

10. The apparatus of claim 9 , wherein the program code further comprises partitioning code configured to cause the at least one processor to partition the quantized weight of the input neural network into a plurality of three-dimensional coding tree units (CTU3Ds),

wherein the receiving code is further configured to cause the at least one processor to receive a CTU3D uniform flag indicating whether a quantized weight of one of the plurality of CTU3Ds is encoded using the uniform coding method,

the determining code is further configured to cause the at least one processor to determine whether the quantized weight of the one of the plurality of CTU3Ds is encoded using the uniform coding method, based on the received CTU3D uniform flag,

the first encoding code is further configured to cause the at least one processor to, based on the quantized weight of the one of the plurality of CTU3Ds being determined to be encoded using the uniform coding method, encode the quantized weight of the one of the plurality of CTU3Ds, using the uniform coding method, and

the second encoding code is further configured to cause the at least one processor to, based on the quantized weight of the one of the plurality of CTU3Ds being determined to not be encoded using the uniform coding method, encode the quantized weight of the one of the plurality of CTU3Ds, using the non-uniform coding method.

11. The apparatus of claim 10 , wherein the first encoding code is further configured to cause the at least one processor to encode the quantized weight of the one of the plurality of CTU3Ds, using a 3D-Unitree coding method.

12. The apparatus of claim 11 , wherein the first encoding code is further configured to cause the at least one processor to, based on the quantized weight of the one of the plurality of CTU3Ds being encoded, using the 3D-Unitree coding method, encode a sign flag indicating whether the quantized weight of the one of the plurality of CTU3Ds is positive or negative.

13. The apparatus of claim 11 , wherein the first encoding code is further configured to cause the at least one processor to, based on a quantized weight of each of the plurality of CTU3Ds being encoded, using the 3D-Unitree coding method, encode a sign flag indicating whether the quantized weight of each of the plurality of CTU3Ds is positive or negative.

14. The apparatus of claim 10 , the second encoding code is further configured to cause the at least one processor to encode the quantized weight of the one of the plurality of CTU3Ds, using a 3D-Tagtree coding method.

15. The apparatus of claim 14 , wherein the second encoding code is further configured to cause the at least one processor to, based on the quantized weight of the one of the plurality of CTU3Ds being encoded, using the 3D-Tagtree coding method, encode a sign flag indicating whether the quantized weight of the one of the plurality of CTU3Ds is positive or negative.

16. The apparatus of claim 14 , wherein the second encoding code is further configured to cause the at least one processor to, based on a quantized weight of each of the plurality of CTU3Ds being encoded, using the 3D-Tagtree coding method, encode a sign flag indicating whether the quantized weight of each of the plurality of CTU3Ds is positive or negative.

17. A non-transitory computer-readable storage medium storing instructions that, when executed by at least one processor for unification based coding for neural network model compression, cause the at least one processor to:

receive a layer uniform flag indicating whether a quantized weight of an input neural network is encoded using a uniform coding method;

determine whether the quantized weight is encoded using the uniform coding method, based on the received layer uniform flag;

based on the quantized weight being determined to be encoded using the uniform coding method, encode the quantized weight, using the uniform coding method; and

based on the quantized weight being determined to not be encoded using the uniform coding method, encode the quantized weight, using a non-uniform coding method.

18. The non-transitory computer-readable storage medium of claim 17 , wherein the instructions, when executed by the at least one processor, further cause the at least one processor to:

partition the quantized weight of the input neural network into a plurality of three-dimensional coding tree units (CTU3Ds);

receive a CTU3D uniform flag indicating whether a quantized weight of one of the plurality of CTU3Ds is encoded using the uniform coding method;

determine whether the quantized weight of the one of the plurality of CTU3Ds is encoded using the uniform coding method, based on the received CTU3D uniform flag;

based on the quantized weight of the one of the plurality of CTU3Ds being determined to be encoded using the uniform coding method, encode the quantized weight of the one of the plurality of CTU3Ds, using the uniform coding method; and

based on the quantized weight of the one of the plurality of CTU3Ds being determined to not be encoded using the uniform coding method, encode the quantized weight of the one of the plurality of CTU3Ds, using the non-uniform coding method.

19. The non-transitory computer-readable storage medium of claim 18 , wherein the instructions, when executed by the at least one processor, further cause the at least one processor to encode the quantized weight of the one of the plurality of CTU3Ds, using a 3D-Unitree coding method.

20. The non-transitory computer-readable storage medium of claim 18 , wherein the instructions, when executed by the at least one processor, further cause the at least one processor to encode the quantized weight of the one of the plurality of CTU3Ds, using a 3D-Tagtree coding method.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 1, 2021
From: WANG, WEI; JIANG, WEI; LIU, SHAN
To: TENCENT AMERICA LLC
Reel/Frame 056736/0743 →
Continuity (2)
Provisional Application 63089443 · Oct 8, 2020
Related Publication 20220114414A1 · Apr 14, 2022
References Cited (23)
US 4972187A · Wecker · 1990 [cited by examiner]
US 5268684A · Allen · 1993 [cited by examiner]
US 5598354A · Fang · 1997 [cited by examiner]
US 7054850B2 · Matsugu · 2006 [cited by examiner]
US 10140573B2 · Julian · 2018 [cited by examiner]
US 10713561B2 · Alvarez-Icaza Rivera · 2020 [cited by examiner]
US 11106973B2 · Shi · 2021 [cited by examiner]
US 11455539B2 · Lee · 2022 [cited by examiner]
US 20080015850A1 · Chen et al. · 2008 [cited by applicant]
US 20110090950A1 · Bush · 2011 [cited by examiner]
US 20120027077A1 · Reznik · 2012 [cited by examiner]
US 20140046885A1 · Majumdar · 2014 [cited by examiner]
US 20170286830A1 · El-Yaniv et al. · 2017 [cited by applicant]
Extended European Search Report dated Nov. 22, 2022 in European Application No. 21878168.0. [cited by applicant]
“Description of Core Experiments on Compression of neural networks for multimedia content description and analysis”, ISO/IEC JTC 1/SC 29/WG 11 N 18991, 2020, Coding of moving pictures and audio Convenorship: UNI (Italy)… [cited by applicant]
Wei Wang et al., “NNR CE3: adaptive 3D partition and 3D-Tree based coding method”, International Organisation for Standardisation Organisation Internationale de Normalisation, 2020, ISO/IEC JTC1/SC29/WG11 MPEG2020/M5377… [cited by applicant]
“Information technology—Multimedia content description interface—Part 17: Compression of neural networks for multimedia content description and analysis”, 2020, ISO 15938-17, (73 pages total). [cited by applicant]
International Search Report dated Dec. 17, 2021 in International Application No. PCT/US2021/044905. [cited by applicant]
Written Opinion of the International Searching Authority dated Dec. 17, 2021 in International Application No. PCT/US2021/044905. [cited by applicant]
Wei Jiang et al., “Structured Weight Unification and Encoding for Neural Network Compression and Acceleration”, Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, 2020, Retrieve… [cited by applicant]
Yi-Min Chou et al., “Unifying and Merging Well-trained Deep Neural Networks for Inference Stage”, 2018, Retrieved from: URL: <https://arxiv.org/pdf/1805.04980.pdf> (8 pages total). [cited by applicant]
Tencent America LLC, “NNR CE4 Method 15: Simplified coding method for unified model”, International Organisation for Standardisation Organisation Internationale De Normalisation ISO/IEC JTC1/SC29/WG11 Coding of Moving P… [cited by applicant]
Communication issued Dec. 21, 2024 in Chinese Application No. 202180006255.7. [cited by applicant]