Limits to Depth Efficiencies of Self-Attention

By Yoav Levine, Noam Wies, Or Sharir, Hofit Bata, Amnon Shashua. 2020

56 citations recorded by the source corpus.

Self-attention architectures, which are rapidly pushing the frontier in natural language processing, demonstrate a surprising depth-inefficient behavior: Empirical signals indicate that increasing the internal representation (network width) is just as useful as increasing the number of self-attention layers (network depth). In this paper, we theoretically study the interplay between depth and width in self-attention, and shed light on the root of the above phenomenon. We invalidate the seemingly plausible hypothesis by which widening is as effective as deepening for self-attention, and show that in fact stacking self-attention layers is so effective that it quickly saturates a capacity of the network width. Specifically, we pinpoint a "depth threshold" that is logarithmic in $d_x$, the network width: $L_{\textrm{th}}=\log_{3}(d_x)$. For networks of depth that is below the threshold, we establish a double-exponential depth-efficiency of the self-attention operation, while for depths over the threshold we show that depth-inefficiency kicks in. Our predictions strongly accord with extensive empirical ablations in Kaplan et al. (2020), accounting for the different behaviors in the two depth-(in)efficiency regimes. By identifying network width as a limiting factor, our analysis indicates that solutions for dramatically increasing the width can facilitate the next leap in self-attention expressivity.

Subfields: Artificial Intelligence, Electrical and Electronic Engineering, Information Systems, Model Architectures, Scaling & Learning Theory

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Graham Neubig
  2. Orhan Firat
  3. Luke S. Zettlemoyer
  4. Noah A. Smith
  5. Ankur Bapna
  6. Mohit Bansal
  7. Kyunghyun Cho
  8. Sebastian Gehrmann

In Electrical and Electronic Engineering

  1. Ozan Irsoy
  2. Colin Raffel
  3. Amnon Shashua
  4. Victor Sanh

In Information Systems

  1. Mark Dredze
  2. Sebastian Gehrmann
  3. Stella Biderman
  4. Ankur Bapna
  5. Julien Launay
  6. Colin Cherry
  7. Yoav Levine
  8. Sheng Shen

In Model Architectures

  1. Daniel Jannai
  2. Amnon Shashua
  3. Noam Wies
  4. Ofir Press
  5. Orhan Firat
  6. Ankur Bapna
  7. Stella Biderman
  8. Teven Le Scao

In Scaling & Learning Theory

  1. Yoav Levine
  2. Sheng Shen
  3. Colin Raffel
  4. Amnon Shashua
  5. Ofir Press
  6. Behrooz Ghorbani
  7. Noam Wies

Citations in the corpus