atlas

Research map / Time series / Foundation models for time series

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

ICLR 2025 · Time series › Foundation models for time series · approach: LLM-based time series forecasting · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Probes LLMs' in-context density estimation by serializing samples as 2-digit numbers, extracting PDFs with Hierarchy-PDF, and visualizing trajectories with InPCA, finding LLM trajectories resemble an adaptive-kernel KDE with two parameters.

Problem

How LLMs estimate probability density functions from data observed in context, and what geometric/algorithmic process underlies this in-context density estimation compared with classical methods like histograms and KDE.

Approach

Uses InPCA on Hellinger distances to embed in-context density estimation trajectories of pretrained LLMs alongside histogram and KDE trajectories, then fits a two-parameter bespoke KDE with adaptive kernel shape and bandwidth that reproduces LLM behavior.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use LLaMA-2 in-context density estimation instead of Gaussian KDEDensity estimation on narrow Gaussian targets · Narrow Gaussian targetsqualitative convergence to the target PDFHelped
Use LLaMA-based density estimation instead of Gaussian KDEDensity estimation on narrow uniform targets · Narrow uniform targetsqualitative ability to reach the target PDFHelped
Use a fitted adaptive kernel shape and bandwidthBespoke KDE · LLaMA-2 13B density-estimation trajectoriestrajectory similarityHelped
Replace the standard n^{-1/5} bandwidth schedule with a faster-decaying fitted scheduleKDE on a narrow Gaussian target · Narrow Gaussian targettrajectory similarity to LLaMA-2 13BHelped
Vary kernel shape from tophat and Gaussian toward smaller shape parameters (ablation)KDE on a narrow Gaussian target · Narrow Gaussian targettrajectory similarity to LLaMA-13BHelped
Fit bespoke KDE to Bayesian histogram trajectoriesBespoke KDE · Bayesian histogram trajectoriestrajectory similarityHurt
Use standard PCA instead of InPCA (ablation)Visualization of LLaMA-2 density-estimation trajectories · LLaMA-2 trajectoriesgeometric clarity of trajectories: 91% vs 83%Hurt

Surprising findings

Limitations

Experimental setup

Datasets: synthetic samples from Gaussian, uniform, and Gaussian-process-generated PDFs

Metrics: Hellinger distance pairwise distance variance captured by InPCA embedding KL-divergence for bespoke KDE fitting

Baselines: Gaussian KDE Bayesian histogram

Builds on: Hierarchy-PDF InPCA Gaussian kernel density estimation induction heads

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy