Research
Retrieval-Centric Deep Learning in Growing Nonparametric Neural Networks
Overview Research area: Machine learning theory and architecture design — specifically the duality between gradient-descent-trained linear layers and attention, nonparametric / growing neural networks

- arXiv
- 2610.03858
- Published
- 2026-10-02
- Authors
- Maximilian Schlegel, Rajai Nasser, Seijin Kobayashi, Yanick Schimpf, Oliver Sieberling, Robert Obryk, Kazuki Irie, João Sacramento, Johannes von Oswald
AI summary
Overview
Research area: Machine learning theory and architecture design — specifically the duality between gradient-descent-trained linear layers and attention, nonparametric / growing neural networks, kernel methods, and optimizer design.
Technical level: Advanced. The paper relies on functional analysis (RKHS, Moore-Aronszajn theorem, Fréchet derivatives, Riesz representation), Gaussian mixture densities, Radon-Nikodym derivatives, and modern linear-attention architectures.
Scope (one sentence): The paper derives principled functional-gradient learning rules for attention layers built on non-linear kernels (RBF and a proposed "weighted softmax" kernel), turning deep networks into growing key-value memory systems, and shows that swapping in advanced linear-attention variants yields connections to known second-order optimizers.
Note: the full paper content supplied here is truncated. Results from the image classification experiments, Figure 5 (hybrid learner), and the detailed Muon comparison are referenced but their numbers are not present in the provided text, so they are not reported below.
What This Paper Is About
Every linear layer in a deep network trained by gradient descent has a classic dual form: its exact input/output behavior can be reproduced by a key-value memory that stores a key and a value for each training datapoint and retrieves outputs with unnormalized dot-product attention — a form of linear attention. Irie et al. [33] suggested replacing that linear attention with a more powerful attention function to build stronger learning systems, but the paper shows that naively transplanting the linear-attention learning rules to advanced kernels does not produce principled optimization. This paper fills that gap, deriving functional gradient-based learning rules for kernelized attention layers (RBF and a new weighted softmax kernel), and separately shows that inserting advanced linear-attention variants (MesaNet/DeltaNet) into the dual form connects to recently proposed optimizers for ordinary fixed-size networks.
Key Contributions
-
A theory of growing nonparametric layers for positive definite kernels. Using the Moore-Aronszajn theorem, the authors show that performing gradient descent on an implicit infinite-dimensional weight matrix over the RKHS feature space is mathematically equivalent to appending a new key-value pair at each step, with key $
\bm{k}_t = \bm{x}_t$ and value $\bm{v}_t = -\eta_t \nabla_{\bm{y}_t}\mathcal{L}$ — the same key-value definitions as the linear case (radial basis function kernel used in experiments). -
A principled learning rule for softmax-like attention via a new "weighted softmax kernel." Because standard softmax attention cannot be grown infinitesimally (introducing any new key discontinuously changes the denominator), the authors introduce per-entry scalar weights and derive a functional gradient descent update, giving new key/value/weight rules (Eq. 7): $
w_{\text{new}} \propto \eta\langle \bm{s}_t, \bm{g}_t\rangle$ and $\tilde{\bm{v}}_{\text{new}} \propto -\eta \sigma_v^2 \bm{g}_t$, with new key $\bm{k}_{\text{new}} = \sigma_k^2 \bm{q}_t$. -
A formal bridge from advanced linear attention to optimizers. Replacing linear attention in the dual form with the mesa-layer [71, 72] — which minimizes a regularized squared error over keys and values with a closed-form solution — yields a layer that implements exactly a recently proposed optimizer, FOOF [9], a simplification of KFAC [47] and thus an approximate second-order method. The DeltaNet case corresponds to an online gradient descent step on a layer-local loss.
-
A hybrid non-parametric / parametric learning scheme for sublinear growth. Existing key-value pairs are treated as learnable parameters optimized with standard optimizers (e.g., Adam or AdamW), and the database grows only when a new key is sufficiently distinct: $
\min_j \lVert \bm{x} - \bm{k}_j \rVert_2 > \tau$.
Main Findings
-
Naive kernel substitution is not principled: the paper shows that directly applying the linear-attention learning rule to advanced kernels does not lead to principled optimization, which is the gap the new derivations close.
-
PDK growing nets inherit the linear key-value rule: for positive definite kernels, the loss-minimizing update is exactly "append $
(\bm{k}_t, \bm{v}_t) = (\bm{x}_t, -\eta_t\nabla_{\bm{y}_t}\mathcal{L})$," but the resulting layer can no longer be collapsed into a fixed-size weight matrix. -
Weighted softmax enables smooth database growth: the weighted softmax functional $
s_{\mathcal{D}}(\bm{q}) = \sum_{(w,\bm{k},\bm{v})\in\mathcal{D}} w e^{\langle\bm{k},\bm{q}\rangle}\bm{v} \big/ \sum_{(w,\bm{k},\bm{v})\in\mathcal{D}} w e^{\langle\bm{k},\bm{q}\rangle}$ admits a functional gradient update, whereas the unweighted softmax does not. -
Gaussian mixtures reproduce the discrete softmax exactly: for a Gaussian mixture density over key-value pairs, the induced continuous softmax equals the discrete weighted softmax, because the shared term $
e^{\frac{1}{2}\sigma_k^2\lVert\bm{q}\rVert^2}$ cancels between numerator and denominator. The prediction is independent of the variances $\sigma_k$ and $\sigma_v$, and the same cancellation holds for any block-diagonal covariance where keys and values are independent. -
Gauge invariance resolves negative weights: when $
\langle \bm{s}_t, \bm{g}_t\rangle < 0$ the update produces a negative weight, risking denominator cancellation and numerical instability. Two remedies are given: clipping, $w_{\text{new}} \leftarrow \max(0, w_{\text{new}})$, or exploiting a translational symmetry (shifting all values by $+\bm{b}$ shifts the output by $+\bm{b}$), choosing a "virtual gauge" $\bm{b}_t$ that makes $\langle \bm{g}_t, \bm{s}_t + \bm{b}_t\rangle$ strictly positive. -
Mini-batching adds B tuples at once: because the functional gradient operator is linear, a mini-batch of size $
B$ sums individual gradients and appends $B$ distinct tuples in a single step. -
MesaNet in the dual form equals a known second-order optimizer: solving the mesa-layer objective analytically gives $
\bm{W}_T = (\bm{V}_{<T}\bm{X}_{<T}^\top + \bm{V}_T\bm{X}_T^\top)(\bm{X}_{<T}\bm{X}_{<T}^\top + \bm{X}_T\bm{X}_T^\top + \lambda\bm{I})^{-1}$, which implements FOOF; the extra inverse matrix acts as a whitening transform on inputs, giving a full Newton update for a shallow linear model and an approximate second-order update for a deep network. -
Teacher-student regression result (Figure 1): on a synthetic regression task with 100-dimensional inputs, a held-out residual MLP teacher (1 hidden layer, ReLU, residual-stream $
d_e = 100$, LeCun-normal fixed weights), the overparameterized "Reference MLP" student outperformed all other models and served as the gold standard. A "Parametric Softmax" baseline — a very wide MLP with width matched to the final number of training samples and softmax activation — and the growing weighted-softmax model were compared against it. Specific loss values are not reported in the provided text. -
Derived rules correspond to plain SGD: the formal learning rules for the growing nets correspond to training them with plain SGD; derivations for more sophisticated optimizers are left for future work.
-
Reported experimental protocol: the baseline architecture is a residual MLP resembling a transformer MLP block, $
\bm{e} \leftarrow \bm{e} + \bm{W}_2\sigma(\bm{W}_1\text{RMSNorm}(\bm{e}))$; activation search covered ReLU, GELU and softmax; optimizer search covered SGD, Adam, AdamW, RMSProp and Muon. Results are averaged over 5 seeds with shaded areas reflecting standard deviation. -
Optimizer performance claim: the MesaNet/DeltaNet-derived optimizers are reported to have competitive performance to Muon [39].
-
Hybrid learner efficiency claim: the authors state empirically that the hybrid algorithm matches the performance of the fully non-parametric learner at a small fraction of its size (Figure 5), though the specific figures are not in the provided text.
Methodology in Plain English
The paper starts from a known mathematical fact: a linear layer trained by gradient descent can be rewritten as a memory that stores one key (the layer input) and one value (the negative error signal) per training example, and answers queries by an attention-like weighted sum. The authors then ask what happens if the simple dot-product similarity in that attention is replaced by something stronger — a kernel.
For kernels that correspond to inner products in a high-dimensional feature space (positive definite kernels), they show the ordinary gradient rule still works: keep storing $(\bm{x}_t, -\eta_t\nabla_{\bm{y}_t}\mathcal{L})$ pairs. For softmax, this breaks down, because adding a key changes the normalizing denominator no matter how small the associated value is. Their fix is to attach a scalar weight to every entry, so entries can be added "smoothly." They then model the whole memory as a continuous density over (key, value) space, choose a Gaussian mixture density, and show the continuous formula reduces exactly to the weighted discrete softmax. Treating the density as a function in an $L_2$ space with a Gaussian base measure lets them compute a functional gradient (via Fréchet derivative and the Riesz representation theorem) and read off, constructively, what new tuple to append. They also handle the practical issue of negative weights, and add a growth-control rule: only append when the new input is far enough from all stored keys ($\min_j \lVert \bm{x} - \bm{k}_j \rVert_2 > \tau$), otherwise update existing entries with a standard optimizer like AdamW.
In parallel, they take the same dual-form equation but plug in more capable linear-attention machinery instead of a non-linear kernel. Using the mesa-layer — which finds the best linear key-value map for all data seen so far under a regularized squared error — they solve for the weights in closed form and observe that the resulting formula is exactly a known optimizer, FOOF. DeltaNet yields an online update. Experiments compare these against standard optimizers on a residual MLP with hyperparameter sweeps, and compare the growing networks against wide MLP baselines on synthetic teacher-student regression and image classification.
Why This Matters
Impact on research: The paper supplies the missing theoretical foundation for the "retrieval-centric" view of deep learning, showing which kernels admit principled growing-network learning rules and which require new machinery (the weighted softmax). It also creates an unusual two-way bridge: non-linear kernels in the dual form produce growing nonparametric networks, while advanced linear attention in the dual form produces second-order optimizers for ordinary weight-based networks — reframing optimizer design as an attention-design problem.
Real-world applications (plausible, based on the mechanisms described):
- Continual or streaming learning systems where new examples are stored and retrieved rather than compressed away, reducing catastrophic forgetting.
- Memory-augmented assistants and retrieval-augmented generation, where an explicit, growable key-value database is the model's memory.
- Second-order-style training acceleration, since the MesaNet/DeltaNet-derived optimizers are reported to be competitive with Muon while being derived from an attention formulation.
- Resource-constrained deployment, where the hybrid growth rule can cap memory by only storing sufficiently novel inputs.
Industry relevance: Because the derived optimizers plug into conventional fixed-size networks and are described as competitive with Muon, they are directly usable in existing training pipelines. The growing-network paradigm, by contrast, challenges a core assumption of industrial deep learning — that model size is fixed — and the paper is explicit that linear memory growth $\mathcal{O}(T)$ is a central open problem, with the hybrid scheme as a first mitigation.
Future Directions
- Constraining growth: model size increases at every training step when a non-linear kernel is chosen; making growth truly sublinear while retaining accuracy is described as perhaps the most central open challenge, with the hybrid threshold rule as only a first result.
- Learning rules for better optimizers: the growing nets were trained with plain SGD because the formal rules were derived for that case; deriving rules for momentum, weight decay and adaptive optimizers is left for future work (with preliminary remarks placed in Appendix D).
- Extending beyond the studied kernels and attention variants: the paper covers positive definite kernels (RBF) and the weighted softmax kernel, plus MesaNet/DeltaNet on the optimizer side; whether other kernels or other advanced linear-attention layers yield equally principled rules is untested here.
- Scaling and architecture questions: the empirical evidence reported in the provided text centers on a 100-dimensional synthetic teacher-student regression task; how the growing-layer approach behaves on larger, deeper and more varied tasks, and how it interacts with scaling, remain open.
Target Audience
Researchers and graduate students working on deep learning theory, attention mechanisms, kernel methods, nonparametric models, and optimizer design. It is also relevant to practitioners interested in memory-augmented or continual-learning systems who are comfortable with linear algebra and optimization, and who want to understand why growing key-value memory layers can or cannot be trained in a principled way. Readers without a background in functional analysis will find Sections 3.2 onward demanding, though the abstract, Table 1 and Section 2 provide accessible framing.
Authors’ abstract
We investigate a general-purpose layer for deep learning that, instead of compressing arbitrary-size training data into fixed-size weight matrices, stores a new pair of key-value representations for every data point during training, and retrieves and recombines these representations through an attention mechanism at inference time - resulting in a growing neural net (NN). While Irie et al. (arXiv:2202.05798) have put forward this perspective from the classic duality expressing any linear layer in a deep NN trained by gradient descent as linear attention (LA) over the training data points, replacing LA by more powerful attention functions, as they suggest, turns out to be non-trivial: we show that naively applying learning rules from the LA case to advanced kernels does not lead to principled optimization. Here we fill this gap and develop functional gradient-based learning rules for kernelized attention layers, based on radial basis function (RBF) and softmax-like kernels - establishing the principled "retrieval-centric deep learning" (RCDL) paradigm. Empirically, we demonstrate the promising performance and learning-efficiency of RCDL on image classification and synthetic teacher-student learning tasks. Moreover, we show that replacing LA in the dual form of NNs by advanced LA variants, namely MesaNet/DeltaNet, yields a formal connection to recently proposed optimizers for conventional fixed-size NNs, offering a novel perspective on deep learning optimization.