atlas

Research map / Architectures and efficiency / Attention and transformers

Training Dynamics of Transformers to Recognize Word Co-occurrence via Gradient Flow Analysis

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Analyzes gradient flow training of a one-layer softmax transformer (W_K, W_Q, W_V, and a linear MLP trained from random init) on detecting co-occurrence of two target words, proving a two-phase dynamic and near-zero training loss.

Problem

Understanding how transformers provably learn via gradient-based training without simplifying assumptions (weight reparameterization, attention linearization, special initialization, lazy regime), using a word co-occurrence detection task.

Approach

Treats joint gradient-flow training of three attention matrices and a linear MLP from random initialization as a coupled dynamical system over inner-product variables, showing a two-phase process (MLP alignment, then joint attention-MLP margin growth) and a novel "automatic balancing of gradients" property that makes losses of different sample types decrease at similar rates.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Jointly evolve the attention matrices and linear MLP after initial MLP alignmentOne-layer transformer trained by gradient flow · Synthetic co-occurrence tasktraining lossHelped
Align the linear MLP with the target words while attention remains nearly unchangedOne-layer transformer trained by gradient flow · Synthetic co-occurrence task, Phase 1training lossMixed
Train the full transformer from random initializationOne-layer transformer trained by gradient flow · Synthetic co-occurrence taskgeneralization lossHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic co-occurrence data (theoretical data distribution)

Metrics: training loss attention score correlation MLP output G(mu)

Builds on: gradient flow analysis of transformers

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy