Skip to main content
Back

KAIST's IMSE Beats Vision AI Corruption With 0.05% of Rival Parameters

IMSE adapts Vision Transformers at test time by tuning only singular values, achieving state-of-the-art accuracy with 385x fewer trainable parameters than competing methods.

Pro

  • IMSE adapts Vision Transformers at test time by tuning only singular values via SVD, using 385x fewer parameters than prior methods.
  • Each linear layer is reinterpreted as a mixture of independent spectral experts; only their contribution weights (singular values) are updated.
  • A new Diversity Maximization Loss prevents feature collapse caused by standard entropy minimization during unsupervised adaptation.
  • IMSE-Retrieval adds a domain memory bank that stores adapted singular values and retrieves them when similar domains reappear in continual TTA.
  • Achieves state-of-the-art on ImageNet-C/R/A, with +5.0 pp over prior best on ImageNet-R and +6.7 pp over ViDA in the continual TTA setting.
  • Code is open-source and works with supervised ViT, MAE, and CLIP pretrained backbones.

Every deployed vision model eventually faces the same quiet crisis: the real world doesn't look like the training set. Fog, blur, sensor noise, domain shifts from artistic renderings to adversarial examples -- the gap between training distribution and deployment conditions is a persistent, expensive problem. Test-time adaptation (TTA) tries to fix this by letting a model update itself on the fly as new data arrives. But most TTA methods either touch too many parameters (risking catastrophic forgetting) or too few (leaving performance on the table). A new paper from KAIST and LG Energy Solution proposes a third path.

IMSE (Intrinsic Mixture of Spectral Experts) reframes what a linear layer actually is -- not a monolithic weight matrix, but a mixture of independent feature extractors -- and uses that insight to adapt large pretrained Vision Transformers with a tiny fraction of the usual parameter budget.

The hidden structure inside every weight matrix

The key mathematical tool here is Singular Value Decomposition (SVD). SVD factorizes any matrix W into three components: W = U * Σ * V^T, where U and V are orthonormal bases (the directions) and Σ is a diagonal matrix of singular values (the magnitudes). IMSE reinterprets each rank-1 component u_i * v_i^T as a spectral expert -- a dedicated feature extractor that operates independently from all others because the singular vectors are mutually orthogonal.

The singular values then become contribution weights: how much each expert's output matters. This is the key insight. IMSE adapts the model to new domains by updating only the singular values while freezing the singular vectors, preserving the subspace of the weight matrix and leveraging the rich feature extractors that pretrained models have already acquired. The result is a drastically smaller set of trainable parameters -- just the diagonal entries of Σ across all layers, which the paper calls the spectral code.

# Conceptual sketch of IMSE adaptation
import torch
# Decompose a pretrained linear layer
U, S, Vh = torch.linalg.svd(W_pretrained, full_matrices=False)
# During TTA: only S is updated, U and Vh are frozen
S_adapted = S.clone().requires_grad_(True)
# Forward pass reconstructs the weight on the fly
W_adapted = U @ torch.diag(S_adapted) @ Vh
output = input @ W_adapted.T

The entropy trap -- and how to escape it

Standard TTA relies on entropy minimization: push the model to make confident predictions on test data. It works, but it has a dark side. Entropy minimization often induces feature collapse, where only a subset of experts is dominantly activated, causing the model to focus on domain-specific rather than class-discriminative features. In plain terms: the model learns to recognize "this looks like a foggy image" instead of "this is a dog." Confidence goes up, but for the wrong reasons.

IMSE addresses this with a Diversity Maximization Loss. The idea is to measure how uniformly the spectral experts are being used across a batch. For each expert, the paper computes how strongly it responds to each input token (the expert-input alignment). If the standard deviation of those responses is low, the expert is firing the same way for everything -- a sign of collapse. The diversity loss penalizes this, pushing the model to keep using its full repertoire of feature extractors.

