DropAttack: A Masked Weight Adversarial Training Method to Improve Generalization of Neural Networks

Ni S., Li J. and Kao H. DropAttack: a masked weight adversarial training method to improve generalization of neural networks. In International Conference on Learning Representations (ICLR), 2022.

采用DropOut的方式, 对输入和网络参数随机性的添加扰动, 思想和AWP有点类似, 都是以增加泛化性的角度出发的.

主要内容

不同一般的对抗训练:

\[\min_{\theta} \mathbb{E}_{(x, y) \sim \mathcal{D}} [\max_{r_{adv} \in S} L(\theta, x + r_{adv}, y)], \]

作者希望'同时'攻击输入和参数:

\[\min_{\theta}\mathbb{E}_{(x, y) \sim D} [\max_{r_x \in S} L(\theta, x + M_x \cdot r_x, y) + \max_{r_{\theta} \in S} L(\theta + M_{\theta} \cdot r_{\theta}, x, y)]. \]

和普通的训练一样, 也是采用梯度去近似求解maximum的, 其算法如下:

让人比较好奇是, 又没有一起攻击的说法呢?

\[\min_{\theta}\mathbb{E}_{(x, y) \sim D} [\max_{r_x \in S} L(\theta + M_{\theta} \cdot r_{\theta}, x + M_x \cdot r_x, y). \]

代码

原文代码

posted @ 2022-04-02 14:41  馒头and花卷  阅读(83)  评论(0编辑  收藏  举报