paper-with-me

Papers

When Do Transformers Outperform Feedforward and Recurrent Networks? A Statistical Perspective

2025-03-14 · Alireza Mousavi-Hosseini, Clayton Sanford, Denny Wu, Murat A. Erdogdu

Theoretical efforts to prove advantages of Transformers in comparison with classical architectures such as feedforward and recurrent neural networks have mostly focused on representational power. In this work, we take an alternative perspective and prove that even with infinite compute, feedforward and recurrent networks may suffer from larger sample complexity compared to Transformers, as the latter can adapt to a form of dynamic sparsity. Specifically, we consider a sequence-to-sequence data generating model on sequences of length $N$, in which the output at each position depends only on $q$ relevant tokens with $q \ll N$, and the positions of these tokens are described in the input prompt. We prove that a single-layer Transformer can learn this model if and only if its number of attention heads is at least $q$, in which case it achieves a sample complexity almost independent of $N$, while recurrent networks require $N^{\Omega(1)}$ samples on the same problem. If we simplify this model, recurrent networks may achieve a complexity almost independent of $N$, while feedforward networks still require $N$ samples. Consequently, our proposed sparse retrieval model illustrates a natural hierarchy in sample complexity across these architectures.

📄 PDF Abstract BibTeX arXiv:2503.11272

Code (1)

mousavih/transformers-separation 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Multi-Head Attention 설명 없음
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Residual Connection 설명 없음
Position-Wise Feed-Forward Layer 설명 없음

Similar Papers 제목 키워드 기반

Going Beyond Linear Transformers with Recurrent Fast Weight Programmers

2021-06-11 · NeurIPS 2021 12 · Kazuki Irie, Imanol Schlag, Róbert Csordás, Jürgen Schmidhuber

Transformers with linearised attention (''linear Transformers'') have demonstrated the practical scalability and effectiveness of outer product-based Fast Weight Programmers (FWPs) from the '90s. However, the original FW…

Atari GamesListOps

The Topological Trouble With Transformers

2026-04-18 · Michael C. Mozer, Shoaib Ahmed Siddiqui, Rosanne Liu arxiv

Transformers encode structure in sequences via an expanding contextual history. However, their purely feedforward architecture fundamentally limits dynamic state tracking. State tracking -- the iterative updating of late…

Gated recurrent neural networks discover attention

2023-09-04 · Nicolas Zucchet, Seijin Kobayashi, Yassir Akram, Johannes von Oswald 외

Recent architectural developments have enabled recurrent neural networks (RNNs) to reach and even surpass the performance of Transformers on certain sequence modeling tasks. These modern RNNs feature a prominent design p…

In-Context Learning

Feedforward Sequential Memory Neural Networks without Recurrent Feedback

2015-10-09 · ShiLiang Zhang, Hui Jiang, Si Wei, Li-Rong Dai

We introduce a new structure for memory neural networks, called feedforward sequential memory networks (FSMN), which can learn long-term dependency without using recurrent feedback. The proposed FSMN is a standard feedfo…

Language ModelingLanguage Modelling

Observer-Feedback-Feedforward Controller Structures in Reinforcement Learning

2023-04-20 · Ruoqi Zhang, Per Mattson, Torbjörn Wigren

The paper proposes the use of structured neural networks for reinforcement learning based nonlinear adaptive control. The focus is on partially observable systems, with separate neural networks for the state and feedforw…

reinforcement-learningReinforcement Learning