Enhancing Adversarial Contrastive Learning via Adversarial Invariant Regularization

Adversarial contrastive learning (ACL) is a technique that enhances standard contrastive learning (SCL) by incorporating adversarial data to learn a robust representation that can withstand adversarial attacks and common corruptions without requiring costly annotations. To improve transferability, the existing work introduced the standard invariant regularization (SIR) to impose style-independence property to SCL, which can exempt the impact of nuisance style factors in the standard representation. However, it is unclear how the style-independence property benefits ACL-learned robust representations. In this paper, we leverage the technique of causal reasoning to interpret the ACL and propose adversarial invariant regularization (AIR) to enforce independence from style factors. We regulate the ACL using both SIR and AIR to output the robust representation. Theoretically, we show that AIR implicitly encourages the representational distance between different views of natural data and their adversarial variants to be independent of style factors. Empirically, our experimental results show that invariant regularization significantly improves the performance of state-of-the-art ACL methods in terms of both standard generalization and robustness on downstream tasks. To the best of our knowledge, we are the first to apply causal reasoning to interpret ACL and develop AIR for enhancing ACL-learned robust representations. Our source code is at https://github.com/GodXuxilie/Enhancing_ACL_via_AIR.

Paper

Similar papers

Peer review

Reviewer Ai1a8/10 · confidence 4/52023-06-19

Summary

The authors propose AIR to regulate the the process of contrastive learning. They first analyze the causal graph of contrastive learning under the adversarial setting, and try to enforce $p\left(y^R | \tilde x\right)\cdot p\left(\tilde x | x\right)$ (Eq.4) to be invariant under different interventions. Intuitively, this regularizer would force the crafted adversarial examples to be style-independent and thus the learned representations shall enjoy better robustness.

Strengths

The core idea of this paper is technically novel and clearly presented. Experiments are reported by applying the proposed AIR / SIR terms to ACL / DynACL, and consistent performance gains are observed. Ablation studies for different values of $\lambda_1$ and $\lambda_2$ are also provided, to verify the effectiveness of the AIR term itself. The authors also provide theoretical results to justify the rationality of the AIR term.

Weaknesses

The proposed method would require more tunning since it incorporates two more hyper-parameters $\lambda_1$ and $\lambda_2$, and we can see from Table 7 that these two hyper-parameters interact in a non-trival way. For example, when compared with the case that only AIR is leveraged ($\lambda_1=0,\ \lambda_2>0$), incorporating AIR with SIR (i.e., $\lambda_1>0,\ \lambda_2>0$) could result in better **robust accuracy**. Little type in Eq. 8: two augmentations in KL divergence should be different. --- Update --- After reading additional experimented provieded by the authors, I decide to raise my score to 8.

Questions

See "Weaknesses" part.

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

2 fair

Limitations

N.A.

Reviewer paeS6/10 · confidence 4/52023-06-22

Summary

This paper proposes a novel adversarial contrastive learning method, which introduces causal reasoning method to obtain robust feature representation and enforce independence from style factors. The idea is simple and effective. In addition, the experiments are sufficient to prove the effectiveness of the proposed method. The source codes are released.

Strengths

1. The idea is interesting and easy to understand. 2. The theoretical analysis is detailed and proves the effectiveness of the proposed method.

Weaknesses

1. The improvement of the proposed method is limited. 2. Without causal reasoning, this paper only proposes two distribution alignment regularizations in the adversarial samples to obtain robust feature representation. Thus, this paper is an incremental work based on ACL and DynACL. 3. I want to see the performance of this paper in the large-scale datasets, such as sub-imagenet.

Questions

Shown as Weaknesses.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Shown as Weaknesses.

Reviewer ZaSM6/10 · confidence 4/52023-07-04

Summary

This paper proposes to tackle adversarial contrastive learning via causal reasoning. Specifically, the authors discuss the scenario where adversarial examples are involved in standard invariant regularization. The authors also provide analysis of proposed invariant regularization to justify the rationality. The experiments on different datasets show improvement compared with baselines.

Strengths

1. The paper is well-written and easy to follow. 2. Taking adversarial example in the SIR via Markov condition seems natural and the analysis could provide some insights. 3. The experiments on various datasets show improvement.

Weaknesses

I have several concerns: 1. The comparison with other baselines is missing in Table 4, such as ACL with SIR and DynACL with SIR. 2. The authors conduct experiments on ResNet family. However, WideResNet backbone networks are always evaluated in the field of adversarial robustness. I wonder whether the superiority of IR can be generalized to different networks. Minors: It seems a typo in Eq. 8, the KL divergence should be computed between $\tau_i$ and $\tau_j$.

Questions

1. Please include the comparison with baseline in Table 4. 2. Please include more evaluation on WideResNet.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The authors have discussed the limitations.

Reviewer fVht4/10 · confidence 4/52023-07-07

Summary

This paper proposed a method to advance adversarial contrastive learning by utilizing a technique called causal reasoning. The adversarial invariant regularization (AIR) proposed in this paper demonstrated a style factor. Additionally, the effectiveness of the proposed method was empirically shown using CIFAR10 and CIFAR100.

