Manuscript Offprint

arXiv:2609.03604

On the Interaction Between Model Compression and Test-Time Adaptation

Francesco Corti, Dong Wang, Young D. Kwon, Cecilia Mascolo, Olga Saukh

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Francesco Corti

Graz University of Technology

Graz, Austria

francesco.corti@tugraz.at

Dong Wang

Graz University of Technology

Graz, Austria

dong.wang@tugraz.at

Young D. Kwon

Samsung AI Center-Cambridge

University of Cambridge

Cambridge, United Kingdom

yd.kwon@samsung.com

Cecilia Mascolo

University of Cambridge

Cambridge, United Kingdom

cm542@cam.ac.uk

Olga Saukh

Graz University of Technology

Complexity Science Hub

Graz, Vienna, Austria

saukh@tugraz.at

ABSTRACT

Deep neural networks deployed in the wild must be both efficient and adaptable, requiring model compression and test-time adaptation (TTA). While both are well studied in isolation, their interaction remains poorly understood. We systematically analyze how structured compression affects a model's ability to adapt under distribution shift. Using ResNet-18 and ViT-Base on CIFAR-10-C and ImageNet-C, we evaluate multiple compression methods combined with standard TTA techniques. We introduce a diagnostic framework that examines representational expressivity and adaptation subspace compatibility. Our results reveal a consistent gap: although compressed models retain high accuracy under supervised adaptation, their TTA performance degrades significantly with increasing compression. We show that this stems from reduced representational diversity and structural constraints that limit recoverability. These effects strongly depend on the compression method, highlighting the need to design compression strategies that preserve adaptability.

1 INTRODUCTION

Deployed deep neural networks (DNNs) often operate under resource constraints and distribution shifts, necessitating both compression to meet memory and latency budgets and adaptation to cope with changing environments (Han et al., 2015; Sun et al., 2020; Wang et al., 2021). While compression and model adaptation have been extensively studied in isolation, their interaction remains largely unexplored (Liang et al., 2025; Choudhary et al., 2020). In particular, it is unclear whether compression strategies can preserve the capacity of a model to adapt to distribution shifts or task variations (Liebenwein et al., 2021).

This interaction is especially critical in edge settings, where adaptation incurs substantial memory overhead due to gradient computation and the need to store intermediate activations (Dong et al., 2026; Gomez et al., 2017; Xiao et al., 2026a). For example, on resource-constrained devices such as Raspberry Pi Zero, adaptation via entropy minimization leads to out-of-memory errors even at small batch sizes (Jia et al., 2024). Consequently, compression is not only desirable for efficient inference but also a prerequisite for enabling on-device adaptation (Lin et al., 2022).

Structured compression methods reduce model size by removing or merging entire computational units (Li et al., 2017; Wang et al., 2025). These methods can be divided into data-dependent methods, which leverage calibration data to estimate unit importance (Sun et al., 2024; Molchanov et al., 2019; LeCun et al., 1989), and data-free methods, which rely on weight statistics (Li et al., 2017) or structural redundancies (Wang et al., 2025).

Test-time adaptation (TTA) has emerged as a promising paradigm for adapting deep models using only unlabeled incoming data (Liang et al., 2025; 2020; Wang et al., 2021). Existing approaches can be broadly categorized into backpropagation-based (BP) and backpropagation-free (BP-free) methods. BP-based methods update model parameters via gradient-based optimization, typically fine-tuning a subset of parameters (Wang et al., 2021; Niu et al., 2023; Gong et al., 2023). While achieving strong adaptation performance, they incur substantial memory overhead due to gradient computation and activation storage, limiting their applicability on resource-constrained devices (Jia et al., 2024).

Figure

(a) ResNet-18 on CIFAR-10-C

(b) ResNet-18 on ImageNet-C

(c) ViT-Base on ImageNet-C

Figure

(d) ResNet-18 on CIFAR-10-C

(e) ResNet-18 on ImageNet-C

(f) ViT-Base on ImageNet-C

