You Don't Need Feature Learning to Do In-Context Learning
Abstract
How should we understand memorization vs. generalization in in-context learning (ICL) tasks, and when does one happen vs. the other? To investigate, we study how rotation-invariant kernel machines learn the ICL linear regression task proposed by Raventos et al. (2023). By decomposing the task in the kernel eigenbasis, we obtain a spectral picture of learning in this ICL setting. This picture reveals that as sample size grows, kernel machines learn successively-higher-degree components of the memorizing solution, which depend upon successively-higher-degree statistics of the training task set. The generalizing solution is approximately a low-degree truncation of the memorizing solution, and so the model first generalizes, then degrades into memorization as training proceeds. The takeaways are threefold. First, if this case is indicative, learning a "generalizing" solution on an ICL task is really just underfitting the memorizing solution! Second, the fact that kernel machines can generalize on this task means that feature learning is inessential to ICL. Third, transformers empirically trained to do ICL are shown to memorize tasks through the higher-order statistics of the training tasks that the kernel-based theory predicts, suggesting it applies even to models capable of feature learning.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI
Related papers
Transformers with Signatures: Towards Universal In-Context Learning in Path Space
Shared title terminologycs.LGZiheng Cheng, Xin Guo, Ben Hambly
PhysICL: In-Context Learning of Physical Fields on Unstructured Meshes from Procedural Priors
Shared title terminologycs.LGFabien Casenave
EEG Decoding in Context: A Framework for Tuning-Free EEG Foundation Models
Shared title terminologycs.LGHao-Run Cai, Si-Yang Liu, Han-Jia Ye et al.
Attention Temperature Confounds Zero-Shot Context Extension
Shared title terminologycs.LGRuben Navasardyan
Near-Far Attention: Region-Aware Sparse Retrieval for Long-Context LLM Decoding
Shared title terminologycs.LGYuanShuo Wang, Jianchao Tan, Lei Gong et al.
Why Calibrated BM25 Filtering Barely Reduced Context on LongMemEval
Shared title terminologycs.LGJohn Knight, Erchin Serpedin, Hasan Kurban