Skip to content

Menu

WorksComputer Science

Random Voronoi Networks

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_bm2nd8hx. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

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.

Introduction

Nearest-neighbor rules require very few parametric assumptions, adapt naturally to local structure, and come with classical statistical consistency guarantees [7, 27, 8]. At the same time, their strengths are tied to properties that modern deep learning pipelines often find inconvenient: prediction requires access to the reference set, memory and latency scale with the number of stored examples, and the winner-take-all nearest-neighbor operator is not differentiable. Furthermore, the curse of dimensionality can degrade nearest-neighbor performance in high dimensions, while the unrestricted binary kk-NN classification class has infinite VC dimension, ruling out distribution-free uniform generalization bounds based solely on its class complexity.

The core object behind 1-NN is the Voronoi tessellation induced by the training set. Prediction is constant inside each cell and changes only across Voronoi boundaries [20, 26], which are defined as a combination of hyperplanes. This observation suggests a natural parallelism between Voronoi tessellation and multi-layer perceptrons (MLPs), since both construct decision regions by composing affine separators with nonlinear aggregation. This paper develops that viewpoint through Random Voronoi Networks (RVNs). RVNs are a family of structured three-layer networks that recover 1-NN Preprint. when every training sample is used as an anchor and each anchor is compared with every other training sample. The first layer generates Voronoi features by applying sampled pairwise Voronoi separators derived from the training set. The second layer generates Voronoi cells by aggregating these comparisons onto cell-membership or top-kk neighborhood indicators. Finally, a readout layer provides the classification or regression prediction. RVN can be instantiated both using step and ReLU activations, inheriting the local inductive bias of prototype methods while remaining compatible with standard neural tooling.

Our contributions are as follows: (1) We formulate Random Voronoi Networks as structured three-layer MLPs whose layers correspond to Voronoi features, Voronoi cells, and readout predictions. (2) We show that step RVNs recover exact Euclidean kk-NN in the full-sample, full-comparison regime, while ReLU RVNs provide a neural violation-score realization of the 1-NN geometry. (3) We analyze uniform comparison sampling and define feasible, label-agnostic selectors using random coverage, directional diversity, coordinate sparsity, and empirical feature variance. The structured selectors are evaluated empirically and do not inherit the uniform-sampling bounds. (4) We empirically separate the exact nearest-neighbor recovery role of RVN from the practical feature-encoding role of RVF, showing improvements over standard random features, comparisons with learned neighborhood models, and interpretable local feature directions.

Together, these results position RVNs as a bridge between nearest-neighbor rules, random feature maps, and neural networks: they preserve the locality and interpretability of prototype methods while offering fixed, scalable, and neural-compatible feature representations.

Related work

Nearest neighbors and prototype methods. The classical analysis of nearest-neighbor rules begins with the seminal result of Cover and Hart [7] and the consistency theory of Stone [27]; a broader treatment appears in the monograph of Devroye et al. [8]. Prototype-based methods such as learning vector quantization (LVQ) compress the reference set into a smaller number of representatives and therefore induce Voronoi decision regions by design [3, 24]. More recent prototype literature emphasizes interpretability, robustness, and efficient certification [23, 28]. RVNs share the local geometric bias of these methods, but use sampled pairwise Voronoi comparisons as an explicit intermediate representation.

Neural Voronoi and kk-NN implementations. Neural implementations of nearest-neighbor and Voronoi decision rules predate this work: Murphy’s 1-NN perceptron uses bisecting-plane comparisons [19], Bose and Garga construct an exact Voronoi network [4], Chen et al. implement kk-NN through an iterative procedure [6], and Gentile and Sznajer simplify Voronoi classifiers using feedback and hyperborder structure [11, 12]. RVN instead emphasizes a static feedforward construction with explicit anchor and comparison budgets (MCM_C, MFM_F), structured comparison subsampling, and reuse of the selected comparisons as a fixed label-agnostic feature map for downstream predictors.

Differentiable and learned neighborhood models. A complementary line of work learns or smooths nearest-neighbor retrieval so that locality can be inserted inside larger differentiable pipelines. Examples include neural nearest-neighbor blocks [21], TabR [13], and ModernNCA [30]. TabR and ModernNCA learn task-specific representations and neighborhood behavior through specialized training objectives or architectures. RVF instead fixes a Euclidean, label-agnostic comparison map before supervised training and can be attached to linear models, generic MLPs, or specialized tabular predictors without changing their losses. We therefore view RVF as complementary to learned retrieval methods rather than as a replacement for them.

Generalization bounds for nearest-neighbor limits. A related theoretical line studies why nearest-neighbor rules can generalize despite their large unrestricted capacity. Graepel and Herbrich [15] derive PAC-Bayesian bounds for KK-NN by viewing it as the limiting case of a kernel classifier with vanishing bandwidth, while Chaudhuri and Dasgupta [5] give finite-sample, distribution-dependent convergence rates for nearest-neighbor classification. Our perspective is complementary: rather than deriving kk-NN from a kernel classifier, RVNs realize the same limiting nearest-neighbor geometry through a structured MLP built from Voronoi comparisons, which allows us to characterize how finite comparison budgets approximate nearest-neighbor cells and pairwise rank geometry.

Random Voronoi Network overview

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

Random features and random ReLU networks. RVNs also connect to the large literature on random features, where nonlinear dictionaries are sampled and only a simple downstream head is trained [22, 17]. Unlike random Fourier or random ReLU features, Voronoi features are data-dependent: each coordinate is tied to a specific pairwise separator between reference samples. The resulting representation therefore carries an explicit local and interpretable geometry while retaining the computational benefits of a fixed feature map.

Voronoi geometry of kk-NN. The geometric structure of nearest-neighbor classifiers can be analyzed via Voronoi diagrams and their higher-order variants [20, 26]. We use this geometry constructively: pairwise bisectors become affine features, sampled rank tests become cells, and the complete comparison graph provides the exact kk-NN endpoint around which the budgeted approximation is defined.

Random Voronoi Networks

Random Voronoi Networks (RVNs) are explicit three-layer multi-layer perceptrons whose weights are determined by Euclidean Voronoi geometry. The first layer computes Voronoi features, which are pairwise comparisons between selected training samples. The second layer computes Voronoi cells, or more generally top-kk neighborhood indicators, by aggregating those comparisons. The final layer averages the values attached to the active cells. By changing only the threshold in the cell layer, the same architecture recovers either 1-nearest neighbor or kk-nearest neighbors, assuming no distance ties.

The kk-nearest-neighbor hypothesis class

Let DN={(xi,ti)}i=1N\mathcal{D}_N=\{(x_i,t_i)\}_{i=1}^{N} be a reference dataset of NN samples, with query xi∈Rdx_i\in\mathbb{R}^{d} and target ti∈Rpt_i\in\mathbb{R}^{p}. For regression, tit_i is a scalar or vector response; for classification, tit_i may be a one-hot label vector. Write X=(x1,…,xN)X=(x_1,\ldots,x_N) and T=(t1,…,tN)T=(t_1,\ldots,t_N). For a query x∈Rdx\in\mathbb{R}^{d}, let NN(x;X)=(i1(x),…,iN(x))\mathcal{N}_N(x;X)=(i_1(x),\ldots,i_N(x)) be the ordering of the reference samples by increasing squared Euclidean distance with respect to XX, so that ∥x−xi1(x)∥22≤⋯≤∥x−xiN(x)∥22\lVert x-x_{i_1(x)}\rVert_2^2\le\cdots\le\lVert x-x_{i_N(x)}\rVert_2^2. Ties are resolved by a fixed deterministic rule. The kk-nearest-neighbor set with respect to XX is

Nk(x;X):={i1(x),…,ik(x)}.(1)\mathcal{N}_k(x;X):=\{i_1(x),\ldots,i_k(x)\}. \tag*{(1)}

The Euclidean 1-NN predictor returns the value attached to the closest reference sample:

f1NN,DN(x):=ti1(x)=targ min⁡i∈[N] ∥x−xi∥22,(2)f_{1\mathrm{NN},\mathcal{D}_N}(x):=t_{i_1(x)}=t_{\underset{i\in[N]}{\operatorname{arg\,min}}\ \lVert x-x_i\rVert_2^2}, \tag*{(2)}

where the arg min uses the same deterministic tie-breaking rule. Thus 1-NN is a Voronoi-cell predictor: each input receives the value attached to the sample whose Voronoi cell contains it. The Euclidean kk-NN predictor averages the values attached to the kk closest reference samples:

fkNN,DN(x):=1k∑i∈Nk(x;X)ti.(3)f_{k\mathrm{NN},D_N}(x) := \frac{1}{k}\sum_{i\in N_k(x;X)} t_i. \tag*{(3)}

For classification, when tit_i is one-hot, fkNN,DN(x)f_{k\mathrm{NN},D_N}(x) stores empirical class frequencies among the kk nearest neighbors, and prediction is y^(x)=arg max⁡ℓ∈[p][fkNN,DN(x)]ℓ\hat{y}(x) = \operatorname{arg\,max}_{\ell\in[p]}[f_{k\mathrm{NN},D_N}(x)]_\ell. We refer to the unrestricted Euclidean kk-nearest-neighbor hypothesis class by HkNNd,p\mathcal{H}^{d,p}_{k\mathrm{NN}}. For binary classification (d≥1d \ge1, k≥1k \ge1, with thresholded one-hot class scores HkNN,bind\mathcal{H}^{d}_{k\mathrm{NN},\mathrm{bin}}), this class has infinite VC dimension [25]: for any nonempty finite set of query points, one can place labeled reference sites arbitrarily close to each query point so as to realize any binary labeling. Thus VCdim⁡(HkNN,bind)=∞\operatorname{VCdim}(\mathcal{H}^{d}_{k\mathrm{NN},\mathrm{bin}}) = \infty.

Random Voronoi Networks as three-layer MLPs

RVNs are structured piece-wise parameterizations of nearest-neighbor geometry. The RVN is constructed using a set of anchors consisting of training samples {xi:i∈A}\{x_i : i \in A\}, where A⊆[N]A \subseteq[N] is a selected sample of indices with ∣A∣=MC|A| = M_C. Let E⊂A×[N]\mathcal{E} \subset A \times[N] be a set of ordered comparison pairs, with i≠ji \ne j for all (i,j)∈E(i,j) \in\mathcal{E}; the second index may be any reference sample. Each pair (i,j)(i,j) defines one Voronoi feature comparing sample xix_i against sample xjx_j. We write MF=∣E∣M_F = |\mathcal{E}|. The pairs in E\mathcal{E} are used to construct the Random Voronoi Feature layer Φ\Phi, the set of anchors AA provide the basis for the Random Voronoi Cell layer Γ\Gamma, and the set of labels TT are used to construct the final readout layer that completes the Random Voronoi Network fRVNf_{\mathrm{RVN}}.

The RVN can be written in the following structured network form, with Φ:Rd→RMF\Phi: \mathbb{R}^{d} \to\mathbb{R}^{M_F}, Γ:RMF→RMC\Gamma: \mathbb{R}^{M_F} \to\mathbb{R}^{M_C}, and f:RMC→Rpf : \mathbb{R}^{M_C} \to\mathbb{R}^{p}.

In the step variant, Γ(x)∈{0,1}MC\Gamma(x) \in\{0,1\}^{M_C} is the vector of active cells. If 1≤k≤MC1 \le k \le M_C and the comparison graph consists of all ordered pairs of distinct selected anchors, precisely kk cells are active whenever their distances to xx are pairwise distinct. For a fixed dataset, HRVNσ(DN;MC,MF)\mathcal{H}^{\sigma}_{\mathrm{RVN}}(D_N; M_C, M_F) denotes the family with fixed geometric hidden layers for each (A,E)(A,\mathcal{E}), activation σ\sigma, and free affine readout parameters.

Random Voronoi Features

The first layer of an RVN constructs the Voronoi feature map Φ(x)∈RMF\Phi(x) \in\mathbb{R}^{M_F}. Its coordinates are indexed by the randomly selected ordered comparison pairs e=(i,j)∈Ee = (i,j) \in\mathcal{E}. Each coordinate compares the distance from the query xx to a main anchor xix_i and a selected reference sample xjx_j. For each comparison pair, define the signed Voronoi margin:

hij(x):=∥x−xj∥22−∥x−xi∥22=2(xi−xj)⊤x+∥xj∥22−∥xi∥22.(4)\begin{aligned} h_{ij}(x) &:= \lVert x-x_j\rVert_2^2-\lVert x-x_i\rVert_2^2 \\ &= 2(x_i-x_j)^\top x+\lVert x_j\rVert_2^2-\lVert x_i\rVert_2^2. \tag*{(4)} \end{aligned}

Thus hij(x)≥0h_{ij}(x) \ge0 exactly when xix_i is at least as close to xx as xjx_j is. Therefore, each Voronoi comparison is an affine neuron. For e=(i,j)e=(i,j), the corresponding first-layer parameters are

We(1):=2(xi−xj)⊤,be(1):=∥xj∥22−∥xi∥22,(5)W^{(1)}_e := 2(x_i-x_j)^\top,\qquad b^{(1)}_e := \lVert x_j\rVert_2^2-\lVert x_i\rVert_2^2, \tag*{(5)}

