Random Voronoi Networks

Ray Verma, Pau Mateo-Bernardó, Daniel Mas Montserrat, David Bonet, Marçal Comajoan Cara, Alexander G. IoannidisarXiv 2026

TL;DR

$k$-Nearest Neighbors ($k$-NN) is wonderfully intuitive and interpretable, but carrying around an entire dataset and using non-differentiable lookup rules makes it a poor fit for modern deep learning pipelines. Random Voronoi Networks (RVNs) bridge this gap by translating nearest-neighbor geometry directly into a structured, three-layer neural network. Even better, its first layer—Random Voronoi Features (RVFs)—acts as a standalone, lightweight data encoder that injects local geometric intuition into everything from simple linear models to state-of-the-art tabular neural networks.

What Problem Does This Paper Address?

Imagine carving up a map into territories around capital cities, where every point belongs to the closest capital. That geometric partitioning is a Voronoi tessellation, and it is the exact mathematical backbone of the 1-Nearest Neighbor (1-NN) algorithm.

Nearest-neighbor rules adapt naturally to local quirks in data without making heavy assumptions. However, modern deep learning finds them inconvenient: inference requires holding the entire training set in memory, latency scales poorly as datasets grow, and the "winner-take-all" lookup operator has zero gradients—meaning you can't backpropagate through it. Meanwhile, standard Multi-Layer Perceptrons (MLPs) also carve up space using hyperplanes, yet they lose the explicit, sample-based interpretability of $k$-NN. The authors ask: Can we explicitly wire Voronoi geometry into a fixed-budget, differentiable neural network?

Methods

The authors introduce Random Voronoi Networks (RVNs), structured three-layer MLPs whose weights aren't learned from scratch, but geometrically derived from training data pairs.

Figure 1: Random Voronoi Network overview. Pairwise bisectors hij = 0 partition the dataset and define the Voronoi geometry. A query x is mapped by W (1) and σ to Voronoi features Φij, routed by W (2) into cell scores Γi whose argmax identifies the nearest prototype, and mapped by W (3) to the final nearest-neighbor prediction.

Here is how the three layers work:

  1. Random Voronoi Features (RVF): Suppose you want to know if a query point $x$ is closer to training anchor $x_i$ than rival $x_j$. Algebraically, the boundary halfway between them (the perpendicular bisector) is just a linear equation! Thus, each neuron in the first layer represents a pairwise comparison between two training points. Using a step activation asks a binary question ("Is $x_i$ closer than $x_j$?"), while a ReLU activation measures how badly that comparison is violated, giving a smooth, differentiable signal.
  2. Random Voronoi Cells: The second layer sums up all comparisons for a given anchor $x_i$. If $x_i$ beats almost all of its rivals, its cell activates—identifying the nearest neighbor (or top-$k$ neighbors).
  3. Readout Layer: Averages or weights the labels of the active cells to output a regression or classification prediction.

Because comparing every training point against every other point requires $N(N-1)$ neurons, the authors introduce budgeted subsampling: picking $M_C$ anchors and $H$ rivals per anchor. Beyond uniform random sampling, they propose three clever, unsupervised pair-selectors:

  • Cosine Diversity: Spreads comparisons across different angles to avoid redundant, parallel boundaries.
  • Sparse Dimension: Favors pairs differing in only a few coordinates (measured via Hoyer sparsity), creating axis-aligned, human-readable splits.
  • High Variance: Picks bisectors that slice right through the middle of the data mass rather than sitting idly on the fringes.

Datasets

The authors evaluate their methods across standard benchmarks without introducing new datasets:

  • TabArena-Lite: A benchmark suite for supervised tabular machine learning, used to test RVFs as feature encoders.
  • Moons & MNIST: Classic synthetic 2D moons and handwritten digits, used to visualize and verify geometric interpretability.