Strengths

- Theoretically, it explained how the KL divergence can provide invariant regularization. - The paper is well organized and most explanations are clearly written and easy to understand the approach and the theoretical explanations.

Weaknesses

- The theoretical analysis of this paper (section 3.2 and section 3.3) appears to apply adversarial examples to the theorem shown in paper [1], which seems closer to an application rather than a novel combination, resulting in a perceived lack of originality. - Although most theorems and reasoning methods are well explained, expressing which input types the KL divergence loss of SIR and AIR applies to would be more effective for reproducing this paper through implementation. - Furthermore, the performance gain shown in robustness experiments from the proposed regularization is considered to have low significance as it is less than 1% in most datasets and tasks. - Also, there is insufficient explanation as to why the proposed method is more helpful for self-supervised adversarial robustness than existing methods, making it difficult to verify the experimental significance of the proposed method. Especially in the experimental results, AIR helps both clean performance and robustness compared to SIR, but there is no clear justification for why these two components should be used simultaneously. - It is unclear why a model trained with SIR and AIR regularization for adversarial x and natural x performs well against common corruption. - As it's a self-supervised pretraining method, the fact that experiments were only conducted on small datasets (CIFAR10, CIFAR100) leaves concerns about its applicability. [1] Mitrovic et al., REPRESENTATION LEARNING VIA INVARIANT CAUSAL MECHANISMS, ICLR 2021

Questions

- It would be good to mention y^R in the main text. - In equation 3, adversarial for x_k^i and x_k^j is expressed in one formula. I'm curious if x_k^j also gets its perturbation updated when creating the adversarial for x_k^i. - It would be great to mention how much performance difference there is, how much slower the speed is, and how much the transferability improves when compared to Supervised Adversarial Training (Madry, TRADES).

Rating

4: Borderline reject: Technically solid paper where reasons to reject, e.g., limited evaluation, outweigh reasons to accept, e.g., good evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

2 fair

Presentation

3 good

Contribution

2 fair

Limitations

- There is a limitation in the hyperparameter tuning of lambda1 and lambda2. - There is a limitation that the gain in performance is marginal.

Authorsrebuttal2023-08-11

We would like to know if you have any further questions or require additional clarification.

Dear Reviewers, Thank you for taking the time to review our work and for providing us with valuable feedback. We have carefully considered your comments and provided our responses. If you have any further questions or require additional clarification, please kindly let us know. In particular, we would like to ask Reviewers **fVht** and **paeS** if our responses satisfactorily address their concerns. Thank you again for your valuable input. Best wishes, \ Authors

Reviewer fVht2023-08-16

Thank you to the authors for their detailed response and additional experiments. I appreciate the effort to address the initial concerns. However, after reviewing the updates, I still have several questions regarding the paper: 1. I'm not entirely convinced about the non-trivial nature of the analysis presented. While such perceptions might vary among reviewers, I would appreciate an opportunity to discuss this aspect with fellow reviewers and the ACs. At this juncture, the claim that AIR represents a novel contribution seems a bit overstated. 3. The response lacks specific details about the sample size used for the t-test and the method employed. A small p-value alone isn't sufficiently informative. Is the performance in Table 1 based on a single pretrained checkpoint with multiple re-runs of the linear layer, or are multiple pretrained checkpoints involved? I kindly ask the authors to explain the number of trials used for the t-test and provide further details. Without such clarity, the performance's significance remains ambiguous. 4. Unfortunately, this recent response didn't fully address my initial queries. There's a lack of detailed explanation regarding why the proposed approach is superior to AIR. For instance, as per Tables 5 or 6, using AIR seems to enhance both clarity and robustness more significantly compared to SIR. Why then is there a need to employ both SIR and AIR? Why not solely focus on enhancing AIR? 5. Do the authors imply that the styles of adversarial perturbation and common corruptions are treated similarly in IR? I'm having difficulty agreeing with this perspective. Adversarial perturbation typically introduces noise to the original image 'x,' whereas common corruption may introduce noise or even result in geometric shifts. Given the distinct nature of these perturbations, I'm still uncertain about how IR achieves superior performance in both scenarios. If these concerns remain unresolved after our discussions, I might reconsider and adjust my score to a 3.

Authorsrebuttal2023-08-17

Reply to Reviewer fVht

