Skip to main content
QUICK REVIEW

[论文解读] AutoLoRa: A Parameter-Free Automated Robust Fine-Tuning Framework

Xilie Xu, Jingfeng Zhang|arXiv (Cornell University)|Oct 3, 2023
Adversarial Robustness in Machine LearningComputer Science被引用 3
一句话总结

AutoLoRa 提出了一种无需参数、自动化的鲁棒微调框架,通过低秩(LoRa)分支解耦对抗性与自然目标的优化,通过防止特征提取器中的冲突梯度方向来稳定训练。该方法在无需超参数调优的情况下,在下游任务中实现了最先进(SOTA)的对抗鲁棒性,仅使用启发式学习率和损失标量调度策略。

ABSTRACT

Robust Fine-Tuning (RFT) is a low-cost strategy to obtain adversarial robustness in downstream applications, without requiring a lot of computational resources and collecting significant amounts of data. This paper uncovers an issue with the existing RFT, where optimizing both adversarial and natural objectives through the feature extractor (FE) yields significantly divergent gradient directions. This divergence introduces instability in the optimization process, thereby hindering the attainment of adversarial robustness and rendering RFT highly sensitive to hyperparameters. To mitigate this issue, we propose a low-rank (LoRa) branch that disentangles RFT into two distinct components: optimizing natural objectives via the LoRa branch and adversarial objectives via the FE. Besides, we introduce heuristic strategies for automating the scheduling of the learning rate and the scalars of loss terms. Extensive empirical evaluations demonstrate that our proposed automated RFT disentangled via the LoRa branch (AutoLoRa) achieves new state-of-the-art results across a range of downstream tasks. AutoLoRa holds significant practical utility, as it automatically converts a pre-trained FE into an adversarially robust model for downstream tasks without the need for searching hyperparameters.

研究动机与目标

  • 为解决在通过特征提取器(FE)同时优化对抗性和自然目标时,由于梯度方向发散导致的鲁棒微调(RFT)不稳定性问题。
  • 通过低秩(LoRa)分支解耦对抗性和自然目标的优化,降低 RFT 对超参数的敏感性。
  • 利用受对抗攻击收敛性和软标签质量启发的启发式策略,自动调度学习率和损失标量($\lambda_1$, $\lambda_2$)。
  • 在无需手动超参数搜索的情况下,实现在下游任务中的最先进对抗鲁棒性。

提出的方法

  • 通过将对抗性数据路由至特征提取器(FE),将自然数据通过低秩(LoRa)分支处理,确保 FE 仅优化对抗性目标。
  • 使用 Kullback-Leibler(KL)损失将知识从 LoRa 分支迁移至 FE,通过对齐对抗性 logit 与自然软标签来保持泛化能力。
  • 采用源自 AutoAttack(Croce & Hein, 2020)的步长调度器自动调度学习率,提升收敛稳定性。
  • 将 $\lambda_1$(自然目标权重)设置为与标准准确率成反比,以加速 LoRa 分支的学习。
  • 将 $\lambda_2$(对抗性目标权重)设置为与标准准确率成正比,以控制 LoRa 软标签的置信度。
  • 对软标签应用锐化超参数 $\alpha$,其中 $\alpha=1.0$ 被发现对鲁棒性最优。

实验结果

研究问题

  • RQ1通过 LoRa 分支解耦对抗性和自然目标优化,是否能减少梯度发散并提升鲁棒微调中的训练稳定性?
  • RQ2能否通过启发式、自动化的学习率与损失标量调度,在 RFT 中实现与调优超参数相当的性能?
  • RQ3LoRa 秩的选择如何影响模型性能与参数效率?
  • RQ4预训练期间的对抗性预算 $\epsilon_{\mathrm{pt}}$ 对下游鲁棒性有何影响?
  • RQ5锐化超参数 $\alpha$ 是否显著影响标准准确率与鲁棒准确率之间的权衡?

主要发现

  • AutoLoRa 在 PGD-10 攻击下于 CIFAR-100 上实现了 33.31% 的最先进鲁棒测试准确率,在 DTD-57 上实现了 27.63% 的鲁棒准确率,优于原始 RFT 和 TWINS。
  • AutoLoRa 中的自动学习率调度器性能与调优超参数相当,CIFAR-10 准确率仅下降 0.16%,鲁棒性损失可忽略不计。
  • 使用 $\alpha=1.0$ 可获得最佳鲁棒准确率,而更高的 $\alpha$ 值(如 5.0)会降低鲁棒性,表明最优锐化至关重要。
  • 更大的预训练对抗性预算($\epsilon_{\mathrm{pt}} = 8/255$)能持续提升下游鲁棒性,AutoLoRa 在 CIFAR-100 上实现了 62.82% 的鲁棒准确率。
  • LoRa 分支在 $r_{\mathrm{nat}}=8$ 时仅占原始模型参数的 4.87%,同时在 CIFAR-10 上保持 54.27% 的鲁棒准确率,展现出极高的效率。
  • 在原始 RFT 和 TWINS 中,自然与对抗性目标之间的梯度相似性显著下降(例如,~0.2),而 AutoLoRa 通过解耦目标维持了稳定的优化。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。