STAG: Structural Test-time Alignment of Gradients for Online Adaptation

Juhyeon Shin, Yujin Oh, Jonghyun Lee, Saehyung Lee, Minjun Park +3 more
2/14/2024
cs.CVcs.LG

No confident code implementation found for this paper.

Abstract

Test-Time Adaptation (TTA) adapts pre-trained models using only unlabeled test streams, requiring real-time inference and update without access to source data. We propose StructuralTest-time Alignment of Gradients (STAG), a lightweight plug-in enhancer that exploits an always-available structural signal: the classifier's intrinsic geometry. STAG derives class-wise structural anchors from classifier weights via self-structural entropy, and during adaptation analytically computes the predicted-class entropy gradient from forward-pass quantities, aligning it to the corresponding anchor with a cosine-similarity loss. This closed-form design incurs near-zero memory and latency overhead and requires no additional backpropagation beyond the underlying baseline. Across corrupted image classification and continual semantic segmentation, STAG provides broadly applicable performance gains for strong TTA baselines on both CNN and Transformer architectures regardless of the underlying normalization scheme, with particularly large gains under challenging online regimes such as imbalanced label shifts, single-sample adaptation, mixed corruption streams and long-horizon continual TTA.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shin2024stag,
  title  = {STAG: Structural Test-time Alignment of Gradients for Online Adaptation},
  author = {Juhyeon Shin and Yujin Oh and Jonghyun Lee and Saehyung Lee and Minjun Park and Dongjun Lee and Uiwon Hwang and Sungroh Yoon},
  year   = {2024},
  eprint = {2402.09004},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.09004v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.09004.svg)](https://codeofpaper.com/paper/2402.09004)

Discussion