---
title: Monotonic Relative Neighborhood Graph (MRNG)
url: https://www.emergentmind.com/topics/monotonic-relative-neighborhood-graph-mrng
type: topic
---

# Monotonic Relative Neighborhood Graph (MRNG)

A Monotonic Relative Neighborhood Graph (MRNG) is a formally defined proximity graph designed to guarantee strictly decreasing distance paths in greedy best-first search, primarily for approximate nearest neighbor search (ANNS) in high-dimensional spaces. MRNG ensures connectedness, compactness (constant out-degree), minimal search complexity, and forms the theoretical core for practical graph-based ANN indices, including recent disk-aware extensions.

## 1. Formal Definition and Construction

MRNG is constructed over a finite set $S \subset \mathbb{R}^d$ with the metric $\delta(p,q) = \|p-q\|_2$. For each pair $(p, q)$, define the lune
\[
\mathrm{lune}_{p,q} = B(p, \delta(p,q)) \cap B(q, \delta(p,q)),
\]
where $B(x, r) = \{y : \delta(x, y) < r\}$. The MRNG is the directed graph $(S, E)$ with
\[
(p \to q) \in E \iff \mathrm{lune}_{p,q} \cap S = \varnothing \;\;\text{or}\;\; \forall r \in \mathrm{lune}_{p,q}:\ (p \to r) \notin E.
\]
Equivalently, for construction: order $S \setminus \{p\}$ by increasing $\delta(p, \cdot)$, initialize the out-neighbor list $L_p$ with the nearest neighbor, and for each successive candidate $q$, include $q$ if no $r \in L_p$ satisfies $\delta(r, q) < \delta(p, q)$.

Pseudocode (all-pairs naive construction, $O(n^2\log n + n^2c)$ time):

```plaintext
for each p in S:
    R ← S \ {p}, sorted by δ(p, ·) ascending
    L ← { R[1] }
    for q in R[2:]:
        conflict ← false
        for r in L:
            if δ(r, q) < δ(p, q):
                conflict ← true
                break
        if not conflict:
            L.add(q)
    for q in L:
        add edge (p→q) to MRNG
```
MRNG is unique and edge-minimal with respect to monotonicity: removing any edge breaks the monotonic path guarantee [2107.13052].

## 2. Monotonicity and Connectivity Properties

A path $v_1 \to v_2 \to \dots \to v_k$ from $p$ to $q$ is monotonic if
\[
\delta(v_i, q) > \delta(v_{i+1}, q) \quad \forall\ i = 1, \dots, k-1.
\]
MRNG is a Monotonic Search Network (MSNET), meaning for every pair $(p, q)$ there exists a monotonic path from $p$ to $q$. Greedy best-first search in MRNG—always moving to the neighbor closest to the query that is strictly closer—never backtracks, with each hop reducing the distance to the target. This ensures strong connectivity: for any $p, q \in S$, there is a directed path from $p$ to $q$ [1707.00143][2107.13052].

MRNG is the unique minimal graph structure guaranteeing this property. Any deletion of edges would violate monotonic search coverage for some node pairs [2107.13052].

## 3. Degree Bound and Space Complexity

The out-degree in MRNG is bounded only by the ambient dimension $d$, not by the cardinality $n$; for $d$-dimensional Euclidean space, by sphere-packing arguments, the degree is
\[
\Delta \leq O((1 + 6/\pi)^d).
\]
Empirical statistics show average node degrees plateau with increasing $n$; for $d=10$, mean degree $\approx 10$, max $\approx 30$, and for $d=100$ mean degree $\approx 40$, max $\approx 200$ [2107.13052]. The total number of edges is $O(n)$, yielding a compact index size [1707.00143].

## 4. Search-Time Complexity and Greedy Guarantees

