Conflict-Aware Adversarial Training

## Abstract

Abstract Adversarial training is the most effective method to obtain adversarial robustness for deep neural networks by directly involving adversarial samples in the training procedure. To obtain an accurate and robust model, the weighted-average method is applied to optimize standard loss and adversarial loss simultaneously. In this paper, we argue that the weighted-average method does not provide the best tradeoff for the standard performance and adversarial robustness. We argue that the failure of the weighted-average method is due to the conflict between the gradients derived from standard and adversarial loss, and further demonstrate such a conflict increases with attack budget theoretically and practically. To alleviate this problem, we propose a new trade-off paradigm for adversarial training with a conflict-aware factor for the convex combination of standard and adversarial loss, named Conflict-Aware Adversarial Training (CA-AT) . Comprehensive experimental results show that CA-AT consistently offers a superior trade-off between standard performance and adversarial robustness under the settings of adversarial training from scratch and parameter-efficient finetuning.

## 1 Introduction

Deep learning models have achieved exemplary performance across diverse application domains (He et al., ; Vaswani et al., ; Ouyang et al., ; Rombach et al., ; Radford et al., ). However, they remain vulnerable to adversarial samples produced by adversarial attacks (Goodfellow et al., ; Liu et al., ; Moosavi-Dezfooli et al., ). Deep learning models can easily be fooled into making mistakes by adding an imperceptible noise produced by adversarial attacks to the standard sample. To solve this problem, many methods have been proposed to improve the robustness against adversarial samples (Cai et al., ; Chakraborty et al., ; Madry et al., ), among which adversarial training (AT) has been proven to be the most effective strategy (Madry et al., ; Athalye et al., ; Qian et al., ; Bai et al., ). Specifically, AT aims to enhance model robustness by directly involving adversarial samples during training. They used adversarial examples to construct the adversarial loss functions for parameter optimization. The adversarial loss can be formulated as a min-max optimization objective, where the adversarial samples are generated by the inner maximization, and the model parameters are optimized by the outer minimization to reduce the empirical risk for adversarial samples.

The trade-off between standard and adversarial accuracy is a key factor for the real-world applications of AT (Tsipras et al., ; Balaji et al., ; Yang et al., ; Stutz et al., ; Zhang et al., ). Although AT can improve robustness against adversarial samples, it also undermines the performance on standard samples. Existing AT methods (Madry et al., ; Cai et al., ; Zhang et al., ; Wang et al., ) design a hybrid loss by combining standard loss and an adversarial loss linearly, where the linear coefficient typically serves as the trade-off factor.

In this paper, we argue that linearly weighted-average method for AT, as well as the Vanilla AT, cannot achieve a ‘near-optimal’ trade-off. In other words, it fails to approximately achieve the Pareto optimal points on the Pareto front of standard and adversarial accuracies. We find that the conflict between the parameter gradient derived from standard loss (standard gradient) and the one derived from adversarial loss (adversarial gradient) is the main source of this failure. Such a gradient conflict causes the model parameter to be stuck in undesirable local optimal points, and it becomes more severe with the increase of adversarial attack budget. In addition, to obtain adversarial robustness, linearly weighted-average method usually sacrifices too much performance on standard samples, which hinders AT from real-world applications.

To solve the problems mentioned above, we propose Conflict-Aware Adversarial Training (CA-AT) to mitigate the conflict during adversarial training. Inspired by gradient surgery (Yu et al., ) in multi-task learning, CA-AT utilizes a new trade-off factor defined as the angle between the standard and adversarial gradients. As depicted in Fig. 1, if the angle is larger than the pre-defined trade-off factor $\gamma$, CA-AT will project the adversarial gradient onto the ‘cone’ around the standard gradient constructed based on the pre-defined trade-off factor; otherwise, it will use the standard gradient to optimize the model parameter $\theta$ directly. Compared to the linearly weighted-average AT with a fixed trade-off factor, CA-AT can boost both standard and adversarial accuracy. Our primary contributions are summarized as follows:

Figure: Figure 1: The key motivation of CA-AT aims to solve the conflict between clean gradient $g_{c}$ and adversarial gradient $g_{\text{a}}$. Unlike the existing weighted-averaged method optimizing model parameter $\theta$ by $g_{\circ}$ as the average of $g_{\text{c}}$ and $g_{\text{a}}$ (Vanilla AT), CA-AT utilizes $g_{*}$ for parameter optimization by gradient projection based on a new trade-off factor $\phi$. The bar chart on the right side illustrates that the model optimized by $g_{*}$ (highlighted as the boldface) can achieve better standard accuracy (blue bar) and adversarial accuracy (red bar) compared to models optimized by $g_{\circ}$. The results of the bar chart on the right are produced by training a ResNet18 on CIFAR10 against the PGD (Madry et al., ) attack.
Refer to caption: x1.png

- 1.
We shed light on the existence of conflict between standard and adversarial gradient which causes a sub-optimal trade-off between standard and adversarial accuracy in AT, when we optimize standard and adversarial loss in weighted-average paradigm by a fixed trade-off factor.
- 2.
To alleviate the gradient conflict in AT, we propose a new paradigm called Conflict-Aware Adversarial Training (CA-AT). It achieves a better trade-off between standard and adversarial accuracy compared to Vanilla AT.
- 3.
Through comprehensive experiments across a wide range of settings, we demonstrate CA-AT consistently improves the trade-off between standard and adversarial accuracy in the context of training from scratch and parameter-efficient finetuning (PEFT), across diverse adversarial loss functions, adversarial attack types, model architectures, and datasets.

## 2 Related Works

Adversarial Training.
Adversarial training (AT) is now broadly considered as the most effective method to achieve adversarial robustness for deep learning models (Qian et al., ; Singh et al., ). The key idea of AT is to involve adversarial samples during the training process. Existing works for AT can be mainly grouped into regularization-driven and strategy-driven. For regularization-driven AT methods, the goal is to design an appropriate loss function for adversarial samples, such as cross-entropy (Madry et al., ), logits pairing (CLP) (Kannan et al., ), and TRADES (Zhang et al., ). On the other hand, strategy-driven AT methods focus on improving adversarial robustness by designing appropriate training strategies. For example, ensemble AT (Tramèr et al., ; Yang et al., ) alleviates the sharp parameter curvature by utilizing adversarial examples generated from different target models, curriculum AT (Cai et al., ) gains adversarial robustness progressively by learning from easy adversarial samples to hard adversarial samples, and adaptive AT (Ding et al., ; Cheng et al., ; Jia et al., ) improves adversarial robustness by adjusting the attack intensity and attack methods. With the development of large-scale pretrained models (Kolesnikov et al., ; Dong et al., ), (Jia et al., ; Hua et al., ) demonstrates the superiority of adversarial PEFT of robust pretrained models, compared to adversarial training from scratch.

However, strategy-based AT methods need to involve additional attack methods or target models in the training process, which will increase the time and space complexity when we apply them. CA-AT can improve both standard and adversarial performance without any increasing cost of training time and computing resources. Besides, CA-AT can also work well with different adversarial loss functions including CLP and TRADES, which will be shown in the section of experimental results. Besides, we find out that CA-AT can work well under the setting of adversarial PEFT.

