IP Library Granted Patent US 12,705,257
Granted Patent B2
US 12,705,257 · App. 18/794,335 · Granted Aug 11, 2026

System and method for identifying approximate k-nearest neighbors in web scale clustering

Inventors: Faizaan Charania (Mountain View, CA); Erik Ordentlich (San Jose, CA)
Assignee: YAHOO ASSETS LLC
G06F16/285G06F16/2456
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,705,257
App. No.
18/794,335
Filed
Aug 5, 2024
Granted
Aug 11, 2026
Kind
B2
Art Unit
2168
USPC
707/737
Abstract

The present teaching relates to method, system, medium, and implementations for identifying k nearest neighbors. One or more KNN lists corresponding to one or more source data points are received. Each KNN list includes K neighbors of a source data point and each of the K neighbors is a data point represented by an index. Neighbor pairs and reverse neighbor pairs are generated based on the one or more KNN lists. The neighbor pairs and reverse neighbor pairs having the same source data point are grouped to generate a grouped pairs of neighbors for the source data point. A local join operation is performed based on grouped pairs of neighbors for each source data point to generate a combined neighborhood for the source data point, which is then sent to a KNN server, where combined neighborhoods generated by multiple local join executors are integrated to update a plurality of global KNN lists.

Claims (44)

1 . A method for generating k-nearest neighbors (KNN) via distributed parallel local join operations, the method comprising:

receiving, by each of a plurality of local join executors from an executor controller controlling all of the plurality of local join executors, a parallel assignment of a corresponding subset of data points in a dataset;

determining in parallel with others of the plurality of local join executors, by each of the plurality of local join executors, distances between the data points within the subset;

selecting, by each of the plurality of local join executors based on the distances and an operational parameter provided by the executor controller, a certain number of nearest neighbors within the corresponding assigned subset of data points;

identifying, by each of the plurality of local join executors in parallel with others of the plurality of local join executors, based on the nearest neighbors, neighbor pairs and reverse neighbor pairs with respect to the data points;

grouping, by each of the plurality of local join executors, the neighbor pairs and reverse neighbor pairs having a same data point to generate grouped neighbor pairs for each of the data points;

performing, by each of the plurality of local join executors in parallel with others of the plurality of local join executors, a respective local join operation based on the grouped neighbor pairs to generate a combined neighborhood for each of the data points; and

sending, by each of the plurality of local join executors to a KNN server, the combined neighborhoods to integrate local join results from the plurality of local join executors to generate the KNNs across all data points in the dataset so that the integration performed by the KNN server is based on indices of the data points and the distances without needing to access feature vectors for the data points thereby enhancing speed or operational efficiency of the plurality of local join executors.

2 . The method of claim 1 , wherein the parallel assignment is determined based on a capacity or current workload of each of the plurality of local join executors.

3 . The method of claim 1 , wherein the parallel assignment is coordinated via the executor controller.

4 . The method of claim 1 , wherein the determining distances in parallel is coordinated via the executor controller.

5 . The method of claim 1 , wherein the information associated with the certain number of nearest neighbors sent from the plurality of local join executors are integrated by the KNN server to generate the KNNs.

6 . The method of claim 5 , wherein the KNN server comprises a plurality of distributed KNN servers managed by a KNN server controller.

7 . The method of claim 6 , wherein the plurality of distributed KNN servers integrate in parallel, the information associated with the certain number of nearest neighbors sent from the plurality of local join executors to generate the KNNs.

8 . A non-transitory, computer-readable medium having information recorded thereon for generating k-nearest neighbors (KNN) via distributed parallel local join operations, wherein the information, when read by a machine, causes the machine to perform operations comprising:

receiving, by each of a plurality of local join executors from an executor controller controlling all of the plurality of local join executors, a parallel assignment of a corresponding subset of data points in a dataset;

determining in parallel with others of the plurality of local join executors, by each of the plurality of local join executors, distances between the data points within the subset;

selecting, by each of the plurality of local join executors based on the distances and an operational parameter provided by the executor controller, a certain number of nearest neighbors within the corresponding assigned subset of data points;

identifying, by each of the plurality of local join executors in parallel with others of the plurality of local join executors, based on the nearest neighbors, neighbor pairs and reverse neighbor pairs with respect to the data points;

grouping, by each of the plurality of local join executors, the neighbor pairs and reverse neighbor pairs having a same data point to generate grouped neighbor pairs for each of the data points;

performing, by each of the plurality of local join executors in parallel with others of the plurality of local join executors, a respective local join operation based on the grouped neighbor pairs to generate a combined neighborhood for each of the data points; and

sending, by each of the plurality of local join executors to a KNN server, the combined neighborhoods to integrate local join results from the plurality of local join executors to generate the KNNs across all data points in the dataset so that the integration performed by the KNN server is based on indices of the data points and the distances without needing to access feature vectors for the data points thereby enhancing speed or operational efficiency of the plurality of local join executors.

9 . The medium of claim 8 , wherein the parallel assignment is determined based on a capacity or current workload of each of the plurality of local join executors.

10 . The medium of claim 8 , wherein the parallel assignment is coordinated via the executor controller.

11 . The medium of claim 8 , wherein the determining distances in parallel is coordinated via the executor controller.

12 . The medium of claim 8 , wherein the information associated with the certain number of nearest neighbors sent from the plurality of local join executors are integrated by the KNN server to generate the KNNs.

13 . The medium of claim 12 , wherein the KNN server comprises a plurality of distributed KNN servers managed by a KNN server controller.

14 . The medium of claim 13 , wherein the plurality of distributed KNN servers integrate in parallel, the information associated with the certain number of nearest neighbors sent from the plurality of local join executors to generate the KNNs.

15 . A system for generating k-nearest neighbors (KNN) via distributed parallel local join operations, the system comprising:

memory storing computer program instructions; and

one or more processors that, in response to executing the computer program instructions, effectuate operations comprising:

receiving, by each of a plurality of local join executors from an executor controller controlling all of the plurality of local join executors, a parallel assignment of a corresponding subset of data points in a dataset;

determining in parallel with others of the plurality of local join executors, by each of the plurality of local join executors, distances between the data points within the subset;

selecting, by each of the plurality of local join executors based on the distances and an operational parameter provided by the executor controller, a certain number of nearest neighbors within the corresponding assigned subset of data points;

identifying, by each of the plurality of local join executors in parallel with others of the plurality of local join executors, based on the nearest neighbors, neighbor pairs and reverse neighbor pairs with respect to the data points;

grouping, by each of the plurality of local join executors, the neighbor pairs and reverse neighbor pairs having a same data point to generate grouped neighbor pairs for each of the data points;

performing, by each of the plurality of local join executors in parallel with others of the plurality of local join executors, a respective local join operation based on the grouped neighbor pairs to generate a combined neighborhood for each of the data points; and

sending, by each of the plurality of local join executors to a KNN server, the combined neighborhoods to integrate local join results from the plurality of local join executors to generate the KNNs across all data points in the dataset so that the integration performed by the KNN server is based on indices of the data points and the distances without needing to access feature vectors for the data points thereby enhancing speed or operational efficiency of the plurality of local join executors.

16 . The system of claim 15 , wherein the parallel assignment is determined based on a capacity or current workload of each of the plurality of local join executors.

17 . The system of claim 15 , wherein the parallel assignment is coordinated via the executor controller.

18 . The system of claim 15 , wherein the determining distances in parallel is coordinated via the executor controller.

19 . The system of claim 15 , wherein the information associated with the certain number of nearest neighbors sent from the plurality of local join executors are integrated by the KNN server to generate the KNNs.

20 . The system of claim 19 , wherein the KNN server comprises a plurality of distributed KNN servers managed by a KNN server controller, and

wherein the plurality of distributed KNN servers integrate in parallel, the information associated with the certain number of nearest neighbors sent from the plurality of local join executors to generate the KNNs.

Assignments (3)
PATENT SECURITY AGREEMENT (FIRST LIEN) Recorded May 19, 2026
From: YAHOO ASSETS LLC
To: ROYAL BANK OF CANADA, AS COLLATERAL AGENT
Reel/Frame 075625/0129 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 5, 2024
From: CHARANIA, FAIZAAN; ORDENTLICH, ERIK
To: VERIZON MEDIA INC.
Reel/Frame 068182/0906 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 5, 2024
From: YAHOO AD TECH LLC (FORMERLY VERIZON MEDIA INC.)
To: YAHOO ASSETS LLC
Reel/Frame 068182/0969 →
Continuity (3)
Continuation 18297139 · Apr 7, 2023
Continuation 17344652 · Jun 10, 2021
Related Publication 20240394280A1 · Nov 28, 2024
References Cited (17)
US 7117185B1 · Aliferis et al. · 2006 [cited by applicant]
US 11151250B1 · Chang et al. · 2021 [cited by applicant]
US 20130230255A1 · Wang et al. · 2013 [cited by applicant]
US 20150178405A1 · Hong et al. · 2015 [cited by applicant]
US 20190042893A1 · Kafai · 2019 [cited by examiner]
US 20190050672A1 · Shang et al. · 2019 [cited by applicant]
US 20210157851A1 · Aoyama et al. · 2021 [cited by applicant]
Title: Implementation of a Parallel K-Nearest Neighbor Algorithm Using MPI; Author: Ahmed S. J. Abu Hammad, Date: 2019; Publisher: CERES; vol. 5, Issue 1; Pertinent Pages: whole document as attached. (Year: 2019). [cited by examiner]
Title: A Distributed Storage and Computation k-Nearest Neighbor Algorithm Based Cloud-Edge Computing for Cyber-Physical-Social Systems; Author: Wei Zhang, Xiaohui Chen, Yueqi Liu, and Qian Xi; Date: 2020; Publisher: IEE… [cited by examiner]
Office Action mailed Dec. 6, 2024 in U.S. Appl. No. 17/344,694. [cited by applicant]
Bu et al., “HaLoop: Efficient Iterative Data Processing on Large Clusters”, Proc. VLDB Endow. Sep. 3, 2010, pp. 285-296, https://doi.org/10.14778/1920841.1920881. [cited by applicant]
Listdiff, “ListDiff—Compare multiple lists to find list differences”, Webpage snapshot taken May 9, 2021 by the WayBack Machine. Retrieved from: <https://web.archive.org/web/20210509204528/http://www.listdiff.com/#expan… [cited by applicant]
Office Action mailed May 29, 2025 in U.S. Appl. No. 17/344,694. [cited by applicant]
Bhattacharjee et al., “BISDBx: towards batch-incremental clustering for dynamic datasets using SNN-DBSCAN”, Pattern Analysis and Applications, 2020, pp. 975-1009, 23, Springer. [cited by applicant]
Office Action mailed Sep. 22, 2025 in U.S. Appl. No. 17/344,694. [cited by applicant]
Xia et al., “Border: Efficient Computation of Boundary Points”, IEEE Transactions on Knowledge and Data Engineering, Mar. 2006, pp. 289-303, vol. 18, No. 3, IEEE Computer Society. [cited by applicant]
Campello et al., “Density-Based Clustering Based on Hierarchical Density Estimates”, 2013, pp. 160-172, Dept. of Computing Science, University of Alberta, Edmonton, AB, Canada. [cited by applicant]