Towards the Distributed Large-scale k-NN Graph Construction by Graph Merge

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Cheng, Zhao, Wan-Lei, Xiao, Shihai, Yao, Jiajie, Zhang, Xuecang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917208902336512
author Zhang, Cheng
Zhao, Wan-Lei
Xiao, Shihai
Yao, Jiajie
Zhang, Xuecang
author_facet Zhang, Cheng
Zhao, Wan-Lei
Xiao, Shihai
Yao, Jiajie
Zhang, Xuecang
contents In order to support the real-time interaction with LLMs and the instant search or the instant recommendation on social media, it becomes an imminent problem to build a k-NN graph or an indexing graph for the massive number of vectorized multimedia data. In such scenarios, the scale of the data or the scale of the graph may exceed the processing capacity of a single machine. This paper aims to address the graph construction problem of such scale via efficient graph merge. For the graph construction on a single node, two generic and highly parallelizable algorithms, namely Two-way Merge and Multi-way Merge are proposed to merge subgraphs into one. For the graph construction across multiple nodes, a multi-node procedure based on Two-way Merge is presented. The procedure makes it feasible to construct a large-scale k-NN graph/indexing graph on either a single node or multiple nodes when the data size exceeds the memory capacity of one node. Extensive experiments are conducted on both large-scale k-NN graph and indexing graph construction. For the k-NN graph construction, the large-scale and high-quality k-NN graphs are constructed by graph merge in parallel. Typically, a billion-scale k-NN graph can be built in approximately 17h when only three nodes are employed. For the indexing graph construction, similar NN search performance as the original indexing graph is achieved with the merged indexing graphs while requiring much less time of construction.
format Preprint
id arxiv_https___arxiv_org_abs_2509_11697
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Towards the Distributed Large-scale k-NN Graph Construction by Graph Merge
Zhang, Cheng
Zhao, Wan-Lei
Xiao, Shihai
Yao, Jiajie
Zhang, Xuecang
Distributed, Parallel, and Cluster Computing
In order to support the real-time interaction with LLMs and the instant search or the instant recommendation on social media, it becomes an imminent problem to build a k-NN graph or an indexing graph for the massive number of vectorized multimedia data. In such scenarios, the scale of the data or the scale of the graph may exceed the processing capacity of a single machine. This paper aims to address the graph construction problem of such scale via efficient graph merge. For the graph construction on a single node, two generic and highly parallelizable algorithms, namely Two-way Merge and Multi-way Merge are proposed to merge subgraphs into one. For the graph construction across multiple nodes, a multi-node procedure based on Two-way Merge is presented. The procedure makes it feasible to construct a large-scale k-NN graph/indexing graph on either a single node or multiple nodes when the data size exceeds the memory capacity of one node. Extensive experiments are conducted on both large-scale k-NN graph and indexing graph construction. For the k-NN graph construction, the large-scale and high-quality k-NN graphs are constructed by graph merge in parallel. Typically, a billion-scale k-NN graph can be built in approximately 17h when only three nodes are employed. For the indexing graph construction, similar NN search performance as the original indexing graph is achieved with the merged indexing graphs while requiring much less time of construction.
title Towards the Distributed Large-scale k-NN Graph Construction by Graph Merge
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2509.11697