Figure 1: The gap between test-time adaptation (TTA) and supervised fine-tuning (Oracle) widens with increasing compression, particularly on ImageNet-C. We compare post-compression TTA against supervised fine-tuning across architectures and datasets, averaged across all corruptions. At low sparsity levels, TTA remains competitive, suggesting that adaptation signals are largely preserved. However, as compression increases, the gap between TTA and supervised fine-tuning grows, suggesting that compressed architectures increasingly hinder effective adaptation with TTA. This effect is especially pronounced on ImageNet-C. Shaded regions indicate ±σ\pm\sigma across corruption types. Top row (a-c): data-dependent pruning (Wanda, Taylor, OBD). Bottom row (d-f): data-free compression (Folding, Mag-ℓ2\ell_2). TTA is performed using SAR (Niu et al., 2023) for ResNet-18 and SPA (Niu et al., 2025) for ViT-Base.

In contrast, BP-free methods avoid gradient computation by adapting parameters during the forward pass (Mirza et al., 2022), modifying lightweight input prompts (Niu et al., 2024) or correcting embedding distortions via layer-wise alignment (Xiao et al., 2026b), making them more suitable for edge deployment. Despite this progress, existing studies predominantly assume dense models and do not account for compression (Mirza et al., 2022; Wang et al., 2021; Niu et al., 2023; Wang et al., 2022; Niu et al., 2022; Sun et al., 2020). This assumption is misaligned with resource-constrained deployment scenarios, where models are routinely compressed to satisfy hardware and efficiency constraints (Fang et al., 2023; Ashkboos et al., 2024; Ma et al., 2023).

Recent studies have shown that compression degrades learned representation quality (Corti et al., 2022), and erodes robustness under distribution shift (Liebenwein et al., 2021). Yet existing work that explicitly considers the compression and adaptation interaction remains limited to quantization (Xiao et al., 2024; Deng et al., 2025). Whether structurally pruned or folded models preserve the representational and geometrical properties required for test-time adaptation remains an open question. In this work, we address the following question:

Does structured compression degrade a model's ability to adapt at test time, or can suitable compression strategies preserve adaptability under distribution shift and task variation?

This question is closely related to continual learning: models deployed at the edge must retain plasticity, i.e., the ability to adapt to incoming data over time (Wang et al., 2022). However, compression applied to meet deployment constraints may inadvertently erode this capacity. If compression reduces feature diversity, misaligns the unsupervised adaptation signal from the supervised gradient direction, or restricts the useful update subspace, the standard compress-and-deploy pipeline can yield models that maintain high accuracy on source data but lose the ability to adapt. We refer to this phenomenon as silent plasticity loss.

Figure 1 provides empirical evidence of this effect: while compressed models retain strong performance under supervised adaptation, their test-time adaptation performance degrades substantially as compression increases, leading to a widening gap between the two. This gap indicates that, despite preserved predictive performance, compression can impair the model's ability to effectively utilize unlabeled test-time signals. A per-corruption decomposition of this gap (Fig. 6) shows that the widening trend generalizes across most corruption types rather than being driven by a subset. To isolate the compression-induced component of this widening from the supervised-unsupervised signal-quality difference already present for the dense model, Fig. 10 reports the Oracle-TTA gap after subtracting its zero-compression value.

We introduce a framework to diagnose how compression interacts with TTA along two complementary dimensions (Sec. 3). First, diversity/expressivity: compression may reduce the variability and richness of internal representations, limiting the range of functions the model can realize during TTA. We quantify this using representation similarity between dense and compressed models (Kornblith et al., 2019), as well as activation entropy across feature maps and tokens (Skean et al., 2025). Second, subspace compatibility: TTA updates are restricted to a small parameter subspace (e.g., normalization layers), and compression may misalign this subspace with useful update directions. We quantify this via gradient cosine similarity between unsupervised and supervised updates, and provide a theoretical analysis of objective-induced gradient degeneracy in both entropy-based and consistency-based TTA objectives.

Our empirical analysis across convolutional and transformer architectures reveals the following insights:

  • The gap between TTA and supervised adaptation (Oracle) widens with increasing compression, suggesting that TTA depends on structural properties of dense models that are not preserved under compression.

  • TTA degrades representations already at low compression levels and fails to recover them at higher sparsity, whereas supervised adaptation consistently restores them, highlighting TTA's sensitivity to compression-induced representational distortions.

  • Compression induces two distinct failure modes of gradient alignment between TTA and supervised updates: gradient degeneracy, where near-uniform predictions attenuate the TTA signal, and active divergence, where the TTA gradient opposes the supervised gradient direction even at minimal sparsity. We show theoretically that both entropy- and consistency-based TTA objectives exhibit gradient collapse under compression, while the supervised cross-entropy gradient can remain more informative at the same sparsity.

  • The severity of these effects depends on the compression method: Wanda and Taylor better preserve recoverable structure, while OBD and Mag- ℓ2\ell_2 lead to pronounced degradation; folding achieves more stable recovery.

  • These effects are substantially more pronounced on ImageNet-C than on CIFAR-10-C, highlighting the increased difficulty of adaptation under complex tasks.

References (58)

  • Git re-basin: Merging models modulo permutation symmetries
  • Slicegpt: Compress large language models by deleting rows and columns
  • Layer Normalization
  • Geometry-aware similarity metrics for neural representations on riemannian and statistical manifolds (opens arXiv in a new tab)
  • Gradient alignment improves test-time adaptation for medical image segmentation
  • A comprehensive survey on model compression and acceleration: T. choudhary et al. Artificial Intelligence Review, 53(7):5113–5155, 2020
  • Studying the impact of magnitude pruning on contrastive learning methods (opens arXiv in a new tab)
  • Reliability of CKA as a similarity measure in deep learning
  • Test-time model adaptation for quantized neural networks
  • Loss of plasticity in deep continual learning
  • E-bats: Efficient backpropagation-free test-time adaptation for speech foundation models
  • An image is worth 16x16 words: Transformers for image recognition at scale
  • Essentially no barriers in neural network energy landscape
  • The role of permutation invariance in linear mode connectivity of neural networks
  • Depgraph: Towards any structural pruning
  • Linear mode connectivity and the lottery ticket hypothesis
  • Loss surfaces, mode connectivity, and fast ensembling of dnns
  • The reversible residual network: Backpropagation without storing activations
  • Sotta: Robust test-time adaptation on noisy data streams
  • Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding (opens arXiv in a new tab)
  • Deep residual learning for image recognition
  • Benchmarking neural network robustness to common corruptions and perturbations
  • Characterising bias in compressed models (opens arXiv in a new tab)
  • Sp3: Enhancing structured pruning via pca projection
  • Tinytta: Efficient test-time adaptation via early-exit ensembles on edge devices
  • REPAIR: REnormalizing permuted activations for interpolation repair
  • Similarity of neural network representations revisited
  • Optimal brain damage
  • Pruning filters for efficient convnets
  • Do we really need to access the source data? source hypothesis transfer for unsupervised domain adaptation
  • A comprehensive survey on test-time adaptation under distribution shifts
  • Nepenthe: Entropy-based pruning as a neural network depth's reducer
  • Lost in pruning: The effects of pruning neural networks beyond test accuracy
  • On-device training under 256kb memory
  • Understanding plasticity in neural networks
  • Llm-pruner: On the structural pruning of large language models
  • Are sixteen heads really better than one? Advances in neural information processing systems, 32, 2019
  • The norm must go on: Dynamic unsupervised domain adaptation by normalization
  • Importance estimation for neural network pruning
  • Efficient test-time model adaptation without forgetting
  • Towards stable test-time adaptation in dynamic wild world
  • Test-time model adaptation with only forward passes
  • Self-bootstrapping for versatile test-time adaptation
  • The effective rank: A measure of effective dimensionality
  • Cut less, fold more: Model compression through the lens of projection geometry
  • Layer by layer: Uncovering hidden representations in language models
  • From llms to edge: Parameter-efficient fine-tuning on edge devices, 2025 (opens arXiv in a new tab)
  • Clustering convolutional kernels to compress deep neural networks
  • A simple and effective pruning approach for large language models
  • Test-time training with self-supervision for generalization under distribution shifts
  • Deep learning and the information bottleneck principle
  • Tent: Fully test-time adaptation by entropy minimization
  • Forget the data and fine-tuning! just fold the network to compress
  • Continual test-time domain adaptation
  • Ttaq: Towards stable post-training quantization in continuous domain adaptation (opens arXiv in a new tab)
  • Efficient Test-Time Adaptation via Decoupled BN Update For Edge Devices
  • Architecture-agnostic test-time adaptation via backprop-free embedding alignment
  • Gradient surgery for multi-task learning