IP Library › Granted Patent US 10,510,017
Granted Patent B2
US 10,510,017 · App. 14/945,221 · Granted Dec 17, 2019

Method for approximate k-nearest-neighbor search on parallel hardware accelerators

Inventors: Edward Bortnikov (Haifa, IL); Alexander Libov (Haifa, IL); Ohad Shacham (Kfar Monash, IL)
Assignee: Oath Inc.
G06N20/00G06F16/90335G06F17/10G06K9/00G06K9/00973G06K9/622G06K9/6276
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 10,510,017
App. No.
14/945,221
Granted
Dec 17, 2019
Kind
B2
Abstract

In one embodiment, a processor of a computing device receives a query. The computing device may compare a centroid of each of a plurality of clusters to the query such that a subset of the plurality of clusters is selected, each of the plurality of clusters having a set of data points. An assignment of the subset of the plurality of clusters may be communicated to a hardware accelerator of the computing device. A plurality of threads of the hardware accelerator of the computing device may generate one or more distance tables that store results of intermediate computations corresponding to the query and the subset of the plurality of clusters. The distance tables may be stored in shared memory of the hardware accelerator. A plurality of threads of the hardware accelerator may determine a plurality of data points using the distance tables. The processor may provide query results pertaining to at least a portion of the plurality of data points.

Claims (72)

1. A method, implemented at least in part via a processor, comprising:

obtaining a query data point representing a query object;

selecting a subset of a plurality of clusters based upon a comparison of a centroid of a cluster of the plurality of clusters to the query data point, wherein the cluster comprises a set of data points;

communicating an assignment of the subset of the plurality of clusters to a hardware accelerator of a computing device;

selecting quantization parameters based, at least in part, on a size of shared memory of the hardware accelerator, wherein the quantization parameters comprise:

a first quantization parameter indicative of a number of coordinates in at least one compressed data point; and

a second quantization parameter indicative of a subvector length associated with at least one coordinate;

generating one or more distance tables based, at least in part, on at least one quantization parameter of the quantization parameters, wherein the one or more distance tables store results of computations corresponding to the query data point and the subset of the plurality of clusters;

storing the one or more distance tables in the shared memory of the hardware accelerator;

determining a plurality of data points using the one or more distance tables;

providing one or more query results pertaining to at least a portion of the plurality of data points;

subdividing a data point in the subset of the plurality of clusters into a plurality of subvectors of the subvector length;

quantizing the plurality of subvectors to generate a compressed data point having the number of coordinates, wherein a coordinate of the compressed data point corresponds to a subvector of the plurality of subvectors; and

mapping the plurality of subvectors to one or more coordinates of the compressed data point.

2. The method as recited in claim 1 , comprising:

determining, for each of the subset of the plurality of clusters, a query residual; and

communicating the query residual for each of the subset of the plurality of clusters to the hardware accelerator.

3. The method as recited in claim 1 , wherein the generating the one or more distance tables is performed, at least in part, by a plurality of threads of the hardware accelerator.

4. The method as recited in claim 1 , wherein the determining the plurality of data points is performed, at least in part, by a plurality of threads of the hardware accelerator.

5. The method as recited in claim 1 , wherein the selecting the quantization parameters is performed, at least in part, by a machine learning process.

6. The method as recited in claim 1 , wherein the one or more distance tables include a plurality of distance tables, each of the plurality of distance tables corresponding to a cluster in the subset of the plurality of clusters.

7. The method as recited in claim 6 , wherein the hardware accelerator includes a plurality of multiprocessors, the method comprising:

generating, by each of the plurality of multiprocessors, a corresponding one of the plurality of distance tables.

8. A computer readable storage medium comprising instructions that when executed by a processor perform operations, the operations comprising:

obtaining a query data point representing a query object;

selecting a subset of a plurality of clusters based upon a comparison of a centroid of a cluster of the plurality of clusters to the query data point, wherein the cluster comprises a set of data points;

communicating an assignment of the subset of the plurality of clusters to a hardware accelerator of a computing device;

selecting quantization parameters based, at least in part, on a size of shared memory of the hardware accelerator, wherein the quantization parameters comprise:

a first quantization parameter indicative of a number of coordinates in at least one compressed data point; and

a second quantization parameter indicative of a subvector length associated with at least one coordinate;

generating one or more distance tables based, at least in part, on at least one quantization parameter of the quantization parameters, wherein the one or more distance tables store results of computations corresponding to the query data point and the subset of the plurality of clusters;

storing the one or more distance tables in the shared memory of the hardware accelerator;

determining a plurality of data points using the one or more distance tables;

providing one or more query results pertaining to at least a portion of the plurality of data points;

subdividing a data point in the subset of the plurality of clusters into a plurality of subvectors of the subvector length;

quantizing the plurality of subvectors to generate a compressed data point having the number of coordinates, wherein a coordinate of the compressed data point corresponds to a subvector of the plurality of subvectors; and

mapping the plurality of subvectors to one or more coordinates of the compressed data point.

9. The computer readable storage medium as recited in claim 8 , the operations comprising:

determining, for each of the subset of the plurality of clusters, a query residual; and

communicating the query residual for each of the subset of the plurality of clusters to the hardware accelerator.

10. The computer readable storage medium as recited in claim 8 , wherein the generating the one or more distance tables is performed, at least in part, by a plurality of threads of the hardware accelerator.

11. The computer readable storage medium as recited in claim 8 , wherein the determining the plurality of data points is performed, at least in part, by a plurality of threads of the hardware accelerator.

12. The computer readable storage medium as recited in claim 8 , wherein the selecting the quantization parameters is performed, at least in part, by a machine learning process.

13. The computer readable storage medium as recited in claim 8 , wherein the one or more distance tables include a plurality of distance tables, each of the plurality of distance tables corresponding to a cluster in the subset of the plurality of clusters.

14. The computer readable storage medium as recited in claim 13 , wherein the hardware accelerator includes a plurality of multiprocessors, the operations comprising:

generating, by each of the plurality of multiprocessors, a corresponding one of the plurality of distance tables.

15. A system comprising:

a processor; and

memory comprising instructions that when executed by the processor perform operations, the operations comprising:

obtaining a query data point representing a query object;

selecting a subset of a plurality of clusters based upon a comparison of a centroid of a cluster of the plurality of clusters to the query data point, wherein the cluster comprises a set of data points;

communicating an assignment of the subset of the plurality of clusters to a hardware accelerator of a computing device;

selecting quantization parameters based, at least in part, on a size of shared memory of the hardware accelerator, wherein the quantization parameters comprise:

a first quantization parameter indicative of a number of coordinates in at least one compressed data point; and

a second quantization parameter indicative of a subvector length associated with at least one coordinate;

generating one or more distance tables based, at least in part, on at least one quantization parameter of the quantization parameters, wherein the one or more distance tables store results of computations corresponding to the query data point and the subset of the plurality of clusters;

storing the one or more distance tables in the shared memory of the hardware accelerator;

determining a plurality of data points using the one or more distance tables;

providing one or more query results pertaining to at least a portion of the plurality of data points;

subdividing a data point in the subset of the plurality of clusters into a plurality of subvectors of the subvector length;

quantizing the plurality of subvectors to generate a compressed data point having the number of coordinates, wherein a coordinate of the compressed data point corresponds to a subvector of the plurality of subvectors; and

mapping the plurality of subvectors to one or more coordinates of the compressed data point.

16. The system as recited in claim 15 , the operations comprising:

determining, for each of the subset of the plurality of clusters, a query residual; and

communicating the query residual for each of the subset of the plurality of clusters to the hardware accelerator.

17. The system as recited in claim 15 , wherein the generating the one or more distance tables is performed, at least in part, by a plurality of threads of the hardware accelerator.

18. The system as recited in claim 15 , wherein the determining the plurality of data points is performed, at least in part, by a plurality of threads of the hardware accelerator.

19. The system as recited in claim 15 , wherein the selecting the quantization parameters is performed, at least in part, by a machine learning process.

20. The system as recited in claim 15 , wherein the one or more distance tables include a plurality of distance tables, each of the plurality of distance tables corresponding to a cluster in the subset of the plurality of clusters.

21. The system as recited in claim 20 , wherein the hardware accelerator includes a plurality of multiprocessors, the operations comprising:

generating, by each of the plurality of multiprocessors, a corresponding one of the plurality of distance tables.

22. The system as recited in claim 15 , wherein the hardware accelerator comprises a graphics processing unit (GPU).

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 19, 2021
From: VERIZON MEDIA INC.
To: VERIZON PATENT AND LICENSING INC.
Reel/Frame 057453/0431 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 26, 2020
From: OATH INC.
To: VERIZON MEDIA INC.
Reel/Frame 054258/0635 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 2, 2018
From: YAHOO HOLDINGS, INC.
To: OATH INC.
Reel/Frame 045240/0310 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 23, 2017
From: YAHOO! INC.
To: YAHOO HOLDINGS, INC.
Reel/Frame 042963/0211 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 19, 2015
From: BORTNIKOV, EDWARD; LIBOV, ALEXANDER; SHACHAM, OHAD
To: YAHOO! INC.
Reel/Frame 037090/0526 →
Continuity (1)
Related Publication 20170140012A1 · May 18, 2017