Papers
Topics
Authors
Recent
Search
2000 character limit reached

BAMG: Block-Aware Monotonic Graph

Updated 10 July 2026
  • 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 2.1×2.1\times higher throughput and up to 52%52\% 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: B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}. Each block is

Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.

A monotonic I/O path from node uu to target qq is a sequence of blocks

P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]

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 qq within a block and across block transitions. If a block BiB_i contains nodes

[vi,1,vi,2,,vi,li],[v_{i,1},v_{i,2},\ldots,v_{i,l_i}],

then

52%52\%0

for intra-block steps, and

52%52\%1

for cross-block transitions. A proximity graph 52%52\%2 with block assignment 52%52\%3 is a BMRNG if, for any pair of nodes 52%52\%4, there exists a monotonic I/O path between 52%52\%5 and 52%52\%6.

BMRNG extends the RNG/MRNG lineage. For standard RNG, an edge 52%52\%7 exists only if no third node lies in the lune: 52%52\%8 The lune is the overlap of two balls centered at 52%52\%9 and B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.0 with radius B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.1, equivalently

B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.2

BMRNG introduces two edge-selection rules. For intra-block edges, if B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.3 and B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.4 is an edge of the MRNG induced by the nodes inside that block, then B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.5. For cross-block edges, B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.6 with B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.7 is removed if there exists some node B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.8 such that B=(V,L),L:V{1,,m}.\mathcal{B}=(V,\mathcal{L}), \qquad \mathcal{L}:V\rightarrow \{1,\dots,m\}.9 and either Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.0 with Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.1, or Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.2 and there is a monotonic path inside block Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.3 leading to Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.4 whose last node Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.5 lies in the lune: Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.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 Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.7 of Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.8 nodes and the block assignment Bi={vV:L(v)=i}.B_i=\{v\in V:\mathcal{L}(v)=i\}.9, if a proximity graph uu0 satisfies Rule 1 and Rule 2, then uu1 is a BMRNG (Li et al., 3 Sep 2025). The proof is constructive. When uu2 and uu3 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 uu4.

The paper also gives an expected path-length result under a random partition model. Assuming nodes are uniformly randomly partitioned into blocks of size uu5, the expected length of a monotonic I/O path uu6 is stated as

uu7

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 uu8, 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 uu9. The resulting construction is therefore simplified to qq0.

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 qq1 is pruned only if there exists a monotone intra-block path of length at most qq2 ending at a node sufficiently close to qq3, as controlled by qq4: qq5 with qq6, such that

qq7

and

qq8

Here qq9 bounds how many intra-block hops may justify pruning, and P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]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 P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]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.

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 P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]2. The paper claims the number of layers is

P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]3

where P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]4 is the average node-to-component ratio, empirically around 5.

The query algorithm is described as block-first. When a node P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]5 is checked, the system loads the block containing P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]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 P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]7 is ordered by approximate distance P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]8 using PQ codes, keeps only the top P=[B0,B1,,BL]P=[B_0,B_1,\ldots,B_L]9 candidates, and supports greedy exploration.

Within a block, the procedure search_within_block(B, v, q, C, α) starts from qq0, performs a bounded-depth BFS/greedy traversal up to depth qq1, inserts visited nodes’ neighbors into qq2, and continues only from intra-block neighbors that improve the best approximate distance so far. The continuation criterion is

qq3

After the block-first phase, the raw vectors of candidates in qq4 are read from disk, exact distances are computed, and the top-qq5 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 qq6TB 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 qq7,

qq8

QPS,

qq9

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 BiB_i0–BiB_i1 16.7%–46.3%
SIFT1M BiB_i2–BiB_i3 13.6%–44.7%
GIST BiB_i4–BiB_i5 43.7%–52.0%
CRAWL BiB_i6–BiB_i7 12.3%–28.3%
GLOVE BiB_i8–BiB_i9 6.0%–20.0%
MSONG [vi,1,vi,2,,vi,li],[v_{i,1},v_{i,2},\ldots,v_{i,l_i}],0–[vi,1,vi,2,,vi,li],[v_{i,1},v_{i,2},\ldots,v_{i,l_i}],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 [vi,1,vi,2,,vi,li],[v_{i,1},v_{i,2},\ldots,v_{i,l_i}],2.

Sensitivity analyses indicate that increasing [vi,1,vi,2,,vi,li],[v_{i,1},v_{i,2},\ldots,v_{i,l_i}],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 [vi,1,vi,2,,vi,li],[v_{i,1},v_{i,2},\ldots,v_{i,l_i}],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 [vi,1,vi,2,,vi,li],[v_{i,1},v_{i,2},\ldots,v_{i,l_i}],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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Block-Aware Monotonic Graph (BAMG).