BAMG: Block-Aware Monotonic Graph
- The paper introduces a joint design method that merges graph structure with disk layout to minimize I/O overhead in high-dimensional approximate nearest neighbor search.
- It employs block-aware edge pruning and a decoupled storage architecture to achieve up to 2.1× higher throughput and significant reductions in disk reads.
- The multi-layer in-memory navigation graph ensures efficient intra-block traversal by selecting optimal entry points and maintaining search accuracy.
Searching arXiv for the BAMG paper and closely related disk-based ANNS works for citation support. Block-Aware Monotonic Graph (BAMG) is a disk-oriented index for approximate nearest neighbor search (ANNS) over high-dimensional vectors that explicitly co-designs graph structure and disk layout. It is motivated by the regime in which neither the graph index nor the raw vectors fit in memory and disk I/O dominates search latency. The framework is grounded in the Block-aware Monotonic Relative Neighborhood Graph (BMRNG), a graph model in which edge selection depends jointly on geometric distance and storage layout, and it is realized in practice through block-aware edge pruning, a decoupled storage design, a multi-layer in-memory navigation graph, and a block-first query algorithm. Reported results show up to higher throughput and up to fewer I/O reads than state-of-the-art baselines while maintaining comparable recall (Li et al., 3 Sep 2025).
1. Problem setting and design rationale
BAMG addresses disk-based ANNS at a scale where the dominant cost is not primarily distance computation, but the number of disk blocks that must be loaded during search (Li et al., 3 Sep 2025). In this setting, a graph edge is useful not only when it is geometrically favorable, but also when it is I/O favorable. The central observation is that existing disk-based graph methods typically optimize either the graph or the storage layout, but not both jointly.
The paper characterizes prior systems as falling into two broad styles. Graph-centric methods such as DiskANN and XN-Graph improve navigability by adding long-range edges or widening candidate neighborhoods, thereby reducing hops without jointly optimizing layout. Layout-centric methods such as Starling improve block locality for a fixed graph by rearranging nodes on disk, but do not modify graph construction rules to exploit the layout. BAMG is defined by the opposite premise: if an intra-block edge can provide the same progress toward the target as a cross-block edge, the intra-block edge should be preferred because it avoids extra I/O.
This framing distinguishes BAMG from approaches that treat disk placement as a post hoc optimization stage. A common misconception is that BAMG is merely a storage-layout rearrangement. The paper instead presents it as a joint graph-and-layout design in which storage placement affects which edges are retained and which are pruned.
2. BMRNG: formal model and monotonic I/O paths
The theoretical basis of BAMG is the Block-aware Monotonic Relative Neighborhood Graph, or BMRNG (Li et al., 3 Sep 2025). A block assignment is defined as a partition of nodes into disk blocks: Each block is
A monotonic I/O path from node to target is a sequence of blocks
such that completeness and I/O monotonicity both hold. Completeness requires that nodes form an internal path within each block and that adjacent blocks are connected by graph edges. I/O monotonicity requires strictly decreasing distance to within a block and across block transitions. If a block contains nodes
then
0
for intra-block steps, and
1
for cross-block transitions. A proximity graph 2 with block assignment 3 is a BMRNG if, for any pair of nodes 4, there exists a monotonic I/O path between 5 and 6.
BMRNG extends the RNG/MRNG lineage. For standard RNG, an edge 7 exists only if no third node lies in the lune: 8 The lune is the overlap of two balls centered at 9 and 0 with radius 1, equivalently
2
BMRNG introduces two edge-selection rules. For intra-block edges, if 3 and 4 is an edge of the MRNG induced by the nodes inside that block, then 5. For cross-block edges, 6 with 7 is removed if there exists some node 8 such that 9 and either 0 with 1, or 2 and there is a monotonic path inside block 3 leading to 4 whose last node 5 lies in the lune: 6
The paper’s intuition is that BMRNG enlarges the set of valid occluding nodes. A cross-block edge need not be kept merely because there is no single closer node; it can also be occluded by a node reachable through one disk I/O plus intra-block monotone traversal. This is the specific sense in which the model is block-aware.
3. Theoretical guarantees and practical approximation
The principal guarantee is Theorem 1, which states that given a set 7 of 8 nodes and the block assignment 9, if a proximity graph 0 satisfies Rule 1 and Rule 2, then 1 is a BMRNG (Li et al., 3 Sep 2025). The proof is constructive. When 2 and 3 lie in the same block, Rule 1 yields an MRNG inside that block and thus a strictly monotone path. When they lie in different blocks, Rule 2 ensures progress to a strictly closer node, either within the same block or by a cross-block transition followed by monotone intra-block progress. Since distances strictly decrease and the graph is finite, the process terminates at 4.
The paper also gives an expected path-length result under a random partition model. Assuming nodes are uniformly randomly partitioned into blocks of size 5, the expected length of a monotonic I/O path 6 is stated as
7
The accompanying interpretation is that larger blocks reduce expected I/O path length, although block size remains constrained by disk page limits. This, in turn, motivates storage compression and layout design.
Exact BMRNG construction is presented as impractical for large-scale use. The paper states that direct construction is at least 8, that block assignment itself is NP-hard, and that suboptimal block assignments can hurt geometry if exact BMRNG rules are enforced everywhere. BAMG is therefore introduced as a practical approximation rather than an exact implementation of BMRNG.
Its construction philosophy is explicit. BAMG first constructs a strong geometric graph, specifically an NSG, then obtains a block assignment using BNF from Starling, keeps all intra-block edges, and prunes cross-block edges using a relaxed block-aware version of Rule 2. The paper argues that transforming NSG into BAMG is linear-time in practice because NSG has expected constant out-degree and the expensive intra-block searches are bounded by the small constant parameter 9. The resulting construction is therefore simplified to 0.
4. Block-aware pruning and storage architecture
BAMG’s pruning rule is a practical approximation to the cross-block logic of BMRNG (Li et al., 3 Sep 2025). A cross-block edge 1 is pruned only if there exists a monotone intra-block path of length at most 2 ending at a node sufficiently close to 3, as controlled by 4: 5 with 6, such that
7
and
8
Here 9 bounds how many intra-block hops may justify pruning, and 0 determines how much closer the terminal node must be to the query. The paper presents these parameters as a tunable trade-off between sparsity and navigability. This suggests that BAMG does not attempt to reproduce the full BMRNG criterion exactly, but instead preserves its operational bias toward replacing expensive cross-block jumps with cheaper intra-block progress when such substitution appears safe.
A second systems contribution is the decoupled storage design. The graph index is stored separately from the raw vectors. The stated motivation is that raw vectors occupy more than 1 of space in graph ANN indexes; once vectors are separated, each disk block can hold more graph nodes, which increases block utilization and reduces redundant reads. The graph index records contain OID, VID, and neighbor OIDs, while raw vectors are stored sequentially in separate disk regions aligned to the node order. The paper states that this avoids maintaining a memory-resident node-to-location map and preserves locality of vectors from the same block.
This architecture is important because BAMG’s graph-theoretic ideas are only useful if the physical layout can expose the intended locality. The design therefore connects logical pruning with a storage representation that increases the number of graph nodes accessible per I/O operation.
5. Navigation hierarchy and block-first query processing
BAMG augments the disk index with a multi-layer in-memory navigation graph used to choose query entry points (Li et al., 3 Sep 2025). Instead of starting from random seeds, the search begins in a small upper-layer graph whose nodes are representatives of connected components in lower-layer blocks. The intended effects are better entry node quality, adaptive use of memory, and guaranteed coverage of each block’s components.
The upper-layer nodes are selected block by block. The procedure computes in-degrees, selects zero in-degree nodes as key nodes, marks nodes reachable from them as covered, repeats until the block is covered, and builds the next layer from the union of these key nodes. The hierarchy continues until the number of nodes falls below a threshold 2. The paper claims the number of layers is
3
where 4 is the average node-to-component ratio, empirically around 5.
The query algorithm is described as block-first. When a node 5 is checked, the system loads the block containing 6, performs intra-block greedy expansion first, inserts neighbors into the candidate pool using PQ-based estimated distances, and only when the candidate pool stabilizes does it load raw vectors for exact reranking. The candidate pool 7 is ordered by approximate distance 8 using PQ codes, keeps only the top 9 candidates, and supports greedy exploration.
Within a block, the procedure search_within_block(B, v, q, C, α) starts from 0, performs a bounded-depth BFS/greedy traversal up to depth 1, inserts visited nodes’ neighbors into 2, and continues only from intra-block neighbors that improve the best approximate distance so far. The continuation criterion is
3
After the block-first phase, the raw vectors of candidates in 4 are read from disk, exact distances are computed, and the top-5 results are returned.
A possible misconception is that BAMG merely delays vector access. The paper’s design is more specific: it attempts to extract as much useful work as possible from each loaded graph block before paying the additional cost of exact vector reads.
6. Empirical results, ablations, and operational scope
The reported evaluation is implemented in C++ with g++ 8.5.0, uses 64 threads for indexing and 8-thread query evaluation, issues disk reads with o_direct, and runs on a machine with an AMD 3.0GHz CPU, 512GB RAM, and 6TB SATA SSDs (Li et al., 3 Sep 2025). The datasets are DEEP1M, SIFT1M, GIST, MSONG, CRAWL, and GLOVE, spanning image, audio, and text vectors with dimensions from 100 to 960. The metrics are 7,
8
QPS,
9
and NIO, defined as the average number of block reads per query. The baselines are DiskANN and Starling.
At the same recall, the main quantitative findings are summarized below.
| Dataset | QPS improvement over Starling | NIO reduction |
|---|---|---|
| DEEP1M | 0–1 | 16.7%–46.3% |
| SIFT1M | 2–3 | 13.6%–44.7% |
| GIST | 4–5 | 43.7%–52.0% |
| CRAWL | 6–7 | 12.3%–28.3% |
| GLOVE | 8–9 | 6.0%–20.0% |
| MSONG | 0–1 | 31.1%–39.6% |
The largest I/O gains are reported on higher-dimensional datasets such as GIST and MSONG, where a 4KB block may store very few raw vectors and block utilization becomes especially important. This suggests that BAMG’s advantages are most visible when vector storage density and graph-block occupancy would otherwise be strongly mismatched.
The ablation study on SIFT1M compares BAMG against BAMG w/o NG, which uses random entry nodes instead of the navigation graph, and BAMG w/o BMRNG, which disables the BMRNG-style edge pruning. Removing BMRNG pruning causes the largest degradation. The navigation graph improves throughput by providing better entry points, with the strongest benefit at moderate recall and only marginal benefit at very high recall 2.
Sensitivity analyses indicate that increasing 3 allows more intra-block hops to support pruning, makes the graph sparser, and improves performance up to a point before saturating because blocks are small and internal path depth is limited. Increasing 4 makes pruning more conservative, keeps more edges, reduces NIO, and often improves QPS up to a point, though it can also slightly hurt performance because of extra computation and candidate noise.
Operationally, the paper identifies BAMG as especially effective when the dataset is large enough that disk I/O dominates, blocks can be populated with many locally related nodes, raw vectors occupy a large fraction of index size, and high recall is desired with fewer random reads. The stated limitations are that exact BMRNG construction is not scalable, BAMG is an approximation, performance depends on block assignment quality and the chosen 5, the system assumes a disk/page-oriented storage model with fixed-size blocks, and index size is slightly larger than Starling because BAMG stores additional offset information and may leave some padding in blocks.