Key Insights and Ideas

  • Exact $k$-NN is hiding inside an MLP: When all anchors and pairwise comparisons are included, a step-activated RVN isn't an approximation—it mathematically recovers exact Euclidean $k$-NN. Meanwhile, a ReLU-activated RVN recovers exact 1-NN once its gating width shrinks past the distance gap between the first- and second-closest neighbors.
  • Logarithmic scaling preserves rank geometry: Complete step-RVFs naturally compute the Kendall rank correlation—measuring how similarly two queries rank the training set by distance. Remarkably, you only need $O(\epsilon^{-2} \log m)$ random pairs to preserve these ranking similarities across $m$ queries.
  • Data-dependent beats data-oblivious: Unlike classic Random Fourier Features (which sample blind random waves), RVFs draw their hyperplanes directly from pairs of real data points. Every feature corresponds to an inspectable direction between two actual examples.

Key Results

  • Exact Recovery with Smarter Budgets: As anchor and rival budgets approach 100%, all RVNs converge to exact 1-NN agreement. However, at tight budgets, the Sparse Dimension selector dramatically outperforms random sampling at identifying true nearest neighbors.
Figure 2: RVNs recover exact nearest-neighbor indices. Left: index-matching accuracy versus H = MF /MC; Sparse Dimension performs best at small budgets, while all selectors converge to exact agreement. Right: accuracy versus MC and H, reaching 1 as both approach full coverage.
  • Boosting Tabular Models: On TabArena-Lite, feeding RVF encodings into downstream models (ElasticNet, TorchMLP, and TabM-Mini) beats raw features, Random Fourier Features, Random ReLU Features, and Nyström RBF features in aggregate Elo rankings. Notably, a simple ElasticNet linear model paired with RVFs achieves Elo scores around 1100—rivaling specialized deep neighborhood architectures like TabR and ModernNCA, with a sharp performance "elbow" requiring relatively few features (under 2,000).
  • Built-in Interpretability: A simple logistic regression trained on RVFs reaches 91% accuracy on MNIST, while allowing exact inspection of which pair of reference digits drove any given prediction.

Limitations and Future Work

Because RVNs rely on Euclidean distances, they still face the curse of dimensionality in very high-dimensional spaces, and materializing all pairwise comparisons scales quadratically if unbudgeted. To push this further, the authors suggest moving beyond fixed Euclidean space—exploring learned Mahalanobis metrics, anisotropic (stretched) Voronoi cells, and task-adaptive pair selectors that tailor partitions directly to supervised labels.

Summary updated

Abstract

Nearest-neighbor methods are local, simple, and interpretable, but their non-parametric form makes them memory-intensive, expensive at inference, and difficult to integrate into differentiable neural architectures. We introduce Random Voronoi Networks (RVNs), a family of structured three-layer MLPs that express nearest-neighbor geometry through sampled Voronoi comparisons. The first layer computes Random Voronoi Features (RVF) from affine pairwise separators between selected training samples, the second layer aggregates these comparisons into Voronoi cells or top-k neighborhood scores, and the readout layer produces classification or regression predictions. We show that, when all samples and pairwise comparisons are included, step RVNs recover exact Euclidean k-NN, while ReLU RVNs provide a violation-score realization for 1-NN that can be relaxed into a differentiable soft weighting. Subsampling yields approximate RVNs with explicit control over the number of cells and features. We study several unsupervised sampling methods that trade off random coverage, directional diversity, coordinate sparsity, and empirical feature variance. Empirically, RVFs produce a highly effective data encoding strategy, providing performance boosts to downstream methods ranging from linear to modern tabular deep learning models. Finally, we showcase that RVF provides an interpretable feature map due to its k-NN based construction and ties to pairwise local directions. These results position our Random Voronoi formulation as a bridge between nearest-neighbor rules, random features, and modern tabular models.
BibTeX
@misc{verma2026random,
  author = {Ray Verma and Pau Mateo-Bernardó and Daniel Mas Montserrat and David Bonet and Marçal Comajoan Cara and Alexander G. Ioannidis},
  title = {{Random Voronoi Networks}},
  year = {2026},
  eprint = {2611.33875},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33875},
}
Figure