IP Library › Granted Patent US 12,165,038
Granted Patent B2
US 12,165,038 · App. 16/276,395 · Granted Dec 10, 2024

Adjusting activation compression for neural network training

Inventors: Daniel Lo (Bothell, WA); Bita Darvish Rouhani (Bellevue, WA); Eric S. Chung (Woodinville, WA); Yiren Zhao (Cambridge, GB); Amar Phanishayee (Seattle, WA); Ritchie Zhao (Ithaca, NY)
Assignee: Microsoft Technology Licensing, LLC
G06N3/063G06F9/30025G06F18/217G06N3/084
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,165,038
App. No.
16/276,395
Granted
Dec 10, 2024
Kind
B2
Abstract

Apparatus and methods for training a neural network accelerator using quantized precision data formats are disclosed, and, in particular, for adjusting floating-point formats used to store activation values during training. In certain examples of the disclosed technology, a computing system includes processors, memory, and a floating-point compressor in communication with the memory. The computing system is configured to produce a neural network comprising activation values expressed in a first floating-point format, select a second floating-point format for the neural network based on a performance metric, convert at least one of the activation values to the second floating-point format, and store the compressed activation values in the memory. Aspects of the second floating-point format that can be adjusted include the number of bits used to express mantissas, exponent format, use of non-uniform mantissas, and/or use of outlier values to express some of the mantissas.

Claims (68)

1. A method, implemented in a computing system comprising at least one hardware processor and at least one memory or storage device coupled to the at least one hardware processor, the method comprising, during a plurality of sets of epochs of training for a neural network:

setting a first activation compression format for the neural network, the neural network comprising at least a thousand interconnected nodes, each node comprising an activation function and a set of weights;

performing a first set of one or more epochs of training of the plurality of sets of epochs of training for the neural network using the first activation compression format, wherein an epoch of training comprises submitting inputs of a set of inputs to the neural network, determining an error term, and backpropagating the error term to the nodes of the neural network to update respective sets of weights of the neural network;

without user intervention, determining a first value for a training performance metric based on analysis of outputs derived from respective inputs in a set of training data for an epoch, wherein the training performance metric assesses the neural network's response characteristics relative to the respective inputs;

based at least in part on the first value for the training performance metric, by the computing system, without user intervention, determining that accuracy of the neural network, as indicated by the first training performance metric, has not increased or is improving by less than a determined amount;

based at least in part on determining that the accuracy of the neural network has not increased or is improving by less than a determined amount, by the computing system, without user intervention, selecting a second activation compression format having a higher precision than the first activation compression format;

performing a second set of one or more epochs of training of the plurality of sets of epochs of training for the neural network; and

during the performing a second set of one or more epochs of training, storing compressed activation values for the neural network expressed in the second activation compression format to provide stored compressed activation values.

2. The method of claim 1 , wherein the determining a first value of the training performance metric for the neural network comprises

calculating accuracy or change in accuracy of at least one layer of the neural network.

3. The method of claim 1 , further comprising:

determining a second value for the training performance metric after the second set of one or more epochs of training;

based on the second value for the training performance metric, adjusting the activation compression format to provide an adjusted activation compression format providing increased precision; and

storing activation values for at least one layer of the neural network in the adjusted activation compression form.

4. The method of claim 1 , wherein:

the second activation compression format has a greater number of mantissa bits than the first activation compression format; or

the first activation compression format is a block floating-point format and the second activation compression format is a normal-precision floating point format.

5. The method of claim 1 , wherein the first activation compression format comprises an outlier mantissa and the second activation compression format does not comprise an outlier mantissa.

6. The method of claim 1 , wherein the first activation compression format comprises a non-uniform mantissa.

7. The method of claim 1 , wherein the training performance metric is based at least in part on one or more of the following for the neural network: a true positive rate, a true negative rate, a positive predictive rate, a negative predictive value, a false negative rate, a false positive rate, a false discovery rate, a false omission rate, or an accuracy rate.

8. The method of claim 1 , wherein the training performance metric is based at least in part on one or more of the following for at least one layer of the neural network: mean square error, perplexity, gradient signal to noise ratio, or entropy.

9. A computing system comprising:

at least one hardware processor;

at least memory or storage device coupled to the at least one hardware processor; and

computer-readable instructions or hardware logic that, when executed, cause the computing system to perform operations during a plurality of sets of epochs of training for a neural network, the operations comprising:

setting a first activation compression format for the neural network, the neural network comprising at least a thousand interconnected nodes, each node comprising an activation function and a set of weights;

performing a first set of one or more epochs of training of the plurality of sets of epochs of training for the neural network using the first activation compression format, wherein an epoch of training comprises submitting inputs of a set of inputs to the neural network, determining an error term, and backpropagating the error term to the nodes of the neural network to update respective sets of weights of the neural network;

without user intervention, determining a first value for a training performance metric based on analysis of outputs derived from respective inputs in a set of training data for an epoch, wherein the training performance metric assesses the neural network's response characteristics relative to the respective inputs;

based at least in part on the first value for the training performance metric, by the computing system, without user intervention, determining that accuracy of the neural network, as indicated by the first training performance metric, has not increased or is improving by less than a determined amount;