so that (W(1)x+b(1))e=hij(x)(W^{(1)}x+b^{(1)})_e=h_{ij}(x). The activation σ\sigma determines how this comparison is encoded. With a step activation σH\sigma_H,

Φstep(x)=σH(W(1)x+b(1)),Φijstep(x)=σH(hij(x))=1{∥x−xi∥22≤∥x−xj∥22},(6)\begin{aligned} \Phi^{\mathrm{step}}(x) &= \sigma_H(W^{(1)}x+b^{(1)}),\\ \Phi^{\mathrm{step}}_{ij}(x) &= \sigma_H(h_{ij}(x))\\ &= \mathbf{1}\{\lVert x-x_i\rVert_2^2 \le\lVert x-x_j\rVert_2^2\}, \tag*{(6)} \end{aligned}

so the feature records whether anchor xix_i is no farther than anchor xjx_j. With a ReLU activation, the orientation is reversed so that the feature records the amount by which the comparison for xix_i is violated:

ΦReLU(x)=ReLU⁡(−(W(1)x+b(1))),ΦijReLU(x)=ReLU⁡(−hij(x)).(7)\begin{aligned} \Phi^{\mathrm{ReLU}}(x) &= \operatorname{ReLU}\left(-(W^{(1)}x+b^{(1)})\right),\\ \Phi^{\mathrm{ReLU}}_{ij}(x) &= \operatorname{ReLU}(-h_{ij}(x)). \tag*{(7)} \end{aligned}

Here the ReLU version uses the opposite orientation of the affine margin, so that ΦijReLU(x)\Phi_{ij}^{\mathrm{ReLU}}(x) is zero when xix_i is at least as close as xjx_j, and positive otherwise. Thus the first layer stores the sampled Voronoi bisectors determined by E\mathcal{E}. The randomness selects which pairwise comparisons are included; after AA and E\mathcal{E} are fixed, the weights and biases are completely determined by the selected reference samples.

Random Voronoi Cells

The second layer aggregates pairwise Voronoi features into anchor-level cell activations Γ(x)∈RMC\Gamma(x) \in\mathbb{R}^{M_C}. For each selected anchor xix_i, i∈Ai \in A, let Ei:={j∈[N]∖{i}:(i,j)∈E}\mathcal{E}_i := \{j \in[N] \setminus\{i\} : (i,j) \in\mathcal{E}\} denote its sampled rivals and let di:=∣Ei∣d_i := |\mathcal{E}_i|. Define the routing matrix WC∈{0,1}MC×MFW_C \in\{0,1\}^{M_C \times M_F} by

(WC)i,e=1{e=(i,j) for some j∈Ei}.(8)(W_C)_{i,e} = \mathbb{1}\{e=(i,j)\text{ for some }j\in\mathcal{E}_i\}. \tag*{(8)}

Thus WCW_C sums exactly the comparisons associated with anchor xix_i.

For the step RVN, choose W(2)=WCW^{(2)} = W_C and bi(2)=−di+k−12b_i^{(2)} = -d_i + k - \frac{1}{2}. Then

Γistep,k(x)=σH(∑j∈EiΦijstep(x)−di+k−12).(9)\Gamma_i^{\mathrm{step},k}(x) = \sigma_H\left(\sum_{j\in\mathcal{E}_i}\Phi_{ij}^{\mathrm{step}}(x)-d_i+k-\frac{1}{2}\right). \tag*{(9)}

Hence Γistep,k(x)=1\Gamma_i^{\mathrm{step},k}(x)=1 exactly when xix_i loses to at most k−1k-1 of its sampled rivals, equivalently when it wins at least di−k+1d_i-k+1 sampled comparisons. If E=EA\mathcal{E}=\mathcal{E}_A exactly, 1≤k≤MC1\leq k\leq M_C, and distances to the selected anchors are distinct, this activates precisely the top-kk anchors within AA; for k=1k=1, it is their hard Voronoi-cell indicator.

For the ReLU RVN, the cell layer instead gates the accumulated comparison violation. Since ΦijReLU(x)=ReLU⁡(−hij(x))\Phi_{ij}^{\mathrm{ReLU}}(x)=\operatorname{ReLU}(-h_{ij}(x)) is zero when xix_i is at least as close as xjx_j, define

Vi(x):=(WCΦReLU(x))i=∑j∈EiΦijReLU(x).(10)V_i(x):=(W_C\Phi^{\mathrm{ReLU}}(x))_i=\sum_{j\in\mathcal{E}_i}\Phi_{ij}^{\mathrm{ReLU}}(x). \tag*{(10)}

Thus Vi(x)=0V_i(x)=0 when xix_i loses to none of its sampled rivals, and otherwise measures the total violation margin. With gate width ε>0\varepsilon>0, choose Wε(2),ReLU=−ε−1WCW_{\varepsilon}^{(2),\mathrm{ReLU}}=-\varepsilon^{-1}W_C and bε(2),ReLU=1MCb_{\varepsilon}^{(2),\mathrm{ReLU}}=\mathbf{1}_{M_C}, giving

ΓiReLU,ε(x)=ReLU⁡(1−Vi(x)ε).(11)\Gamma_i^{\mathrm{ReLU},\varepsilon}(x)=\operatorname{ReLU}\left(1-\frac{V_i(x)}{\varepsilon}\right). \tag*{(11)}

This is a shrinking violation gate: it equals 1 when the sampled comparisons for xix_i are all satisfied, decays linearly for 0<Vi(x)<ε0<V_i(x)<\varepsilon, and vanishes once Vi(x)≥εV_i(x)\geq\varepsilon. For fixed ε>0\varepsilon>0, this ReLU map is differentiable almost everywhere.

Readout Layer

The readout layer converts anchor-level cell activations into the final prediction by attaching each selected anchor xix_i, i∈Ai\in A, to its target ti∈Rpt_i\in\mathbb{R}^p. For regression, ti=yit_i=y_i is the response associated with xix_i; for classification, ti=eyit_i=e_{y_i} is the one-hot encoding of its class label.

For the step RVN, Γstep,k(x)\Gamma^{\mathrm{step},k}(x) is binary and is designed to activate the selected neighbors. We therefore choose W:,i(3),step,k=ti/kW_{:,i}^{(3),\mathrm{step},k}=t_i/k and b(3),step,k=0b^{(3),\mathrm{step},k}=0, so that

fstep,k(x)=1k∑i∈AΓistep,k(x)ti.(12)f^{\mathrm{step},k}(x)=\frac{1}{k}\sum_{i\in A}\Gamma_i^{\mathrm{step},k}(x)t_i. \tag*{(12)}

When exactly kk cells are active, this is the average of the targets attached to those anchors. However, under budgeted comparison sampling, the number of active cells may differ from kk, so the readout may not be a normalized neighborhood average.

For the ReLU RVN, ΓReLU,ε(x)\Gamma^{\mathrm{ReLU},\varepsilon}(x) is generally soft and is intended to select a single nearest anchor as ε→0+\varepsilon\to0^+. We therefore use the unnormalized readout W:,i(3),ReLU=tiW_{:,i}^{(3),\mathrm{ReLU}}=t_i with b(3),ReLU=0b^{(3),\mathrm{ReLU}}=0, giving

fReLU,ε(x)=∑i∈AΓiReLU,ε(x)ti.(13)f^{\mathrm{ReLU},\varepsilon}(x)=\sum_{i\in A}\Gamma_i^{\mathrm{ReLU},\varepsilon}(x)t_i. \tag*{(13)}

For finite ε\varepsilon, this combines the targets of anchors with nonzero ReLU cell activity.

In classification, the output f(x)∈Rpf(x) \in\mathbb{R}^{p} is interpreted as a vector of class scores and prediction is y^(x)=arg⁡max⁡c[f(x)]c\hat{y}(x) = \arg\max_{c}[f(x)]_{c}. In regression, f(x)f(x) is used directly as the predicted response.

Equivalence between RVN and k-NN

We now state when RVNs exactly recover nearest-neighbor predictors. Exact recovery uses the full-anchor, full-comparison endpoint, MC=NM_C = N and MF=N(N−1)M_F = N(N - 1). For fixed finite NN, this is a finite construction rather than an asymptotic budget limit. The complete ordered graph is

Efull={(i,j):i,j∈[N], i≠j}.\mathcal{E}_{\mathrm{full}} = \{(i,j) : i,j \in[N],\ i \ne j\}.

Let ΩX⊂Rd\Omega_X \subset\mathbb{R}^{d} denote the set of query points with no distance ties among the reference samples X=(x1,…,xN)X = (x_1,\ldots,x_N).

Theorem 3.1 (Step RVNs recover kk-NN). Fix a reference dataset DN={(xi,ti)}i=1N\mathcal{D}_N = \{(x_i,t_i)\}_{i=1}^{N} and 1≤k≤N1 \le k \le N. If A=[N]A = [N] and E={(i,j):i,j∈[N], i≠j}\mathcal{E} = \{(i,j) : i,j \in[N],\ i \ne j\}, then the step RVN with the canonical readout W⋅,i(3)=ti/kW_{\cdot,i}^{(3)} = t_i/k, b(3)=0b^{(3)} = 0, satisfies

fRVNstep,k(x)=fkNN,DN(x)f_{\mathrm{RVN}}^{\mathrm{step},k}(x) = f_{k\mathrm{NN},\mathcal{D}_N}(x)

for every xx with no distance ties.

Theorem 3.2 (ReLU RVNs recover 1-NN at finite gate width). Fix a reference dataset DN={(xi,ti)}i=1N\mathcal{D}_N = \{(x_i,t_i)\}_{i=1}^{N} with N≥1N \ge1. Suppose A=[N]A = [N] and E=Efull\mathcal{E} = \mathcal{E}_{\mathrm{full}}, and use the canonical readout W⋅,i(3)=tiW_{\cdot,i}^{(3)} = t_i, b(3)=0b^{(3)} = 0.

Fix x∈ΩXx \in\Omega_X. If N≥2N \ge2, let i1(x)i_1(x) and i2(x)i_2(x) index the nearest and second-nearest reference samples, and define their squared-distance gap by Δ(x):=∥x−xi2(x)∥22−∥x−xi1(x)∥22>0\Delta(x) := \lVert x - x_{i_2(x)} \rVert_2^2 - \lVert x - x_{i_1(x)} \rVert_2^2 > 0. Then, for every 0<ε≤Δ(x)0 < \varepsilon\le\Delta(x),

fRVNReLU,ε(x)=f1NN,DN(x).(14)f_{\mathrm{RVN}}^{\mathrm{ReLU},\varepsilon}(x) = f_{1\mathrm{NN},\mathcal{D}_N}(x). \tag*{(14)}

If N=1N = 1, the same equality holds for every ε>0\varepsilon> 0. Consequently, for every x∈ΩXx \in\Omega_X,

lim⁡ε→0+fRVNReLU,ε(x)=f1NN,DN(x).(15)\lim_{\varepsilon\to0^+} f_{\mathrm{RVN}}^{\mathrm{ReLU},\varepsilon}(x) = f_{1\mathrm{NN},\mathcal{D}_N}(x). \tag*{(15)}

The proofs are given in Appendix § 8.§ 1 and Appendix § 8.§ 2.

Budgeted Approximation and Rank Geometry

The anchor and comparison budgets control two distinct approximations. We write MC=∣A∣M_C = |A| for the number of main anchors and MF=MCHM_F = M_C H when each main anchor uses HH sampled rivals, with 1≤MC≤N1 \le M_C \le N and 0≤H≤N−10 \le H \le N-1. At the cell level, HH controls how accurately sampled comparisons resolve kk nearest neighbors. At the feature level, we analyze how MFM_F controls preservation of the complete pairwise ranking geometry under uniform random pair sampling.

Cell-level approximation. For each main anchor i∈Ai \in A, HH rivals are sampled uniformly without replacement from [N]∖{i}[N] \setminus\{i\}. Define the global reference distance rank

riX(x):=1+∑j∈[N]∖{i}1{∥x−xj∥22<∥x−xi∥22}.(16)r_i^{X}(x) := 1 + \sum_{j \in[N]\setminus\{i\}} \mathbf{1}\{\lVert x - x_j \rVert_2^2 < \lVert x - x_i \rVert_2^2\}. \tag*{(16)}

so a reference sample has rank 1 exactly when it attains the minimum distance to xx. For a sampled rival set Ei⊆[N]∖{i}\mathcal{E}_i \subseteq[N] \setminus\{i\} with ∣Ei∣=H|\mathcal{E}_i| = H, define

Li(x;Ei):=∑j∈Ei1{∥x−xj∥22<∥x−xi∥22}.(17)L_i(x;\mathcal{E}_i) := \sum_{j \in\mathcal{E}_i} \mathbf{1}\{\lVert x - x_j \rVert_2^2 < \lVert x - x_i \rVert_2^2\}. \tag*{(17)}

Then, for k≥1k \ge1, Γistep,k(x)=1{Li(x;Ei)≤k−1}\Gamma_i^{\mathrm{step},k}(x) = \mathbf{1}\{L_i(x;\mathcal{E}_i) \le k - 1\}.

Proposition 3.3 (Sampled comparisons control top-kk activation). Fix k≥1k \ge1, 0≤H≤N−10 \le H \le N-1, and a main anchor ii with reference set rank riX(x)r_i^X(x). If Ei⊆[N]∖{i}\mathcal{E}_i \subseteq[N] \setminus\{i\} is sampled uniformly without replacement with ∣Ei∣=H|\mathcal{E}_i|=H, then

P(Γistep,k(x)=1)=P(Li≤k−1),and(18)\mathbb{P}\left(\Gamma_i^{\mathrm{step},k}(x)=1\right)=\mathbb{P}(L_i \le k-1),\quad\text{and} \tag*{(18)}
Li(x;Ei)∼Hypergeom⁡(N−1,riX(x)−1,H).(19)L_i(x;\mathcal{E}_i)\sim\operatorname{Hypergeom}\left(N-1,r_i^X(x)-1,H\right). \tag*{(19)}

Let SHk(x):=∑i∈AΓistep,k(x)S_H^k(x):=\sum_{i\in A}\Gamma_i^{\mathrm{step},k}(x) denote the number of active main-anchor cells.

Corollary 3.4 (Comparison budget controls effective neighborhood size). Fix k≥1k \ge1, 1≤MC≤N1 \le M_C \le N, and 0≤H≤N−10 \le H \le N-1. Suppose AA is sampled uniformly from [N][N] with ∣A∣=MC|A|=M_C, and each i∈Ai\in A samples HH rivals uniformly from [N]∖{i}[N]\setminus\{i\}. Assume that the reference samples have pairwise distinct distances to the query xx. Then

E[SHk(x)]=MCmin⁡{k,H+1}H+1.(20)\mathbb{E}\left[S_H^k(x)\right]=M_C\frac{\min\{k,H+1\}}{H+1}. \tag*{(20)}

Practically, for H≥k−1H \ge k-1, define the effective neighborhood size

keff:=E[SHk(x)]=MCkH+1=MC2kMF+MC.(21)k_{\mathrm{eff}}:=\mathbb{E}\left[S_H^k(x)\right]=\frac{M_C k}{H+1}=\frac{M_C^2 k}{M_F+M_C}. \tag*{(21)}

Together, Proposition 3.3 and Corollary 3.4 quantify the effect of comparison subsampling: HH controls how reliably lower-ranked anchors are rejected, while keff=E[SHk(x)]k_{\mathrm{eff}}=\mathbb{E}[S_H^k(x)] is the expected number of active cells and therefore the effective support of the approximate RVN. Smaller HH broadens this support, whereas MC=NM_C=N and H=N−1H=N-1 recover the exact kk-NN support. This gives a direct, practical link between the feature budget and geometric smoothing; proofs are given in Appendix C.

Feature-level approximation. The reference set X=(x1,…,xN)X=(x_1,\ldots,x_N) induces, for every no-tie input xx, a ranking πX(x)\pi_X(x) of all NN reference samples by increasing distance. For one canonical orientation i<ji<j, define ψij(x)=2Φijstep(x)−1∈{−1,+1}\psi_{ij}(x)=2\Phi_{ij}^{\mathrm{step}}(x)-1\in\{-1,+1\} and let P=(N2)P=\binom{N}{2}. A ranking disagreement between two inputs is a pair {i,j}\{i,j\} that the two induced rankings order differently. Jiao and Vert [18] showed that normalized signed pairwise comparisons give an explicit feature map for the Kendall kernel. The following proposition identifies this map with complete signed step RVFs on reference-distance rankings.

Proposition 3.5 (Complete RVFs encode Kendall rank geometry). Assume N≥2N\ge2 and x,x′∈ΩXx,x'\in\Omega_X. The complete signed step-RVF kernel satisfies

KX(x,x′):=1P∑i<jψij(x)ψij(x′)(22)K_X(x,x'):=\frac{1}{P}\sum_{i<j}\psi_{ij}(x)\psi_{ij}(x') \tag*{(22)}
=1−2DK(πX(x),πX(x′))P,(23)=1-\frac{2D_K(\pi_X(x),\pi_X(x'))}{P}, \tag*{(23)}

where DKD_K counts pairwise ranking disagreements. Hence KXK_X is the Kendall rank correlation between the two reference-distance rankings and is positive semidefinite.

ReLU RVFs retain the same binary ranking comparisons: for inputs without distance ties, ψij(x)=1−2⋅1{ΦijReLU(x)>0}\psi_{ij}(x)=1-2\cdot\mathbf{1}\{\Phi_{ij}^{\mathrm{ReLU}}(x)>0\}. Thus, the Kendall kernel is recoverable by thresholding ReLU coordinates, although it is not their raw inner product.

Corollary 3.6 (Random RVFs preserve rank geometry with logarithmic feature growth). *Assume N≥2N\ge2, and let Q={z1,…,zm}⊂ΩXQ=\{z_1,\ldots,z_m\}\subset\Omega_X be a fixed set of m≥1m\ge1 queries. Fix ϵ>0\epsilon>0, 0<δ<10<\delta<1, and an integer MF≥1M_F\ge1. Sample MFM_F independent reference pairs independently and uniformly with replacement, and let K^MF\widehat{K}_{M_F} be their average signed comparison product. Then E[K^MF(za,zb)]=KX(za,zb)\mathbb{E}[\widehat{K}_{M_F}(z_a,z_b)]=K_X(z_a,z_b) for all a,b∈[m]a,b\in[m]. With probability at least 1−δ1-\delta,

max⁡a,b∈[m]∣K^MF(za,zb)−KX(za,zb)∣≤ϵ(24)\max_{a,b\in[m]}\left|\widehat{K}_{M_F}(z_a,z_b)-K_X(z_a,z_b)\right|\le\epsilon \tag*{(24)}

whenever

MF≥2ϵ2log⁡2m2δ.(25)M_F\ge\frac{2}{\epsilon^2}\log\frac{2m^2}{\delta}. \tag*{(25)}

Proposition 3.5 and Corollary 3.6 show that complete step RVFs encode the full reference-distance ranking through a Kendall kernel, while MF=O(ϵ−2[log⁡m+log⁡(1/δ)])M_F = O\left(\epsilon^{-2}[\log m + \log(1/\delta)]\right) uniformly preserves these similarities over mm fixed queries. Thus, under uniform independent pair sampling, a finite random RVF map can approximate ranking geometry without materializing all (N2)\binom{N}{2} canonical comparisons. This provides a baseline theoretical justification for comparison subsampling, while the structured selectors considered below depart from this sampling model and are evaluated empirically. Proofs are given in Appendix § 9.

Feature-pair selectors for approximate RVF

For each main anchor i∈Ai \in A, a selector chooses HH distinct rivals Si⊂[N]∖{i}S_i \subset[N] \setminus\{i\} and forms E=⋃i∈A{(i,j):j∈Si}\mathcal{E} = \bigcup_{i \in A}\{(i,j): j \in S_i\}. The selectors below differ only in how these HH rivals are chosen. All are unsupervised and label-agnostic, and aim to use the fixed comparison budget efficiently.

Cosine Diversity selector. For a main anchor ii and candidate jj, let uij=(xj−xi)/∥xj−xi∥2u_{ij} = (x_j - x_i)/\lVert x_j - x_i\rVert_2. The Cosine Diversity selector greedily accepts jj when

max⁡ℓ∈Si∣⟨uij,uiℓ⟩∣<τ,∣Si∣<MF/MC,(26)\max_{\ell\in S_i} \left|\langle u_{ij},u_{i\ell}\rangle\right| < \tau,\qquad|S_i| < M_F/M_C, \tag*{(26)}

for τ∈(0,1)\tau\in(0,1), filling any remaining slots uniformly at random. This discourages nearly parallel comparisons and spreads each cell across more angular directions.

Sparse Dimension selector. The Sparse Dimension selector favors pairs whose differences are concentrated in few coordinates. For dij=∣xi−xj∣∈R≥0dd_{ij} = |x_i - x_j| \in\mathbb{R}_{\ge0}^{d}, score candidates by Hoyer sparsity [16],

sp⁡(dij)=d−∥dij∥1/(∥dij∥2+ϵ)d−1,ϵ>0(27)\operatorname{sp}(d_{ij}) = \frac{\sqrt{d} - \lVert d_{ij}\rVert_1/(\lVert d_{ij}\rVert_2+\epsilon)}{\sqrt{d}-1},\qquad\epsilon> 0 \tag*{(27)}

with the following conventions: set sp⁡(0)=1\operatorname{sp}(0)=1 in every dimension. When d=1d=1 and dij≠0d_{ij}\ne0, set sp⁡(dij)=0\operatorname{sp}(d_{ij})=0. For each ii, the selector chooses the MF/MCM_F/M_C candidates with largest sp⁡(dij)\operatorname{sp}(d_{ij}). These comparisons produce more axis-aligned and interpretable Voronoi hyperplanes.

High Variance selector. The High Variance selector prioritizes comparisons whose bisectors split the empirical data mass. For a candidate pair (i,j)(i,j), define χij(z)=1{∥z−xi∥22≤∥z−xj∥22}\chi_{ij}(z) = 1\{\lVert z-x_i\rVert_2^2 \le\lVert z-x_j\rVert_2^2\}. On a subset Z⊆DZ \subseteq\mathcal{D}, compute

p^ij=∣Z∣−1∑z∈Zχij(z),qij=p^ij(1−p^ij).(28)\widehat{p}_{ij} = |Z|^{-1}\sum_{z\in Z}\chi_{ij}(z),\qquad q_{ij} = \widehat{p}_{ij}(1-\widehat{p}_{ij}). \tag*{(28)}

For each ii, the selector chooses the MF/MCM_F/M_C candidates with largest qijq_{ij}. Since qijq_{ij} is maximized near p^ij=1/2\widehat{p}_{ij}=1/2, selected comparisons tend to cut through the data rather than produce nearly constant activations. The four selectors trade off simplicity, angular coverage, coordinate sparsity, and empirical informativeness under the same budgets MCM_C and MFM_F. Detailed implementations are given in Appendix § 10.

Experimental Results

We evaluate three aspects of RVNs: nearest-neighbor recovery, RVF as a fixed tabular encoding, and geometric interpretability. Experimental details are given in Appendix § 11, with compute resources in Appendix § 11.6.

Equivalence between RVN and 1-NN

We verify that RVF construction selects the same nearest-neighbor index as exact Euclidean 1-NN. For each query xx, we compare i1NN(x)=arg⁡min⁡i∈[N]∥x−xi∥22i_{\mathrm{1NN}}(x) = \arg\min_{i \in[N]} \lVert x - x_i \rVert_2^2, and iRVF(x)=arg⁡max⁡i∈[N]Γi(x)i_{\mathrm{RVF}}(x) = \arg\max_{i \in[N]} \Gamma_i(x), with Acc=1∣Q∣∑x∈Q1{iRVF(x)=i1NN(x)}\mathrm{Acc} = \frac{1}{\lvert Q\rvert} \sum_{x \in Q} \mathbf{1}\{i_{\mathrm{RVF}}(x) = i_{\mathrm{1NN}}(x)\}, where Γi(x)\Gamma_i(x) is the Voronoi-cell score for sample ii.

Consistent with the cell-level approximation theory in § 3.7, Figure 2 shows that increasing the rival budget H=MF/MCH = M_F/M_C improves rank resolution by reducing the chance that a lower-ranked anchor misses closer competitors, while increasing MCM_C increases anchor coverage. Sparse Dimension selection gives substantially better recovery at small rival budgets, showing that structured allocation can identify useful comparisons more efficiently than uniform sampling. All selectors converge to exact 1-NN when both anchor and comparison coverage become complete.

Index-matching accuracy and accuracy heatmap for RVNs

Figure 2. RVNs recover exact nearest-neighbor indices. Left: index-matching accuracy versus H=MF/MCH = M_F/M_C; Sparse Dimension performs best at small budgets, while all selectors converge to exact agreement. Right: accuracy versus MCM_C and HH, reaching 1 as both approach full coverage.

Random Voronoi Feature Encoding

We next evaluate RVF as a fixed, label-agnostic, data-dependent encoding for supervised tabular learning. Given an encoder T:Rd→Rq\mathcal{T} : \mathbb{R}^d \to\mathbb{R}^q, we train downstream predictors on transformed inputs T(x)\mathcal{T}(x). We compare raw inputs, Random Fourier Features (RFF) [22], Random ReLU Features (RRF) [17], Nyström RBF Features (RBF), and two RVF variants:

TRVF(x)=ΦReLU(x),\mathcal{T}_{\mathrm{RVF}}(x) = \Phi^{\mathrm{ReLU}}(x),
TRVF+VC(x)=[ΦReLU(x);ΓReLU,ε(x)].(29)\mathcal{T}_{\mathrm{RVF+VC}}(x) = [\Phi^{\mathrm{ReLU}}(x); \Gamma^{\mathrm{ReLU},\varepsilon}(x)]. \tag*{(29)}

RVF uses the pairwise ReLU margins ΦReLU\Phi^{\mathrm{ReLU}}, while RVF+VC additionally includes the aggregated cell representation ΓReLU,ε\Gamma^{\mathrm{ReLU},\varepsilon}. We evaluate on TabArena-Lite [10] with ElasticNet, TorchMLP, and TabM-Mini [14]; TabR [13] and ModernNCA [30] are included as specialized learned neighborhood-model references. Full protocol details are given in Appendix § 11.

Figure 3 shows that RVF-based encoders achieve the strongest aggregate rankings among the evaluated feature maps. ElasticNet benefits strongly, indicating that RVF makes useful local structure more linearly accessible. Interestingly, ModernNCA and TabR, which employ learned neighborhood representations, achieve performance comparable to ElasticNet with RVF. We view this comparison as indication that RVF can inject a strong local geometric bias into non-specialized models.

Aggregate Elo across downstream models and ElasticNet Elo versus feature budget

Figure 3. RVFs improve downstream tabular performance. Left: aggregate Elo across downstream models show that RVF encodings outperform benchmark feature maps. Right: ElasticNet Elo versus feature count compared to raw baseline, showing an early performance elbow and efficient data-dependent encoding.

The feature-budget curve further shows a strong performance elbow with comparatively few encoded features. Overall, these results support the role of RVF as a reusable representation rather than merely a neural reproduction of Euclidean kk-NN. A classifier-versus-encoder ablation is reported in Appendix § 11.§ 2, and individual dataset results are shown in Appendix § 11.§ 1.

Interpretability of Random Voronoi Features

RVFs support interpretation at both global and query-specific levels, since each coordinate corresponds to a reference pair (xi,xj)(x_i,x_j), with comparison direction vij=xj−xiv_{ij}=x_j-x_i and bisector midpoint mij=(xi+xj)/2m_{ij}=(x_i+x_j)/2. For a linear classifier with class scores sc(x)=bc+∑eβc,eze(x)s_c(x)=b_c+\sum_e\beta_{c,e}z_e(x), where ze(x)z_e(x) denotes the encoded feature supplied to the classifier, coefficient magnitudes ∣βc,e∣|\beta_{c,e}| identify globally influential comparisons, while ac,e(x)=βc,eze(x)a_{c,e}(x)=\beta_{c,e}z_e(x) gives each comparison’s signed contribution to the score for a particular query.

Figure 4 illustrates both levels. On moons, we display the comparisons with the largest coefficient magnitudes, revealing global directions concentrated near discriminative regions. On MNIST, a simple logistic regression model trained on RVF features reaches 91% accuracy. We select the feature with the largest absolute contribution ∣ac^,e(x)∣|a_{\hat{c},e}(x)| to the predicted class score for each displayed query, and visualize its reference pair and signed image difference. The strongest feature often contains an anchor from the same class as the query, providing a visually meaningful local comparison. Vision-specific modeling is outside our scope, but this experiment illustrates that RVF-based encodings are inherently inspectable: predictions can be decomposed into sample-pair comparisons and local directions.

RVF interpretability: moons directions and MNIST query examples

Figure 4. RVF interpretability. Left: top 15 logistic-regression RVFs on moons, shown as directions vij=xj−xiv_{ij}=x_j-x_i at midpoints mijm_{ij}; influential features concentrate near discriminative regions and align with class separation. Right: MNIST examples showing the highest-contributing RVF for each query.

Limitations and Conclusion

RVNs benefit from locality, making them useful for piecewise or prototype-like tasks and naturally interpretable through sample-pair comparisons. However, they can suffer in high dimensions and scale poorly if all pairwise anchor comparisons are materialized. Practical variants should use better representations or metrics, subsampling, pruning, distance-based computation, or approximate comparisons. Future extensions include learned Mahalanobis metrics, anisotropic cells, and task-adaptive selectors to better align Voronoi partitions with real tabular data geometry.

Random Voronoi Networks provide a structured neural formulation of nearest-neighbor geometry through pairwise affine comparisons and Voronoi-cell aggregation. Step RVNs recover Euclidean kk-NN at the full-comparison endpoint, while ReLU RVNs provide a differentiable 1-NN relaxation. Budgeted RVFs retain this geometry with far fewer comparisons and improve downstream tabular models while remaining interpretable. Overall, RVNs connect nearest-neighbor methods, random features, and neural networks through a common Voronoi construction.

AI Use Statement

AI tools were used to assist with drafting, editing, and improving the presentation of this manuscript, including refinement of prose, organization, and mathematical formulation. All content, claims, derivations, and results were reviewed and verified by the authors who take full responsibility for the accuracy and content of the paper.

RVN Formulation

The kk-nearest-neighbor hypothesis class

Let DN={(xi,ti)}i=1N\mathcal{D}_N = \{(x_i,t_i)\}_{i=1}^N be a reference dataset with xi∈Rdx_i \in\mathbb{R}^d and ti∈Rpt_i \in\mathbb{R}^p, and write X=(x1,…,xN)X = (x_1,\ldots,x_N) and T=(t1,…,tN)T = (t_1,\ldots,t_N). For a query x∈Rdx \in\mathbb{R}^d, let (i1(x),…,iN(x))(i_1(x),\ldots,i_N(x)) be the deterministic ordering of the reference points by increasing squared Euclidean distance to xx, breaking distance ties by increasing dataset index, and define Nk(x;X):={i1(x),…,ik(x)}\mathcal{N}_k(x;X) := \{i_1(x),\ldots,i_k(x)\}. The Euclidean kk-NN predictor is

fkNN,DN(x):=1k∑i∈Nk(x;X)ti.(30)f_{k\mathrm{NN},\mathcal{D}_N}(x) := \frac{1}{k}\sum_{i\in\mathcal{N}_k(x;X)} t_i. \tag*{(30)}

For regression this is the average response among the kk nearest reference points. For classification with one-hot labels, it gives empirical class frequencies and predicts y^(x)=arg maxℓ∈[p][fkNN,DN(x)]ℓ\hat{y}(x) = \mathop{\rm arg\,max}_{\ell\in[p]}[f_{k\mathrm{NN},\mathcal{D}_N}(x)]_\ell. The case k=1k=1 is the usual Voronoi-cell nearest-neighbor rule.

For a fixed dataset DN\mathcal{D}_N, the expression above defines one predictor. The corresponding NN-site Euclidean kk-nearest-neighbor hypothesis class is obtained by allowing both the reference sites and their attached values to vary:

HkNNN,d,p:={x↦1k∑i∈Nk(x;X)ti: X∈(Rd)N, T∈(Rp)N}.(31)\mathcal{H}_{k\mathrm{NN}}^{N,d,p}:=\left\{x\mapsto\frac{1}{k}\sum_{i\in\mathcal{N}_k(x;X)}t_i:\ X\in(\mathbb{R}^d)^N,\ T\in(\mathbb{R}^p)^N\right\}. \tag*{(31)}

The unrestricted, nonparametric kk-NN class allows the number of reference sites to vary:

HkNNd,p:=⋃N≥kHkNNN,d,p.(32)\mathcal{H}_{k\mathrm{NN}}^{d,p}:=\bigcup_{N\ge k}\mathcal{H}_{k\mathrm{NN}}^{N,d,p}. \tag*{(32)}

For binary classification with d≥1d\ge1 and k≥1k\ge1 (denoting the resulting binary classifier class by HkNN,bind\mathcal{H}_{k\mathrm{NN},\mathrm{bin}}^d), this unrestricted class has infinite VC dimension. Indeed, given any m≥1m\ge1 distinct points z1,…,zm∈Rdz_1,\ldots,z_m\in\mathbb{R}^d and any binary labeling, place kk reference sites sufficiently close to each zjz_j, all with the prescribed label of zjz_j, choosing the neighborhoods disjoint. Then the kk nearest neighbors of each zjz_j are exactly its local reference sites, so the classifier realizes the prescribed labeling. Since this shatters finite sets of arbitrary size,

VCdim⁡(HkNN,bind)=∞.(33)\operatorname{VCdim}(\mathcal{H}_{k\mathrm{NN},\mathrm{bin}}^d)=\infty. \tag*{(33)}

This standard shattering argument is often cited as the reason that unrestricted nearest-neighbor classifiers have infinite VC dimension; see, for example, [25].

Three-layer MLPs RVN Hypothesis Class

This appendix subsection makes explicit the hypothesis class induced by the three-layer Random Voronoi Network (RVN) construction. The purpose is to separate three sources of variation: the choice of anchors, the choice of sampled Voronoi comparisons, and the free readout parameters. Throughout, the reference dataset

DN={(xi,ti)}i=1N\mathcal{D}_N=\{(x_i,t_i)\}_{i=1}^N

is fixed. Let A⊆[N]A\subseteq[N] denote the selected anchor indices, with ∣A∣=MC|A|=M_C, and let

E⊂{(i,j):i∈A, j∈[N]∖{i}},∣E∣=MF,\mathcal{E}\subset\{(i,j):i\in A,\ j\in[N]\setminus\{i\}\},\qquad|\mathcal{E}|=M_F,

denote the selected ordered comparison graph. The hidden-layer parameters of the RVN are determined by (A,E)(A,\mathcal{E}) and the Euclidean geometry of the anchor points. The only trainable, or freely chosen, parameters in the class below are the readout weights and biases. For an activation choice σ\sigma and neighborhood parameter kk, define

HRVNσ,k(DN;MC,MF):={fA,E,Θσ,k:A⊆[N], ∣A∣=MC,E⊂A×[N], ∣E∣=MF,i≠j for all (i,j)∈E,Θ=(W(3),b(3))∈Rp×MC×Rp}.(34)\mathcal{H}_{\mathrm{RVN}}^{\sigma,k}(D_N;M_C,M_F) :=\left\{f_{A,\mathcal{E},\Theta}^{\sigma,k}: \begin{aligned} &A\subseteq[N],\ |A|=M_C,\\ &\mathcal{E}\subset A\times[N],\ |\mathcal{E}|=M_F,\\ &i\ne j\text{ for all }(i,j)\in\mathcal{E},\\ &\Theta=(W^{(3)},b^{(3)})\in\mathbb{R}^{p\times M_C}\times\mathbb{R}^{p} \end{aligned} \right\}. \tag*{(34)}

Each function in the class has the three-layer form

fA,E,Θσ,k(x)=W(3)ΓA,Eσ,k(x)+b(3),(35)f_{A,\mathcal{E},\Theta}^{\sigma,k}(x)=W^{(3)}\Gamma_{A,\mathcal{E}}^{\sigma,k}(x)+b^{(3)}, \tag*{(35)}

where the feature layer computes sampled Voronoi comparisons and the cell layer aggregates those comparisons into anchor-level activations. Thus the class is a structured subfamily of three-layer MLPs: it has the same input–hidden–hidden–output architecture as a standard MLP, but the first two layers are not arbitrary parameters. They are fixed by the selected anchors and by the selected comparison graph.

The quantity MCM_C controls the number of prototype cells available to the network, while MFM_F controls the number of pairwise Voronoi constraints used to define those cells. In the full-anchor and full-comparison case,

A=[N],Efull={(i,j)∈[N]×[N]:i≠j},A=[N],\qquad\mathcal{E}_{\mathrm{full}}=\{(i,j)\in[N]\times[N]:i\ne j\},

the step version recovers the usual Euclidean kk-nearest-neighbor rule, up to the deterministic tie convention. For strict statements below, we work away from distance ties, or equivalently assume a fixed perturbation or tie-breaking rule.

Step RVN

The step RVN is the hard-cell version of the construction. It uses the Heaviside activation

H(u)=1{u≥0}H(u)=\mathbf{1}\{u\ge0\}

in both hidden layers. For each ordered comparison pair (i,j)∈E(i,j)\in\mathcal{E}, the first layer computes the binary Voronoi comparison

Φijstep(x)=H(∥x−xj∥22−∥x−xi∥22)=1{∥x−xi∥22≤∥x−xj∥22}.(36)\Phi_{ij}^{\mathrm{step}}(x)=H\left(\lVert x-x_j\rVert_2^2-\lVert x-x_i\rVert_2^2\right) =\mathbf{1}\left\{\lVert x-x_i\rVert_2^2\le\lVert x-x_j\rVert_2^2\right\}. \tag*{(36)}

Thus Φijstep(x)=1\Phi_{ij}^{\mathrm{step}}(x)=1 exactly when anchor xix_i is no farther than anchor xjx_j in distance to the query.

For each anchor i∈Ai\in A, write

Ei:={j∈[N]∖{i}:(i,j)∈E},di:=∣Ei∣.\mathcal{E}_i:=\{j\in[N]\setminus\{i\}:(i,j)\in\mathcal{E}\},\qquad d_i:=|\mathcal{E}_i|.

The second layer sums the sampled wins of anchor ii and thresholds the result:

Γistep,k(x)=H(∑j∈EiΦijstep(x)−di+k−12).(37)\Gamma_i^{\mathrm{step},k}(x) =H\left(\sum_{j\in\mathcal{E}_i}\Phi_{ij}^{\mathrm{step}}(x)-d_i+k-\frac{1}{2}\right). \tag*{(37)}

Equivalently, if

Li(x;Ei):=∑j∈Ei1{∥x−xj∥22<∥x−xi∥22}L_i(x;\mathcal{E}_i):=\sum_{j\in\mathcal{E}_i}\mathbf{1}\left\{\lVert x-x_j\rVert_2^2<\lVert x-x_i\rVert_2^2\right\}

denotes the number of sampled rivals that are strictly closer to xx than xix_i, then, away from distance ties and k≥1k\ge1,

Γistep,k(x)=1{Li(x;Ei)≤k−1}.(38)\Gamma_i^{\mathrm{step},k}(x)=\mathbf{1}\{L_i(x;\mathcal{E}_i)\le k-1\}. \tag*{(38)}

Hence a step cell is active exactly when its anchor loses to at most k−1k-1 sampled rivals. For k=1k=1, this is the sampled hard Voronoi-cell condition. For general kk, it is a sampled top-kk condition.

The canonical kk-NN readout attaches the target value tit_i to the cell for anchor ii:

W:,i(3),step,k=1kti,b(3),step,k=0,(39)W^{(3),\mathrm{step},k}_{:,i}=\frac{1}{k}t_i,\qquad b^{(3),\mathrm{step},k}=0, \tag*{(39)}

which gives

fA,EAstep,k(x)=1k∑i∈AΓistep,k(x)ti.(40)f^{\mathrm{step},k}_{A,\mathcal{E}_A}(x)=\frac{1}{k}\sum_{i\in A}\Gamma_i^{\mathrm{step},k}(x)t_i. \tag*{(40)}

When the comparison graph is exactly EA={(i,j):i,j∈A, i≠j}\mathcal{E}_A=\{(i,j):i,j\in A,\ i\ne j\}, 1≤k≤MC1\le k\le M_C, and distances to the selected anchors are pairwise distinct, exactly the anchors whose distance rank among AA is at most kk are active. Therefore,

fA,EAstep,k(x)=1k∑i∈Nk(x;A)ti,(41)f^{\mathrm{step},k}_{A,\mathcal{E}_A}(x)=\frac{1}{k}\sum_{i\in\mathcal{N}_k(x;A)}t_i, \tag*{(41)}

where Nk(x;A)\mathcal{N}_k(x;A) denotes the kk nearest anchors to xx among the selected anchor set AA. In particular, if A=[N]A=[N] and all ordered comparisons are included, the step RVN exactly realizes the Euclidean kk-nearest-neighbor predictor on DN\mathcal{D}_N.

Allowing arbitrary readout parameters Θ=(W(3),b(3))\Theta=(W^{(3)},b^{(3)}) gives the full hypothesis class in (34). The canonical readout above is the particular member that recovers the usual kk-NN averaging rule.

ReLU RVN

The ReLU RVN is a soft-cell relaxation of the hard Voronoi rule. Instead of recording whether a comparison is won or lost, the first layer records the amount by which the comparison for anchor ii is violated. For each ordered pair (i,j)∈E(i,j)\in\mathcal{E}, define

ΦijReLU(x)=ReLU⁡(∥x−xi∥22−∥x−xj∥22).(42)\Phi^{\mathrm{ReLU}}_{ij}(x)=\operatorname{ReLU}\left(\lVert x-x_i\rVert_2^2-\lVert x-x_j\rVert_2^2\right). \tag*{(42)}

Then ΦijReLU(x)=0\Phi^{\mathrm{ReLU}}_{ij}(x)=0 whenever xix_i is at least as close to xx as xjx_j is, and it is positive precisely when xjx_j beats xix_i. The value of the feature is the nonnegative part of the signed violation margin.

For each anchor i∈Ai\in A, the accumulated sampled violation is

Vi(x):=∑j∈EiΦijReLU(x).(43)V_i(x):=\sum_{j\in\mathcal{E}_i}\Phi^{\mathrm{ReLU}}_{ij}(x). \tag*{(43)}

Thus Vi(x)=0V_i(x)=0 when all sampled Voronoi inequalities for anchor ii are satisfied, and Vi(x)V_i(x) increases as the query moves outside the sampled cell of anchor ii. With gate width ε>0\varepsilon>0, the ReLU cell activation is

ΓiReLU,ε(x)=ReLU⁡(1−Vi(x)ε).(44)\Gamma_i^{\mathrm{ReLU},\varepsilon}(x)=\operatorname{ReLU}\left(1-\frac{V_i(x)}{\varepsilon}\right). \tag*{(44)}

This cell equals one when the sampled comparisons for anchor ii are all satisfied, decays linearly for accumulated violations between 0 and ε\varepsilon, and vanishes once Vi(x)≥εV_i(x)\ge\varepsilon.

The ReLU RVN readout is affine:

fA,E,ΘReLU,ε(x)=W(3)ΓA,EReLU,ε(x)+b(3).(45)f^{\mathrm{ReLU},\varepsilon}_{A,\mathcal{E},\Theta}(x)=W^{(3)}\Gamma^{\mathrm{ReLU},\varepsilon}_{A,\mathcal{E}}(x)+b^{(3)}. \tag*{(45)}

The canonical nearest-neighbor readout uses

W:,i(3),ReLU=ti,b(3),ReLU=0,W^{(3),\mathrm{ReLU}}_{:,i}=t_i,\qquad b^{(3),\mathrm{ReLU}}=0,

so that

fA,EReLU,ε(x)=∑i∈AΓiReLU,ε(x)ti.(46)f^{\mathrm{ReLU},\varepsilon}_{A,\mathcal{E}}(x)=\sum_{i\in A}\Gamma_i^{\mathrm{ReLU},\varepsilon}(x)t_i. \tag*{(46)}

When the comparison graph is complete over AA with EA={(i,j):i,j∈A, i≠j}\mathcal{E}_A=\{(i,j):i,j\in A,\ i\ne j\}, the only anchor with zero accumulated violation is the nearest anchor, provided there are no distance ties. Hence, as ε→0+\varepsilon\to0^+, the ReLU RVN selects the same cell as the hard 1-nearest-neighbor rule:

lim⁡ε→0+ΓiReLU,ε(x)=1{i=arg min⁡ℓ∈A ∥x−xℓ∥22}.(47)\lim_{\varepsilon\to0^+}\Gamma_i^{\mathrm{ReLU},\varepsilon}(x)=\mathbf{1}\left\{i=\underset{\ell\in A}{\operatorname{arg\,min}}\ \lVert x-x_\ell\rVert_2^2\right\}. \tag*{(47)}

again away from ties. Consequently, with the canonical readout,

lim⁡ε→0+fA,EAReLU,ε(x)=targ mini∈A∥x−xi∥22.(48)\lim_{\varepsilon\to0^{+}} f^{\mathrm{ReLU},\varepsilon}_{A,\mathcal{E}_A}(x) = t_{\mathop{\mathrm{arg\,min}}\limits_{i \in A}} \lVert x-x_i\rVert_2^2. \tag*{(48)}

If A=[N]A=[N], this is exactly the Euclidean 1-nearest-neighbor predictor on the full reference dataset.

Thus the ReLU RVN is a standard three-layer ReLU MLP realization of Voronoi geometry: the first hidden layer computes violation margins for sampled bisectors, the second hidden layer converts accumulated violations into soft cell activations, and the readout layer combines the targets or logits attached to the active cells. Unlike the step RVN, which directly realizes hard top-kk selection, the ReLU construction is most naturally interpreted as a soft nearest-cell relaxation whose zero-width limit recovers 1-NN.

Proofs of the main statements

Proof of Theorem 3.1

Theorem 3.1 (restated). Fix a reference dataset DN={(xi,ti)}i=1N\mathcal{D}_N=\{(x_i,t_i)\}_{i=1}^{N} and 1≤k≤N1 \le k \le N. If A=[N]A=[N] and

Efull={(i,j):i,j∈[N], i≠j},\mathcal{E}_{\mathrm{full}}=\{(i,j):i,j\in[N],\ i\ne j\},

then the step RVN with canonical readout W:,i(3)=ti/kW^{(3)}_{:,i}=t_i/k and b(3)=0b^{(3)}=0 satisfies

fRVNstep,k(x)=fkNN,DN(x)f_{\mathrm{RVN}}^{\mathrm{step},k}(x)=f_{k\mathrm{NN},\mathcal{D}_N}(x)

for every xx with no distance ties.

Proof. Fix ΩX⊂Rd\Omega_X\subset\mathbb{R}^{d} denoting the set of query points with no distance ties among the reference samples, and take A=[N]A=[N] and E=Efull\mathcal{E}=\mathcal{E}_{\mathrm{full}}. If N=1N=1, necessarily k=1k=1 and there are no comparisons. The step-cell activation is Γ1step,1(x)=σH(1/2)=1\Gamma^{\mathrm{step},1}_{1}(x)=\sigma_H(1/2)=1, so the result is immediate. Henceforth assume N≥2N\ge2.

Let ri(x)r_i(x) denote the Euclidean distance rank of xix_i among x1,…,xNx_1,\ldots,x_N, with ri(x)=1r_i(x)=1 for the nearest reference sample. Because x∈ΩXx\in\Omega_X, there are no distance ties. For the step Voronoi feature,

Φijstep(x)=1{∥x−xi∥22≤∥x−xj∥22}.\Phi^{\mathrm{step}}_{ij}(x)=\mathbf{1}\{\lVert x-x_i\rVert_2^2\le\lVert x-x_j\rVert_2^2\}.

Hence xix_i beats exactly the N−ri(x)N-r_i(x) reference samples that are farther from xx than xix_i is:

∑j∈[N]j≠iΦijstep(x)=N−ri(x).(49)\sum_{\substack{j\in[N]\\j\ne i}}\Phi^{\mathrm{step}}_{ij}(x)=N-r_i(x). \tag*{(49)}

In the full-comparison regime, di=N−1d_i=N-1. Substituting (49) into the step cell layer yields

Γistep,k(x)=σH(∑j≠iΦijstep(x)−di+k−12)(50)\Gamma_i^{\mathrm{step},k}(x)=\sigma_H\left(\sum_{j\ne i}\Phi^{\mathrm{step}}_{ij}(x)-d_i+k-\frac{1}{2}\right) \tag*{(50)}
=σH(N−ri(x)−(N−1)+k−12)(51)=\sigma_H\left(N-r_i(x)-(N-1)+k-\frac{1}{2}\right) \tag*{(51)}
=σH(k+12−ri(x)).(52)=\sigma_H\left(k+\frac{1}{2}-r_i(x)\right). \tag*{(52)}

Since ri(x)r_i(x) is integer-valued,

Γistep,k(x)=1⟺ri(x)≤k.(53)\Gamma_i^{\mathrm{step},k}(x)=1\quad\Longleftrightarrow\quad r_i(x)\le k. \tag*{(53)}

Therefore, the active step RVN cells are exactly the kk nearest neighbors of xx.

With readout

W:,i(3),step,k=tik,b(3),step,k=0,W^{(3),\mathrm{step},k}_{:,i}=\frac{t_i}{k},\qquad b^{(3),\mathrm{step},k}=0,

the RVN output is

fRVNstep,k(x)=1k∑i=1NΓistep,k(x)ti(54)f_{\mathrm{RVN}}^{\mathrm{step},k}(x)=\frac{1}{k}\sum_{i=1}^{N}\Gamma_i^{\mathrm{step},k}(x)t_i \tag*{(54)}
=1k∑i∈Nk(x;X)ti(55)=\frac{1}{k}\sum_{i\in\mathcal{N}_k(x;\mathcal{X})}t_i \tag*{(55)}
=fkNN,DN(x).(56)=f_{k\mathrm{NN},D_N}(x). \tag*{(56)}

This proves the theorem.

Proof of Theorem 3.2

Theorem 3.2 (restated). Fix a reference dataset DN={(xi,ti)}i=1N\mathcal{D}_N=\{(x_i,t_i)\}_{i=1}^{N} with N≥1N\geq1. Suppose A=[N]A=[N] and

E=Efull={(i,j):i,j∈[N], i≠j},\mathcal{E}=\mathcal{E}_{\mathrm{full}}=\{(i,j):i,j\in[N],\ i\ne j\},

and use the canonical readout W:,i(3)=tiW_{:,i}^{(3)}=t_i, b(3)=0b^{(3)}=0.

Fix x∈ΩXx\in\Omega_X. For N≥2N\geq2, let

Δ(x)=∥x−xi2(x)∥22−∥x−xi1(x)∥22\Delta(x)=\lVert x-x_{i_2(x)}\rVert_2^2-\lVert x-x_{i_1(x)}\rVert_2^2

be the squared-distance gap between the nearest and second-nearest reference samples. Then

fRVNReLU,ε(x)=f1NN,DN(x)f_{\mathrm{RVN}}^{\mathrm{ReLU},\varepsilon}(x)=f_{1\mathrm{NN},D_N}(x)

for every 0<ε≤Δ(x)0<\varepsilon\leq\Delta(x).

If N=1N=1, this equality holds for every ε>0\varepsilon>0. Consequently, for every x∈ΩXx\in\Omega_X,

lim⁡ε→0+fRVNReLU,ε(x)=f1NN,DN(x).\lim_{\varepsilon\to0^+}f_{\mathrm{RVN}}^{\mathrm{ReLU},\varepsilon}(x)=f_{1\mathrm{NN},D_N}(x).

Proof. Fix x∈ΩXx\in\Omega_X, and take A=[N]A=[N] and E=Efull\mathcal{E}=\mathcal{E}_{\mathrm{full}}.

If N=1N=1, there are no comparisons, so V1(x)=0V_1(x)=0 and Γ1ReLU,ε(x)=1\Gamma_1^{\mathrm{ReLU},\varepsilon}(x)=1 for every ε>0\varepsilon>0. The canonical readout therefore gives fRVNReLU,ε(x)=t1=f1NN,D1(x)f_{\mathrm{RVN}}^{\mathrm{ReLU},\varepsilon}(x)=t_1=f_{1\mathrm{NN},D_1}(x). Henceforth assume N≥2N\geq2.

Let

i⋆(x)=arg⁡min⁡i∈[N] ∥x−xi∥22i^\star(x)=\underset{i\in[N]}{\arg\min}\ \lVert x-x_i\rVert_2^2

be the unique nearest neighbor of xx. The ReLU Voronoi feature records the amount by which the comparison for anchor ii is violated:

ΦijReLU(x)=ReLU⁡(−hij(x)),\Phi_{ij}^{\mathrm{ReLU}}(x)=\operatorname{ReLU}(-h_{ij}(x)),
hij(x)=∥x−xj∥22−∥x−xi∥22.h_{ij}(x)=\lVert x-x_j\rVert_2^2-\lVert x-x_i\rVert_2^2.

For the nearest anchor i⋆(x)i^\star(x),

∥x−xi⋆∥22<∥x−xj∥22for all j≠i⋆.\lVert x-x_{i^\star}\rVert_2^2<\lVert x-x_j\rVert_2^2 \qquad\text{for all }j\ne i^\star.

Therefore hi⋆j(x)>0h_{i^\star j}(x)>0 and

Φi⋆jReLU(x)=0for all j≠i⋆.\Phi_{i^\star j}^{\mathrm{ReLU}}(x)=0 \qquad\text{for all }j\ne i^\star.

Its accumulated violation is therefore

Vi⋆(x)=∑j≠i⋆Φi⋆jReLU(x)=0.(57)V_{i^\star}(x)=\sum_{j\ne i^\star}\Phi_{i^\star j}^{\mathrm{ReLU}}(x)=0. \tag*{(57)}

Now take any i≠i⋆(x)i\ne i^\star(x). Since the comparison graph is complete, the comparison (i,i⋆)(i,i^\star) is present. Moreover,

hii⋆(x)=∥x−xi⋆∥22−∥x−xi∥22<0.h_{ii^\star}(x)=\lVert x-x_{i^\star}\rVert_2^2-\lVert x-x_i\rVert_2^2<0.

Hence

Φii⋆ReLU(x)=∥x−xi∥22−∥x−xi⋆∥22>0.\Phi_{ii^\star}^{\mathrm{ReLU}}(x)=\lVert x-x_i\rVert_2^2-\lVert x-x_{i^\star}\rVert_2^2>0.

Thus every non-nearest anchor has strictly positive accumulated violation:

Vi(x)=∑j≠iΦijReLU(x)≥Φii⋆ReLU(x)>0,i≠i⋆(x).(58)V_i(x)=\sum_{j\ne i}\Phi_{ij}^{\mathrm{ReLU}}(x)\ge\Phi_{ii^\star}^{\mathrm{ReLU}}(x)>0,\qquad i\ne i^\star(x). \tag*{(58)}

Since i2(x)i_2(x) is the second-nearest reference sample, for every i≠i⋆(x)i\ne i^\star(x) we have

Vi(x)≥Φii⋆ReLU(x)=∥x−xi∥22−∥x−xi⋆∥22≥Δ(x).V_i(x)\ge\Phi_{ii^\star}^{\mathrm{ReLU}}(x)=\lVert x-x_i\rVert_2^2-\lVert x-x_{i^\star}\rVert_2^2\ge\Delta(x).

The second-nearest anchor loses only to the nearest anchor, so Vi2(x)(x)=Δ(x)V_{i_2(x)}(x)=\Delta(x). Thus, for every 0<ε≤Δ(x)0<\varepsilon\le\Delta(x), the ReLU gate gives Γi⋆ReLU,ε(x)=1\Gamma_{i^\star}^{\mathrm{ReLU},\varepsilon}(x)=1 and ΓiReLU,ε(x)=0\Gamma_i^{\mathrm{ReLU},\varepsilon}(x)=0 for every i≠i⋆(x)i\ne i^\star(x). The canonical readout therefore satisfies

fRVNReLU,ε(x)=ti⋆(x)=f1NN,DN(x).f_{\mathrm{RVN}}^{\mathrm{ReLU},\varepsilon}(x)=t_{i^\star(x)}=f_{1\mathrm{NN},D_N}(x).

Since Δ(x)>0\Delta(x)>0, the limit as ε→0+\varepsilon\to0^+ follows.

Budgeted Approximation: Proofs

Sampled comparisons control top-kk activation

Proposition 3.3 (restated). For a main anchor i∈Ai\in A, sample Ei⊆[N]∖{i}\mathcal{E}_i\subseteq[N]\setminus\{i\} uniformly without replacement with ∣Ei∣=H|\mathcal{E}_i|=H. If riX(x)r_i^X(x) is the full-reference rank defined in Equation (16), then

Li(x;Ei)∼Hypergeom⁡(N−1,riX(x)−1,H),L_i(x;\mathcal{E}_i)\sim\operatorname{Hypergeom}(N-1,r_i^X(x)-1,H),

and Γistep,k(x)=1\Gamma_i^{\mathrm{step},k}(x)=1 exactly when Li(x;Ei)≤k−1L_i(x;\mathcal{E}_i)\le k-1.

Proof. Fix an input x∈Rdx\in\mathbb{R}^d and a main anchor ii. Write r:=riX(x)r:=r_i^X(x). By definition of full-reference rank, exactly r−1r-1 of the N−1N-1 possible rivals are strictly closer to xx than xix_i, while the remaining N−rN-r rivals are at least as far from xx as xix_i.

The set Ei\mathcal{E}_i is drawn uniformly from all (N−1H)\binom{N-1}{H} subsets of HH rivals. The loss count Li(x;Ei)L_i(x;\mathcal{E}_i) records how many of the sampled rivals come from the r−1r-1 closer reference points. To obtain exactly ℓ\ell losses, the sample must contain ℓ\ell of those r−1r-1 closer points and H−ℓH-\ell of the N−rN-r non-closer points. The number of such rival sets is therefore

(r−1ℓ)(N−rH−ℓ).\binom{r-1}{\ell}\binom{N-r}{H-\ell}.

Dividing by the total number of size-HH rival sets gives

P(Li(x;Ei)=ℓ)=(riX(x)−1ℓ)(N−riX(x)H−ℓ)(N−1H),(59)\mathbb{P}\bigl(L_i(x;\mathcal{E}_i)=\ell\bigr)=\frac{\binom{r_i^X(x)-1}{\ell}\binom{N-r_i^X(x)}{H-\ell}}{\binom{N-1}{H}}, \tag*{(59)}

with infeasible binomial coefficients interpreted as zero. This is exactly the probability mass function of Hypergeom⁡(N−1,riX(x)−1,H)\operatorname{Hypergeom}(N-1,r_i^X(x)-1,H).

By Equation (17) and the step-cell rule, Γistep,k(x)=1\Gamma_i^{\mathrm{step},k}(x)=1 iff Li(x;Ei)≤k−1L_i(x;\mathcal{E}_i)\le k-1. Hence

P(Γistep,k(x)=1)=∑ℓ=0min⁡{k−1,H}(riX(x)−1ℓ)(N−riX(x)H−ℓ)(N−1H).(60)\mathbb{P}\bigl(\Gamma_i^{\mathrm{step},k}(x)=1\bigr)=\sum_{\ell=0}^{\min\{k-1,H\}}\frac{\binom{r_i^X(x)-1}{\ell}\binom{N-r_i^X(x)}{H-\ell}}{\binom{N-1}{H}}. \tag*{(60)}

If riX(x)≤kr_i^X(x)\le k, at most k−1k-1 closer reference points exist, so the cell is active for every possible rival sample. At the complete rival budget H=N−1H=N-1, all possible rivals are observed and Li(x;Ei)=riX(x)−1L_i(x;\mathcal{E}_i)=r_i^X(x)-1 deterministically; therefore the selected main anchor is active exactly when its global reference rank is at most kk.

Comparison budget controls effective neighborhood size

Corollary 3.4 (restated). Fix k≥1k \ge1, 1≤MC≤N1 \le M_C \le N, and 0≤H≤N−10 \le H \le N - 1. Suppose AA is sampled uniformly from [N][N] with ∣A∣=MC|A| = M_C, and for each i∈Ai \in A, HH rivals are sampled uniformly from [N]∖{i}[N] \setminus\{i\}. Assume that the reference samples have pairwise distinct distances to the query xx. Then

E[SHk(x)]=MCmin⁡{k,H+1}H+1.\mathbb{E}[S_H^k(x)] = M_C \frac{\min\{k,H+1\}}{H+1}.

For H≥k−1H \ge k - 1, keff=E[SHk(x)]=MCk/(H+1)=MC2k/(MF+MC)k_{\mathrm{eff}} = \mathbb{E}[S_H^k(x)] = M_C k/(H+1) = M_C^2 k/(M_F + M_C).

Proof. After sampling the main-anchor set AA, let II be an index chosen uniformly from the MCM_C elements of AA. Since AA itself is a uniformly sampled size-MCM_C subset of [N][N], II is marginally uniform on the full reference set:

P(I=i)=P(i∈A)P(I=i∣i∈A)=MCN1MC=1N.\mathbb{P}(I=i)=\mathbb{P}(i\in A)\mathbb{P}(I=i\mid i\in A)=\frac{M_C}{N}\frac{1}{M_C}=\frac{1}{N}.

Conditional on I=iI=i, its rival set EI\mathcal{E}_I is a uniformly sampled size-HH subset of [N]∖{i}[N]\setminus\{i\}. Let B:={I}∪EIB := \{I\} \cup\mathcal{E}_I, so ∣B∣=H+1|B| = H + 1. For any fixed subset B⊂[N]B \subset[N] of size H+1H + 1 and any i∈Bi \in B,

P(B,I=i)=1N1(N−1H)=1(NH+1)1H+1,\mathbb{P}(B,I=i)=\frac{1}{N}\frac{1}{\binom{N-1}{H}}=\frac{1}{\binom{N}{H+1}}\frac{1}{H+1},

where the second equality follows from (NH+1)=NH+1(N−1H)\binom{N}{H+1}=\frac{N}{H+1}\binom{N-1}{H}. Thus BB is uniformly distributed over all (H+1)(H+1)-subsets of the reference set and, conditional on BB, the distinguished main anchor II is uniform over the H+1H+1 elements of BB.

Order the elements of BB by increasing distance to xx. Away from ties, one element occupies each relative rank in {1,…,H+1}\{1,\ldots,H+1\}. Because II is uniform on BB, its relative rank RB(I)R_B(I) is uniform:

P(RB(I)=r∣B)=1H+1,r=1,…,H+1.\mathbb{P}(R_B(I)=r\mid B)=\frac{1}{H+1},\qquad r=1,\ldots,H+1.

The sampled loss count is exactly RB(I)−1R_B(I)-1, since every element of BB ranked before II is one sampled rival closer to xx. Therefore

ΓIstep,k(x)=1⟺RB(I)−1≤k−1⟺RB(I)≤k.\Gamma_I^{\mathrm{step},k}(x)=1 \Longleftrightarrow R_B(I)-1\le k-1 \Longleftrightarrow R_B(I)\le k.

There are min⁡{k,H+1}\min\{k,H+1\} admissible ranks among the H+1H+1 equally likely possibilities, and hence

P(ΓIstep,k(x)=1)=∑r=1min⁡{k,H+1}1H+1=min⁡{k,H+1}H+1.(61)\mathbb{P}\left(\Gamma_I^{\mathrm{step},k}(x)=1\right) =\sum_{r=1}^{\min\{k,H+1\}}\frac{1}{H+1} =\frac{\min\{k,H+1\}}{H+1}. \tag*{(61)}

Finally, because II is uniform among the selected main anchors,

P(ΓIstep,k(x)=1)=E[1MC∑i∈AΓistep,k(x)]=1MCE[SHk(x)].\mathbb{P}\left(\Gamma_I^{\mathrm{step},k}(x)=1\right) =\mathbb{E}\left[\frac{1}{M_C}\sum_{i\in A}\Gamma_i^{\mathrm{step},k}(x)\right] =\frac{1}{M_C}\mathbb{E}[S_H^k(x)].

Multiplying by MCM_C proves

E[SHk(x)]=MCmin⁡{k,H+1}H+1.\mathbb{E}[S_H^k(x)] = M_C\frac{\min\{k,H+1\}}{H+1}.

For H≥k−1H \ge k-1, the minimum equals kk. Substituting MF=MCHM_F=M_C H yields

keff=E[SHk(x)]=MCkH+1=MC2kMF+MC.k_{\mathrm{eff}}=\mathbb{E}[S_H^k(x)] =\frac{M_C k}{H+1} =\frac{M_C^2 k}{M_F+M_C}.

At H=N−1H=N-1, this becomes keff=MCk/Nk_{\mathrm{eff}}=M_C k/N; when also MC=NM_C=N, it reduces to the exact kk active cells of full kk-NN. □

Complete RVFs encode Kendall rank geometry

Proposition 3.5 (restated). Assume N≥2N \ge2 and x,x′∈ΩXx,x' \in\Omega_X. Let P=(N2)P = \binom{N}{2} and KX(x,x′)=P−1∑i<jψij(x)ψij(x′)K_X(x,x') = P^{-1}\sum_{i<j}\psi_{ij}(x)\psi_{ij}(x'). Then

KX(x,x′)=1−2DK(πX(x),πX(x′))P,K_X(x,x') = 1 - \frac{2D_K(\pi_X(x),\pi_X(x'))}{P},

so KXK_X equals Kendall rank correlation and is positive semidefinite.

Proof. For an unordered reference pair {i,j}\{i,j\}, call the pair concordant if xx and x′x' rank ii and jj in the same order, and discordant if the order is reversed. Equivalently, ψij(x)ψij(x′)=+1\psi_{ij}(x)\psi_{ij}(x')=+1 for a concordant pair and −1-1 for a discordant pair. Let CC and DD denote the numbers of concordant and discordant pairs. Then C+D=PC+D=P, and the Kendall disagreement count is DK(πX(x),πX(x′))=DD_K(\pi_X(x),\pi_X(x'))=D. Therefore

KX(x,x′)=C−DP=P−2DP=1−2DK(πX(x),πX(x′))P.\begin{aligned} K_X(x,x') &= \frac{C-D}{P} = \frac{P-2D}{P}\\ &= 1-\frac{2D_K(\pi_X(x),\pi_X(x'))}{P}. \end{aligned}

