提出新型零阶优化方法,让模型在低内存设备上高效适应新数据。
Curvature-Aware Zeroth-Order Optimization for Memory-Efficient Test-Time Adaptation

- 利用损失曲率先验设计自适应扰动采样策略
- 在多个数据集上超越现有方法,准确率提升2.1%-4.7%
- 适合资源受限的边缘设备部署,内存开销大幅降低
测试时自适应(TTA)旨在通过适配未标注测试数据来提升预训练模型的跨域性能。现有方法多依赖反向传播(BP)微调,但在设备端部署时内存开销大。无梯度的零阶(ZO)方法仅需前向计算,更适用于实际场景。然而,其梯度估计方差远高于一阶方法。本文发现:适配过程中损失函数的海森矩阵具有持续的低秩结构。基于此,提出曲率感知零阶优化(CAZO)方法,通过滑动平均估计对角海森值构建协方差矩阵,实现各向异性扰动采样。该方法冻结预训练权重,仅优化少量适配器参数,完全基于前向传播进行梯度估计,显著降低内存消耗。大量实验表明,CAZO在多个基准数据集上显著优于现有方法,达到先进水平,同时兼顾精度与内存效率。代码已开源。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。