Thanks for your replies. Please find our responses below. > [Reply to Q1] Kindly note that, to the best of our knowledge, we are the first effort to connect causal reasoning with ACL. We construct a novel causal graph of ACL and provide the theorem to justify the rationality of our constructed causal graph of ACL. > [Reply to Q2] Details of the t-test. In Table 1 (a.k.a. ***Table A***), for **baselines** (i.e., ACL and DynACL) and **our proposed method** (i.e., ACL with IR and DynACL with IR), we used a single pre-trained checkpoint and repeated the finetuning procedure three times. Therefore, for each baseline and each dataset, we have **three** results of robust test accuracy and **three** results of standard test accuracy. Note that, for baselines, we used the public pre-trained checkpoints downloaded from their official GitHub. To conduct t-tests, we used the following code: ``` from scipy import stats a = the list of results of the baseline b = the list of results of our proposed method if stats.levene(a, b).pvalue > 0.05: # check whether the variance is the same. print(stats.ttest_ind(a,b,equal_var=True).pvalue) # check whether there is significant difference between two distributions. else: print(stats.ttest_ind(a,b,equal_var=False).pvalue) ``` On each dataset, we conducted a t-test between the three results of robust/standard test accuracy achieved by the baseline and the three results of robust/standard test accuracy achieved by our proposed method. Then, we reported the corresponding p-value in ***Table A***. We can observe that the p-value is far smaller than 0.05, which means that the t-test rejects the null hypothesis and our results are significantly better than the baseline. > [Reply to Q3] Perhaps there is a misunderstanding. Kindly note that SIR is the method of [1]. **AIR is *our* proposed regularization**. IR means AIR+SIR. As you mentioned, our proposed AIR is apparently more effective than SIR since AIR can enhance both standard and robust test accuracy more significantly compared to SIR. We empirically found that IR slightly improves performance compared to AIR. Therefore, we choose to use SIR and our proposed AIR together. > [Reply to Q4] IR regulates the representations to be invariant of style factors, thus enhancing the robustness in downstream tasks. We can treat adversarial attacks and common corruptions as style factors which are functions to manipulate the original data without changing its semantics. Adversarial attacks add imperceptible input perturbations to the original data while maintaining the original semantics. Common corruptions [2] used 15 types of algorithms from noise, blur, weather, and digital categories to generate input perturbations without modifying the semantics of the original data. IR aims to regulate the representations to be invariant of style factors. Therefore, IR helps to make the representations robust against style factors that do not change the semantics, thus improving robustness against adversarial robustness and common corruptions. *References*\ [1] Representation learning via invariant causal mechanisms. Mitrovic et al., ICLR 2021.\ [2] Benchmarking Neural Network Robustness to Common Corruptions and Perturbations. Hendrycks et al., ICLR 2019.

Area Chair waST2023-08-19

Remaining concerns

Dear Reviewer fVht, Are the authors' responses effective in addressing your concerns? Thank you. AC

Reviewer fVht2023-08-19

Thank you for your detailed responses. Your feedback has provided clarity and addressed some of my initial concerns. > In response to Q2: we used a single pre-trained checkpoint and repeated the finetuning procedure three times. I'm not entirely clear on the why author perform multiple runs during the finetuning phase, especially when the proposed methods focus primarily on pretraining approach. To genuinely validate the stability and effectiveness of the proposed methods, wouldn't it be more appropriate to conduct multiple runs during pretraining and then finetune the resulting checkpoints? From this angle, significance of proposed methods upon baselines is still my concerns. > In response to Q3: We empirically found that IR slightly improves performance compared to AIR. Therefore, we choose to use SIR and our proposed AIR together. While the combination of improved clean performance and enhanced robustness with AIR already achieve better performance compare to IR, the empirical results stemming from the combination of IR and AIR don't seem to present a coherent strategy. Thus, as I remain unconvinced about the significance of the approach compared to the baselines, and I seek further clarification on the justification for the design of the regularizers, I have decided to maintain my score of 4.

Authorsrebuttal2023-08-19

Thanks for your replies. > 1. Regarding multiple runs. First, we performed multiple runs of fine-tuning because we wanted to exempt the effect of the randomness of fine-tuning in the performance of downstream tasks. In this way, we can provide a genuine comparison of the performance of the pre-trained models. Second, to the best of our knowledge, no existing ACL work (such as ACL, AdvCL, InfoNCE, DynACL) has performed multiple runs of pre-training and then reported the error bars due to that robust pre-training is extremely time-consuming. Third, in the past two days, we conducted another two runs of ACL with IR and DynACL with IR on CIFAR-10 with different random seeds, respectively. Then, for each pre-trained checkpoint, we conducted SLF three times. Therefore, for our proposed method and each dataset, we have **nine** results of robust test accuracy and **nine** results of standard test accuracy. By conducting the t-test between the three results of the baseline (i.e., ACL and DynACL) and the **nine** results of our proposed method (shown in the below table), we find that the p-value is even smaller, which further validates the significance of our proposed method. | p-value | AA on CIFAR-10 | SA on CIFAR-10 | |---|---|---| | ACL vs ACL with IR | 8.140e-08 | 2.723e-13 | | DynACL vs DynACL with IR | 1.123e-05 | 1.857e-13 | > 2. Further clarification for the design of the regularizers. SIR of paper [1] is used to regulate standard representations to be style-independent. Our proposed AIR is proposed to regulate robust representations to be style-independent. It is an intuitive way for us to combine SIR and AIR together (i.e., IR) in order to regulate both standard and robust representations. Note that ACL also uses the contrasts between standard representations (standard contrastive loss) and the contrasts between robust representations (adversarial contrastive loss) simultaneously. In a similar way, we tried to use SIR and our proposed AIR to regulate both standard and robust representations, which is a natural way for us to further improve the performance. *References*\ [1] Representation learning via invariant causal mechanisms. Mitrovic et al., ICLR 2021.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC