IP Library Granted Patent US 11,354,538
Granted Patent B2
US 11,354,538 · App. 16/908,570 · Granted Jun 7, 2022

Lookup-based convolutional neural network

Inventors: Hessam Bagherinezhad (Seattle, WA); Ali Farhadi (Seattle, WA); Mohammad Rastegari (Seattle, WA)
Assignee: Apple Inc.
G06K9/6255G06K9/6256G06K9/6262G06K9/6271G06N3/0454G06N3/063G06N3/084G06V20/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,354,538
App. No.
16/908,570
Granted
Jun 7, 2022
Kind
B2
Abstract

Systems and methods are disclosed for lookup-based convolutional neural networks. For example, methods may include applying a convolutional neural network to image data based on an image to obtain an output, in which a layer of the convolutional network includes filters with weights that are stored as a dictionary (D) of channel weight vectors, a respective lookup index tensor (I) that indexes the dictionary, and a respective lookup coefficient tensor (C), and in which applying the convolutional neural network includes: convolving the channel weight vectors of the dictionary (D) with an input tensor based on the image to obtain an input dictionary (S), and combining entries of the input dictionary (S) that are indexed with indices from the respective lookup index tensor (I) and multiplied with corresponding coefficients from the respective lookup coefficient tensor (C); and storing, displaying, or transmitting data based on the output of the convolutional neural network.

Claims (48)

1. A method, comprising:

applying a convolutional neural network to input data to obtain output data, in which a layer of the convolutional neural network includes filters with weights that are stored as a dictionary (D) of channel weight vectors, a respective lookup index tensor (I) that indexes the dictionary, and a respective lookup coefficient tensor (C), wherein applying the convolutional neural network includes:

obtaining an input dictionary (S) based at least in part on the channel weight vectors of the dictionary (D); and

combining entries of the input dictionary (S) based at least in part on the respective lookup index tensor (I) and the respective lookup coefficient tensor (C); and

storing, displaying, or transmitting an output based on the output data of the convolutional neural network.

2. The method of claim 1 , further comprising training the convolutional neural network by back-propagation using a sparse tensor (P), wherein non-zero entries of the sparse tensor (P) correspond to coefficients of the respective lookup coefficient tensor (C) at locations corresponding to indices of the respective lookup index tensor (I), and wherein performing a training iteration comprises:

convolving the channel weight vectors of the dictionary (D) with a training input tensor to obtain a training input dictionary (S);

convolving the training input dictionary (S) with the sparse tensor (P) to obtain training activations;

determining a loss function based on the training activations; and

updating the sparse tensor (P) based on the loss function.

3. The method of claim 2 , wherein the loss function includes a regularization term based on a norm of the sparse tensor (P).

4. The method of claim 2 , wherein performing the training iteration further comprises:

sorting entries of a vector of the sparse tensor (P) corresponding to a spatial location; and

zeroing out all but the s largest entries of the vector of the sparse tensor (P), wherein s is a sparsity constraint.

5. The method of claim 2 , wherein performing the training iteration further comprises:

applying a threshold function to entries of the sparse tensor (P).

6. The method of claim 2 , wherein performing the training iteration further comprises:

back-propagating through a threshold function to determine a gradient with respect to the sparse tensor (P).

7. The method of claim 1 , further comprising training the convolutional neural network using back-propagation to update the respective lookup index tensor (I) and the respective lookup coefficient tensor (C) in multiple training iterations, while holding the dictionary (D) of channel weight vectors fixed.

8. The method of claim 1 , wherein the dictionary (D) of channel weight vectors is used in multiple layers of the convolutional neural network.

9. The method of claim 1 , wherein the dictionary (D) of channel weight vectors is determined by training a different neural network that includes the dictionary (D), wherein the different neural network is a different depth than the convolutional neural network.

10. The method of claim 1 , further comprising determining the dictionary (D) of channel weight vectors by training a different neural network that includes the dictionary (D), wherein the different neural network has less layers than the convolutional neural network.

11. The method of claim 1 , wherein the input data is based on an image and the output data is a classification of the image.

12. A non-transitory computer readable memory storing instructions which, when executed by one or more processors, cause the one or more processors to:

apply a convolutional neural network to input data to obtain output data, in which a layer of the convolutional neural network includes filters with weights that are stored as a dictionary (D) of channel weight vectors, a respective lookup index tensor (I) that indexes the dictionary, and a respective lookup coefficient tensor (C), wherein applying the convolutional neural network includes:

obtaining an input dictionary (S) based at least in part on the channel weight vectors of the dictionary (D); and

combining entries of the input dictionary (S) based at least in part on the respective lookup index tensor (I) and the respective lookup coefficient tensor (C); and

storing, displaying, or transmitting an output based on the output data of the convolutional neural network.

13. The non-transitory computer readable memory of claim 12 , wherein the instructions, when executed by one or more processors, further cause the one or more processors to train the convolutional neural network by back-propagation using a sparse tensor (P), wherein non-zero entries of the sparse tensor (P) correspond to coefficients of the respective lookup coefficient tensor (C) at locations corresponding to indices of the respective lookup index tensor (I), and wherein a training iteration comprises:

convolving the channel weight vectors of the dictionary (D) with a training input tensor to obtain a training input dictionary (S);

convolving the training input dictionary (S) with the sparse tensor (P) to obtain training activations;

determining a loss function based on the training activations; and

updating the sparse tensor (P) based on the loss function.

14. The non-transitory computer readable memory of claim 13 , wherein the loss function includes a regularization term based on a norm of the sparse tensor (P).

15. The non-transitory computer readable memory of claim 13 , wherein the training iteration further comprises:

sorting entries of a vector of the sparse tensor (P) corresponding to a spatial location; and

zeroing out all but the s largest entries of the vector of the sparse tensor (P), wherein s is a sparsity constraint.

16. The non-transitory computer readable memory of claim 12 , wherein the input data is based on an image and the output data is a classification of the image.

17. A device, comprising:

memory; and

one or more processors configured to:

apply a convolutional neural network to input data to obtain output data, in which a layer of the convolutional neural network includes filters with weights that are stored as a dictionary (D) of channel weight vectors, a respective lookup index tensor (I) that indexes the dictionary, and a respective lookup coefficient tensor (C), wherein the one or more processors are configured to apply the convolutional neural network by:

obtaining an input dictionary (S) based at least in part on the channel weight vectors of the dictionary (D); and

combining entries of the input dictionary (S) based at least in part on the respective lookup index tensor (I) and the respective lookup coefficient tensor (C); and

storing, displaying, or transmitting an output based on the output data of the convolutional neural network.

18. The device of claim 17 , wherein the device comprises a wearable device.

19. The device of claim 17 , wherein the device comprises a sensor configured to obtain the input data.

20. The device of claim 17 , wherein the dictionary (D) of channel weight vectors is determined by training a different neural network that includes the dictionary (D), wherein the different neural network is a different depth than the convolutional neural network.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 31, 2021
From: XNOR.AI, INC.
To: APPLE INC.
Reel/Frame 058512/0527 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 31, 2021
From: BAGHERINEZHAD, HESSAM; FARHADI, ALI; RASTEGARI, MOHAMMAD
To: XNOR.AI, INC.
Reel/Frame 058512/0536 →
Continuity (3)
Continuation 16038083 · Jul 17, 2018
Provisional Application 62534401 · Jul 19, 2017
Related Publication 20200364499A1 · Nov 19, 2020