Down with the Hierarchy: The ‘H’ in HNSW Stands for “Hubs”

Blaise Munyampirwa, Vihan Lakshman, Benjamin Coleman · DOI

Abstract

The Hierarchical Navigable Small World (HNSW) algorithm is the industry standard for vector search, but its "Hierarchical" component is largely redundant for high-dimensional data. By introducing the Hub Highway Hypothesis, we demonstrate that high-dimensional spaces naturally form "hubs" that act as a built-in routing system. This allows a flat graph implementation (FlatNav) to match HNSW’s performance while reducing memory overhead by nearly 40%.

Introduction

In the era of Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG), searching through millions of vector embeddings quickly and accurately is a critical bottleneck. For nearly a decade, HNSW has been the dominant solution. It works by creating a multi-layered graph—similar to a "skip list"—where top layers provide a coarse, fast route to the general neighborhood of a target, and lower layers provide fine-grained accuracy.

However, this hierarchy comes at a cost: it increases memory usage and complicates distributed system designs. While some researchers suspected the hierarchy might be unnecessary for high-dimensional data, no one had conducted a large-scale, rigorous study to prove it or, more importantly, to explain why it happens. This paper fills that gap by challenging the fundamental design of HNSW.

Methods

The researchers took a two-pronged approach:

  1. Benchmarking: They developed FlatNav, a high-performance C++ implementation of a "flat" Navigable Small World (NSW) graph. They compared it against the gold-standard hnswlib across a massive suite of datasets to see if removing the hierarchy actually hurt performance.
  2. The Hub Highway Hypothesis: To explain their findings, they investigated hubness—a phenomenon in high-dimensional geometry where a small number of points (hubs) unexpectedly become the "nearest neighbors" to a disproportionately large number of other points. They hypothesized that these hubs naturally form a "highway" that queries use to navigate the graph, making an artificial hierarchy unnecessary.

The Hub Highway Hypothesis

The most striking insight is that the hierarchy in HNSW is essentially a "manual" version of a structure that high-dimensional math creates for free. In high dimensions, hubs emerge naturally and become the most frequently traversed nodes in the graph.

The Hub Highway Hypothesis: Hubs naturally form a "highway" subgraph that facilitates efficient routing in high-dimensional spaces.

Queries spend the first 5–10% of their search steps visiting these high-connectivity hub nodes. These hubs act as the "on-ramps" to the highway, routing the search to the correct region of the graph before the algorithm settles into a local neighborhood. The hierarchy does help in low-dimensional spaces (typically $d < 32$). However, as dimensionality increases, the "hubness" of the space increases, and the benefit of the hierarchical layers vanishes.

Empirical Evaluation

The study utilized an extensive range of benchmarks, including BigANN (100M scale), Microsoft SpaceV, Yandex DEEP, and real-world LLM embeddings from MSMARCO. Across 13 popular benchmarks, FlatNav achieved latency and recall performance that was essentially identical to HNSW. There was no "accuracy penalty" for ditching the hierarchy.

Furthermore, because FlatNav doesn't need to store multiple layers of the graph or manage the complex pointers between them, it is significantly leaner. During index construction on 100-million-scale datasets, FlatNav reduced peak memory consumption by 38% to 39% compared to hnswlib.

Conclusion

While the empirical evidence is strong, a full theoretical proof for the Hub Highway Hypothesis is still missing. Mathematical bounds on query latency in these "hub-heavy" proximity graphs remain an open challenge. However, the practical implications are clear: the next frontier for vector search isn't adding more layers, but rather optimizing the connectivity and "link pruning" of the base graph to better leverage these natural highways.

Summary updated

BibTeX
@inproceedings{munyampirwa2026down,
  author = {Blaise Munyampirwa and Vihan Lakshman and Benjamin Coleman},
  title = {{Down with the Hierarchy: The ‘H’ in HNSW Stands for “Hubs”}},
  booktitle = {ECIR},
  year = {2026},
  doi = {10.1007/978-3-032-21324-2\_3},
}
Figure