paper-with-me

Papers

Universal Approximation with Softmax Attention

2025-04-22 · Jerry Yao-Chieh Hu, Hude Liu, Hong-Yu Chen, Weimin Wu, Han Liu

We prove that with linear transformations, both (i) two-layer self-attention and (ii) one-layer self-attention followed by a softmax function are universal approximators for continuous sequence-to-sequence functions on compact domains. Our main technique is a new interpolation-based method for analyzing attention's internal mechanism. This leads to our key insight: self-attention is able to approximate a generalized version of ReLU to arbitrary precision, and hence subsumes many known universal approximators. Building on these, we show that two-layer multi-head attention alone suffices as a sequence-to-sequence universal approximator. In contrast, prior works rely on feed-forward networks to establish universal approximation in Transformers. Furthermore, we extend our techniques to show that, (softmax-)attention-only layers are capable of approximating various statistical models in-context. We believe these techniques hold independent interest.

📄 PDF Abstract BibTeX arXiv:2504.15956

Code (1)

magics-lab/uap_attention 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

ReLU How Do I Communicate to Expedia? How Do I Communicate to Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Live Support & Special Travel…
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Multi-Head Attention 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…

Similar Papers 제목 키워드 기반

Transformer Approximations from ReLUs

2026-04-27 · Jerry Yao-Chieh Hu, Mingcheng Lu, Yi-Chen Lee, Han Liu arxiv

We provide a systematic recipe for translating ReLU approximation results to softmax attention mechanism. This recipe covers many common approximation targets. Importantly, it yields target-specific, economic resource bo…

Are Transformers with One Layer Self-Attention Using Low-Rank Weight Matrices Universal Approximators?

2023-07-26 · Tokio Kajitsuka, Issei Sato

Existing analyses of the expressive capacity of Transformer models have required excessively deep layers for data memorization, leading to a discrepancy with the Transformers actually used in practice. This is primarily …

Memorization

Sliced ReLU attention: Quasi-linear contextual expressivity via sorting

2025-12-12 · François-Xavier Vialard, Siwan Boufadène arxiv

We introduce sliced ReLU attention, a new attention mechanism that departs structurally from both softmax and its approximation alternatives. Instead of applying a nonlinearity to pairwise dot products, we operate on one…

Efficient High-Accuracy PDEs Solver with the Linear Attention Neural Operator

2025-10-19 · Ming Zhong, Zhenya Yan arxiv

Neural operators offer a powerful data-driven framework for learning mappings between function spaces, in which the transformer-based neural operator architecture faces a fundamental scalability-accuracy trade-off: softm…

Softmax Output Approximation for Activation Memory-Efficient Training of Attention-based Networks

2023-09-21 · NeurIPS 2023 11

In this paper, we propose to approximate the softmax output, which is the key product of the attention mechanism, to reduce its activation memory usage when training attention-based networks (aka Transformers). During th…