Reproduce “JoMA: Demystifying Multilayer Transformers via JOint Dynamics of MLP and Attention” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Yuandong Tian, Yiping Wang, Zhenyu Zhang, Beidi Chen, Simon Du
The Joint MLP/Attention (JoMA) framework characterizes the learning dynamics of multi-layer Transformers, demonstrating that nonlinear activations cause attention to evolve from initially sparse to subsequently dense, facilitating hierarchical feature learning. This framework predicts and empirically confirms a "drop-and-bounce" pattern in attention entropy and MLP stable ranks, providing insights into how Transformers adaptively learn data structures.
Key insights
- Nonlinear MLP activations drive a distinct two-stage attention dynamic: initially sparse (focusing on salient features) then becoming denser (incorporating less salient features), differing from persistent sparsity with linear activations.
- The evolution of self-attention dynamics is intrinsically linked to the MLP weight updates, with JoMA invariants showing attention parameters are implicitly related to MLP weights.
- Multi-layer Transformers learn hierarchical data structures by adaptively matching attention dynamics to token co-occurrence frequencies, starting with strong (low-level) associations and progressing to weaker (high-level) ones.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.