Lune

ICLR2025顶会

Density estimation with LLMs: a geometric investigation of in-context learning trajectories

Toni J. B. Liu, Nicolas Boullé, Raphaël Sarfati, Christopher J. Earls

摘要

Large language models (LLMs) demonstrate remarkable emergent abilities to perform in-context learning across various tasks, including time-series forecasting. This work investigates LLMs' ability to estimate probability density functions (PDFs) from data observed in-context; such density estimation (DE) is a fundamental task underlying many probabilistic modeling problems. We use Intensive Principal Component Analysis (InPCA) to visualize and analyze the in-context learning dynamics of LLaMA-2, Gemma, and Mistral. Our main finding is that these LLMs all follow similar learning trajectories in a low-dimensional InPCA space, which are distinct from those of traditional density estimation methods such as histograms and Gaussian kernel density estimation (KDE). We interpret these LLMs' in-context DE process as a KDE algorithm with adaptive kernel width and shape. This custom kernel model captures a significant portion of the LLMs' behavior despite having only two parameters. We further speculate on why the LLMs' kernel width and shape differ from classical algorithms, providing insights into the mechanism of in-context probabilistic reasoning in LLMs. Our codebase, along with a 3D visualization of an LLM's in-context learning trajectory, is publicly available at https://github.com/AntonioLiu97/LLMICL_inPCA.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • LoRA: Low-Rank Adaptation of Large Language Models 引用了 Language Models are Few-Shot Learners
  • Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixtures 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • Transformers as Unsupervised Learning Algorithms: A study on Gaussian Mixtures 引用了 Language Models are Few-Shot Learners
  • Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-context 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-context 引用了 Language Models are Few-Shot Learners
  • Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-context 引用了 Large Language Models Are Zero-Shot Time Series Forecasters
  • An Explanation of In-context Learning as Implicit Bayesian Inference 引用了 Language Models are Few-Shot Learners
  • Large Language Models Are Zero-Shot Time Series Forecasters 引用了 Language Models are Few-Shot Learners
  • Time-LLM: Time Series Forecasting by Reprogramming Large Language Models 引用了 Language Models are Few-Shot Learners
  • Time-LLM: Time Series Forecasting by Reprogramming Large Language Models 引用了 Large Language Models Are Zero-Shot Time Series Forecasters
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper2

  1. Transformers as Unsupervised Learning Algorithms: A study on Gaussian MixturesZhiheng Chen, Ruofan Wu, Guanhua FangICLR 2026 · 2 次引用
  2. Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-contextYijia Dai, Zhaolin Gao, Yahya Sattar, Sarah Dean 等NeurIPS 2025 · 2 次引用

它引用的 Paper12

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
  3. An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 次引用
  4. Time-LLM: Time Series Forecasting by Reprogramming Large Language ModelsMing Jin, Shiyu Wang, Lintao Ma, Zhixuan Chu 等ICLR 2024 · 915 次引用
  5. Large Language Models Are Zero-Shot Time Series ForecastersNate Gruver, Marc Finzi, Shikai Qiu, Andrew Gordon WilsonNeurIPS 2023 · 898 次引用

相关 Paper

  1. What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 次引用
  2. Task Descriptors Help Transformers Learn Linear Models In-ContextRuomin Huang, Rong GeICLR 2025
  3. Language Models Are Implicitly ContinuousSamuele Marro, Davide Evangelista, Xuanqiang Angelo Huang, Emanuele La Malfa 等ICLR 2025
  4. Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder PerspectiveSeungwook Han, Jinyeop Song, Jeff Gore, Pulkit AgrawalICML 2025
  5. Controllable Context Sensitivity and the Knob Behind ItJulian Minder, Kevin Du, Niklas Stoehr, Giovanni Monea 等ICLR 2025
黄昏的海面,两侧是细线勾勒的悬崖