Uncovering Emergent Physics Representations Learned In-Context by Large Language Models
Yeongwoo Song, Jaeyong Bae, Dong-Kyum Kim, Hawoong Jeong

TL;DR
This paper investigates how large language models learn and encode physical concepts during in-context learning, revealing that they develop representations aligned with physical variables like energy through analyzing their internal activations.
Contribution
It introduces a mechanistic analysis of LLMs' physics reasoning, showing that meaningful physical concepts are encoded during in-context learning using sparse autoencoders.
Findings
LLMs improve physics-based dynamics forecasting with longer contexts
Sparse autoencoders reveal features correlating with physical variables like energy
Physical concepts are encoded within LLMs during in-context learning
Abstract
Large language models (LLMs) exhibit impressive in-context learning (ICL) abilities, enabling them to solve wide range of tasks via textual prompts alone. As these capabilities advance, the range of applicable domains continues to expand significantly. However, identifying the precise mechanisms or internal structures within LLMs that allow successful ICL across diverse, distinct classes of tasks remains elusive. Physics-based tasks offer a promising testbed for probing this challenge. Unlike synthetic sequences such as basic arithmetic or symbolic equations, physical systems provide experimentally controllable, real-world data based on structured dynamics grounded in fundamental principles. This makes them particularly suitable for studying the emergent reasoning behaviors of LLMs in a realistic yet tractable setting. Here, we mechanistically investigate the ICL ability of LLMs,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputational Physics and Python Applications
