Curvature-Aware Zeroth-Order Optimization for Memory-Efficient Test-Time Adaptation

2026-08-12Computer Vision and Pattern Recognition

Computer Vision and Pattern Recognition
AI summary

The authors focus on improving how pre-trained models adjust to new, unlabeled test data without using the usual backpropagation method, which can be too complex for devices with limited resources. They identify a consistent pattern in the way the model’s loss behaves during adaptation and use this to create a new technique called CAZO. This method estimates important curvature information from the loss to guide smarter changes, all while only using simple forward computations. Their tests show that CAZO performs better than other similar methods, balancing accuracy and memory use effectively.

Test-time adaptationBackpropagationZeroth-order optimizationGradient estimationHessian matrixLoss landscapeAnisotropic samplingPre-trained modelsMemory efficiencyAdapter parameters
Authors
Junming Zhang, Shuyu Yin, Peilin Liu, Rendong Ying, Fei Wen
Abstract
Test-time adaptation (TTA) aims to enhance the cross-domain performance of pre-trained models by adapting to unlabeled test data. While most existing TTA methods rely on backpropagation (BP) for finetuning, BP-free methods such as zeroth-order (ZO) methods are more desired in practical on-device scenarios. ZO methods rely only on forward computation, which can largely reduce the complexity and memory overhead of on-device deployment. However, ZO methods suffer from much higher variance compared with first-order methods in estimating the gradient. To address this, we propose an improved ZO method to substantially boost the performance of ZO optimization based TTA. First, we provide an observation to reveal the persistent low-rank Hessian structure of the loss during the adaptation process. Based on this insight, we then propose a loss-landscape curvature-aware zeroth-order (CAZO) method, which leverages a sliding-average estimation of the diagonal Hessian to construct a covariance matrix for anisotropic perturbation sampling. CAZO operates by freezing pretrained weights and optimizing minimal adapter parameters via forward-only passes based gradient estimation, which can substantially reduce the memory overhead compared to BP-based methods. Extensive experiments demonstrate that CAZO significantly outperforms existing TTA methods, achieving state-of-the-art performance while maintaining an excellent balance between accuracy and memory efficiency. Code is available at https://github.com/Hollyming/CAZO.