Skip to main content
QUICK REVIEW

[Paper Review] Filtering Beats Fine Tuning: A Bayesian Kalman View of In Context Learning in LLMs

Andrew Kiruluta|arXiv (Cornell University)|Jan 2, 2026
Domain Adaptation and Few-Shot LearningComputer Science0 citations
TL;DR

The paper models in-context learning in LLMs as online Bayesian state estimation using Kalman filtering, treating a low-dimensional latent adaptation state with uncertainty dynamics that drive rapid, information-driven adaptation without parameter updates.

ABSTRACT

We present a theory-first framework that interprets inference-time adaptation in large language models (LLMs) as online Bayesian state estimation. Rather than modeling rapid adaptation as implicit optimization or meta-learning, we formulate task- and context-specific learning as the sequential inference of a low-dimensional latent adaptation state governed by a linearized state-space model. Under Gaussian assumptions, adaptation follows a Kalman recursion with closed-form updates for both the posterior mean and covariance. This perspective elevates epistemic uncertainty to an explicit dynamical variable. We show that inference-time learning is driven by covariance collapse, i.e., rapid contraction of posterior uncertainty induced by informative tokens, which typically precedes convergence of the posterior mean. Using observability conditions on token-level Jacobians, we establish stability of the Bayesian filter, prove exponential covariance contraction rates, and derive mean-square error bounds. Gradient descent, natural-gradient methods, and meta-learning updates arise as singular, noise-free limits of the filtering dynamics, positioning optimization-based adaptation as a degenerate approximation of Bayesian inference. The resulting theory provides a unified probabilistic account of in-context learning, parameter-efficient adaptation, and test-time learning without parameter updates. It yields explicit guarantees on stability and sample efficiency, offers a principled interpretation of prompt informativeness via information accumulation, and clarifies the role of uncertainty dynamics absent from existing accounts. Minimal illustrative experiments corroborate the qualitative predictions of the theory.

Motivation & Objective

  • Motivate a theory-first account of inference-time adaptation in LLMs that treats adaptation as sequential Bayesian state estimation.
  • Introduce a low-dimensional latent adaptation state to parameterize task- and context-specific deviations from pretrained models.
  • Provide formal analysis of covariance contraction, stability, and sample efficiency under observability conditions.

Proposed method

  • Propose a linearized state-space model where the effective parameters are θ_t = θ_0 + B x_t with x_t being a latent state.
  • Model the token-wise negative log-likelihood as a linearized observation: ℓ_t ≈ ℓ_t^(0) + ∇_θ ℓ_t^T B x_t + v_t with v_t ∼ N(0, R_t).
  • Apply Kalman (or extended Kalman) filtering to update the posterior p(x_t | D_t) with mean μ_t and covariance P_t.
  • Use information-form (precision) Kalman updates to show monotonic information accumulation and covariance contraction.
  • Derive stability and convergence results under observability assumptions and relate gradient-based methods as singular, noise-free limits of filtering.

Experimental results

Research questions

  • RQ1Can inference-time adaptation in LLMs be rigorously modeled as sequential Bayesian state estimation?
  • RQ2How does information accumulation via prompt tokens affect posterior uncertainty and adaptation speed?
  • RQ3What guarantees can be provided for stability, contraction of uncertainty, and mean-square error in this filtering framework?
  • RQ4How do gradient-based updates relate to the Kalman filter in the limit of vanishing observation noise?
  • RQ5What role does prompt informativeness play in enabling efficient, test-time adaptation without parameter updates?

Key findings

  • Inference-time learning emerges as Bayesian filtering with explicit posterior uncertainty dynamics.
  • Covariance contracts exponentially under observability and information accumulation from prompts.
  • Posterior mean error is bounded with a term that decays as uncertainty contracts, showing rapid improvement before exact state convergence.
  • Gradient descent and natural-gradient methods appear as singular, noise-free limits of the Kalman update, not as primary mechanisms.
  • Prompts act as experiments; their information content governs learnability via the observability Gramian.
  • Kalman-based learning provides stability guarantees and a principled interpretation of prompt informativeness for few-shot generalization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.