Hierarchical Adaptive networks with Task vectors for Test-Time Adaptation
About
Test-time adaptation allows pretrained models to adjust to incoming data streams, addressing distribution shifts between source and target domains. However, standard methods rely on single-dimensional linear classification layers, which often fail to handle diverse and complex shifts. We propose Hierarchical Adaptive Networks with Task Vectors (Hi-Vec), which leverages multiple layers of increasing size for dynamic test-time adaptation. By decomposing the encoder's representation space into such hierarchically organized layers, Hi-Vec, in a plug-and-play manner, allows existing methods to adapt to shifts of varying complexity. Our contributions are threefold: First, we propose dynamic layer selection for automatic identification of the optimal layer for adaptation to each test batch. Second, we propose a mechanism that merges weights from the dynamic layer to other layers, ensuring all layers receive target information. Third, we propose linear layer agreement that acts as a gating function, preventing erroneous fine-tuning by adaptation on noisy batches. We rigorously evaluate the performance of Hi-Vec in challenging scenarios and on multiple target datasets, proving its strong capability to advance state-of-the-art methods. Our results show that Hi-Vec improves robustness, addresses uncertainty, and handles limited batch sizes and increased outlier rates.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Image Classification | Waterbirds | Average Accuracy89.53 | 157 | |
| Image Classification | CIFAR10-C (test) | Accuracy (Gaussian)83.6 | 65 | |
| Image Classification | CIFAR100-C (test) | Robustness Accuracy65.1 | 51 | |
| Adaptation with outlier datasets | CIFAR-10-C | Accuracy (Noise)83.6 | 28 | |
| Adaptation with outlier datasets | CIFAR-100-C | Accuracy (Noise)58.2 | 28 | |
| Image Classification | ColoredMNIST | Accuracy79.53 | 20 | |
| Adaptation with outlier datasets | ImageNet-C with Places365-C outliers 1.0 (test) | Accuracy0.469 | 14 | |
| Adaptation with outlier datasets | ImageNet-C with Textures-C outliers 1.0 (test) | Accuracy46.8 | 14 | |
| Image Classification | CIFAR10 Corrupted (test) | Accuracy86.5 | 14 | |
| Image Classification | CIFAR100 (80:20) Corrupted (test) | Accuracy66.8 | 14 |