For query $q$ and source $p$, let $L(p,q)$ denote the length of the monotonic path in MRNG, and $c$ the average node out-degree, which is $O(1)$. The greedy search procedure inspects at most $c$ candidates per hop, with total time
\[
T_{\mathrm{search}} = O(c\,\mathbb{E}_{p,q}[L(p,q)]).
\]
Under uniform random distribution in $\mathbb{R}^d$,
\[
\mathbb{E}[L] = O\Big(n^{1/d} \log n^{1/d} / \Delta r\Big)
\]
where $\Delta r$ is the minimal difference in triangle side-lengths in $S$. In high dimensions, this growth is close to logarithmic in $n$ [1707.00143]. Greedy monotonic search in MRNG always terminates at the true nearest neighbor in at most $n$ steps; empirical scaling closely matches or exceeds alternatives like k-NN graphs [2107.13052].

## 5. Generalizations, Approximation Techniques, and Hidden Structures

To accommodate large $n$, generalizations of MRNG restrict neighbor candidate sets and cap the out-degree:
- Degree cap $m$ ($|N_x| \leq m$)
- Candidate pool $U_x \subset S \setminus \{x\}$

Generic MRNG (GenMRNG) applies identical neighbor construction, limited to candidates from $U_x$ and up to $m$ neighbors. With $|U_x| = \ell$, build time is $O(n\ell\log\ell)$ and storage $O(nm)$ [2107.13052].

MRNG possesses hidden structure termed **conflicting nodes**: for edge $v \to u$, the conflicting node set $C(v \to u)$ contains all $w$ such that $u \in \mathrm{lune}_{v,w}$—these are nodes "blocked" during construction. Recording conflict lists per edge facilitates escape from local minima in search, enabling improved recall and faster query time. The conflict-search subroutine, upon encountering a local minimum, scans $C(v \to u)$ for nodes closer to $q$; this strictly accelerates search convergence [2107.13052].

Empirical findings indicate that capping degree at roughly half the mean degree of MRNG retains nearly full recall, with a phase transition where adding more edges yields negligible improvement [2107.13052].

## 6. Block-Aware Monotonic Extensions for Disk-Based ANNS

The Block-aware Monotonic Relative Neighborhood Graph (BMRNG) extends MRNG principles to disk-resident graphs where disk I/O cost dominates. Vertex set $V$ is partitioned into blocks $\mathcal{B}$; block-aware pruning jointly considers both geometric and storage layout to ensure monotonic search over block transitions.

- **Intra-block edges:** Retain the full block-wise MRNG.
- **Cross-block edges:** Pruned aggressively; only kept if no intra-block monotonic shortcut exists.

A monotonic I/O path is defined as a sequence of block-transitions and node steps, with strictly decreasing distances to $q$ at every step. BMRNG guarantees such monotonic I/O paths for every pair $(u,q)$. The expected number of block transitions is
\[
O\left(\frac{n-c}{n-1} \cdot \frac{n^{1/d}\log n^{1/d}}{\Delta r}\right)
\]
[2509.03226].

The Block-Aware Monotonic Graph (BAMG) is a practical, linear-time index that approximates BMRNG by integrating block layout into edge selection and leverages in-memory multi-layer navigation graphs for efficient search entry. BAMG achieves up to 2.1× higher throughput and 13–52% fewer disk I/Os compared to prior approaches, with only a small index size overhead [2509.03226].

## 7. Practical Implications and Empirical Performance

MRNG serves as a theoretical foundation for scalable ANNS indices such as Navigating Spreading-out Graphs (NSG), which are practical MRNG approximations with nearly $O(n^{1.3})$ build cost and billion-node scalability [1707.00143].

Guidance for implementation includes using genMRNG with degree caps at approximately half the empirical mean, candidate pools drawn from k-NN graphs or random samples, and conflict lists for heavy edges, optimizing both index build and search times [2107.13052].

Compared to classical Relative Neighborhood Graphs (RNG), MRNG relaxes the empty-lune condition, enforcing forward-only monotonic greedy paths and precluding backtracking. BMRNG/BAMG further extend this property to disk-based environments, making graph construction and block assignment a joint optimization problem, resulting in significant query throughput and I/O gains while preserving monotonicity and recall [2509.03226].

Source: https://www.emergentmind.com/topics/monotonic-relative-neighborhood-graph-mrng