Large Language Models (LLMs) have been shown to organize the representations of input sequences into straighter neural trajectories in their deep layers, which has been hypothesized to facilitate next-token prediction via linear extrapolation. Language models can also adapt to diverse tasks and learn new structure in context, and recent work has shown that this in-context learning (ICL) can be reflected in representational changes. Here we bring these two lines of research together to explore whether representation straightening occurs \emph{within} a context during ICL. We measure representational straightening in Gemma 2 models across a diverse set of in-context tasks, and uncover a dichotomy in how LLMs' representations change in context. In continual prediction settings (e.g., natural language, grid world traversal tasks) we observe that increasing context increases the straightness of neural sequence trajectories, which is correlated with improvement in model prediction. Conversely, in structured prediction settings (e.g., few-shot tasks), straightening is inconsistent -- it is only present in phases of the task with explicit structure (e.g., repeating a template), but vanishes elsewhere. These results suggest that ICL is not a monolithic process. Instead, we propose that LLMs function like a Swiss Army knife: depending on task structure, the LLM dynamically selects between strategies, only some of which yield representational straightening.
Abstract representational geometry supports inference in large language models
College of Future Information Technology, Fudan University(复旦大学未来信息科技学院);Beijing National Research Center for Information Science and Technology, Tsinghua University(北京信息科学与技术国家研究中心,清华大学)
The Geometry of Representational Failures in Vision Language Models
Dipartimento di Fisica, Università di Torino(都灵大学物理系);Princeton Neuroscience Institute and AI Lab, Princeton University(普林斯顿大学神经科学研究所和AI实验室);Intesa Sanpaolo AI Research(Intesa Sanpaolo AI研究中心);Dipartimento di Scienze Matematiche, Politecnico di Torino(都灵理工学院数学科学系);Network Science Institute, Northeastern University London, UK(伦敦大学东北方大学网络科学研究所)
Training-Driven Representational Geometry Modularization Predicts Brain Alignment in Language Models
School of Biomedical Engineering, Tsinghua University, Beijing, China(生物医学工程学院,清华大学,北京,中国);Tsinghua Laboratory of Brain and Intelligence, Tsinghua University, Beijing, China(脑与智能实验室,清华大学,北京,中国);School of Basic Medical Sciences, Tsinghua University, Beijing, China(基础医学学院,清华大学,北京,中国);Department of Psychological and Cognitive Sciences, Tsinghua University, Beijing, China(心理学与认知科学系,清华大学,北京,中国)
Large language models reorganize representational geometry during in-context learning
School of Psychological and Brain Sciences, Georgia Tech(佐治亚理工学院心理与脑科学学院);Department of Psychology, New York University(纽约大学心理学系);Center of Excellence for Computational Cognition, Georgia Tech(佐治亚理工学院计算认知卓越中心);Honda Research Institute(本田研究院);Departments of Neuroscience and Psychology, The University of Texas at Austin(德克萨斯大学奥斯汀分校神经科学与心理学系)
Do Models Hear Like Us? Probing the Representational Alignment of Audio LLMs and Naturalistic EEG
School of Computer Science, Chongqing University(重庆大学计算机科学学院);Dept. of Comp. Sci. and Tech., Institute for AI, Tsinghua University(清华大学计算机科学与技术系、人工智能研究院);School of Economics and Business Administration, Chongqing University(重庆大学经济与商业管理学院);School of Artificial Intelligence, Southwest University(西南大学人工智能学院);The First Affiliated Hospital of Chongqing Medical University(重庆医科大学第一附属医院)
Tracing the Representation Geometry of Language Models from Pretraining to Post-training
Computer Science, McGill University(麦吉尔大学计算机科学系);Mila - Quebec AI Institute(魁北克人工智能研究所);UC Berkeley(加州大学伯克利分校);G o o g l e , Paradigms of Intelligence Team(谷歌,智能范式团队);Mathematics and Statistics, Université de Montréal(蒙特利尔大学数学与统计学系);Neurology & Neurosurgery and Montreal Neurological Institute, McGill University(神经病学与神经外科及蒙特利尔神经研究所,麦吉尔大学);CIFAR Learning in Machines & Brains Program(CIFAR 机器与大脑学习计划)
How Pruning Reshapes Features: Sparse Autoencoder Analysis of Weight-Pruned Language Models
organization= VRAIN -- Valencian Research Institute for Artificial Intelligence, Universitat Polit\`ecnica de Val\`encia , city= Valencia , country= Spain;organization= Department of Economics;organization= Department of Business Organisation, Universitat Polit\`ecnica de Val\`encia , city= Valencia , country= Spain
The Shape of Adversarial Influence: Characterizing LLM Latent Spaces with Persistent Homology
Microsoft Security Response Center(微软安全响应中心);AIDOS Lab, University of Fribourg(弗里堡大学AIDOS实验室);Department of Mathematics, Imperial College London(伦敦帝国理工学院数学系);Queen Mary University of London(伦敦大学量子玛丽学院);Imperial College London(伦敦帝国理工学院);Language Technology Lab, University of Cambridge(剑桥大学语言技术实验室);The Alan Turing Institute(艾伦·图灵研究所)