Cubit: Token Mixer with Kernel Ridge Regression
Not on the map. Why?
Abstract (arXiv)
Since its introduction in 2017, the Transformer has become one of the most widely adopted architectures in modern deep learning. Despite extensive efforts to improve positional encoding, attention mechanisms, and feed-forward networks, the core token-mixing mechanism in Transformers remains attention. In this work, we show that the attention module in Transformers can be interpreted as performing Nadaraya-Watson regression, where it computes similarities between tokens and aggregates the corresponding values accordingly. Motivated by this perspective, we propose Cubit, a potential next-generation architecture that leverages Kernel Ridge Regression (KRR), while the vanilla Transformer relies on Nadaraya-Watson regression. Specifically, Cubit modifies the classical attention computation by incorporating the closed-form solution of KRR, combining value aggregation through kernel similarities with normalization via the inverse of the kernel matrix. To improve the training stability, we further propose the Limited-Range Rescale (LRR), which rescales the value layer within a controlled range. We argue that Cubit, as a KRR-based architecture, provides a stronger mathematical foundation than the vanilla Transformer, whose attention mechanism corresponds to Nadaraya-Watson regression. We validate this claim through comprehensive experiments. The experimental results suggest that Cubit may exhibit stronger long-sequence modeling capability. In particular, its performance gain over the Transformer appears to increase as the training sequence length grows.
Key facts. No citing papers in the map yet (data through 13 Oct 2026). Builds on 58 of its 95 references that are in the map. First posted on arXiv 7 May 2026.
Builds on
58 of 95 references.
References · 58
- 2017Attention Is All You Needcited by 60,106
- 2015Deep Residual Learning for Image Recognitioncited by 51,950
- 2020Language Models are Few-Shot Learnerscited by 32,320
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,223
- 2016Densely Connected Convolutional Networkscited by 6,707
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,798
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,658
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,539
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,053
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,463
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,044
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,981
38 more
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,843
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,440
- 2024Mixtral of Expertscited by 1,811
- 2019Root Mean Square Layer Normalizationcited by 1,449
- 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,442
- 2023Video-LLaVA: Learning United Visual Representation by Alignment Before Projectioncited by 1,392
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,323
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,323
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,307
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,126
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,093
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 854
- 2024DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Modelscited by 853
- 2022Simplified State Space Layers for Sequence Modelingcited by 781
- 2017Crowdsourcing Multiple Choice Science Questionscited by 751
- 2021Scaling Vision with Sparse Mixture of Expertscited by 744
- 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 705
- 2021CogView: Mastering Text-to-Image Generation via Transformerscited by 692
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 603
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 501
- 2022On the Parameterization and Initialization of Diagonal State Space Modelscited by 420
- 2024xLSTM: Extended Long Short-Term Memorycited by 322
- 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Freecited by 270
- 2023From Sparse to Soft Mixtures of Expertscited by 247
- 2021Hash Layers For Large Sparse Modelscited by 237
- 2019Understanding and Improving Layer Normalizationcited by 213
- 2022DeepNet: Scaling Transformers to 1,000 Layerscited by 177
- 2025RWKV-7 "Goose" with Expressive Dynamic State Evolutioncited by 136
- 2024HGRN2: Gated Linear RNNs with State Expansioncited by 124
- 2021Finetuning Pretrained Transformers into RNNscited by 94
- 2024Hyper-Connectionscited by 82
- 2025mHC: Manifold-Constrained Hyper-Connectionscited by 82
- 2024Theory, Analysis, and Best Practices for Sigmoid Self-Attentioncited by 64
- 2024Skywork-MoE: A Deep Dive into Training Techniques for Mixture-of-Experts Language Modelscited by 59
- 2026Attention Residualscited by 58
- 2024JetMoE: Reaching Llama2 Performance with 0.1M Dollarscited by 57
- 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Lengthcited by 46
- 2023Replacing softmax with ReLU in Vision Transformerscited by 44
50 most cited of 58 All 58 (JSON)
Built on by
Not cited yet.