based at least in part on determining that the accuracy of the neural network has not increased or is improving by less than a determined amount, by the computing system, without user intervention, selecting a second activation compression format having a higher precision than the first activation compression format;

performing a second set of one or more epochs of training of the plurality of sets of epochs of training for the neural network; and

during the performing a second set of one or more epochs of training, storing compressed activation values for the neural network expressed in the second activation compression format.

10. The apparatus of claim 9 , the operations further comprising:

producing values for the training performance metric by calculating accuracy or change in accuracy of at least one layer of the neural network.

11. The apparatus of claim 9 , the operations further comprising

uncompressing the stored compressed activation values and training the neural network;

evaluating the training performance metric for the trained neural network;

based on the training performance metric, adjusting the activation compression format to an increased precision; and

storing activation values for at least one layer of the trained neural network in the adjusted activation compression form.

12. The apparatus of claim 9 , wherein:

the second activation compression format has a greater number of mantissa bits than the first activation compression format; and

the first activation compression format is a block floating-point format and the second activation compression format is a normal-precision floating point format.

13. The apparatus of claim 9 , wherein the selected activation compression format comprises a non-uniform outlier mantissa and the adjusted activation compression format does not comprise an outlier mantissa.

14. The apparatus of claim 9 , wherein the training performance metric is based at least in part on one or more of the following for at least one layer of the neural network: a true positive rate, a true negative rate, a positive predictive rate, a negative predictive value, a false negative rate, a false positive rate, a false discovery rate, a false omission rate, or an accuracy rate, mean square error, perplexity, gradient signal to noise ratio, or entropy.

15. The apparatus of claim 9 , the operations further comprising:

producing a neural network comprising uncompressed activation values expressed in a first floating-point format, the first floating-point format having higher precision than the activation compression format;

selecting a second floating-point format for the neural network based on a value of the training performance metric; and

converting at least one of the activation values to the activation compression format, thereby producing the compressed activation values.

16. One or more computer-readable storage media or hardware logic comprising:

computer-executable instructions or logic that, when executed by a computing system comprising at least one memory or storage device and at least one hardware processed coupled to the at least one memory or storage device, cause the computing system to, during a plurality of sets of epochs of training for a neural network, set a first activation compression format for the neural network, the neural network comprising at least a thousand interconnected nodes, each node comprising an activation function and a set of weights;

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to perform a first set of one or more epochs of training of the plurality of sets of epochs of training for the neural network using the first activation compression format, wherein an epoch of training comprises submitting inputs of a set of inputs to the neural network, determining an error term, and backpropagating the error term to the nodes of the neural network to update respective sets of weights of the neural network;

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to, without user intervention, determine a first value for a training performance metric based on analysis of outputs derived from respective inputs in a set of training data for an epoch, wherein the training performance metric assesses the neural network's response characteristics relative to the respective inputs;

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to, based at least in part on the first value for the training performance metric, without user intervention, determine that accuracy of the neural network, as indicated by the first training performance metric, has not increased or is improving by less than a determined amount;

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to, without user intervention, based at least in part on determining that the accuracy of the neural network has not increased or is improving by less than a determined amount, select a second activation compression format having a higher precision than the first activation compression format;

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to perform a second set of one or more epochs of training of the plurality of sets of epochs of training for the neural network; and

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to, during the performing a second set of one or more epochs of training, store compressed activation values for the neural network expressed in the second activation compression format to provide stored compressed activation values.

17. The one or more computer-readable storage media or hardware logic of claim 16 , further comprising:

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to determine a second value for the training performance metric after the second set of one or more epochs of training;

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to, based on the second value for the training performance metric, adjust the activation compression format to provide an adjusted activation compression format providing increased precision; and

computer-executable instructions or logic that, when executed by the computing system, cause the computing system to store activation values for at least one layer of the neural network in the adjusted activation compression form.

18. The one or more computer-readable storage media or hardware logic of claim 16 , wherein:

the second activation compression format has a greater number of mantissa bits than the first activation compression format; or

the first activation compression format is a block floating-point format and the second activation compression format is a normal-precision floating point format.

19. The one or more computer-readable storage media or hardware logic of claim 16 , wherein the first activation compression format comprises an outlier mantissa and the second activation compression format does not comprise an outlier mantissa.

20. The one or more computer-readable storage media or hardware logic of claim 16 , wherein the first activation compression format comprises a non-uniform mantissa.

21. The one or more computer-readable storage media or hardware logic of claim 16 , wherein the training performance metric is based at least in part on:

(1) one or more of the following for the neural network: a true positive rate, a true negative rate, a positive predictive rate, a negative predictive value, a false negative rate, a false positive rate, a false discovery rate, a false omission rate, an accuracy rate; or

(2) one or more of the following for at least one layer of the neural network: mean square error, perplexity, gradient signal to noise ratio, or entropy.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 15, 2019
From: LO, DANIEL; DARVISH ROUHANI, BITA; CHUNG, ERIC S.; ZHAO, YIREN; PHANISHAYEE, AMAR; ZHAO, RITCHIE
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 048342/0142 →
Continuity (1)
Related Publication 20200264876A1 · Aug 20, 2020
Cited By (2)
US 12,511,544 US 12,585,926