Clustering Head: A Visual Case Study of the Training Dynamics in Transformers
2024-10-31Unverified0· sign in to hype
Ambroise Odonnat, Wassim Bouaziz, Vivien Cabannes
Unverified — Be the first to reproduce this paper.
ReproduceAbstract
This paper introduces the sparse modular addition task and examines how transformers learn it. We focus on transformers with embeddings in ^2 and introduce a visual sandbox that provides comprehensive visualizations of each layer throughout the training process. We reveal a type of circuit, called "clustering heads," which learns the problem's invariants. We analyze the training dynamics of these circuits, highlighting two-stage learning, loss spikes due to high curvature or normalization layers, and the effects of initialization and curriculum learning.