Gradients Operation.
Gradients Operation, also known as gradient surgery (Yu et al., ), aims to improve model performance by directly operating the parameter gradient during training. It was first presented in the area of multi-task learning to alleviate the gradient conflict between loss functions designed for different tasks. The conflict can be measured by cosine similarity (Yu et al., ) or Euclidean distance (Liu et al., ) between the gradients derived from different loss functions. Besides, multi-task learning, (Mansilla et al., ) incorporates gradient operation to encourage gradient agreement among different source domains, enhancing the model’s generalization ability to the unseen domain, and (Chaudhry et al., ; Yang et al., ) alleviate the forgetting issue in continual learning by projecting the gradients from the current task to the orthogonal direction of gradients derived from the previous task.

We are the first work to observe the gradient conflict between standard and adversarial loss during AT and further reveal its relation to adversarial attack budget. Moreover, we propose a new trade-off paradigm specifically designed for AT based on gradient operation. It can achieve a better trade-off compared to Vanilla AT and guarantee the standard performance well.

## 3 Gradient Conflict in AT

In this section, we will discuss the occurrence of gradient conflict in AT via a synthetic dataset and real-world datasets such as CIFAR10 and CIFAR100. Additionally, we demonstrate such a conflict will become more serious with the increase of the attack budget theoretically and practically.

### 3.1 Preliminaries & Notations

Considering a set of images, each image $x\in\mathbb{R}^{d}$ and its label $y\in\mathbb{R}^{l}$ is drawn i.i.d. from distribution $\mathcal{D}$. The classifier $f:\mathbb{R}^{d}\rightarrow\mathbb{R}^{l}$ parameterized by $\theta$ aims to map an input image to the probabilities of the classification task. The objective of AT is to ensure that $f$ does not only perform well on $x$, but also manifests robustness against adversarial perturbation $\epsilon$ bounded by attack budget $\delta$ as $\|\epsilon\|_{p}\leq\delta$, where $p$ determinates the $L_{p}$ norm constraint on the perturbations $\epsilon$ commonly taking on the values of $\infty$ or $2$. The perturbation $\epsilon$ can be defined as $\epsilon=\arg\max_{\|\epsilon\|_{p}\leq\delta}\mathcal{L}(x+\epsilon,y;\theta)$, which can be approximated by gradient-based adversarial attacks such as PGD. Throughout the remaining part of this paper, we refer to $x$ as the standard sample and $x+\epsilon$ as the adversarial sample.

We define clean loss ${\mathcal{L}_{\text{c}}}=\mathcal{L}(x,y;\theta)$ and adversarial loss ${\mathcal{L}_{\text{a}}}=\mathcal{L}(x+\epsilon,y;\theta)$, respectively. $\mathcal{L}$ is the loss function for classification task (e.g. cross-entropy). As shown in Eq. 1, the goal of adversarial training is to obtain the parameter $\theta$ that can be both accurate and robust.

$$ $\displaystyle\min_{\theta}(\mathbb{E}_{(x,y)\sim\mathcal{D}}[{\mathcal{L}_{ \text{c}}}],\mathbb{E}_{(x,y)\sim\mathcal{D}}[{\mathcal{L}_{\text{a}}}])$ (1) $$

For vanilla AT, as mentioned in Section 2, optimizing a hybrid loss containing standard loss ${\mathcal{L}_{\text{c}}}$ and adversarial loss ${\mathcal{L}_{\text{a}}}$ is a widely-used method for solving Eq. 1. As shown in Eq. 2, existing works (Wang et al., ; Zhang et al., ; Kannan et al., ) construct such a hybrid loss by using a linear-weighted approach for ${\mathcal{L}_{\text{c}}}$ and ${\mathcal{L}_{\text{a}}}$.

$$ $\displaystyle\min_{\theta}\mathbb{E}_{(x,y)\sim\mathcal{D}}[\lambda{\mathcal{L }_{\text{a}}}+(1-\lambda){\mathcal{L}_{\text{c}}}],$ (2) $$

where $\lambda\in[0,1]$ serves as a fixed hyper-parameter for the trade-off between ${\mathcal{L}_{\text{c}}}$ and ${\mathcal{L}_{\text{a}}}$. Refer to Fig. 1, the optimization process of Eq. 2 can be described as utilizing $g_{\circ}=(1-\lambda)g_{c}+\lambda g_{a}$ to update $\theta$ at each optimization step, where $g_{\text{c}}=\frac{\partial{\mathcal{L}_{\text{c}}}}{\partial\theta}$ and $g_{\text{a}}=\frac{\partial{\mathcal{L}_{\text{a}}}}{\partial\theta}$ represent standard and adversarial gradients, respectively.

To measure how well we can solve Eq. 1, we define a metric $\mu=||g_{\text{c}}||_{2}\cdot||g_{\text{a}}||_{2}\cdot(1-\cos(g_{\text{c}},g_{
\text{a}}))$. The basic motivation for the consideration of $\mu$ is that it should combine three kinds of signals during AT simultaneously: (1) $||g_{\text{c}}||_{2}$ reflects the convergence of clean loss ${\mathcal{L}_{\text{c}}}$, (2) $||g_{\text{a}}||_{2}$ reflects the convergence of adversarial loss ${\mathcal{L}_{\text{a}}}$, and (3) $(1-\cos(g_{\text{c}},g_{\text{a}}))$ reflects the directional conflict between $g_{\text{c}}$ and $g_{\text{a}}$.
Based on (1), (2), and (3), a small $\mu$ implies that both ${\mathcal{L}_{\text{c}}}$ and ${\mathcal{L}_{\text{a}}}$ have converged well while reaching a consensus on the optimization direction for the next step.

### 3.2 Theoretical & Experimental Support for Motivation

We introduce Theorem 1 that demonstrates $\mu$ can be bounded by the input dimension $d$ and perturbation budget $\delta$ in AT.
Theorem 1. Consider the gradient conflict $\mu=||g_{\text{c}}||_{2}\cdot||g_{\text{a}}||_{2}\cdot(1-\cos(g_{\text{c}},g_{
\text{a}}))$ and suppose that the input $x$ is a $d$-dimensional vector.

- 1.
Given the $L_{2}$ restriction for $\epsilon$ as $||\epsilon||_{2}\leq\delta$, we have $\mu\leq\mathcal{O}(\delta^{2})$.
- 2.
Given the $L_{\infty}$ restriction for $\epsilon$ as $||\epsilon||_{\infty}\leq\delta$, we have $\mu\leq\mathcal{O}(d^{2}\delta^{2})$.

The intuitive understanding of Theorem 1 is that with the increasing attack budget $\delta$, the adversarial samples in AT will move further from the distribution $\mathcal{D}$ of standard samples. The conflict between $g_{a}$ and $g_{c}$ will become more serious, and $L_{a}$ and $L_{c}$ will be hard to converge. Therefore, the upper bound of $\mu$ will become larger. The proof of Theorem 1 will be shown in the appendix.