This is Kendall rank correlation. Moreover, KX(x,x′)=zX(x)⊤zX(x′)K_X(x,x')=z_X(x)^\top z_X(x') for the explicit feature map zX(x)=P−1/2(ψij(x))i<jz_X(x)=P^{-1/2}(\psi_{ij}(x))_{i<j}, proving positive semidefiniteness.

Ranking information retained by ReLU RVFs

For inputs without distance ties, ΦijReLU(x)=max⁡{0,−hij(x)}\Phi_{ij}^{\mathrm{ReLU}}(x)=\max\{0,-h_{ij}(x)\} is positive exactly when reference sample jj is closer than ii. Therefore,

ψij(x)=1−2⋅1{ΦijReLU(x)>0}.\psi_{ij}(x)=1-2\cdot1\{\Phi_{ij}^{\mathrm{ReLU}}(x)>0\}.

Thus, thresholding the complete ReLU-RVF map recovers the signed comparisons and hence the Kendall kernel in Proposition 3.5. The concentration bound also applies to these thresholded features under independent uniform pair sampling, but does not extend directly to raw ReLU inner products which also contain information regarding magnitude. Bachrach et al. [2] established a Hoeffding bound for estimating Kendall’s rank correlation between two rankings by uniformly sampling comparison pairs. A union bound gives the following guarantee over a fixed set of queries.

