A striking property of transformers is their ability to perform in-context learning (ICL), a machine learning framework in which the learner is presented with a novel context during inference implicitly through some data, and tasked with making a prediction in that context. As such, that learner must adapt to the context without additional training. We explore the role of softmax attention in an ICL setting where each context encodes a regression task. We show that an attention unit learns a window that it uses to implement a nearest-neighbors predictor adapted to the landscape of the pretraining tasks. Specifically, we show that this window widens with decreasing Lipschitzness and increasing label noise in the pretraining tasks. We also show that on low-rank, linear problems, the attention unit learns to project onto the appropriate subspace before inference. Further, we show that this adaptivity relies crucially on the softmax activation and thus cannot be replicated by the linear activation often studied in prior theoretical analyses.
UniAttn: Reducing Inference Costs via Softmax Unification for Post-Training LLMs
School of Software, Tsinghua University(清华大学软件学院);School of Computer Science, Beijing University of Posts and Telecommunications(北京邮电大学计算机学院);Beihang University(北航);Department of Automation, Tsinghua University(清华大学自动化系)
DashAttention: Differentiable and Adaptive Sparse Hierarchical Attention
Tsinghua University(清华大学);Instituto Superior Técnico, Universidade de Lisboa(里斯本大学理工学院);Instituto de Telecomunicações(电信研究院);Carnegie Mellon University(卡内基梅隆大学);Sapienza University of Rome(罗马萨皮恩扎大学);University of Edinburgh(爱丁堡大学);TransPerfect(TransPerfect公司);ELLIS Unit Lisbon(里斯本ELLIS单位)
When can isotropy help adapt LLMs' next word prediction to numerical domains?
Department of Electrical and Computer Engineering & Department of Computer Science(电气与计算机工程系与计算机科学系);Department of Computer Science(计算机科学系);Department of Electrical and Computer Engineering(电气与计算机工程系)
PolicyAttention: Softmax Attention Implements Policy Mirror Descent for Closed-Loop Control
Quantitative Research Society(量化研究学会);Nanyang Technological University(南洋理工大学);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));The University of Hong Kong(香港大学)
In-Context Algorithm Emulation in Fixed-Weight Transformers
Center for Foundation Models and Generative AI, Northwestern University(西北大学基础模型与生成式人工智能中心);Department of Computer Science, Northwestern University(西北大学计算机科学系);Ensemble AI;Engineering Science, University of Toronto(多伦多大学工程科学系);Department of Statistics and Data Science, Northwestern University(西北大学统计与数据科学系)