The Lipschitz Constant of Self-Attention

By Hyunjik Kim, George Papamakarios, Andriy Mnih. 2020

231 citations recorded by the source corpus.

Lipschitz constants of neural networks have been explored in various contexts in deep learning, such as provable adversarial robustness, estimating Wasserstein distance, stabilising training of GANs, and formulating invertible neural networks. Such works have focused on bounding the Lipschitz constant of fully connected or convolutional networks, composed of linear maps and pointwise non-linearities. In this paper, we investigate the Lipschitz constant of self-attention, a non-linear neural network module widely used in sequence modelling. We prove that the standard dot-product self-attention is not Lipschitz, and propose an alternative L2 self-attention that is Lipschitz. We derive an upper bound on the Lipschitz constant of L2 self-attention and provide empirical evidence for its asymptotic tightness. To demonstrate the practical relevance of the theory, we formulate invertible self-attention and use it in a Transformer-based architecture for a character-level language modelling task.

Subfields: Cognitive Neuroscience, Experimental and Cognitive Psychology, Statistical and Nonlinear Physics, Model Architectures

How researchers see this paper

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

In Cognitive Neuroscience

  1. Yihe Dong
  2. Ho Kei Cheng
  3. Andreas Loukas
  4. Chi-Keung Tang
  5. Chris G. Willcocks
  6. Yu-Wing Tai
  7. Jean-Baptiste Cordonnier

In Experimental and Cognitive Psychology

  1. Wai Lam
  2. Yihe Dong
  3. Zihao Fu
  4. Ho Kei Cheng
  5. Anthony Man-Cho So
  6. Andreas Loukas
  7. Chi-Keung Tang
  8. Nigel Collier

In Statistical and Nonlinear Physics

  1. Yang Long
  2. Wai Lam
  3. Yihe Dong
  4. Ho Kei Cheng
  5. Sam Bond-Taylor
  6. Andreas Loukas
  7. Adam Leach
  8. Chi-Keung Tang

In Model Architectures

  1. Jean-Baptiste Cordonnier
  2. Yihe Dong
  3. Andreas Loukas
  4. Yang Long
  5. Chinmay Hegde
  6. Wai Lam
  7. Qian Yu
  8. Shengding Hu

Citations in the corpus