Random RVFs preserve rank geometry with logarithmic feature growth

Corollary 3.6 (restated). Assume N≥2N \ge2, and let Q={z1,…,zm}⊂ΩXQ=\{z_1,\ldots,z_m\}\subset\Omega_X be a fixed set of m≥1m\ge1 queries. If MFM_F canonical reference pairs are sampled independently and uniformly, then K^MF\widehat{K}_{M_F} is unbiased for KXK_X. All pairwise kernel values on QQ are within ϵ\epsilon of their complete values with probability at least 1−δ1-\delta whenever

MF≥2ϵ2log⁡2m2δ.M_F \ge\frac{2}{\epsilon^2}\log\frac{2m^2}{\delta}.

Proof. For a uniformly sampled canonical reference pair ee, define Ye:=ψe(x)ψe(x′)∈{−1,+1}Y_e:=\psi_e(x)\psi_e(x')\in\{-1,+1\}. Uniformity over the P=(N2)P=\binom{N}{2} reference pairs gives

E[Ye]=1P∑i<jψij(x)ψij(x′)=KX(x,x′).\mathbb{E}[Y_e]=\frac{1}{P}\sum_{i<j}\psi_{ij}(x)\psi_{ij}(x')=K_X(x,x').

Hence K^MF=MF−1∑q=1MFYeq\widehat{K}_{M_F}=M_F^{-1}\sum_{q=1}^{M_F}Y_{e_q} is unbiased. Since the sampled pairs are independent and each Yeq∈[−1,1]Y_{e_q}\in[-1,1], Hoeffding’s inequality yields

P(∣K^MF(x,x′)−KX(x,x′)∣≥ϵ)≤2e−MFϵ2/2.(62)\mathbb{P}\left(\left|\widehat{K}_{M_F}(x,x')-K_X(x,x')\right|\ge\epsilon\right)\le2e^{-M_F\epsilon^2/2}. \tag*{(62)}

Apply this bound to the at most m2m^2 ordered query pairs (za,zb)∈Q×Q(z_a,z_b)\in Q\times Q and use the union bound:

P[max⁡a,b∈[m]∣K^MF(za,zb)−KX(za,zb)∣≥ϵ]≤2m2e−MFϵ2/2.\mathbb{P}\left[\max_{a,b\in[m]}\left|\widehat{K}_{M_F}(z_a,z_b)-K_X(z_a,z_b)\right|\ge\epsilon\right]\le2m^2e^{-M_F\epsilon^2/2}.

Requiring the right-hand side to be at most δ\delta gives

MF≥2ϵ2log⁡2m2δM_F \ge\frac{2}{\epsilon^2}\log\frac{2m^2}{\delta}

which proves the simultaneous approximation guarantee. Equivalently, MF=O(ϵ−2[log⁡m+log⁡(1/δ)])M_F = O(\epsilon^{-2}[\log m + \log(1/\delta)]) suffices.

Selector Algorithms

The selectors in § 3.8 are defined in Algorithms 1, 2, 3, and 4.

For the Cosine Diversity selector (assuming d≥1d \ge1, H≥2H \ge2, and distinct reference locations), τ\tau is computed for each dataset based on the ambient dimension dd and group size HH. Using a Gaussian approximation for pairwise cosine similarities, we set a Bonferroni-corrected baseline for the m=H(H−1)/2m = H(H - 1)/2 comparisons at nominal level α=0.1\alpha= 0.1: τstat=1dΦ−1(1−α2m)\tau_{\mathrm{stat}} = \frac{1}{\sqrt{d}}\Phi^{-1}\left(1-\frac{\alpha}{2m}\right). To account for dimensional constraints when H>dH > d, we also use the Welch coherence lower bound μmin⁡=max⁡(0,H−d)d(H−1)\mu_{\min} = \sqrt{\frac{\max(0,H-d)}{d(H-1)}}. Finally, we take τ=max⁡(τstat,μmin⁡+ϵ)\tau= \max(\tau_{\mathrm{stat}}, \mu_{\min} + \epsilon) with safety margin ϵ=0.05\epsilon= 0.05, and clip τ\tau between 0.1 and 0.9 to prevent overly restrictive or permissive selection. This threshold is a heuristic: the Welch bound provides a necessary lower bound on coherence rather than a guarantee that a feasible subset exists among the candidate directions. If the greedy scan selects fewer than HH rivals, the selector samples the remaining slots uniformly without replacement from the unused rivals. This gives exactly HH rivals whenever H≤N−1H \le N - 1.

Algorithm 1 Random selector
Require: Dataset {x_i}_{i=1}^N, Number of features M_F, Number of cells M_C
1: Set Number of features per cell H ← M_F/M_C
2: Sample main anchors A ⊆ [N] uniformly with |A| = M_C
3: Initialize selected pair set E ← ∅
4: for i ∈ A do
5:   Sample S_i ⊆ [N] \ {i} uniformly with |S_i| = H
6:   Add {(i, j) : j ∈ S_i} to E
7: end for
8: return E

Additional experimental details

Individual Dataset Results

Classifier and encoder ablation

To separate RVN’s role as a nearest-neighbor classifier from RVF’s role as a reusable encoder, we compare standard kk-NN, the aggregated Voronoi Cell representation, the pairwise Voronoi Feature representation, and their combination with the same ElasticNet downstream model where applicable.

Table 1 shows that the pairwise Voronoi Features account for most of the downstream gain: RVF+ElasticNet and RVF+VC+ElasticNet reach about 1140 Elo, whereas standard kk-NN and Algorithm 2 Cosine Diversity selector

ConfigurationElo
Voronoi Features + Cells + ElasticNet1142
Voronoi Features + ElasticNet1140
Raw + ElasticNet971
Standard kk-NN881
Voronoi Cells + ElasticNet866

Table 1. Classifier-versus-encoder ablation. Elo scores separate the nearest-neighbor/cell representation from the pairwise RVF representation.

Require: Distinct dataset {xi}i=1N\{x_i\}_{i=1}^{N}, Number of features MFM_F, Number of cells MCM_C, threshold τ\tau

  1. Set Number of features per cell H←MF/MCH \leftarrow M_F/M_C

  2. Sample main anchors A⊆[N]A \subseteq[N] uniformly with ∣A∣=MC|A| = M_C

  3. Initialize selected pair set E←∅\mathcal{E} \leftarrow\emptyset

  4. for i∈Ai \in A do

    1. Initialize selected neighbor set Si←∅S_i \leftarrow\emptyset

    2. Randomly order candidates Ci←[N]∖{i}C_i \leftarrow[N] \setminus\{i\}

    3. for j∈Cij \in C_i do

      1. Compute uij←(xj−xi)/∥xj−xi∥2u_{ij} \leftarrow(x_j - x_i)/\lVert x_j - x_i\rVert_2

      2. if ∣Si∣<H|S_i| < H and (Si=∅(S_i = \emptyset or max⁡ℓ∈Si∣⟨uij,uiℓ⟩∣<τ)\max_{\ell\in S_i}|\langle u_{ij}, u_{i\ell}\rangle| < \tau) then

        1. Add jj to SiS_i

      3. end if

      4. if ∣Si∣=H|S_i| = H then

        1. break

      5. end if

    4. end for

    5. if ∣Si∣<H|S_i| < H then

      1. Fill SiS_i with uniformly sampled remaining candidates until ∣Si∣=H|S_i| = H

    6. end if

    7. Add {(i,j):j∈Si}\{(i,j):j \in S_i\} to E\mathcal{E}

  5. end for

  6. return E\mathcal{E}

Algorithm 3 Sparse Dimension selector

Require: Dataset {xi}i=1N\{x_i\}_{i=1}^{N}, Number of features MFM_F, Number of cells MCM_C

  1. Set Number of features per cell H←MF/MCH \leftarrow M_F/M_C

  2. Sample main anchors A⊆[N]A \subseteq[N] uniformly with ∣A∣=MC|A| = M_C

  3. Initialize selected pair set E←∅\mathcal{E} \leftarrow\emptyset

  4. for i∈Ai \in A do

    1. for j∈[N]∖{i}j \in[N] \setminus\{i\} do

      1. Compute dij←∣xi−xj∣d_{ij} \leftarrow|x_i - x_j|

      2. Compute sparsity score qij←sp⁡(dij)q_{ij} \leftarrow\operatorname{sp}(d_{ij}) via (27)

    2. end for

    3. Select SiS_i as the HH candidates with largest qijq_{ij}

    4. Add {(i,j):j∈Si}\{(i,j):j \in S_i\} to E\mathcal{E}

  5. end for

  6. return E\mathcal{E}

Voronoi Cells+ElasticNet remain below 900. The small difference between RVF and RVF+VC suggests that the individual pairwise margins, rather than the aggregated cell representation alone, drive most of the improvement.

Benchmark protocol

We evaluate supervised RVF encoders on TabArena-Lite [10]. The datasets used here range from roughly 500 to 81,000 samples and span classification and regression tasks, feature dimensions, and tabular domains. This is the practical fixed-budget evaluation of RVF and is distinct from the N<1000N < 1000 full-RVN diagnostic in § 4.1. The goal is to test whether an encoder improves downstream learning across heterogeneous tabular problems, rather than on a single curated benchmark. Following the established benchmark protocol that is shown to be a good indicator of performance [10], we test on fold 0. All RVF anchors, comparison pairs, scalers, and categorical encoders are fit using only the training split, avoiding test-set leakage. We encode all categorical features with one-hot encoding.

For each dataset, we compare the following input encodings:

  • None: the raw input representation;

Algorithm 4 High Variance selector

Require: Dataset {xi}i=1N\{x_i\}_{i=1}^{N}, Number of features MFM_F, Number of cells MCM_C, nonempty evaluation subset Z\mathcal{Z}

  1. Set Number of features per cell H←MF/MCH \leftarrow M_F/M_C

  2. Sample main anchors A⊆[N]A \subseteq[N] uniformly with ∣A∣=MC|A| = M_C

  3. Initialize selected pair set E←∅\mathcal{E} \leftarrow\emptyset

  4. for i∈Ai \in A do

  5. &nbsp;&nbsp;&nbsp;&nbsp;for j∈[N]∖{i}j \in[N] \setminus\{i\} do

  6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for z∈Zz \in\mathcal{Z} do

  7. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute

χij(z)←1{∥z−xi∥22≤∥z−xj∥22}\chi_{ij}(z) \leftarrow\mathbf{1}\{\lVert z-x_i\rVert_2^2 \le\lVert z-x_j\rVert_2^2\}
  1. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end for

  2. &nbsp;&nbsp;&nbsp;&nbsp;Estimate p^ij←∣Z∣−1∑z∈Zχij(z)\widehat{p}_{ij} \leftarrow|\mathcal{Z}|^{-1}\sum_{z\in\mathcal{Z}}\chi_{ij}(z)

  3. &nbsp;&nbsp;&nbsp;&nbsp;Score candidate jj by qij←p^ij(1−p^ij)q_{ij} \leftarrow\widehat{p}_{ij}(1-\widehat{p}_{ij})

  4. &nbsp;&nbsp;&nbsp;&nbsp;end for

  5. &nbsp;&nbsp;&nbsp;&nbsp;Select SiS_i as the HH candidates with largest qijq_{ij}

  6. &nbsp;&nbsp;&nbsp;&nbsp;Add {(i,j):j∈Si}\{(i,j):j\in S_i\} to E\mathcal{E}

  7. end for

  8. return E\mathcal{E}

  • RFF: Random Fourier Features, which use random sinusoidal projections to approximate shift-invariant kernels [22];

  • RRF: Random ReLU Features, which use data-agnostic random affine projections followed by ReLU activations [17];

  • RBF: Nyström RBF features, which approximate data-dependent radial basis functions by random sampling [29].

  • RVF: ReLU Random Voronoi Features ΦReLU(x)\Phi^{\mathrm{ReLU}}(x);

  • RVF+VC: the concatenated representation [ΦReLU(x);ΓReLU,ε(x)][\Phi^{\mathrm{ReLU}}(x);\Gamma^{\mathrm{ReLU},\varepsilon}(x)].

We apply these encodings to the following models as downstream predictors:

  • ElasticNet: a generalized linear model with combined L1L_1 and L2L_2 regularization, used to test whether the encoding exposes useful linear structure;

  • TorchMLP: a standard multilayer perceptron, used to test interaction with generic neural predictors;

  • TabM-Mini: a modern tabular neural model, used to test whether RVF improves specialized tabular architectures.

For additional neighborhood-model context, we report TabR [13] and ModernNCA [30] as aggregate Elo reference lines in Figure 3. These models learn task-specific retrieval or neighborhood representations.

Metrics and ranking

To aggregate results over heterogeneous tasks, we adapt TabArena’s Elo-based ranking methodology [9, 10], and use F1 for classification and R2R^2 for regression. Elo ratings are computed from pairwise comparisons induced by dataset-level task metrics, allowing classification and regression results to be summarized in a common ranking. All Elo ratings are initialized at 1000. We estimate uncertainty using 200 bootstrap replicates, each sampling the original number of datasets with replacement and refitting Elo ratings. We report the 2.5th and 97.5th percentiles of the resulting ratings as the 95% bootstrap interval.

For Figure 3 (right), rankings are computed for each dataset–encoder pair for the same number of features. Concatenated RVF+VC features are adjusted accordingly to maintain the same size as the competitors to maintain fairness. As stated, RVF encodings do not increase their performance as TabR and ModernNCA already specialize for geometric nearest-neighbor bias. With RVF embeddings, TabR and ModernNCA get elo of 980 and 1020 respectively.

Heatmap of individual dataset results

Figure 5. Individual Dataset Results. Percentage improvement for each dataset over all models and encoders compared to raw (non-encoded) baseline. Classification measured using F1 score (above black line) and regression measured using R2R^2 score (below black line). RVF Based encoders perform better than other encoders for most datasets within the same model group. These results are especially pronounced for Modern Tabular Models like TabM. All classification datasets are above the black horizontal line, while regression tasks are below.

Hyperparameter optimization

For every dataset, encoder, and downstream model combination, we perform automated hyperparameter optimization with Optuna [1] using the TPESampler. Each experiment is run for up to 50 trials, optimizing over 1 fold validation set separate from test and train sets. We adopted the search spaces from Erickson et al. [10] for torchMLP and TabM. For the linear model with ElasticNet regularization, we used a custom wide search. Details of these are provided in Table 2-Table 4.

HyperparameterSpace
alphaLogUniform([1e-05, 1.0])
l1_ratioUniform([0.0, 1.0])
scalerChoice(["standard", "quantile"])

Table 2. Hyperparameter search space for ElasticNet.

HyperparameterSpace
arch_typeChoice(["tabm-mini"])
tabm_kChoice([32])
share_training_batchesChoice([False])
batch_sizeChoice(["auto"])
patienceChoice([16])
lrLogUniform([1e-4, 3e-3])
weight_decay_choiceChoice([0.0, 1.0])
gradient_clipping_normChoice([1.0])
ampChoice([False])
compile_modelChoice([False])
n_blocksChoice([2, 3, 4, 5])
d_blockChoice(128:16:1024) (step size = 16)
dropout_choiceChoice([0.0, 1.0])
d_embeddingChoice([8, 12, 16, 20, 24, 28, 32])
num_emb_n_binsUniformInt([2, 128])
eval_batch_sizeChoice([128])
bool_to_catChoice([True])
average_logitsChoice([False])

Table 4. Hyperparameter search space for TabM.

For the encoders, we perform HPO over number of features ranging from 5 to 25000. For RVF based encoders, MCM_C ranges from 50 to 500, while also optimizing over the selectors, and choosing ϵ∈[10−5,105]\epsilon\in[10^{-5}, 10^{5}]. For RFF and Nystroem RBF, the gamma parameter is optimized over the range of 0.0001 to 100.0. For all encoders, we perform standard scaling before and after encoding.

HyperparameterSpace
hidden_dimUniformInt([8, 256])
activationChoice(["relu", "elu"])
n_layersUniformInt([1, 5])
learning_rateLogUniform([0.0001, 0.03])
weight_decayLogUniform([1e-12, 0.1])
dropout_rateUniform([0.0, 0.4])
use_batch_normChoice([True, False])
scalerChoice(["standard", "quantile"])

Table 3. Hyperparameter search space for MLP.

Computational resources

All experiments were run on cluster machines. The TabM and MLP benchmark experiments were run on NVIDIA A100 GPUs with 40GB of VRAM. All remaining experiments, including ElasticNet benchmarks, interpretability experiments, and 1-NN/RVF equivalence experiments, were run on CPU. For these CPU experiments, each dataset–model–encoding–group configuration required less than 10GB of RAM.

References

  1. [1]Takuya Akiba, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama. Optuna: A next-generation hyperparameter optimization framework. In The 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 2623–2631, 2019.arxiv.org/abs/1907.10902
  2. [2]Yoram Bachrach, Ralf Herbrich, and Ely Porat. Sketching algorithms for approximating rank correlations in collaborative filtering systems. In Jussi Karlgren, Jorma Tahrio, and Heikki Hyyrö, editors, String Processing and Information Retrieval, pages 344–352, Berlin, Heidelberg, 2009. Springer Berlin Heidelberg. doi: 10.1007/978-3-642-03784-9_34.DOI
  3. [3]John S. Baras and Anthony LaVigna. Convergence of a neural network classifier. In Advances in Neural Information Processing Systems 3, pages 839–845, 1990.
  4. [4]Nirmal K. Bose and Amulya K. Garga. Neural network design using voronoi diagrams. IEEE Transactions on Neural Networks, 4(5):778–787, 1993.
  5. [5]Kamalika Chaudhuri and Sanjoy Dasgupta. Rates of convergence for nearest neighbor classification. In Advances in Neural Information Processing Systems, volume 27, pages 3437–3445. Curran Associates, Inc., 2014.arxiv.org/abs/1407.0067
  6. [6]Yan Qiu Chen, Robert I. Damper, and Mark S. Nixon. On neural-network implementations of k-nearest neighbor pattern classifiers. IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, 44(7):622–629, 1997.
  7. [7]Thomas M. Cover and Peter E. Hart. Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1):21–27, 1967.DOI
  8. [8]Luc Devroye, László Györfi, and Gábor Lugosi. A Probabilistic Theory of Pattern Recognition. Springer, 1996.DOI
  9. [9]A.E. Elo. The USCF Rating System: Its Development, Theory, and Applications. United States Chess Federation, 1966. URL https://books.google.es/books?id=onUazQEACAAJ.
  10. [10]Nick Erickson, Lennart Purucker, Andrej Tschalzev, David Holzmüller, Prateek Desai, David Salinas, and Frank Hutter. Tabarena: A living benchmark for machine learning on tabular data. In Advances in Neural Information Processing Systems, volume 38, 2025. doi: 10.52202/085713-0519.DOI
  11. [11]Camillo Gentile and Mario Sznajer. An improved voronoi-diagram-based neural net for pattern classification. IEEE Transactions on Neural Networks, 12(5):1227–1234, 2001.
  12. [12]Camillo Gentile and Mario Sznajer. Hyperborders in the voronoi-diagram-based neural net for pattern classification. In Proceedings of the 2002 International Joint Conference on Neural Networks (IJCNN’02), volume 3. IEEE, 2002.DOI
  13. [13]Yury Gorishniy, Ivan Rubachev, Nikolay Kartashev, Daniil Shlenskii, Akim Kotelnikov, and Artem Babenko. Tabr: Tabular deep learning meets nearest neighbors. In International Conference on Learning Representations, 2024.
  14. [14]Yury Gorishniy, Akim Kotelnikov, and Artem Babenko. Tabm: Advancing tabular deep learning with parameter-efficient ensembling. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=Sd4wYY0hMγ.arxiv.org/abs/2410.24210
  15. [15]Thore Graepel and Ralf Herbrich. A pac-bayesian analysis of distance-based classifiers: Why nearest-neighbour works! arXiv preprint arXiv:2109.13889, 2021. doi: 10.48550/arXiv.2109.13889. URL https://arxiv.org/abs/2109.13889.
  16. [16]Patrik O. Hoyer. Non-negative matrix factorization with sparseness constraints. Journal of Machine Learning Research, 5:1457–1469, 2004.
  17. [17]Daniel Hsu, Clayton H. Sanford, Rocco Servedio, and Emmanouil V. Vlatakis-Gkaragkounis. On the approximation power of two-layer networks of random relus. In Proceedings of the Thirty Fourth Conference on Learning Theory, volume 134 of Proceedings of Machine Learning Research, pages 2423–2461, 2021.arxiv.org/abs/2102.02336
  18. [18]Yunlong Jiao and Jean-Philippe Vert. The kendall and mallows kernels for permutations. In Francis Bach and David Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 1935–1944. PMLR, 2015. URL https://proceedings.mlr.press/v37/jiao15.html.
  19. [19]Owen J. Murphy. Nearest neighbor pattern classification perceptrons. Proceedings of the IEEE, 78(10):1595–1598, 1990.DOI
  20. [20]Atsuyuki Okabe, Barry Boots, and Kokichi Sugihara. Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. John Wiley & Sons, 1992.
  21. [21]Tobias Plötz and Stefan Roth. Neural nearest neighbors networks. arXiv preprint arXiv:1810.12575, 2018.arxiv.org/abs/1810.12575
  22. [22]Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in Neural Information Processing Systems 20, 2007.
  23. [23]Sascha Saralajew, Lars Holdijk, Maike Rees, and Thomas Villmann. Prototype-based neural network layers: Incorporating vector quantization. arXiv preprint arXiv:1812.01214, 2019.arxiv.org/abs/1812.01214
  24. [24]Atsushi Sato and Keiji Yamada. Generalized learning vector quantization. In Advances in Neural Information Processing Systems 8, pages 423–429, 1996.
  25. [25]Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014.
  26. [26]Chawin Sitawarin, Evgenios M. Kornaropoulos, Dawn Song, and David Wagner. Adversarial examples for k-nearest neighbor classifiers based on higher-order voronoi diagrams. In Advances in Neural Information Processing Systems 34, 2021.arxiv.org/abs/2011.09719
  27. [27]Charles J. Stone. Consistent nonparametric regression. The Annals of Statistics, 5(4):595–620, 1977.DOI
  28. [28]Václav Voráček and Matthias Hein. Probably adversarially robust nearest prototype classifiers. In Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 22019–22057, 2022.arxiv.org/abs/2207.07208
  29. [29]Christopher K. I. Williams and Matthias Seeger. Using the nyström method to speed up kernel machines. In Advances in Neural Information Processing Systems, volume 13, pages 682–688, 2001.
  30. [30]Han-Jia Ye et al. Revisiting nearest neighbor for tabular data: A deep tabular baseline two decades later. In International Conference on Learning Representations, 2025.arxiv.org/abs/2407.03257

AI tools statement

This work lists 1 AI tool.

  • AI tools · AI tool

    Roles
    Writing — original draftWriting — review & editing
    Verification
    self-declared at submission

Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type