The full objective combines entropy minimization and diversity maximization: L_IMSE = L_entmin + λ_dm * L_dm, where the two losses play complementary roles -- entropy minimization provides the adaptation signal while diversity maximization prevents representation collapse.

IMSE architecture diagram showing domain bank, singular value adaptation pipeline, and retrieval mechanism

Memory for a shifting world

Single-domain TTA is the easy case. The harder problem is Continual TTA (CTTA): the model sees an endless stream of data where the domain keeps changing -- fog, then blur, then noise, then back to fog -- without any labels or domain boundary signals. The challenge is not just adapting forward, but remembering what you learned before.

IMSE-Retrieval handles this with a Domain Bank: a lightweight memory that stores pairs of (domain descriptor, spectral code). The domain descriptor is computed cheaply from patch token statistics (channel-wise mean and variance after the embedding stage). When a domain shift is detected -- using symmetric KL divergence between the current descriptor and an exponential moving average -- the system stores the current adapted spectral code and retrieves the most similar past code to initialize the next adaptation. The storage required for the Domain Bank is approximately 0.33 MB per domain, which is negligible relative to the ViT-Base backbone size of 330.23 MB.

Benchmarks: the numbers hold up

The paper evaluates on three standard robustness benchmarks:

  • ImageNet-C: 15 corruption types (noise, blur, weather, digital) at severity level 5, 50k images
  • ImageNet-R: artistic renditions of ImageNet classes (style shift)
  • ImageNet-A: naturally occurring adversarial examples (hard real-world cases)

On ImageNet-C with a supervised ViT-Base backbone, IMSE achieves 69.0% average accuracy across 15 corruptions, outperforming the previous best method DPAL by 2.0 percentage points. The gains are even larger on out-of-distribution shift types: IMSE outperforms DPAL by 5.0 pp on ImageNet-R and by 4.9 pp on ImageNet-A.

The method also generalizes across pretraining strategies. With MAE and CLIP pretraining, IMSE outperforms DPAL by 3.4 pp and 2.8 pp respectively, indicating that adjusting only the singular values is effective regardless of the pretraining method.

In the continual setting, the efficiency advantage becomes dramatic. IMSE-Retrieval achieves 64.4% accuracy in CTTA while requiring only 36.8K trainable parameters -- about 0.05% of the parameters updated by CoTTA and 0.26% relative to ViDA. It is also 3.5 times faster than ViDA and 2.5 times faster than CoTTA at runtime.

MethodCTTA AccuracyTrainable ParamsRuntime (sec/batch)
TENT52.8%38.4K0.31
CoTTA50.7%86.4M2.52
ViDA57.7%14.2M3.49
IMSE-Retrieval64.4%36.8K0.99

What this unlocks in practice

The combination of extreme parameter efficiency, no need for source data, and a retrieval mechanism for domain memory makes IMSE a strong candidate for several real-world scenarios:

  • Edge deployment: models running on hardware with limited memory that encounter varying lighting, weather, or sensor conditions
  • Industrial inspection: cameras that shift over time due to wear, lighting changes, or product line changes (notably, LG Energy Solution co-authored this paper)
  • Medical imaging: scanners from different manufacturers or settings that produce systematically different image statistics
  • Long-running production systems: any model that needs to stay accurate as its input distribution drifts without retraining from scratch

One practical limitation worth noting: while IMSE requires far fewer trainable parameters than existing approaches, it introduces some additional memory usage due to storing decomposed singular vectors alongside the original weights. The one-time SVD decomposition of all linear layers takes about 5 seconds as an offline preprocessing step, but this is a fixed cost paid once before deployment.

The SVD of all linear layers is performed only once as an offline preprocessing step before adaptation, and reconstructing weights via W = U*Σ*V^T adds an overhead of only 0.07 seconds per batch -- about 7% of total adaptation time. The code is publicly available on GitHub, built on top of the DPAL and ViDA codebases.