Synthetic Experiment. In order to show the implications of Theorem 1 empirically, we introduce the synthetic experiment as a binary classification task by selecting digit one and digit two from MNIST with a resolution of $32\times 32$, and train a logistic regression model parameterized by $w\in\mathbb{R}^{(32\times 32)\times 2}$ via BCE loss by vanilla AT for 20 epochs, where $\epsilon$ is contained by its $L_{\infty}$ norm as $\|\epsilon\|_{\infty}\leq\delta$, and $\lambda=0.5$ serves as the trade-off factor between standard and adversarial loss.

Figure: (a)
Refer to caption: x2.png

Compared to the experiments on real-world datasets, this synthetic experiment offers a distinct advantage in terms of the ability to analytically solve the inner maximization. For real-world datasets, only numerical solutions can be derived using gradient-based attacks (e.g. PGD) during AT. These numerical solutions sometimes are not promising due to gradient masking (Athalye et al., ; Papernot et al., ). On the contrary, our synthetic experiments can ensure a high-quality solution for inner maximization, eliminating the potential effect of experimental results caused by some uncertainties such as gradient masking.

Under the circumstance of a simple logistic regression model with analytical solution for inner maximization, the hybrid loss for Vanilla AT can be presented as Eq. 3, where $\exp()$ denotes the exponential function. The details of getting the analytical solution for inner maximization will be presented in the appendix.

