LGNENov 19, 2020

On the Dynamics of Training Attention Models

arXiv:2011.10036v29 citations
AI Analysis

This work provides theoretical understanding of attention model convergence for researchers and practitioners using attention mechanisms, addressing a gap in the theoretical depth of this widely used component.

This paper investigates the training dynamics of attention models in a simple text classification task. It proves that training converges to attending to discriminative words when a linear classifier is used, by showing a persistent identity between word embeddings and key-query inner products for these words.

The attention mechanism has been widely used in deep neural networks as a model component. By now, it has become a critical building block in many state-of-the-art natural language models. Despite its great success established empirically, the working mechanism of attention has not been investigated at a sufficient theoretical depth to date. In this paper, we set up a simple text classification task and study the dynamics of training a simple attention-based classification model using gradient descent. In this setting, we show that, for the discriminative words that the model should attend to, a persisting identity exists relating its embedding and the inner product of its key and the query. This allows us to prove that training must converge to attending to the discriminative words when the attention output is classified by a linear classifier. Experiments are performed, which validate our theoretical analysis and provide further insights.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes