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.
Here is how the three layers work:
- 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.
- 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).
- 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.
- 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