BAMG: A Block-Aware Monotonic Graph Index for Disk-Based Approximate Nearest Neighbor Search

Huiling Li, Jianliang Xu · OpenReview

Abstract

Approximate Nearest Neighbor Search (ANNS) over high-dimensional vectors is a foundational problem in databases, where disk I/O often emerges as the dominant performance bottleneck at scale. Existing graph indexing solutions for disk-based ANNS typically either optimize the storage layout for a given graph or construct the graph independently of the storage layout, thus overlooking their interaction. In this paper, we propose the Block-aware Monotonic Relative Neighborhood Graph (BMRNG), a novel graph structure that jointly considers both geometric distance and storage layout for edge selection, theoretically guaranteeing the existence of I/O monotonic search paths. To address the scalability challenge of BMRNG construction, we further develop a practical and efficient variant, the Block-Aware Monotonic Graph (BAMG), which can be constructed in linear time from a monotonic graph considering the storage layout. BAMG integrates block-aware edge pruning with a decoupled storage design that separates raw vectors from the graph index, thereby maximizing block utilization and minimizing redundant disk reads. Extensive experiments on real-world datasets demonstrate that BAMG achieves up to 2.1x higher throughput and reduces I/O reads by up to 52% compared to state-of-the-art methods, while maintaining comparable recall.

Introduction: The I/O Bottleneck

Approximate Nearest Neighbor Search (ANNS) is the backbone of modern AI applications like Retrieval-Augmented Generation (RAG) and recommender systems. As datasets grow to billions of vectors, they no longer fit in RAM and must be stored on SSDs. In this disk-resident setting, the primary performance bottleneck shifts from CPU computation to disk I/O latency.

Latency breakdown for state-of-the-art disk-based ANNS methods, showing that I/O time ($T_{I/O}$) accounts for the vast majority of search latency.

Existing solutions typically treat the graph structure and the disk layout as two separate problems: they either build a graph and then try to "shuffle" nodes into blocks to improve locality, or they build a graph based purely on geometric distances without considering how those nodes are physically stored. This separation fails to exploit the fact that traversing an edge within the same disk block is essentially "free," while crossing into a different block triggers a high-latency disk read.

The BMRNG Framework

To bridge this gap, the authors introduce the Block-aware Monotonic Relative Neighborhood Graph (BMRNG). Unlike traditional graphs, BMRNG incorporates the storage layout into its edge selection process. It introduces a new "edge occlusion rule": an edge between two nodes in different blocks is pruned if there is a path within a block that moves the search closer to the target.

Comparison of search paths in a standard Monotonic Relative Neighborhood Graph (MRNG) and the proposed Block-aware MRNG (BMRNG). BMRNG leverages intra-block edges to ensure I/O monotonic search paths.

This design guarantees I/O monotonicity, meaning every disk access is mathematically certain to move the search closer to the destination, thereby eliminating redundant reads and oscillations common in standard graph traversals on disk.

BAMG: Practical Implementation

Since BMRNG is computationally expensive to build, the authors propose the Block-Aware Monotonic Graph (BAMG) as a practical, linear-time approximation. BAMG utilizes several key innovations:

  1. Decoupled Storage Design: BAMG separates the graph index (neighbor lists and compact PQ codes) from high-precision raw vectors. This allows a single 4KB disk block to store significantly more navigational data, increasing the "fan-out" per I/O.
  2. Block-First Search: The search algorithm is modified to exhaustively explore intra-block neighbors before jumping to a new disk block, ensuring the system extracts every bit of information from a loaded page before moving on.
  3. Multi-layer Navigation: To find a good starting point, they build a memory-resident hierarchical graph that ensures full topological coverage of the disk-based blocks.

Experimental Results

BAMG was evaluated on massive datasets including DEEP (100M), SIFT (100M), LAION (100M), and MSMARCO (50M). BAMG consistently outperformed top-tier baselines like DiskANN and Starling:

  • Throughput: BAMG achieved a speedup of 0.9x to 2.8x over Starling across different datasets at the same recall levels.
  • I/O Efficiency: The number of disk blocks read (NIO) was reduced by up to 78.2% on the MSMARCO dataset compared to Starling.
  • Search Latency: Breakdown analysis showed that while BAMG adds a small refinement stage for raw vectors, its total I/O time is drastically lower because it navigates the graph much more efficiently.

Conclusion

BAMG represents a significant shift in disk-based ANNS by jointly optimizing graph topology and storage layout. By prioritizing intra-block edges and ensuring I/O monotonicity, BAMG effectively mitigates the disk I/O bottleneck, offering a scalable and efficient solution for billion-scale vector search.

Summary updated

Abstract

Approximate Nearest Neighbor Search (ANNS) over high-dimensional vectors is a foundational problem in databases, where disk I/O often emerges as the dominant performance bottleneck at scale. Existing graph indexing solutions for disk-based ANNS typically either optimize the storage layout for a given graph or construct the graph independently of the storage layout, thus overlooking their interaction. In this paper, we propose the Block-aware Monotonic Relative Neighborhood Graph (BMRNG), a novel graph structure that jointly considers both geometric distance and storage layout for edge selection, theoretically guaranteeing the existence of I/O monotonic search paths. To address the scalability challenge of BMRNG construction, we further develop a practical and efficient variant, the Block-Aware Monotonic Graph (BAMG), which can be constructed in linear time from a monotonic graph considering the storage layout. BAMG integrates block-aware edge pruning with a decoupled storage design that separates raw vectors from the graph index, thereby maximizing block utilization and minimizing redundant disk reads. Additionally, we design a multi-layer navigation graph for adaptive and efficient query entry, along with a block-first search algorithm that prioritizes intra-block traversal to fully exploit each disk I/O operation. Extensive experiments on real-world datasets demonstrate that BAMG achieves up to 2.1x higher throughput and reduces I/O reads by up to 52% compared to state-of-the-art methods, while maintaining comparable recall.
BibTeX
@misc{li2025bamg,
  author = {Huiling Li and Jianliang Xu},
  title = {{BAMG: A Block-Aware Monotonic Graph Index for Disk-Based Approximate Nearest Neighbor Search}},
  year = {2025},
  eprint = {2509.03226},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.03226},
}

Loading related content...

Figure