IP Library Granted Patent US 11,847,567
Granted Patent B1
US 11,847,567 · App. 16/923,003 · Granted Dec 19, 2023

Loss-aware replication of neural network layers

Inventors: Eric A. Sather (Palo Alto, CA); Steven L. Teig (Menlo Park, CA); Alexandru F. Drimbarean (Galway, IE)
Assignee: PERCEIVE CORPORATION
G06N3/082G06N3/048G06N3/084G06N5/046G06N20/00
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 11,847,567
App. No.
16/923,003
Granted
Dec 19, 2023
Kind
B1
Abstract

Some embodiments provide a method that receives a network with trained floating-point weight values. The network includes layers of nodes, each of which computes an output value based on input values and trained weight values. To replace a first layer of the trained network in a modified network with quantized weight values, the method defines multiple replica layers. Each replica layer includes nodes that correspond to nodes of the first layer, has a different set of allowed quantized weight values, and receives the same input values from a previous layer of the modified network such that groups of corresponding nodes from the replica layers operate correspondingly to the first layer. The method trains the quantized weight values of the modified network using a loss function with terms that account for effect on the loss function due to the quantization and for interactions between corresponding weight values of the replica layers.

Claims (42)

1. A method for training a plurality of parameters of a network, the method comprising:

receiving a machine-trained (MT) network with a plurality of trained floating-point weight values, the trained MT network comprising a plurality of layers of computation nodes, wherein each computation node of a set of the layers computes an output value based on a set of input values and a set of trained weight values;

to replace a first layer of the trained MT network in a modified MT network with quantized weight values, defining a set of at least second and third replica layers for the modified MT network, wherein (i) each respective replica layer comprises a respective set of computation nodes that correspond to a set of computation nodes of the first layer, (ii) each of the replica layers has a different set of allowed quantized weight values, and (iii) each of the replica layers receives a same set of input values from a previous layer of the modified MT network such that groups of corresponding nodes from the set of replica layers operate correspondingly to the first layer of the trained MT network; and

training the quantized weight values of the modified MT network using a loss function with (i) a first set of terms that account for an effect on the loss function due to the quantization of the weight values and (ii) a second set of terms that account for interactions between corresponding weight values of the replica layers.

2. The method of claim 1 , wherein:

training the quantized weight values comprises propagating a plurality of inputs through the modified MT network to generate outputs; and

the loss function further comprises a loss term that measures, for each input, a difference between an expected output for the input and the generated output for the input.

3. The method of claim 2 , wherein the first set of terms account for the effect on the loss term of the loss function due to the quantization of the weight values.

4. The method of claim 3 , wherein the first set of terms are approximations of second-order partial derivatives of the loss term with respect to each of the weight values.

5. The method of claim 4 , wherein the second set of terms are approximations of second-order mixed derivatives with respect to pairs of corresponding weight values of the replica layers.

6. The method of claim 1 , wherein:

each respective group of corresponding nodes comprises a respective node from each of the replica layers and receives a respective set of input values; and

each respective computation node within a group of corresponding nodes (i) computes a dot product using the set of input values received by the group of corresponding nodes and (ii) quantizes the computed dot product.

7. The method of claim 6 , wherein a first term in the first set of terms related to a first weight value from a first computation node in the second replica layer differs from a second term in the first set of terms related to a second weight value from a second computation node in the third replica layer that corresponds to the first computation node due to the quantization of the dot products computed by the first and second nodes.

8. The method of claim 7 , wherein a third term in the second set of terms related to the first and second weight values differs from the first and second terms due to the quantization of the dot products computed by the first and second nodes.

9. The method of claim 1 further comprising defining a fourth layer for the modified MT network that receives outputs from the replica layers and sums corresponding outputs from groups of corresponding nodes of the replica layers.

10. The method of claim 1 , wherein defining the set of replica layers comprises:

assigning initial floating-point weight values to the quantized weight values; and

determining the sets of allowed quantized weight values for each of the replica layers.

11. The method of claim 10 , wherein assigning the initial floating-point weight values comprises decomposing the trained floating-point weight values of the first layer into groups of corresponding weight values in each of the replica layers.

12. The method of claim 10 , wherein training the quantized weight values comprises projecting the floating-point weight values of the trained MT network to allowed sets of weight values while ensuring that at least a threshold percentage of the projected weight values are zero.

13. A non-transitory machine-readable medium storing a program which when executed by at least one processing unit trains a plurality of parameters of a network, the program comprising sets of instructions for:

receiving a machine-trained (MT) network with a plurality of trained floating-point weight values, the trained MT network comprising a plurality of layers of computation nodes, wherein each computation node of a set of the layers computes an output value based on a set of input values and a set of trained weight values;

to replace a first layer of the trained MT network in a modified MT network with quantized weight values, defining a set of at least second and third replica layers for the modified MT network, wherein (i) each respective replica layer comprises a respective set of computation nodes that correspond to a set of computation nodes of the first layer, (ii) each of the replica layers has a different set of allowed quantized weight values, and (iii) each of the replica layers receives a same set of input values from a previous layer of the modified MT network such that groups of corresponding nodes from the set of replica layers operate correspondingly to the first layer of the trained MT network; and

training the quantized weight values of the modified MT network using a loss function with (i) a first set of terms that account for an effect on the loss function due to the quantization of the weight values and (ii) a second set of terms that account for interactions between corresponding weight values of the replica layers.

14. The non-transitory machine-readable medium of claim 13 , wherein:

training the quantized weight values comprises propagating a plurality of inputs through the modified MT network to generate outputs;

the loss function further comprises a loss term that measures, for each input, a difference between an expected output for the input and the generated output for the input; and

the first set of terms account for the effect on the loss term of the loss function due to the quantization of the weight values.

15. The non-transitory machine-readable medium of claim 14 , wherein (i) the first set of terms are approximations of second-order partial derivatives of the loss term with respect to each of the weight values and (ii) the second set of terms are approximations of second-order mixed derivatives with respect to pairs of corresponding weight values of the replica layers.

16. The non-transitory machine-readable medium of claim 13 , wherein:

each respective group of corresponding nodes comprises a respective node from each of the replica layers and receives a respective set of input values; and

each respective computation node within a group of corresponding nodes (i) computes a dot product using the set of input values received by the group of corresponding nodes and (ii) quantizes the computed dot product.

17. The non-transitory machine-readable medium of claim 16 , wherein:

a first term in the first set of terms related to a first weight value from a first computation node in the second replica layer differs from a second term in the first set of terms related to a second weight value from a second computation node in the third replica layer that corresponds to the first computation node due to the quantization of the dot products computed by the first and second nodes; and

a third term in the second set of terms related to the first and second weight values differs from the first and second terms due to the quantization of the dot products computed by the first and second nodes.

18. The non-transitory machine-readable medium of claim 13 , wherein the program further comprises a set of instructions for defining a fourth layer for the modified MT network that receives outputs from the replica layers and sums corresponding outputs from groups of corresponding nodes of the replica layers.

19. The non-transitory machine-readable medium of claim 13 , wherein the set of instructions for defining the set of replica layers comprises sets of instructions for:

assigning initial floating-point weight values to the quantized weight values; and

determining the sets of allowed quantized weight values for each of the replica layers.

20. The non-transitory machine-readable medium of claim 19 , wherein the set of instructions for assigning the initial floating-point weight values comprises a set of instructions for decomposing the trained floating-point weight values of the first layer into groups of corresponding weight values in each of the replica layers.

21. The non-transitory machine-readable medium of claim 19 , wherein the set of instructions for training the quantized weight values comprises a set of instructions for projecting the floating-point weight values of the trained MT network to allowed sets of weight values while ensuring that at least a threshold percentage of the projected weight values are zero.

Assignments (3)
BILL OF SALE Recorded Oct 31, 2024
From: AMAZON.COM SERVICES LLC
To: AMAZON TECHNOLOGIES, INC.
Reel/Frame 069288/0490 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 31, 2024
From: PERCEIVE CORPORATION
To: AMAZON.COM SERVICES LLC
Reel/Frame 069288/0731 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 21, 2020
From: SATHER, ERIC A.; TEIG, STEVEN L.; DRIMBAREAN, ALEXANDRU F.
To: PERCEIVE CORPORATION
Reel/Frame 053271/0362 →
Continuity (6)
Continuation In Part 16684128 · Nov 14, 2019
Provisional Application 62975539 · Feb 12, 2020
Provisional Application 62955349 · Dec 30, 2019
Provisional Application 62949082 · Dec 17, 2019
Provisional Application 62926382 · Oct 25, 2019
Provisional Application 62775886 · Dec 5, 2018
Cited By (3)
US 12,417,387 US 12,530,594 US 12,614,093