Density estimation with LLMs: a geometric investigation of in-context learning trajectories
Toni J.B. Liu, Nicolas Boull\'e, Rapha\"el Sarfati, Christopher J., Earls

TL;DR
This paper explores how large language models perform in-context density estimation, revealing their learning trajectories in a low-dimensional space and interpreting their behavior as an adaptive kernel density estimator.
Contribution
It introduces a geometric analysis of LLMs' in-context learning trajectories for density estimation, linking their behavior to an adaptive kernel density estimation model.
Findings
LLMs follow similar low-dimensional learning trajectories
LLaMA's in-context density estimation resembles an adaptive KDE
The proposed kernel model captures key behaviors with only two parameters
Abstract
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 leverage the Intensive Principal Component Analysis (InPCA) to visualize and analyze the in-context learning dynamics of LLaMA-2 models. 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 like histograms and Gaussian kernel density estimation (KDE). We interpret the LLaMA in-context DE process as a KDE with an adaptive kernel width and shape. This custom kernel model captures a…
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
TopicsNeural Networks and Applications · Face and Expression Recognition · Digital Imaging for Blood Diseases
MethodsLLaMA
