Sparse Attention as Compact Kernel Regression
Saul Santos, Nuno Gonçalves, Daniel C McNamee, Marcos Vinicius Treviso, Andre Martins
NeurIPS 2026
Abstract. Recent work has revealed a link between self-attention mechanisms in transformers and test-time kernel regression via the Nadaraya-Watson estimator, with standard softmax attention corresponding to a Gaussian kernel. However, a kernel-theoretic understanding of sparse attention mechanisms is currently missing. In this paper, we establish a formal correspondence between sparse attention and compact (bounded support) kernels. We show that normalized ReLU and sparsemax attention arise from Epanechnikov kernel regression under fixed and adaptive normalizations, respectively. More generally, we demonstrate that widely used kernels in nonparametric density estimation---including Epanechnikov, biweight, and triweight---correspond to -entmax attention with for , while the softmax/Gaussian relationship emerges in the limit . This unified perspective explains how sparsity naturally emerges from kernel design and provides principled alternatives to heuristic top- attention and other associative memory mechanisms. Experiments with a kernel-regression-based variant of transformers---Memory Mosaics---show that kernel-based sparse attention achieves competitive performance on language modeling, in-context learning, and length generalization tasks, offering a principled framework for designing attention mechanisms.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:49 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This work addresses the central challenge of providing a unified kernel-regression interpretation of sparse attention mechanisms. During the rebuttal, the authors further clarified on the points (regd clarification on the effect of normalisation, scaling and efficiency) raised during the rebuttal. While there are still some marginal concerns regarding the novelty of the work, and the lack of experimental verification on large-scale datasets, the theoretical perspective was rated as elegant and the paper is generally well received, and contributions significant enough to be presented at the conference. The authors are encouraged to take into account the remaining concerns raised by the reviewers in preparation for the final version of the paper.
Final justification
The meta-review was updated based on the author rebuttal and reviewer acknowledgement.
Read meta-review
Meta-review
This work addresses the central challenge of providing a unified kernel-regression interpretation of sparse attention mechanisms. During the rebuttal, the authors further clarified on the points (regd clarification on the effect of normalisation, scaling and efficiency) raised during the rebuttal. While there are still some marginal concerns regarding the novelty of the work, and the lack of experimental verification on large-scale datasets, the theoretical perspective was rated as elegant and the paper is generally well received, and contributions significant enough to be presented at the conference. The authors are encouraged to take into account the remaining concerns raised by the reviewers in preparation for the final version of the paper.
Final justification
The meta-review was updated based on the author rebuttal and reviewer acknowledgement.
1 comment
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 4/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This work re-visits (sparse) attention mechanisms through the lens of kernel regression. The authors have identified many different sparse attention proposals from the literature, e.g., top-k softmax, sparsemax, and a-entmax, and they have provided (continuous) theoretical frameworks that can elegantly describe all these alternatives through appropriate choice of kernels. Even though the corresponding proofs are compact, the connections and abstractions are highly non-trivial, at least to my view. The theoretical findings are also supported with experimental evaluations on several different realistic scenarios, which are also compared with well-established alternatives such as RetNet, Mamba, and more. In particular, the properties of several different kernel-based formulations are studied in terms of: (i) loss validation per number of iterations, (ii) accuracy and total variation-distance in the RegBench benchmark, and (iii) length generalization on synthetic tasks. The experiments highlight both the strengths and the limitations of each kernel method.
Strengths and weaknesses
Strengths
The paper is in general carefully written, the motivation is well-justified, and the problem definitions are clear. More specifics:
- The proposed framework to generalize sparse attention mechanisms via kernel regression is very interesting and quite important. It provides novel insights and the community can benefit from such an abstraction to make informed choices on the types of sparse attention used per-application.
- By viewing the problem through the lens of kernel regression, it can help to design novel algorithms for sparse attention (as the authors also did here), or strengthen the capabilities of existing algorithms.
- The theoretical analysis is sound and clear, and all the theoretical claims are supported with proofs.
- From the experimental side, the authors have provided more than enough experiments to highlight both the strengths and limitations of each different type of sparse attention mechanism. The corresponding discussions are helpful for the reader to understand in which type of applications each kernel formulation fits best.
- I am not an expert in this field, but the related literature discussion seems thorough.
- It feels strange to mention this explicitly, but I verified by-hand every single reference in the bibliography, as I believe that this task is becoming more-and-more important these days, and every reviewer should do it. I did not notice any "hallucinations" or other funky business, but I mention under "Questions" below some references that can be updated to more recent versions.
Weaknesses
In terms of weaknesses, my main comment is that the paper is missing an algorithmic / complexity analysis of each method. This would be very helpful, even at a high level. Also, in few places some definitions seem to be missing or obfuscated, which I explain below under "Questions".
Questions
Main questions
-
What are the associated computational costs for the methods? (if you can provide this information, even at a high level). Are any of the kernel variants "more expensive" than standard softmax attention? Could there be a correlation between "cost" and "quality"?
-
In figure 2, at 8-layers (middle picture), the Biweight (2-ReLUmax) kernel seems to be outperforming by far all the other methods, as mentioned in the discussion, but the advantage is less significant for 1- or 12-layers. Is there any intuition why this happens? Can it be an "artifact" of the specific instance / dataset?
-
It seems that Mamba, in Table 1, underperforms significantly compared to the other baselines. I was wondering if the authors have experimented with other, more recent linear attention alternatives in this context (Gated DeltaNets, KDA, or others). I certainly do not expect the authors to run any experiments at this point, it is mostly a curiosity.
Other comments
- Missing / obfuscated definitions:
- In Eq. (5), it is not clear what is. The last reference to any "" seems to be few pages above, in Eq. (1). It would help to clarify it.
- It would not harm to define mathematically in lines 122-123, just to be crystal clear.
- In line 62, is not defined (seems to be the same that is mentioned below in the optimization problem, is this right?)
- Suggestion: in Table 2, "Gaussian" can be renamed to "Gaussian (softmax)" for the lazy readers.
- References [1], [3], [4], [9], [12], [18], [25], [30], [31], [39], [45], [46], fall in one of the following categories:
- Outdated version (arxiv vs published)
- Missing authors (because google scholar truncates the last few authors to "and others")
- Other typos (capitalization, or so)
Please update the references, it is important.
- This is more of a comment rather than a question, but i am a bit surprised that the paper was not submitted as a theory paper, or at least in the subcategory. But I guess it does not really matter.
Limitations
Yes, the authors have adequately addressed limitations.
Final justification
As I wrote in the rebuttal I think the paper deserves to appear at the conference, but my confidence is medium so the comments of the other reviewers should also be taken into consideration.
Formatting concerns
There are no formatting concerns.
2 comments
Rebuttal
“The paper is missing an algorithmic / complexity analysis…”
We agree and will add one; §B.4 currently discusses efficiency qualitatively but gives no per-method costs. Costs are per query over keys; is the average support size and the number of Halley/bisection iterations used to find .
| Method | Normalizer | Forward | Backward |
|---|---|---|---|
| Gaussian (softmax) | closed form | ||
| normReLU | closed form | ||
| -ReLUmax | max reduction | ||
| sparsemax / -entmax | root-finding for | ||
| top- softmax / uniform | selection |
All methods share the same score computation and differ only in the normalizer, and is a small constant in practice, so none changes the quadratic asymptotics of an attention layer. The compact family has a sparse Jacobian, so the backward pass scales with rather than , an advantage over softmax that grows with sparsity.
“What are the associated computational costs?” “Could there be a correlation between cost and quality?”
Runtime depends strongly on the mechanism, the implementation and the hardware; for a rigorous efficiency assessment against softmax we refer to AdaSplash and AdaSplash-2 [1,3], whose short answer is that -entmax attention can be faster than softmax at long enough context, which increases the relevance of the link drawn in our paper.
For combinatorial support selection (top-/top-) the picture differs: these require selection or sorting, which are less GPU-friendly. By number of passes over the scores, the ordering is: (1) softmax, single pass via online softmax; (2) -ReLUmax, two passes (max, then normalize); (3) top- softmax/uniform, sorting pass plus final pass; (4) sparsemax/entmax via AdaSplash, multiple passes; (5) top- entmax, multiple passes. This cost is independent of : the exponent in is elementwise, so 1-, 2- and 3-ReLUmax all take two passes. Not so on the entmax side, where determines the root-finding problem for . We therefore highlight -ReLUmax as promising from an efficiency standpoint: it preserves compact support at any order while avoiding both the combinatorial support construction of top- and the root-finding of entmax.
Measured on the sort task on a single A6000:
| Kernel | Time (hours) | vs. softmax |
|---|---|---|
| Gaussian (softmax) | 18.3 | — |
| Epanechnikov (normReLU) | 18.5 | +1.1% |
| Epanechnikov (1-ReLUmax) | 19.2 | +4.9% |
| Uniform NN, | 19.2 | +4.9% |
| Triweight (4/3-entmax) | 20.9 | +14.2% |
| Epanechnikov (sparsemax) | 21.0 | +14.8% |
| Biweight (1.5-entmax) | 21.5 | +17.5% |
| Gaussian NN, | 21.7 | +18.6% |
On cost–quality. We find no monotone relationship, which we think is itself the useful answer.
“In Figure 2 at 8 layers, 2-ReLUmax far outperforms the others…”
You are right and we clarify this below. As noted in §4.1 and the footnote to Table 3, the 2-ReLUmax run required a lower learning rate ( vs ) due to training instability, so the apparent advantage confounded kernel with optimization setting.
We reran the 8-layer configuration with all kernels at the same learning rate, and the gap does not persist [https://anonymous.4open.science/r/babistories_new_lr_8h/loss_history_trim.pdf]. 2-ReLUmax remains competitive but does not stand apart from the other compact kernels, consistent with the 1- and 12-layer panels and with Tab. 1. We will replace Fig. 2 with the matched-learning-rate version and state the instability at higher learning rates explicitly.
“Mamba underperforms… Have you tried more recent linear attention alternatives (Gated DeltaNet, KDA)?”
We have not, and agree it would be interesting. Our baseline set and protocol follow RegBench [4] directly (sequence length, vocabulary, training sizes, hyperparameter search) and [5] for the architecture, so our numbers are comparable to both; the recurrent and SSM baselines are those of [4].
On Mamba, the gap is consistent with [4] rather than anomalous. RegBench requires inferring a PFA from in-context examples, which depends on content-based lookup over the full context; models compressing the context into a fixed-size recurrent state are bottlenecked on exactly that, whereas attention and Memory Mosaics retain an explicit key-value cache.
One point of framing: the models you mention are companions to our perspective rather than competitors. Delta-rule and gated linear attention variants are themselves interpretable as test-time regression on an associative memory [6], but with a fixed-size state, i.e. parametric regression in kernel terms. Our correspondence concerns the nonparametric case, where the cache grows with context and the estimator is Nadaraya-Watson. We will note this as future work.
“Other comments…”
All fair, and we will fix them in the revised version.
[1] Gonçalves et al., ICML 2025.
[2] Dao, ICLR 2024.
[3] Gonçalves et al., ICML 2026.
[4] Akyürek et al., ICML 2024.
[5] Zhang et al., ICLR 2025.
[6] Wang, Shi, Fox, 2025.
Rebuttal acknowledgement
I thank the authors for their responses. My questions were answered adequately, and I trust that if the paper gets accepted the authors will make any appropriate additions / adjustments to the test as necessary.
Regarding the "computational cost vs accuracy" question, I should have clarified that I was more interested in the complexity perspective rather than the actual wall-clock / runtime. The latter really only depends on how well the method is implemented, which gives no intuition from a scientific perspective, it is just engineering. But I still found the answer acceptable.
I will keep the score 5 and my recommendation to accept the paper. I think this is an interesting perspective that is worth to be communicated at the conference, and, to my view, the authors did a very rigorous analysis. At the same time I keep my confidence to the medium since I am not an expert in this area, and the other reviewers also had thorough comments.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The work demonstrates that sparse attention mechanisms (sparsemax, -entmax, top-, normalized ReLU) correspond to Nadaraya-Watson regression with compact support kernels (Epanechnikov, biweight, triweight, truncated Gaussian), with softmax/Gaussian as a limiting case. It also proposes a new transformation (r-ReLUmax) anchored to the maximum score, and experiments on Memory Mosaics in language modeling, in-context learning, and length generalization.
Strengths and weaknesses
Cons
- Marginal originality. The connection between softmax Gaussian kernel regression is well known (Tsai et al., Wang et al.), and the connection between ReLU Epanechnikov has already been noted by Hoover et al. [16], as the authors themselves admit. The sparse Hopfield literature ([17], [26], [27]) has already covered the entmax side from an energy-function perspective. The main addition is the systematization + adaptive-bandwidth interpretation + ReLUmax—useful, but more of a "nice unifying lens" rather than a groundbreaking new result.
- The assumption of -normalized keys/queries is critical for the entire dot-product Euclidean distance correspondence, but it does not hold in vanilla transformers. The theory only transfers cleanly to architectures like Memory Mosaics. This limits the scope of the claims and should have been discussed more directly.
- Weak empirical gains and scale. At 12 layers, the differences virtually disappear; on RegBench (Table 1), the differences are fractional decimals without error bars, while Table 2 shows massive variance between seeds (e.g., normReLU on MQMTAR 64$\times$: mean 0.31 but max 0.94). Everything is evaluated at parameters, on a toy dataset (BabiStories), with a context length of 512.
- Section B.4 references AdaSplash without providing any wall-clock time or throughput measurements; the efficiency claims remain unproven.
Questions
How does the correspondence behave without normalized keys? Is there a generalization using a Mahalanobis or a learned metric? Can you provide standard deviations or confidence intervals (std/CI) for Tables 1–2? How many of these differences are actually statistically significant? Why does sparsemax collapse on Reverse 1.5$\times$ (0.03) while dominating on MQMTAR? Is there an explanation for this via its adaptive support?Can you provide a wall-clock comparison of entmax/AdaSplash vs. FlashAttention at a context length of ?
Limitations
n/a
Final justification
I have read the rebuttal which has helped clarify some points. I continue to have reservations about the novelty and potential impact, but the presented work certainly is worth of a higher score.
Formatting concerns
n/a
1 comment
Rebuttal
“Marginal originality. The softmax/Gaussian link is known, ReLU/Epanechnikov was noted by Hoover et al., and the sparse Hopfield literature covers the entmax side.”
We respectfully disagree with this point. While the softmax-Gaussian association is well established [1, 2], and the normalized ReLU-Epanechnikov link is due to Hoover et al. [3] (which we do acknowledge in our paper in §3), the sparse Hopfield literature does not subsume our result. There are two different and orthogonal views (energy-function vs kernel regression perspectives) which are not equivalent. For example, the energy formulation made by Hoover et al. [3] uses log of ReLU in their energy function and need to add a term inside the log to prevent logs of zero, none of which is required in our paper which uses a different construction. Sparse Hopfield networks [4, 5, 6] are closer to our work but they DO NOT follow from a Nadaraya-Watson correspondence. This is an entirely novel contribution from our paper.
Our Proposition 1 makes a different and original claim. It identifies the induced kernel as the rectified polynomial family with (a classical object in nonparametric statistics [7]) and shows that the entmax threshold is the bandwidth, It converts from an algorithmic artifact of the projection into a statistically meaningful quantity, and makes -entmax attention an adaptive-bandwidth Nadaraya–Watson estimator whose bandwidth is selected per query, from the scores, at test time. This statement was not done in [3, 4, 5, 6], and it does not follow from the energy view: one can write down the sparse Hopfield energy, and analyze its retrieval dynamics in full, without ever encountering .
Additionally, the kernel reading resolves a degeneracy the energy-based work does not address: the failure of normalized ReLU is, stated in kernel terms, an empty support set, and both repairs follow from that single diagnosis which is adapting the bandwidth until the support is nonempty (§3.1), or anchor it at the nearest key (§3.2). Fourth, top- softmax and top- uniform [9] have, to our knowledge, no Fenchel-Young characterization and sit outside the sparse Hopfield framework entirely; under the kernel view they are immediately truncated-Gaussian kNN and uniform kNN regression (§3.2). This is what allows fixed-cardinality, fixed-bandwidth and adaptive-bandwidth sparsity to be compared on a single axis, and the comparison is informative: uniform kNN plateaus at accuracy and does not improve with data, normReLU degrades in both metrics, and adaptivemethods dominate.
We agree with the reviewer that this is a unification rather than a new architecture, and we would rather not oversell it. We believe, however, that the unification has content: it fixes the kernel family behind -entmax, identifies the threshold with a bandwidth, covers top- methods that have no variational form, imports a classical optimality result that points at an empirically strong variant, and yields one new transformation (-ReLUmax).
“The -normalization assumption does not hold in vanilla transformers.”
This assumption is actually not so restrictive, as it holds exactly under QK-normalization [10], used in ViT-22B, Chameleon, Swin-V2 and nGPT [11-14], among others; it fails in the original transformer [15], where LayerNorm precedes the QKV projection.
Second, Unit norm is a convention used to replicate vanilla transformers: if , then , and §3 goes through with and reparameterized by . QK-RMSNorm without learnable gain gives , so the correspondence transfers exactly; with a learnable gain, up to its deviation from isotropy.
Third, expanding , the term is constant in ; only variation in obstructs the identification. Carrying it through, unnormalized softmax attention is a Nadaraya–Watson estimator with a per-key reweighting, $$ and for the compact family of Proposition 1, -entmax applied to scores with a per-key additive bias . Vanilla dot-product attention thus corresponds to weighted kernel regression with key norm as an importance term, and the correspondence becomes exact if is subtracted from the scores. This also isolates what normalization buys: it removes a confound between key norm and key–query proximity.
We chose Memory Mosaics architecture because it implements the Nadaraya–Watson estimator explicitly (§2.3), isolating the effect of kernel choice. It normalizes keys and values by construction, Eq. (5), so the assumption is architectural rather than imposed by us.
We will make this more clear in the final version.
“Weak empirical gains and scale”, “fractional decimals without error bars”, “massive variance between seeds”
RegBench. We follow the protocol of [15,16] for comparability, including single-run reporting. We agree the 10k-40k differences are small and will say so. Accuracy saturates at $\approx$95.5, so convergence at 40k is a ceiling effect, not a crossover. The informative column is 1k: sparsemax reaches 94.2/32.5 (Acc/TVD) against 54.5/62.6 for the Transformer, which needs the full 40k to reach 95.5.
Table 2 variance. We report the spread rather than hide it (three seeds, mean as headline, max in superscript; with three seeds a std has two d.o.f.). It is intrinsic to the metric: exact match scores zero unless every value is correct. Spread is near zero in-distribution and grows monotonically with extrapolation factor, equally for all kernels, so the cross-method ordering (consistent across MQMTAR, reverse, sort) remains informative. The mean-max gap is itself diagnostic: normReLU at 64$\times$ gives 0.31/0.94 against sparsemax 0.31/0.51, same mean, very different reliability, as predicted by §3.
Depth and scale. §4.1 states that sufficient depth compensates for kernel choice; our claim is narrower, that the kernel matters where capacity or data are limited. The goal is a controlled comparison with attention as the only variable across ten variants. The setting is not uniformly small-data: BabiStories is 474M tokens, and length generalization trains on examples.
“§B.4 references AdaSplash without wall-clock measurements.”
We agree that §B.4 currently argues qualitatively and cites AdaSplash [18] without measurements of our own which we provide below. We note, however, that runtime depends strongly on the specific sparse attention mechanism, on the implementation itself, and on other factors such as the hardware used. We refer to the AdaSplash and the more recent AdaSplash-2 papers [18, 19] for a rigorous assessment of computational efficiency with respect to softmax, as these details are out of the scope of our paper. The short answer from [17, 19] is that -entmax attention via AdaSplash can be faster than softmax attention for long enough context size, which increases the relevance of the link to compact kernel regression drawn by our paper.
Measurements. End-to-end training wall-clock on the sort task, 40M samples, global batch size 256, single A6000, identical architecture and schedule across kernels:
| Kernel | Time (hours) | vs. softmax |
|---|---|---|
| Gaussian (softmax) | 18.3 | — |
| Epanechnikov (normReLU) | 18.5 | +1.1% |
| Epanechnikov (1-ReLUmax) | 19.2 | +4.9% |
| Uniform NN, | 19.2 | +4.9% |
| Triweight (4/3-entmax) | 20.9 | +14.2% |
| Epanechnikov (sparsemax) | 21.0 | +14.8% |
| Biweight (1.5-entmax) | 21.5 | +17.5% |
| Gaussian NN, | 21.7 | +18.6% |
What this does show. At our context length (512), the entmax variants are slightly slower than softmax by 14–18%, and we will state this. This is the expected regime because attention is not the dominant cost at 512 tokens [17], and AdaSplash's advantage comes from skipping blocks of the score matrix, which requires sparsity high enough to skip substantial portions, a condition that arises at long context, not here. So, the numbers do support two narrower claims we will keep. First, the overhead of compact kernels is modest and bounded even in the regime least favourable to them. Second, -ReLUmax is genuinely cheap: it requires two passes over the scores (a max reduction, then normalization) with no root-finding and no sorting, giving +4.9% over softmax while retaining compact support and, on this task, reaching 0.80 at against 0.06 for softmax (Table 2).
We will update the claims in the revised version.
[1] Tsai et al., EMNLP 2019.
[2] Wang, Shi, Fox, 2025.
[3] Hoover et al., NFAM 2025.
[4] Hu et al., NeurIPS 2023.
[5] Santos et al., ICML 2024.
[6] Santos et al., JMLR 2025.
[7] Scott, Wiley 2015.
[8] Epanechnikov, 1969.
[9] Gupta et al., SustaiNLP 2021.
[10] Henry et al., Findings EMNLP 2020.
[11] Dehghani et al., ICML 2023.
[12] Chameleon Team, 2024.
[13] Liu et al., CVPR 2022.
[14] Loshchilov et al., 2024.
[15] Akyürek et al., ICML 2024.
[16] Zhang et al., ICLR 2025.
[17] Dao, ICLR 2024.
[18] Gonçalves et al., ICML 2025.
[19] Gonçalves et al., ICML 2026.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper theoretically establishes a correlation between kernel regression and sparse attention. It offers a kernel-based perspective for understanding the sparsity phenomenon in attention. Based on this connection, the authors propose a new attention mechanism and the experimental results show that the proposed method achieves competitive performance.
Strengths and weaknesses
The authors provide a novel perspective that explains attention sparsity through the kernel regression, and the comprehensive theoretical proofs lend strong support to the proposed claims. However, the paper has some presentation issues as detailed in the Question block below.
Questions
- According to Table 1, as the size of the training set increases, the baselines become competitive with the best accuracy of the proposed method. In particular, at a training size of 40K, both the baseline and the proposed method reach the same best accuracy of 95.5%. This suggests that the advantage of the proposed method may diminish as the training set grows larger. Experiments on larger datasets would help address this concern.
- Abbreviations are not spelled out on first use (e.g., "PFA").
- The citation command "inter alia" in Section 1 is used incorrectly.
- Mathematical symbols should be defined where they first appear. Several symbols are left unexplained, such as , , and in Equation (5).
- Symbols should not be defined more than once. For instance, appears to be defined twice.
- Typo: "top-k" should be "Top-k" in the caption of Figure 1.
- In Figure 1, the input is defined as a vector in the caption. However, is also used to denote the x-axis in the left subfigure, where it appears to be a scalar. How can an n-dimensional vector be represented in a two-dimensional figure? In addition, what does K(u) on the y-axis of the left subfigure represent, and what does the y-axis of the right subfigure represent?
Limitations
The authors have adequately addressed the limitations and implications of their work.
Final justification
I appreciate the authors' detailed responses, which address most of my concerns. I would encourage evaluation on larger datasets (>40k) in future work. My rating score remains at 4.
Formatting concerns
There is no violation of formatting.
2 comments
Rebuttal
“According to Table 1, as the size of the training set increases, the baselines become competitive with the best accuracy of the proposed method. In particular, at a training size of 40K, both the baseline and the proposed method reach the same best accuracy of 95.5%. This suggests that the advantage of the proposed method may diminish as the training set grows larger. Experiments on larger datasets would help address this concern.”
We agree that last-token accuracy converges at 40k, but this is a ceiling of the RegBench metric rather than a vanishing advantage: accuracy saturates at for every competitive method, and what the table measures is a difference in data requirement.
On the saturation: at 40k, all of Transformer, Gaussian, sparsemax, -entmax and -entmax fall within points of each other, i.e. within seed-level variation. We agree these differences are small and do not wish to overclaim them.
The separation is in the low-data columns. At 1k, Epanechnikov (sparsemax) reaches Acc / TVD, and every compact-kernel variant is above . The Transformer at 1k reaches / , which is near chance, and needs the full 40k to reach ; our 1k model is within points of that, and already surpasses the Transformer trained on more data ( at 2.5k). The recurrent baselines behave the same way: Mamba reaches at 1k, while RetNet, H3, GLA and S4 remain at –. The claim we intend is therefore not "compact kernels beat softmax at 40k" but that adaptive sparsity extracts the PFA structure from one fortieth of the data.
The effect is also visible internally: at 1k, sparsemax improves TVD over the Gaussian kernel ( vs ), and the ablations isolate which ingredient matters — fixed-support normReLU degrades sharply ( / ) and fixed-cardinality uniform kNN plateaus at , never recovering ( at 40k).
On extending beyond 40k: the 1k–40k grid is the protocol of RegBench itself [1], whose design (random PFAs, held-out generative processes, per-token loss against the true posterior) is what licenses the TVD metric. We follow [1] for sequence length, vocabulary and hyperparameter tuning, and [2] for the architecture and training setup, so our numbers are directly comparable to both. Going beyond 40k would put us off-protocol while measuring an already-saturated metric.
We will rewrite the discussion of Table 1 to foreground the data-efficiency reading, state explicitly that accuracy saturates at 40k, and note the ceiling so the 40k column is not read as evidence of a vanishing advantage.
[1] Ekin Akyürek, Bailin Wang, Yoon Kim, Jacob Andreas. In-context language learning: architectures and algorithms. ICML, 2024.
[2] Jianyu Zhang, Niklas Nolte, Ranajoy Sadhukhan, Beidi Chen, Léon Bottou. Memory Mosaics. ICLR, 2025.
“Abbreviations are not spelled out on first use (e.g., "PFA")” and “The citation command "inter alia" in Section 1 is used incorrectly.”
Thank you for raising this point. We will correct them in the revised version. We now spell out PFA (probabilistic finite automaton) on first use in §1.
“Mathematical symbols should be defined where they first appear (e.g. in Equation 5)”, “Symbols should not be defined more than once”, and “Typo: top-k should be Top-k in the caption of Figure 1.”
Thank you! We will fix this in the final version. In Equation (5), was indeed never introduced. It is the layer input embedding, . We will define both in the revised version at first use, and will make the definitions of and immediately adjacent to (5) rather than in the following paragraph. On duplication: , and are defined in §2.2 and then restated in full in Proposition 1. We will define them once in §2.2 and refer back, keeping only the assumption in the proposition statement.
”In Figure 1, the input is defined as a vector in the caption. However , is also used to denote the x-axis in the left subfigure, where it appears to be a scalar. How can an -dimensional vector be represented in a two-dimensional figure? In addition, what does on the y-axis of the left subfigure represent, and what does the y-axis of the right subfigure represent?”
Indeed, the caption overloads across the two panels, and we will rewrite it in the revised version. The two panels show different objects:
- Left: classical kernel functions in the scalar case , i.e. on the horizontal axis, with on the vertical axis being the (normalized) kernel value, the weight a key at distance from the query receives. This is the standard 1D kernel-shape plot and is what makes compact versus unbounded support visible. The d-dimensional kernel would be analogous to this one with spherical symmetry.
- Right: the corresponding attention transformations, applied to a three-dimensional score vector with the first coordinate set to 0 without loss of generality. We should call this instead of which is the notation we use in Eq. (1). This is a vector of dimensionality (number of tokens in the context), whereas is -dimensional, so the two are different objects. . The two horizontal axes are ; the vertical axis is the probability mass assigned to the anchored first coordinate, i.e. for the transformation named above each surface. The flat zero regions are exactly where sparsity occurs. We will fix this notation clash in the revised version, using distinct symbols for the two panels. Thank you for catching this!
Reply to Authors
I appreciate the authors' detailed responses, which address most of my concerns. I would encourage evaluation on larger datasets (>40k) in their future work. My rating score remains at 4.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Response to the Area Chair
We thank the AC for the summary. We accept and answer all three points; below is what changes in the camera-ready, with pointers to the detailed material already provided in the reviewer threads, where the responses suggest the main concerns were addressed and one score was raised.
1. Scope of the ℓ2 normalization assumption (raised by Reviewer UREM; full derivation in our response there).
The assumption will be stated in the paper. Two clarifications:
First, the requirement is constant key/query norm, not unit norm: any ∥ki∥=∥q∥=c works with b,γ reparameterized by c. This holds exactly under QK-normalization [1] and QK-RMSNorm, as used in [2–5], though not in the original transformer [6].
Second, the unnormalized case is inside the framework rather than outside it. Only variation in ∥ki∥2 obstructs the identification; carrying that term through shows vanilla dot-product attention to be weighted Nadaraya–Watson regression with key norm as a per-key importance term, exact once ∥ki∥2 is subtracted from the scores. We will add this as a corollary with proof. It also clarifies what normalization contributes: it removes a confound between key norm and key–query proximity.
2. Effect sizes, statistical uncertainty, and scale (raised across reviews; see our responses on Tables 1 and 2).
We accept these points. Three changes:
As reported in our response to the reviewer UqA7 that 2-ReLUmax run used a lower learning rate for stability, confounding kernel with optimizer setting. We reran at a matched learning rate; the advantage does not persist. Fig. 2 will be replaced and the instability stated explicitly.
On scale we retain the limitation. The study was designed as a controlled comparison isolating the attention mechanism across ten kernel variants, which is what our compute supports; we do not claim the conclusions transfer to frontier-scale models. Nevertheless, BabiStories is 474M tokens, and the length-generalization experiments train on 50×106 (MQMTAR), 30×106 (reverse) and 40×106 (sort) examples.
3. Efficiency (raised by reviewers UREM and UqA7; complexity table and measurements given in those threads).
The substantive finding is that at our context length (512) the entmax variants are 14–18% slower than softmax, and we will report this rather than implying otherwise. This is the expected regime: attention is not the dominant cost at 512 tokens [8], and the AdaSplash [9] advantage comes from skipping blocks of the score matrix, which requires sparsity levels arising at long context. Any implication of a speedup at this scale will be removed.
Two narrower claims survive and will be stated as such: the overhead of compact kernels is modest and bounded even in the least favourable regime, and r-ReLUmax is structurally cheap where two passes over the scores, no root-finding and no sorting, at roughly 5% over softmax.
[1] Henry, Dachapally, Pawar, Chen. Query-key normalization for transformers. Findings of EMNLP, 2020.
[2] Dehghani et al. Scaling vision transformers to 22 billion parameters. ICML, 2023.
[3] Chameleon Team. Chameleon: mixed-modal early-fusion foundation models. 2024.
[4] Liu et al. Swin Transformer V2: scaling up capacity and resolution. CVPR, 2022.
[5] Loshchilov, Hsieh, Sun, Ginsburg. nGPT: normalized transformer with representation learning on the hypersphere. 2024.
[6] Vaswani et al. Attention is all you need. NeurIPS, 2017.
[7] Akyürek, Wang, Kim, Andreas. In-context language learning: architectures and algorithms. ICML, 2024.
[8] Dao. FlashAttention-2: faster attention with better parallelism and work partitioning. ICLR, 2024.
[9] Gonçalves, Treviso, Martins. AdaSplash: adaptive sparse flash attention. ICML, 2025.