Lune

NeurIPS2022顶会

Your Transformer May Not be as Powerful as You Expect

Shengjie Luo, Shanda Li, Shuxin Zheng, Tie-Yan Liu, Liwei Wang, Di He

摘要

Relative Positional Encoding (RPE), which encodes the relative distance between any pair of tokens, is one of the most successful modifications to the original Transformer. As far as we know, theoretical understanding of the RPE-based Transformers is largely unexplored. In this work, we mathematically analyze the power of RPE-based Transformers regarding whether the model is capable of approximating any continuous sequence-to-sequence functions. One may naturally assume the answer is in the affirmative-RPE-based Transformers are universal function approximators. However, we present a negative result by showing there exist continuous sequence-to-sequence functions that RPE-based Transformers cannot approximate no matter how deep and wide the neural network is. One key reason lies in that most RPEs are placed in the softmax attention that always generates a right stochastic matrix. This restricts the network from capturing positional information in the RPEs and limits its capacity. To overcome the problem and make the model more powerful, we first present sufficient conditions for RPE-based Transformers to achieve universal function approximation. With the theoretical guidance, we develop a novel attention module, called Universal RPE-based (URPE) Attention, which satisfies the conditions. Therefore, the corresponding URPE-based Transformers become universal function approximators. Extensive experiments covering typical architectures and tasks demonstrate that our model is parameter-efficient and can achieve superior performance to strong baselines in a wide range of applications. The code will be made publicly available at https://github.com/lsj2408/URPE . The order is decided by rolling the dice.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 33 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • A Complete Expressiveness Hierarchy for Subgraph GNNs via Subgraph Weisfeiler-Lehman Tests 引用了 Do Transformers Really Perform Badly for Graph Representation?
  • Beyond Weisfeiler-Lehman: A Quantitative Framework for GNN Expressiveness 引用了 A Complete Expressiveness Hierarchy for Subgraph GNNs via Subgraph Weisfeiler-Lehman Tests
  • Beyond Weisfeiler-Lehman: A Quantitative Framework for GNN Expressiveness 引用了 Do Transformers Really Perform Badly for Graph Representation?
  • Do Transformers Really Perform Badly for Graph Representation? 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Do Transformers Really Perform Badly for Graph Representation? 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Functional Interpolation for Relative Positions improves Long Context Transformers 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Functional Interpolation for Relative Positions improves Long Context Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Functional Interpolation for Relative Positions improves Long Context Transformers 引用了 Do Transformers Really Perform Badly for Graph Representation?
  • Functional Interpolation for Relative Positions improves Long Context Transformers 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Graph Inductive Biases in Transformers without Message Passing 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Graph Inductive Biases in Transformers without Message Passing 引用了 Do Transformers Really Perform Badly for Graph Representation?
  • Graph Inductive Biases in Transformers without Message Passing 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper33

  1. Towards Revealing the Mystery behind Chain of Thought: A Theoretical PerspectiveGuhao Feng, Bohang Zhang, Yuntian Gu, Haotian Ye 等NeurIPS 2023 · 470 次引用
  2. Graph Inductive Biases in Transformers without Message PassingLiheng Ma, Chen Lin, Derek Lim, Adriana Romero-Soriano 等ICML 2023 · 185 次引用
  3. A Complete Expressiveness Hierarchy for Subgraph GNNs via Subgraph Weisfeiler-Lehman TestsBohang Zhang, Guhao Feng, Yiheng Du, Di He 等ICML 2023 · 84 次引用
  4. Functional Interpolation for Relative Positions improves Long Context TransformersShanda Li, Chong You, Guru Guruganesh, Joshua Ainslie 等ICLR 2024 · 66 次引用
  5. Beyond Weisfeiler-Lehman: A Quantitative Framework for GNN ExpressivenessBohang Zhang, Jingchu Gai, Yiheng Du, Qiwei Ye 等ICLR 2024 · 59 次引用

它引用的 Paper20

  1. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 次引用
  4. Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng 等NeurIPS 2021 · 1,632 次引用
  5. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用

相关 Paper

  1. Are Transformers universal approximators of sequence-to-sequence functions?Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank J. Reddi 等ICLR 2020 · 481 次引用
  2. Exploring Transformer ExtrapolationZhen Qin, Yiran Zhong, Hui DengAAAI 2024 · 12 次引用
  3. Stable, Fast and Accurate: Kernelized Attention with Relative Positional EncodingShengjie Luo, Shanda Li, Tianle Cai, Di He 等NeurIPS 2021 · 66 次引用
  4. Universal Approximation with Softmax AttentionJerry Yao-Chieh Hu, Hude Liu, Hong-Yu Chen, Weimin Wu 等ICML 2026 · 9 次引用
  5. DAPE: Data-Adaptive Positional Encoding for Length ExtrapolationChuanyang Zheng, Yihang Gao, Han Shi, Minbin Huang 等NeurIPS 2024 · 42 次引用
黄昏的海面,两侧是细线勾勒的悬崖