$$ $\displaystyle\min_{\theta}{\mathbb{E}}_{(x,y)\sim\mathcal{D}}$ $\displaystyle[\lambda\log(1+\exp(-y\cdot(w^{T}x+b)+\delta||w||_{1}))$ $\displaystyle+(1-\lambda)\log(1+\exp(-y\cdot(w^{T}x+b))]$ (3) $$

Fig. 2 illustrates the results of this synthetic experiment. By TSNE, Fig. 2(a) visualizes the distributions of $g_{\text{a}}$ and $g_{\text{c}}$ for different training samples in the last training epoch. With the increase of attack budget $\delta$, these two distributions are progressively fragmented, meaning $g_{\text{a}}$ and $g_{\text{c}}$ become more different.

For Fig. 2(a), it is the tSNE visualization depicting the distributions of $g_{\text{a}}$ and $g_{\text{c}}$ for different training samples across varying $\delta$. Particularly, the distributions of $g_{\text{a}}$ and $g_{\text{c}}$ begin to segregate more distinctly as $\delta$ becomes larger, concomitant with the increasing gradient conflict $\mu$. Furthermore, the bar chart Fig. 2(b) reveals a decline in both standard and adversarial accuracies with increasing $\delta$ and $\mu$. This trend indicates that the larger gradient conflict can harm the model’s performances on both standard and adversarial accuracies. The subfigure on the right side of Fig. 2(b) shows an almost quadratic growth relationship between $\mu$ and $\delta$, the red line is the theoretical upper bound derived from Theorem 1, demonstrating the effectiveness of Theorem 1 empirically.

Figure: (a) Different Model Architectures and Datasets
Refer to caption: x4.png

Experiments on Real-world Datasets. Beyond the synthetic experiment, we also conduct experiments on real-world datasets such as CIFAR10/CIFAR100, and we also observe the gradient conflict during AT. Fig. 3 shows that such a conflict exists varying from different datasets, model architectures, and attack methods used in AT, and our method ($\gamma=0.8$, $\gamma=0.9$), which will be introduced in the next section, can consistently alleviate the conflict compared to the Vanilla AT ($\lambda=0.5$, $\lambda=1$).

## 4 Methodology

As we mentioned in Section 3, the trade-off between standard and adversarial accuracy is profoundly influenced by the gradient conflict $\mu$ (Fig. 2). The vanilla AT, which employs a linear trade-off factor $\lambda$ to combine clean and adversarial loss (as seen in Eq. 2), does not adequately address the issue of gradient conflict.

Based on this observation, we introduce Conflict-aware Adversarial Training (CA-AT) as a new trade-off paradigm for AT. The motivation of CA-AT is that the gradient conflict in AT can be alleviated by generally conducting operations on the adversarial gradient $g_{\text{a}}$ and the standard gradient $g_{\text{c}}$ during the training process, and such an operation should guarantee the standard accuracy because its priority is higher adversarial accuracy. Inspired by existing works related to gradient operation Yu et al. (, ); Liu et al. (); Chaudhry et al. (); Mansilla et al. (), CA-AT employs a pre-defined trade-off factor $\gamma$ as the goal of cosine similarity between $g_{\text{c}}$ and $g_{\text{a}}$. In each iteration, instead of updating parameter $\theta$ by linearly weighted-averaged gradient $g_{\circ}$, CA-AT utilizes $g_{*}$ to update $\theta$ as Eq. 4

$$ $g_{*}=\begin{cases}g_{\text{a}}+\frac{||g_{\text{a}}||_{2}(\gamma\sqrt{1-\phi^ {2}}-\phi\sqrt{1-\gamma^{2}})}{||g_{\text{c}}||_{2}\sqrt{1-\gamma^{2}}}g_{ \text{c}},\quad\phi\leq\gamma\\ g_{\text{c}},\quad\phi>\gamma\end{cases}$ (4) $$

where $\phi=\cos(g_{\text{a}},g_{\text{c}})$ is the cosine similarity between standard gradient $g_{\text{c}}$ and adversarial gradient $g_{\text{a}}$. The intuitive explanation of Eq. 4 is depicted in Fig. 1. For each optimization iteration, if $\phi$ is less than $\gamma$, then $g_{*}$ is produced by projecting $g_{\text{a}}$ onto the cone of $g_{\text{c}}$ at an angle $\arccos{(\gamma)}$. If $\phi>\gamma$, we will use the standard gradient $g_{\text{c}}$ to optimize $\theta$, because we need to guarantee standard accuracy when the conflict is not quite serious.

The mechanism behind Eq. 4 is straightforward. It mitigates the gradient conflict in AT by ensuring that $g_{\text{c}}$ is consistently projected in a direction close to $g_{\text{a}}$. Considering an extreme case that $g_{\text{c}}$ and $g_{\text{a}}$ are diametrically opposite ($g_{\text{a}}=-g_{\text{c}}$), in such a scenario, if we produce the gradient by Vanilla AT as $g_{\circ}=g_{\text{c}}+g_{\text{c}}$, $g_{\circ}$ will be a zero vector and the optimization process will be stuck. On the other hand, $g_{*}$ will align closely to $g_{\text{c}}$ within $\gamma$, avoiding $\theta$ to be stuck in a suboptimal point.

Furthermore, under the condition of $\phi\leq\gamma$, we find that CA-AT can also be viewed as a convex combination for standard and adversarial loss with a conflict-aware trade-off factor $\lambda^{*}$ as $\mathcal{L}={\mathcal{L}_{\text{c}}}+\lambda^{*}{\mathcal{L}_{\text{a}}}$, where $\lambda^{*}=\frac{||g_{\text{a}}||_{2}(\gamma\sqrt{1-\phi^{2}}-\phi\sqrt{1-
\gamma^{2}})}{||g_{\text{c}}||_{2}\sqrt{1-\gamma^{2}}}$. Intuitively, $\lambda^{*}$ increases with the decreasing of $\phi$, which means we lay more emphasis on the standard loss when the conflict becomes more serious, and the hyperparameter $\gamma$ here serves a role of temperature to control the intensity of changing to $\lambda^{*}$.

Figure: Algorithm 1 CA-AT

The pseudo-code of the CA-AT is shown as Algorithm 1. In each training batch $B$, we calculate both standard loss ${\mathcal{L}_{\text{c}}}$ and adversarial loss ${\mathcal{L}_{\text{a}}}$. By evaluating and adjusting the alignment
between standard gradient $g_{\text{c}}$ and adversarial gradient $g_{\text{a}}$, the algorithm ensures the model not only performs well via standard samples but also maintains robustness against designed perturbations. This adjustment is made by modifying the adversarial gradient $g_{\text{a}}$ to better align with the standard gradient $g_{\text{c}}$ based on the projection margin threshold $\gamma$, where $g_{*}$ is produced to optimize the model parameter $\theta_{t}$ in each round $t$.

## 5 Experimental Results & Analysis

Figure: (a) CUB-Bird
Refer to caption: x6.png

Figure: Figure 5: SA-AA Fronts for Adversarial PEFT on ViT using Adapter on Stanford Dogs.
Refer to caption: x10.png

Figure: (a) Cross Entropy
Refer to caption: x11.png

In this section, we demonstrate the effectiveness of CA-AT for achieving better trade-off results compared to Vanilla AT. We conduct experiments on adversarial training from scratch and adversarial PEFT among various datasets and model architectures. Besides, motivated by Theorem 1, we evaluate CA-AT by involving adversarial samples with a larger budget in training. Experimental results show that CA-AT can boost the model’s robustness by handling adversarial samples with a larger budget, while Vanilla AT fails.

### 5.1 Experimental Setup

Datasets and Models. We evaluate our proposed method on various image classification datasets including CIFIAR10 (Krizhevsky et al., ), CIFIAR100 (Krizhevsky et al., ), CUB-Bird (Wah et al., ), and StanfordDogs (Khosla et al., ). The model architectures we utilized to train from scratch on CIFAR10 and CIFAR100 are ResNet18, ResNet34 (He et al., ), and WideResNet28-10 (WRN-28-10) (Zagoruyko and Komodakis, ). We set the value of running mean and running variance in each Batch Normalization block into false as a trick to boost adversarial robustness (Wang et al., ; Walter et al., ). For experiments on PEFT, we fine-tune Swin Transformer (Swin-T) (Liu et al., ) and Vision Transformer (ViT) (Dosovitskiy et al., ) by using Adapter (Pfeiffer et al., , ), which fine-tunes the large pretrained model by inserting a small trainable module into each block. Such a module adapts the internal representations for specific tasks without altering the majority of the pretrained model’s parameters. Both Swin-T and ViT are pretrained adversarially (Dong et al., ) on ImageNet. For the experiments on ResNet, we set the resolution of input data as $32\times 32$, and use resolution as $224\times 224$ for the PEFT experiments on Swin-T and ViT.

Hyper-parameters for AT. For adversarial training from scratch, we use the PGD attack with $\delta=8/255$ with step size $2/255$ and step number $10$. For the optimizer, we use SGD with momentum as $0.9$ and the initial learning rate as $0.4$. We use the one-cycle learning rate policy (Smith and Topin, ) as the dynamic adjustment method for the learning rate within 200 epochs. The details of hyperparameter setup for adversarial PEFT will be shown in Appendix. Generally, we use a sequence of operations as random crop, random horizontal flip, and random rotation for data augmentation. For a fair comparison, we maintain the same hyper-parameters across experiments for vanilla AT and CA-AT on both adversarial training from scratch and PEFT.

Evaluation. We evaluate adversarial robustness by reporting the accuracies against extensive adversarial attacks constrained by $L_{\infty}$ and $L_{2}$. For attacks bounded by $L_{\infty}$ norm, we selected most representative methods including PGD (Madry et al., ), AutoPGD (Croce, ), FGSM (Goodfellow et al., ), MIFGSM (Dong et al., ), FAB (Croce and Hein, ), and AutoAttack (Croce, ). Besides, we also conducted the targeted adversarial attacks, where they are denoted as a ’T-’ as the prefix (e.g. T-AutoPGD). For all the targeted adversarial attacks, we set the number of classes as $10$. Attacks bounded by $L_{2}$ norm are denoted as ’-L2’ in suffix (e.g. AutoPGD-L2). Besides, we apply attacks with different loss functions such as cross entropy (AutoPGD) and difference of logits ratio (AutoPGD-DLR), to avoid the ‘fake’ adversarial examples caused by gradient vanishing (Athalye et al., ).

To measure the quality of trade-off between standard accuracy (SA) and adversarial accuracy (AA), we define SA-AA front as an empirical Pareto front for SA and AA. We draw this front by conducting different $\lambda$ on Vanilla AT and different $\gamma$ on CA-AT.

### 5.2 Experimental Results on PEFT

CA-AT offers the better trade-off on adversarial PEFT. Fig. 4 shows the SA-AA fronts on fine-tuning robust pretrained Swin Transformer on CUB-Bird and StanfordDogs by using Adapter. We set $\lambda=[0,0.5,1]$ for Vanilla AT and $\gamma=[0.8,0.9,1]$ for CA-AT. The red data points for CA-AT are positioned in the upper right area relative to the blue points for Vanilla AT. It shows that CA-AT can consistently attain better standard and adversarial accuracy compared to the Vanilla AT across different datasets. Besides, we observed that on fine-grained datasets such as CUB-Bird and Stanford Dogs, the superiority of CA-AT is more significant compared to the results on normal datasets.

Results for CA-AT with Different Pretrained Models. Fig. 5 shows that CA-AT can also boost the trade-off performance on ViT. The main difference between these two models is that, ViT treats image patches as tokens and processes them with a standard transformer architecture Vaswani et al. (), while Swin-T uses shifted windows for hierarchical feature merging. While ViT applies global attention directly on image patches, Swin Transformer applies local attention within windows and uses a hierarchical approach to better handle larger and more detailed images. The superiority of CA-AT on ViT is not as significant as it is on Swin-T (Fig. 4(b)), but it still can gain better standard and adversarial accuracy compared to Vanilla AT.

### 5.3 Experimental Results on Training from Scratch

Figure: (a) ResNet18
Refer to caption: x14.png

**Table 1: Evaluation results on CIFAR10 for CA-AT ($\gamma=0.8$) and Vanilla AT ($\lambda=0.5$) across different $L_{\infty}$-based attacks with various values of budget $\delta$.**
|  |  | Standard Accuracy | PGD | AutoPGD | MIFGSM | FAB | T-FAB | FGSM |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|  | $p=\infty$ | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT |
| ResNet18 | 8/255 | 0.8659 | 0.8239 | 0.7442 | 0.4703 | 0.6301 | 0.3996 | 0.7419 | 0.4745 | 0.8177 | 0.809 | 0.6861 | 0.6538 | 0.7649 | 0.519 |
| 16/255 | 0.7311 | 0.4248 | 0.5555 | 0.2486 | 0.7233 | 0.4225 | 0.7475 | 0.78 | 0.5445 | 0.5104 | 0.7435 | 0.4387 |  |  |  |
| 24/255 | 0.7189 | 0.405 | 0.4886 | 0.1963 | 0.7182 | 0.413 | 0.6858 | 0.7333 | 0.4599 | 0.4783 | 0.7235 | 0.403 |  |  |  |
| 32/255 | 0.7033 | 0.3877 | 0.4455 | 0.1589 | 0.7182 | 0.413 | 0.6402 | 0.6836 | 0.4044 | 0.4507 | 0.7066 | 0.379 |  |  |  |
|  |  | Standard Accuracy | PGD | AutoPGD | MIFGSM | FAB | T-FAB | FGSM |  |  |  |  |  |  |  |
|  | $p=\infty$ | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT | CA-AT | Vanilla AT |
| ResNet34 | 8/255 | 0.8753 | 0.8305 | 0.8098 | 0.5973 | 0.7285 | 0.4417 | 0.8111 | 0.5983 | 0.8247 | 0.8068 | 0.7274 | 0.6951 | 0.8149 | 0.5327 |
| 16/255 | 0.8034 | 0.5756 | 0.6793 | 0.3395 | 0.8077 | 0.5791 | 0.7738 | 0.7613 | 0.6013 | 0.5762 | 0.7916 | 0.2762 |  |  |  |
| 24/255 | 0.7957 | 0.5602 | 0.6445 | 0.2859 | 0.8067 | 0.5743 | 0.7307 | 0.6937 | 0.5142 | 0.5174 | 0.7743 | 0.1428 |  |  |  |
| 32/255 | 0.785 | 0.5443 | 0.6165 | 0.2498 | 0.8067 | 0.5743 | 0.6918 | 0.6221 | 0.4424 | 0.4822 | 0.7616 | 0.088 |  |  |  |

Figure: Figure 8: Results for Vanilla AT and CA-AT trained on adversarial samples with two different budget values ($\delta=8/255$,$\delta=12/255$) on CIFAR10 with ResNet18. We evaluate the adversarial accuracy among different adversarial attacks with different budget values $\delta$ denoting as the x-axis.
Refer to caption: x16.png

CA-AT results in better trade-off with different adversarial loss functions.
Fig. 6 visualizes SA-AA fonts from experiments using vanilla AT with $\lambda=[0,0.25,0.5,0.75,1]$ and CA-AT with $\gamma=[0.7,0.75,0.8,0.85,0.9,1]$ on CIFAR10. In this figure, most orange data points (CA-AT) lie in the upper right space of blue points (Vanilla AT), indicating that CA-AT offers a better empirical Pareto front for the trade-off between standard accuracy and adversarial accuracy. Moreover, Fig. 6 and Fig. 6 show CA-AT can also consistently boost the adversarial accuracy for different adversarial loss functions used in AT such as TRADES (Zhang et al., ) and CLP (Kannan et al., ). For the experiments on CIFAR100, we selected the strongest and most representative attack methods to evaluate the model’s robustness, including targeted attack (T-FAB), untargeted attacks (PGD, MIFGSM), $L_{2}$-norm attack (T-PGD), and ensemble attack (AutoAttack). Showing the trade-off results on CIFAR100 in Fig. 7(a) (ResNet18) and Fig. 7(b) (ResNet34), the performance gain of CA-AT is more limited compared to the one on CIFAR10, but it can still achieve better performance on standard accuracy and adversarial accuracy against various adversarial attacks.

CA-AT is more robust to adversarial attacks with larger budget values.
We evaluate adversarial precision through various adversarial attacks with different attack budget values $\delta$, to demonstrate the superiority of our model over Vanilla AT under various intensities of adversarial attacks. We applied both Vanilla AT and CA-AT to ResNet18 on CIFAR10, and the results about $L_{\infty}$-based attacks are shown in Table 1. In Table 1, although our CA-AT achieves slightly lower adversarial accuracy against FAB when $\delta$ is larger than $8/255$, it outperforms the Vanilla AT in both standard accuracy and adversarial accuracy on any other attack methods (e.g. AutoPGD, MIFGSM, and T-FAB) with different budget $\delta$. It clearly illustrates that, compared to Vanilla AT, CA-AT can enhance the model’s adversarial robustness
ability to resist stronger adversarial attacks with larger budget $\delta$.

CA-AT enables AT via stronger adversarial examples. In our toy experiment (Fig. 2) and Theorem 1, the conflict $\mu$ would be more serious if we utilize adversarial examples with larger attack budget $\delta$ during AT. It implies that Vanilla AT cannot handle stronger adversarial examples during training because of the gradient conflict. In Fig. 8, we visualize the results of training ResNet34 on CIFAR10 with adversarial samples produced by the same attack method (PGD), but different attack budgets ($\delta=8/255$ and $\delta=16/255$), and evaluate the adversarial accuracies against various adversarial methods (e.g. FGSM and PGD) with different budgets (x-axis). Compared to the blue and orange curves (Vanilla AT with $\delta=8/255$), it shows that Vanilla AT fails when training with the adversarial attack with a higher perturbation bound, causing a decrease in both standard and adversarial accuracy. On the contrary, CA-AT, shown as the green and red curves, can improve both standard and adversarial accuracy by involving stronger adversarial samples with larger attack budgets.

Experimental Results in Appendix. More experimental results for CA-AT regarding different model architectures (WRN-28-10), different attack methods utilized for producing adversarial samples during AT, various $L_{2}$-based attacks with different budgets, and black-box attacks can be found in Appendix C. In addition, the detailed proof for Theorem 1 is included in Appendix A.

## 6 Conclusion & Outlook

In this work, we illustrate that the weighted-average method in AT is not capable of achieving the ‘near-optimal’ trade-off between standard and adversarial accuracy due to the gradient conflict existing in the training process. We demonstrate the existence of such a gradient conflict and its relation to the attack budget of adversarial samples used in AT practically and theoretically. Based on this phenomenon, we propose a new trade-off framework for AT called Conflict-Aware Adversarial Training (CA-AT) to alleviate the conflict by gradient operation, as well as applying a conflict-aware trade-off factor to the convex combination of standard and adversarial loss functions. Extensive results demonstrate the effectiveness of CA-AT for gaining trade-off results under the setting of training from scratch and PEFT.

For future work, we plan to undertake a more detailed exploration of the gradient conflict phenomenon in AT from the data-centric perspective. We hold the assumption that some training samples can cause serious gradient conflict, while others do not. We will evaluate this assumption in the future work, and intend to reveal the influence of training samples causing gradient conflict.

## Appendix A Proof of Theorem 1

Considering $||\epsilon||_{2}$ or $||\epsilon||_{\infty}$ is usually very small for adversarial examples, we utilize Taylor Expansion for $x$ as the approximation for the adversarial loss $\mathcal{L}(x+\epsilon;\theta)$, such that:

$$ $\displaystyle\mathcal{L}(x+\epsilon;\theta)=\mathcal{L}(x;\theta)+(\frac{ \partial\mathcal{L}(x;\theta)}{\partial x})^{T}\epsilon+\mathcal{O}(\|\epsilon \|^{2})$ (5) $$

To derive an upper bound on the gradient conflict in the regime that $\|\epsilon\|$ gets small, we will only consider the first-order term above. We then take the derivative of both sides of the equation with respect to $\theta$ to obtain:

$$ $\displaystyle g_{\text{a}}=g_{\text{c}}+\frac{\partial^{2}\mathcal{L}(x;\theta )}{\partial x\partial\theta}\epsilon=g_{\text{c}}+\frac{\partial g_{\text{c}}} {\partial x}\epsilon=g_{\text{c}}+H\epsilon$ (6) $$

where $H=\frac{\partial g_{\text{c}}}{\partial x}\in\mathbb{R}^{d_{\theta}\times d_{x}}$. $d_{\theta}/d_{x}$ denotes the dimension of parameter $\theta$ and input data $x$. By multiplying $g_{\text{a}}^{T}$ and $g_{\text{c}}^{T}$ on the two sides of Eq. 6, respectively, we can obtain Eq. 7 and Eq. 8 as follows.

$$ $\displaystyle g_{\text{c}}^{T}g_{\text{a}}$ $\displaystyle=||g_{\text{c}}||_{2}^{2}+g_{\text{c}}^{T}H\epsilon$ (7) $\displaystyle||g_{\text{a}}||_{2}^{2}$ $\displaystyle=g_{\text{a}}^{T}g_{\text{c}}+g_{\text{a}}^{T}H\epsilon$ (8) $$

Eq. 7 minus Eq. 8:

$$ $\displaystyle g_{\text{c}}^{T}g_{\text{a}}$ $\displaystyle=\dfrac{||g_{\text{a}}||_{2}^{2}+||g_{\text{c}}||_{2}^{2}+ \epsilon^{T}H^{T}(g_{\text{c}}-g_{\text{a}})}{2}$ (9) $$

Based on Eq. 6, we can replace $(g_{\text{c}}-g_{\text{a}})$ as $H\epsilon$:

$$ $\displaystyle g_{\text{c}}^{T}g_{\text{a}}=\dfrac{||g_{\text{a}}||_{2}^{2}+||g _{\text{c}}||_{2}^{2}-\epsilon^{T}H^{T}H\epsilon}{2}$ (10) $$

Recall the definition of $\mu$ as $\mu=||g_{\text{c}}||_{2}\cdot||g_{\text{a}}||_{2}\cdot(1-\cos(g_{\text{c}},g_{
\text{a}}))$

$$ $\displaystyle\mu$ $\displaystyle=||g_{\text{c}}||_{2}\cdot||g_{\text{a}}||_{2}\cdot(1-\cos(g_{ \text{c}},g_{\text{a}}))$ $\displaystyle=||g_{\text{c}}||_{2}\cdot||g_{\text{a}}||_{2}-g_{\text{c}}^{T}g_ {\text{a}}\quad$ $\displaystyle=\dfrac{2||g_{\text{c}}||_{2}\cdot||g_{\text{a}}||_{2}-||g_{\text {a}}||_{2}^{2}-||g_{\text{c}}||_{2}^{2}+\epsilon^{T}H^{T}H\epsilon}{2}\quad \text{(Use \lx@cref{creftype~refnum}{eq:app:3})}$ $\displaystyle=\frac{\epsilon^{T}\mathcal{K}(\theta,x)\epsilon-(||g_{\text{c}}| |_{2}-||g_{\text{a}}||_{2})^{2}}{2}\leq\frac{\epsilon^{T}\mathcal{K}(\theta,x) \epsilon}{2}\leq\frac{\lambda_{max}\epsilon^{T}\epsilon}{2}$ (11) $$

where $\mathcal{K}(\theta,x)=H^{T}H$ is a symmetric and positive semi-definite matrix, and $\lambda_{max}$ is the largest eigenvalue of $K$, where $\lambda_{max}\geq 0$.

Considering two widely-used restrictions for perturbation $\epsilon$ applied in adversarial examples as $l_{2}$ and $l_{\infty}$ norm, we have:

- •
For $||\epsilon||_{2}\leq\delta$, where $\mu\leq\dfrac{1}{2}\lambda_{max}\delta^{2}$. The upper bound of $\mu$ is $\mathcal{O}(\delta^{2})$.
- •
For $||\epsilon||_{\infty}\leq\delta$, it implies that the absolute value of each element of $\epsilon$ is bounded by $\delta$, where $\epsilon^{T}\epsilon=\sum^{d}_{i=0}\epsilon_{i}^{2}\leq d^{2}\delta^{2}$. The upper bound of $\mu$ is $\mathcal{O}(d^{2}\delta^{2})$.

## Appendix B Analytical Solution for the Inner Maximization

We introduce the details about how to get the analytical inner-max solution (Eq. 3) for our synthetic experiment presented in Section 3. As we introduced in Section 3, consider a linear model as $f(x)=w^{T}x+b$ under a binary classification task where $y\in\{+1,-1\}$. The predicted probability of sample $x$ with respect to its ground truth $y$ can be defined as:

$$ $\displaystyle p(y|x)=\frac{1}{1+\exp(-y\cdot f(x))}$ (12) $$

Then, the BCE loss function for sample $x$ can be formulated as:

$$ $\displaystyle\mathcal{L}(f(x),y)=-\log(p(y|x))=\log(1+\exp(-y\cdot f(x)))$ (13) $$

Consider the perturbation $\epsilon$ under the restriction of $L_{\infty}$ norm, the adversarial attack for such a linear model can be formulated as an inner maximization problem as Eq. 14.

$$ $\displaystyle\max_{\|\epsilon\|_{\infty}\leq\delta}\log(1+\exp(-y\cdot f(x+ \epsilon)))\equiv\min_{\|\epsilon\|_{\infty}\leq\delta}y\cdot w^{T}\epsilon\quad$ (14) $$

Consider the case that $y=+1$, where the $L_{\infty}$ norm says that each element in $\epsilon$ must have magnitude less than or equal $\delta$, we clearly minimize this quantity when we set $\epsilon_{i}=-\delta$ for $w_{i}\geq 0$ and $\epsilon_{i}=\delta$ for $w_{i}<0$. For $y=-1$, we would just flip these quantities. That is, the optimal solution $\epsilon^{*}$ to the above optimization problem for the $L_{\infty}$ norm is expressed as Eq. 15.

$$ $\displaystyle\epsilon^{*}=-y\cdot\delta\odot\text{sign}(w)$ (15) $$

where $\odot$ is the element-wise multiplication. Based on Eq. 15, we can formulate the adversarial loss as follows, which is as same as the adversarial loss presented in Eq. 3.

$$ $\displaystyle\mathcal{L}(f(x+\epsilon^{*}),y)$ $\displaystyle=\log(1+\exp(-y\cdot w^{T}x-y\cdot b-y\cdot w^{T}\epsilon^{*}))$ $\displaystyle=\log(1+\exp(-y\cdot f(x)+\delta\|w\|_{1}))$ (16) $$

## Appendix C Additional Experimental Results

**Table 2: Evaluation results for CA-AT for using different inner maximization solver (PGD/PGD-DLR) during the process of AT.**
|  | Standard | T-AutoPGD-DLR | T-AutoPGD-L2 | T-FAB | FGSM | PGD | AutoPGD | MIFGSM | FAB | PGD-L2 | AutoPGD-L2 | AutoAttack | Adversarial Mean Acc |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $\gamma=0.8$, PGD | 0.8659 | 0.4004 | 0.5356 | 0.6861 | 0.7649 | 0.7442 | 0.6301 | 0.7419 | 0.8177 | 0.8211 | 0.67 | 0.3517 | 0.6512 |
| $\gamma=0.8$, PGD-DLR | 0.8646 | 0.4147 | 0.539 | 0.7168 | 0.7452 | 0.672 | 0.6429 | 0.6864 | 0.8001 | 0.8196 | 0.6919 | 0.3260 | 0.6413 |
| $\gamma=0.9$, PGD | 0.9009 | 0.2844 | 0.5075 | 0.6986 | 0.7781 | 0.7021 | 0.6624 | 0.7251 | 0.8371 | 0.8588 | 0.7267 | 0.2472 | 0.6389 |
| $\gamma=0.9$, PGD-DLR | 0.8923 | 0.3794 | 0.5353 | 0.6874 | 0.779 | 0.7207 | 0.6428 | 0.7315 | 0.8229 | 0.8488 | 0.7038 | 0.2992 | 0.6501 |

Experimental setup on adversarial PEFT. For the experiments on adversarial PEFT, we leverage the adversarially pretrained Swin-T and ViT downloaded from ARES(^1^11[https://github.com/thu-ml/ares](https://github.com/thu-ml/ares)). For adapter, we implement it as Pfeiffer et al. [] by inserting an adapter module subsequent to the MLP block at each layer with a reduction factor of 8.

Figure: (a) ResNet34
Refer to caption: x17.png

Figure: (a) ResNet34
Refer to caption: x19.png

Figure: (a) ResNet34
Refer to caption: x20.png

The effect of inner maximization solver in AT. In Table 2, we conduct the ablation study for using different attack methods to generate adversarial samples during adversarial training from scratch. We find that PGD-DLR can achieve higher adversarial accuracies when $\gamma=0.9$ but lead them worse when $\gamma=0.8$ but not significant. We conclude that the effect of the inner maximization solver, as well as the adversarial attack method during AT, does not dominate the performance of CA-AT. However, choosing a better inner maximization solver can still help adversarial robustness marginally.

Results for different model architectures. For different model architectures such as ResNet34 and WRN-28-10, their SA-AA front on CIFAR10 and and CIFAR100 with different adversarial loss functions are shown in Fig. 9, Fig. 11, and Fig. 10. All of those figures demonstrate CA-AT can consistently surpass Vanilla AT across different model architectures.

Results for $L_{2}$-based adversarial attacks with different budgets. Besides evaluating the adversarial accuray on $L_{\infty}$-based attacks with different budgets (Table 1), we also evaluate the adversarial robustness against $L_{2}$-based adversarial attacks with different budgets ($||\epsilon||_{2}=[0.5,1,1.5,2]$), which is shown in Table 3.

Results for Black-box Attack. To demonstrate the performance gain of adversarial accuracy is not brought by obfuscated gradients Athalye et al. [], Table 4 shows that CA-AT ($\gamma=0.8$ and $\gamma=0.9$) outperforms Vanilla AT ($\lambda=0.5$ and $\lambda=1$) against the black-box attacks such as Square .

**Table 3: Evaluation Results for CA-AT ($\gamma=0.8$) and vanilla AT ($\lambda=0.5$) across different $L_{2}$-based attacks with various restriction $\theta$.**
|  |  | PGD-L2 | AutoPGD-L2 | T-AutoPGD-L2 |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
|  | $p=2$ | $\gamma=0.8$ | $\lambda=0.5$ | $\gamma=0.8$ | $\lambda=0.5$ | $\gamma=0.8$ | $\lambda=0.5$ |
| ResNet18 | 0.5 | 0.8211 | 0.7759 | 0.67 | 0.5222 | 0.5356 | 0.5327 |
| 1 | 0.8207 | 0.7748 | 0.603 | 0.3036 | 0.261 | 0.2762 |  |
| 1.5 | 0.8194 | 0.7738 | 0.5652 | 0.2405 | 0.1483 | 0.1428 |  |
| 2 | 0.8187 | 0.7734 | 0.5331 | 0.2115 | 0.0904 | 0.088 |  |
|  |  | PGD-L2 | AutoPGD-L2 | T-AutoPGD-L2 |  |  |  |
|  | $p=2$ | $\gamma=0.8$ | $\lambda=0.5$ | $\gamma=0.8$ | $\lambda=0.5$ | $\gamma=0.8$ | $\lambda=0.5$ |
| ResNet34 | 0.5 | 0.8411 | 0.78 | 0.7534 | 0.5255 | 0.5301 | 0.5325 |
| 1 | 0.8412 | 0.7791 | 0.7249 | 0.3806 | 0.2571 | 0.2683 |  |
| 1.5 | 0.8403 | 0.7784 | 0.7022 | 0.3462 | 0.1446 | 0.1438 |  |
| 2 | 0.8386 | 0.7781 | 0.679 | 0.3196 | 0.0899 | 0.0905 |  |

**Table 4: The results of Square attack between Vanilla AT and CA-AT with different hyperparameters ($\lambda$,$\gamma$) on CIFAR10.**
|  | ResNet18 | ResNet34 |  |  |
| --- | --- | --- | --- | --- |
|  | Standard | Square | Standard | Square |
| Standard Training, $\lambda=0$ | 0.8824 | 0.703 | 0.8793 | 0.6893 |
| Vanilla AT, $\lambda=0.5$ | 0.7627 | 0.6808 | 0.7768 | 0.6992 |
| Vanilla AT, $\lambda=1$ | 0.7456 | 0.6684 | 0.7791 | 0.7064 |
| CA-AT, $\gamma=0.8$ | 0.8117 | 0.7344 | 0.8223 | 0.7476 |
| CA-AT, $\gamma=0.9$ | 0.853 | 0.7509 | 0.8445 | 0.7469 |

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: 1. In line 268, a reference is missing.
2. The authors argue that the weighted-average method does not provide the best tradeoff for the standard performance and adversarial robustness, but in my mind, CA-AT also doesn't, like Vanilla AT can also beat CA-AT  in your FAB experiments.
3. What leads to the large fluctuation during epoch 60-90 in the middle image in  Fig.3(a)?
4. Is the initial learning rate 0.4 the normal setting? As I remember the decayed learning rate schedule is more common.
soundness: 3
strengths: 1. The proposed Conflict-Aware Adversarial Training (CA-AT) effectively addresses gradient conflict, achieving a better balance between standard performance and adversarial robustness.

2. Comprehensive experimental results across various datasets and model architectures validate the effectiveness of CA-AT in improving the trade-off between standard and adversarial accuracy.

3. The method demonstrates strong performance in both training from scratch and parameter-efficient fine-tuning, showcasing its versatility.
summary: The paper explores the issue of gradient conflict in adversarial training, highlighting how traditional methods struggle to balance standard performance and adversarial robustness. The authors introduce Conflict-Aware Adversarial Training (CA-AT), which employs a novel trade-off paradigm based on gradient alignment to address this conflict. Through extensive experiments, CA-AT shows consistent improvements in the trade-off between standard and adversarial accuracy across various datasets and model architectures.
weaknesses: 1. The proposed CA-AT aims to manipulate the gradient of the clean examples and the adversarial example, the idea is not novel, either for input gradient alignment [1] or model gradient alignment [2].

2.  I think starting from PGD adversarial training, they just use the adversarial example for training, rather than the combination that CA-AT wants to tackle. 

3. Although CA-AT shows improved performance over Vanilla AT in several experiments, it lacks comparisons with other advanced adversarial training methods.

4. The price of the double propagation should also be considered.


[1] Understanding and Improving Fast Adversarial Training

[2] Quantifying the preferential direction of the model gradient in adversarial training with projected gradient descent

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Please refer to those in the weaknesses section.
soundness: 3
strengths: - The paper is easy to follow.
- Extensive experiments are conducted to demonstrate the effectiveness of the proposed method empirically.
summary: The paper proposes to use a dynamic conflict-aware factor to control the trade-off between the standard and adversarial loss. Only the standard gradient is used if the adversarial and standard gradients are close. Otherwise, the adversarial gradient is emphasized. Based on Figure 3 in the paper, I suppose both gradients tend to be similar in the later training phase, and the proposed methods will mainly optimize the standard loss. Extensive experiments are conducted and the results are promising.
weaknesses: - The proposed factor seems a bit bizarre to me. Take Figure 1 as an example. Any $g_a$ that ends in the dotted line with $arccos(g_a, g_b) > \gamma$ will result in the same $g^*$, which doesn't make sense to me. Imagine $g_a$ equals $g_o$ in Figure 1, and one will still get the same $g^*$.
- One should conduct an ablation study by using traditional $\lambda$-weighted mean of $g_a$ and $g_c$ when $\phi \leq \gamma$ and only $g_c$ when $\phi > \gamma$, as I suspect that this might be the reason for the performance boosts.
- Some other suggestions:
- - Add the legends for Figure 6 (b) and (c).
- - Conduct experiments on ImageNet.
- - Run multiple-trails and report the error bar.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. The exact form of $\lambda^*$ is interesting. Could you elaborate on why this form was chosen? What was the inspiration, and what benefits does it offer?

2. Please include additional baselines in the experimental section to allow for a more extensive and objective comparison.
soundness: 3
strengths: 1. The paper is well-organized, featuring a logical structure with clear illustrations, algorithms, experimental results, images, and tables, making it easy to understand and follow.

2. The notation and terminology throughout the paper are highly consistent and precise, enhancing clarity and readability.

3. The paper introduces the metric $\mu$ based on the weighted average method to measure the conflict and convergence between gradients, providing theoretical upper bounds. The logical flow is clear, and the conclusions align well with practical observations.

4. In addition to experiments on real datasets, the authors conducted synthetic experiments, which further reinforce the credibility of the proposed method.

5. The experimental section is detailed and well-explained, making it easy for readers to comprehend the setup and results.

6. Apart from the original cross-entropy loss, the authors extensively study the performance of the proposed methods under various other loss functions and test them against different types of attacks. The experimental design is comprehensive and thorough.
summary: This paper proposes a **Conflict-Aware Adversarial Training (CA-AT)** gradient operation method that effectively alleviates the gradient conflict between the clean loss and adversarial loss. The proposed method is well-supported by theoretical foundations and shows strong experimental results. Findings indicate that, with the gradient conflict mitigation approach, CA-AT improves the balance between standard accuracy (SA) and adversarial accuracy (AA) — the SA-AA frontier — compared to vanilla adversarial training.
weaknesses: 1. Please provide detailed accuracy results for experiments on ViT and Swin-T in table format.

2. Does CA-AT also perform well on larger datasets such as ImageNet?

3. Additional baselines that achieve similar levels of balance should be included, such as other advanced weighted methods or gradient operations. Using only Vanilla AT as a baseline is insufficient.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 2
questions: · How are the hyperparameter $\gamma$ and the batch size set? What effect do they have on the performance of the proposed method？

· How well does the proposed method perform against more optimization-based attacks (e.g., C&W [2], DDN[3])?

[2] Towards Evaluating the Robustness of Neural Networks, IEEE SP, 2017.

[3] Decoupling Direction and Norm for Efficient Gradient-Based L2 Adversarial Attacks and Defenses, CVPR, 2019.

· How effective is the proposed method compared to the improved AT (e.g., TRADES, MART)?
soundness: 3
strengths: · This manuscript offers a new perspective on improving adversarial robustness by addressing gradient conflict.

· This work provides a theoretical analysis, supported by empirical experiments, to demonstrate the gradient conflict and present the motivation for CA-AT.

· Extensive experiments across different datasets are conducted to validate the effectiveness of the proposed CA-AT.
summary: This work aims to address the limitations of traditional weighted-average adversarial training, the authors propose a novel framework called Conflict-Aware Adversarial Training (CA-AT). This work identifies that existing weighted-average AT methods face a gradient conflict, particularly with higher attack budgets. The proposed CA-AT mitigates this conflict by introducing a conflict-aware trade-off factor that adjusts the influence of standard gradient and the adversarial gradient based on their alignment.
weaknesses: · Some detailed parameters are not clear, for example, the $\gamma$ and the batch size. According to the study in [1], the batch size is related to the learning rate and they will influence the natural accuracy and robust accuracy.

[1] Bag of Tricks for Adversarial Training, ICLR, 2021.

· The adversarial attacks used to evaluate the adversarial training methods mainly belong to gradient-based methods, more optimization-based attacks can be used to evaluate the effectiveness of the proposed method.

· The main comparison method in this manuscript is vanilla AT. There are many improved adversarial training methods that can be considered for comparison.

Meta-review: The paper tackles an important problem in adversarial training by addressing gradient conflicts through a conflict-aware trade-off factor. However, the proposed method lacks sufficient novelty, as gradient alignment has been explored in existing works, and CA-AT appears more incremental than groundbreaking. The comparisons are primarily limited to Vanilla AT, without sufficient evaluation against advanced methods like TRADES or MART, raising questions about its relative effectiveness. Furthermore, the experiments are confined to small-scale datasets, with no results on ImageNet or other large-scale benchmarks, undermining claims of broad applicability. Empirical results are further weakened by the absence of error bars and robust statistical analysis, while certain cases show inferior performance compared to the baseline. Additionally, the method introduces significant computational overhead, and hyperparameter sensitivity is insufficiently analyzed, limiting practical utility. Due to these substantial weaknesses, including limited originality, incomplete evaluations, and methodological concerns, the paper falls short of the standard for acceptance

Decision: Reject