Table of Contents
Fetching ...

Rethinking Test-Time Training: Tilting The Latent Distribution For Few-Shot Source-Free Adaptation

Tahir Qasim Syed, Behraj Khan

TL;DR

This paper tackles the problem of adapting frozen foundation model components for few-shot classification without access to upstream data or parameter updates. It reframes adaptation as a KL-optimal change of measure over the latent embedding distribution induced by the encoder, implemented via exponential tilting using task-relevant scores derived from a small support set. By reweighting latent representations, predictions under the tilted distribution $P_\lambda$ incorporate downstream task structure without modifying the encoder, classifier, or decision rule, and without gradients. Empirically, tilting yields consistent gains across multiple datasets, backbones, and shot regimes, with transductive tilting further boosting performance and cross-domain generalization demonstrating the robustness of this inference-time distributional correction approach. The work highlights latent distribution reweighting as a viable, training-free alternative to parameter-based adaptation for constrained deployment of foundation models.

Abstract

Often, constraints arise in deployment settings where even lightweight parameter updates e.g. parameter-efficient fine-tuning could induce model shift or tuning instability. We study test-time adaptation of foundation models for few-shot classification under a completely frozen-model regime, where additionally, no upstream data are accessible. We propose arguably the first training-free inference method that adapts predictions to the new task by performing a change of measure over the latent embedding distribution induced by the encoder. Using task-similarity scores derived from a small labeled support set, exponential tilting reweights latent distributions in a KL-optimal manner without modifying model parameters. Empirically, the method consistently competes with parameter-update-based methods across multiple benchmarks and shot regimes, while operating under strictly and universally stronger constraints. These results demonstrate the viability of inference-level distributional correction for test-time adaptation even with a fully-frozen model pipeline.

Rethinking Test-Time Training: Tilting The Latent Distribution For Few-Shot Source-Free Adaptation

TL;DR

This paper tackles the problem of adapting frozen foundation model components for few-shot classification without access to upstream data or parameter updates. It reframes adaptation as a KL-optimal change of measure over the latent embedding distribution induced by the encoder, implemented via exponential tilting using task-relevant scores derived from a small support set. By reweighting latent representations, predictions under the tilted distribution incorporate downstream task structure without modifying the encoder, classifier, or decision rule, and without gradients. Empirically, tilting yields consistent gains across multiple datasets, backbones, and shot regimes, with transductive tilting further boosting performance and cross-domain generalization demonstrating the robustness of this inference-time distributional correction approach. The work highlights latent distribution reweighting as a viable, training-free alternative to parameter-based adaptation for constrained deployment of foundation models.

Abstract

Often, constraints arise in deployment settings where even lightweight parameter updates e.g. parameter-efficient fine-tuning could induce model shift or tuning instability. We study test-time adaptation of foundation models for few-shot classification under a completely frozen-model regime, where additionally, no upstream data are accessible. We propose arguably the first training-free inference method that adapts predictions to the new task by performing a change of measure over the latent embedding distribution induced by the encoder. Using task-similarity scores derived from a small labeled support set, exponential tilting reweights latent distributions in a KL-optimal manner without modifying model parameters. Empirically, the method consistently competes with parameter-update-based methods across multiple benchmarks and shot regimes, while operating under strictly and universally stronger constraints. These results demonstrate the viability of inference-level distributional correction for test-time adaptation even with a fully-frozen model pipeline.
Paper Structure (56 sections, 6 theorems, 27 equations, 6 tables)

This paper contains 56 sections, 6 theorems, 27 equations, 6 tables.

Key Result

Theorem A.1

Let $P_0$ be a reference probability measure over latent space $\mathcal{Z}$, and let $s : \mathcal{Z} \rightarrow \mathbb{R}$ be a measurable score function. For any $c \in \mathbb{R}$, consider the constrained optimization problem Then the unique solution is given by the exponentially tilted distribution where $\lambda \in \mathbb{R}$ is chosen such that $\mathbb{E}_{z \sim P_\lambda}[s(z)] =

Theorems & Definitions (11)

  • Theorem A.1: KL-Optimal Latent Measure Adaptation
  • proof
  • Corollary A.2: Empirical Latent Tilting
  • Theorem A.3: Bayes-Optimal Marginal Prediction under a Tilted Latent Measure
  • proof
  • Proposition A.4: Empirical Form of the Tilted Measure
  • proof
  • Corollary A.5: Label-Shift Correction as a Special Case
  • proof
  • Proposition A.6: First-Order Stability for Small $\lambda$
  • ...and 1 more