双分支HNSW方法:带跳跃桥接与LID驱动的优化
Dual-Branch HNSW Approach with Skip Bridges and LID-Driven Optimization
AI总结:
针对HNSW的局部最优和复杂度问题,提出双分支结构配合LID插入及跳跃桥接,提升召回率并加速构建,保持推理速度。
摘要:
层次可导航小世界(HNSW)算法广泛用于近似最近邻(ANN)搜索,利用可导航小世界图的原理。然而,它面临一些局限性。第一个是局部最优问题,源于算法的贪心搜索策略,每一步仅基于邻近度选择邻居,这常常导致簇断开。第二个局限性是HNSW经常无法实现对数复杂度,尤其是在高维数据集中,因为需要逐层穷举遍历。为解决这些局限性,我们提出了一种新算法,可缓解局部最优和簇断开问题,同时提升构建速度并保持推理速度。第一个组成部分是带有基于LID(局部固有维度)插入机制的双分支HNSW结构,支持从多个方向遍历。这改进了离群节点的捕获,增强了簇连通性,加速了构建速度,并降低了局部最小值风险。第二个组成部分引入了一种桥接构建技术,绕过冗余的中间层,从而维持推理速度并弥补双分支结构引入的额外计算开销。在多种基准和数据集上的实验表明,我们的算法在准确性和速度上均优于原始HNSW。我们评估了计算机视觉(CV)和自然语言处理(NLP)领域的六个数据集,结果显示在NLP任务中召回率提升了18%,在CV任务中最高提升了30%,同时构建时间最多减少了20%,并保持了推理速度。我们未观察到算法中的任何权衡。消融研究表明,基于LID的插入对性能影响最大,其次是双分支结构和桥接构建组件。
英文摘要:
The Hierarchical Navigable Small World (HNSW) algorithm is widely used for approximate nearest neighbor (ANN) search, leveraging the principles of navigable small-world graphs. However, it faces some limitations. The first is the local optima problem, which arises from the algorithm's greedy search strategy, selecting neighbors based solely on proximity at each step. This often leads to cluster disconnections. The second limitation is that HNSW frequently fails to achieve logarithmic complexity, particularly in high-dimensional datasets, due to the exhaustive traversal through each layer. To address these limitations, we propose a novel algorithm that mitigates local optima and cluster disconnections while enhancing the construction speed, maintaining inference speed. The first component is a dual-branch HNSW structure with LID-based insertion mechanisms, enabling traversal from multiple directions. This improves outlier node capture, enhances cluster connectivity, accelerates construction speed and reduces the risk of local minima. The second component incorporates a bridge-building technique that bypasses redundant intermediate layers, maintaining inference and making up the additional computational overhead introduced by the dual-branch structure. Experiments on various benchmarks and datasets showed that our algorithm outperforms the original HNSW in both accuracy and speed. We evaluated six datasets across Computer Vision (CV), and Natural Language Processing (NLP), showing recall improvements of 18\% in NLP, and up to 30\% in CV tasks while reducing the construction time by up to 20\% and maintaining the inference speed. We did not observe any trade-offs in our algorithm. Ablation studies revealed that LID-based insertion had the greatest impact on performance, followed by the dual-branch structure and bridge-building components.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。