The mechanistic basis of data dependence and abrupt learning in an in-context classification task

Gautam Reddy
2023-12-04
Abstract:Transformer models exhibit in-context learning: the ability to accurately predict the response to a novel query based on illustrative examples in the input sequence. In-context learning contrasts with traditional in-weights learning of query-output relationships. What aspects of the training data distribution and architecture favor in-context vs in-weights learning? Recent work has shown that specific distributional properties inherent in language, such as burstiness, large dictionaries and skewed rank-frequency distributions, control the trade-off or simultaneous appearance of these two forms of learning. We first show that these results are recapitulated in a minimal attention-only network trained on a simplified dataset. In-context learning (ICL) is driven by the abrupt emergence of an induction head, which subsequently competes with in-weights learning. By identifying progress measures that precede in-context learning and targeted experiments, we construct a two-parameter model of an induction head which emulates the full data distributional dependencies displayed by the attention-based network. A phenomenological model of induction head formation traces its abrupt emergence to the sequential learning of three nested logits enabled by an intrinsic curriculum. We propose that the sharp transitions in attention-based networks arise due to a specific chain of multi-layer operations necessary to achieve ICL, which is implemented by nested nonlinearities sequentially learned during training.
Machine Learning
What problem does this paper attempt to address?
The paper primarily explores the mechanisms of data dependency and abrupt learning in specific context-based classification tasks. The focus of the research is to understand how the transformer model, without updating weights, can predict responses to new queries based solely on examples in the input sequence. This ability is referred to as in-context learning (ICL), which contrasts with weight-based learning (IWL) that relies on encoding query-response relationships in network weights. The paper first demonstrates that a minimal attention network trained on simplified datasets can reproduce key findings from previous studies, namely that certain language data distribution characteristics, such as bursts, large dictionaries, and skewed rank-frequency distributions, control the trade-off or simultaneous occurrence between ICL and IWL. The authors point out that ICL is driven by an abrupt induction head which subsequently competes with IWL. By identifying leading indicators before ICL and designing targeted experiments, the authors construct a two-parameter induction head model that simulates full data distribution dependency and captures the learning dynamics exhibited by attention-based networks. The research reveals the mechanism behind the formation of the induction head, attributing it to nested nonlinear sequential learning within multi-layer operation chains, which are necessary for achieving ICL. Additionally, the paper discusses how different data distribution parameters such as the number of classes, bursts, intra-class variability, and rank-frequency distribution exponent impact ICL and IWL. It emphasizes the complexity of the phenomenon of abrupt learning and proposes a phenomenological model to track the loss landscape of induction head formation, aiding in understanding the specific mechanisms behind abrupt learning. In conclusion, the paper provides an in-depth understanding of how the transformer model achieves ICL through the formation and development of induction heads. This is crucial for comprehending the zero-shot learning capability and architectural factors of large-scale language models.