[论文解读] Gradient Adversarial Training of Neural Networks
本文提出梯度对抗训练(GREAT),一种新颖的框架,通过训练一个辅助网络来分类反向传播过程中梯度张量的来源,同时主网络则对抗性地扭曲这些梯度。GREAT 提升了模型对对抗样本的鲁棒性,实现了更有效的知识蒸馏,并通过在不同任务间对齐梯度来增强多任务学习,且无需超参数调优。
We propose gradient adversarial training, an auxiliary deep learning framework applicable to different machine learning problems. In gradient adversarial training, we leverage a prior belief that in many contexts, simultaneous gradient updates should be statistically indistinguishable from each other. We enforce this consistency using an auxiliary network that classifies the origin of the gradient tensor, and the main network serves as an adversary to the auxiliary network in addition to performing standard task-based training. We demonstrate gradient adversarial training for three different scenarios: (1) as a defense to adversarial examples we classify gradient tensors and tune them to be agnostic to the class of their corresponding example, (2) for knowledge distillation, we do binary classification of gradient tensors derived from the student or teacher network and tune the student gradient tensor to mimic the teacher's gradient tensor; and (3) for multi-task learning we classify the gradient tensors derived from different task loss functions and tune them to be statistically indistinguishable. For each of the three scenarios we show the potential of gradient adversarial training procedure. Specifically, gradient adversarial training increases the robustness of a network to adversarial attacks, is able to better distill the knowledge from a teacher network to a student network compared to soft targets, and boosts multi-task learning by aligning the gradient tensors derived from the task specific loss functions. Overall, our experiments demonstrate that gradient tensors contain latent information about whatever tasks are being trained, and can support diverse machine learning problems when intelligently guided through adversarialization using a auxiliary network.
研究动机与目标
- 为解决通过反向传播训练的深度神经网络泛化能力缺乏正式理解的问题。
- 探究梯度张量(常被忽视)是否包含有助于改善训练动态的潜在信息。
- 开发一个统一框架,通过对抗训练利用梯度张量信息,以在多种学习场景中提升模型性能。
- 通过实现自动梯度对齐,减少知识蒸馏和多任务学习中对超参数调优的依赖。
提出的方法
- 引入一个辅助网络,在反向传播期间对梯度张量的来源(例如不同任务、模型或数据类型)进行分类。
- 使用梯度反转,将对抗性信号反向传递至主网络,促使主网络生成在不同来源间难以区分的梯度张量。
- 采用梯度对齐层(GAL)显式对齐多任务学习中不同损失函数的梯度张量。
- 将相同的对抗机制应用于知识蒸馏,通过训练辅助网络区分学生网络与教师网络的梯度。
- 通过训练辅助网络识别干净样本与对抗样本的梯度,将同一框架应用于对抗防御。
- 利用标准反向传播与反向梯度流之间的功能相似性,实现有效正则化,且无需额外计算。
实验结果
研究问题
- RQ1在反向传播过程中生成的梯度张量能否作为改善模型泛化能力和鲁棒性的可靠信号?
- RQ2对梯度张量进行对抗训练能否提升对目标攻击和非目标攻击的防御能力?
- RQ3梯度对抗训练能否在无需大量超参数调优的情况下提升知识蒸馏效果?
- RQ4在不同任务损失函数之间实现梯度对齐,能否在不手动调整损失权重的情况下提升多任务学习性能?
- RQ5辅助网络能够分类梯度来源的能力,是否揭示了可被用于正则化主网络的潜在结构?
主要发现
- GREAT 在无需训练时使用对抗样本的情况下,显著提升了对目标攻击和非目标攻击的防御能力,表现出强大鲁棒性。
- 在知识蒸馏中,GREAT 超越了软标签蒸馏方法,并在不同学生-教师配置和数据集(包括 mini-ImageNet)上均表现出一致的优越性能。
- 在 CIFAR-10 上,GREAT 在边缘检测和去噪重建任务中表现最佳,且在图像着色任务中误差率仅比最优方法高 0.5%。
- 在 NYUv2 数据集上,GREAT 在深度估计和表面法向量估计任务中分别取得最低 RMSE(0.779 和 0.167),优于基线方法和基于不确定性的方法。
- GREAT 在所有任务中表现与 GradNorm 相当或更优,且无需超参数调优,展现出对数据集和模型架构变化的强鲁棒性。
- 该方法减少了多任务学习中对手动损失权重的依赖,即使在超参数于某一数据集上优化后在另一数据集上失效的情况下,也能实现稀疏与密集场景下的协同训练。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。