TL;DR
A novel method reveals that few-shot learning in language models, specifically for addition tasks, is localized to a few attention heads. This insight enhances understanding of the computational structures within transformer models.
✦ Why It Matters
Focus on optimizing attention heads in transformer models to enhance few-shot learning capabilities.
Key Takeaways
Full Summary
Few-shot learning allows language models to generalize from a small number of input-label pairs to make predictions on new data. This study investigates how modern transformer models, like Llama-3-8B-Instruct, implement this learning, particularly for tasks involving integer addition.
A new method was introduced to identify that only a few attention heads are responsible for this learning, specifically three heads operating in six-dimensional subspaces. These subspaces track the units digit and magnitude of numbers using trigonometric functions and low-frequency components.
Additionally, a mathematical identity was derived to connect the 'aggregator' and 'extractor' subspaces, clarifying how information flows from individual examples to a final concept. The findings suggest that analyzing low-dimensional subspaces can provide deeper insights into the internal workings of language models.
Related