Effective Targeted Attacks for Adversarial Self-Supervised Learning

Recently, unsupervised adversarial training (AT) has been highlighted as a means of achieving robustness in models without any label information. Previous studies in unsupervised AT have mostly focused on implementing self-supervised learning (SSL) frameworks, which maximize the instance-wise classification loss to generate adversarial examples. However, we observe that simply maximizing the self-supervised training loss with an untargeted adversarial attack often results in generating ineffective adversaries that may not help improve the robustness of the trained model, especially for non-contrastive SSL frameworks without negative examples. To tackle this problem, we propose a novel positive mining for targeted adversarial attack to generate effective adversaries for adversarial SSL frameworks. Specifically, we introduce an algorithm that selects the most confusing yet similar target example for a given instance based on entropy and similarity, and subsequently perturbs the given instance towards the selected target. Our method demonstrates significant enhancements in robustness when applied to non-contrastive SSL frameworks, and less but consistent robustness improvements with contrastive SSL frameworks, on the benchmark datasets.

Paper

References (41)

Scroll for more · 29 remaining

Similar papers

Peer review

Reviewer Uc5D7/10 · confidence 5/52023-07-05

Summary

This paper highlights that untargeted attacks for adversarial self-supervised learning result in poor downstream robustness. Instead, they suggest utilizing targeted attacks and propose a scoring method for selecting the target samples. They show that this approach results in significant robustness improvements over the untargeted attacks.

Strengths

1. The paper highlights a major issue with adversarial self-supervised learning for non-contrastive models, that the untargeted attacks typically used fail to deliver good downstream robustness. 2. The proposed method shows significant robustness improvement when compared to positive-only untargeted attack. 3. The paper is well-written and the definitions and argumentation are easy to follow.

Weaknesses

1. The proposed method, TARO, has two components but their individual contributions are not studied. TARO improves over the positive-only unsupervised attack by i. changing it to a targeted attack and ii. by selecting the target using a score function. However, there are indications in the prior work and in the results in this paper that the majority of the improvement comes from i. and not ii. For example, (Petrov and Kiwatkowska, 2022) also compare targeted and untargeted adversarial self supervision and show that targeted attacks across the whole batch result in more certifiably robust models than the untargeted ones. The fact that the improvements in Table 4 in this paper are significantly lower than the improvements in Table 3 is further evidence that it might be i. that drives the improvement rather than ii. Hence, the authors should consider adding an additional baseline to all their results where instead of using their score function, they select a random sample from the batch. This would also be computationally easier, as the paper reports a 5% overhead for the target selection. 2. The paper does not address the fact that the training loss and the loss used for computing the adversarial samples need not be the same. In fact, a number of prior works have this precise setting, e.g., (Alayrac et al., 2019), (Nguyen et al., 2022). Hence, it is not particularly novel that the loss used for training a positive-only model can be different from the one used for the attacks. 3. Only RoCL and ACL are compared against the novel method, but a number of other unsupervised adversarial training methods have been proposed as listed above. In order to claim that the target selection via a score function is better than them, the authors should compare with a larger range of methods. In my view, it is especially important to compare against methods that generate adversarial examples using the whole batch, rather than a single target as these methods might be stronger than the proposed TARO. Some examples of such prior work are (Ho and Vasconcelos, 2020), (Fan et al., 2021), (Petrov and Kwiatkowska, 2022) and the Adversarial-to-Adversarial and Dual Stream methods by (Jiang et al., 2020). 4. In the “Visualization of embedding space” paragraph and Fig. 3, it is actually not that clear whether the targeted attacks generate more samples on the boundary than the untargeted attacks. Visually the two plots seem quite similar. References: Jean-Baptiste Alayrac, Jonathan Uesato, Po-Sen Huang, Alhussein Fawzi, Robert Stanforth, and Pushmeet Kohli. Are labels required for improving adversarial robustness?, 2019 Chih-Hui Ho and Nuno Vasconcelos. Contrastive learning with adversarial examples, 2020 Ziyu Jiang, Tianlong Chen, Ting Chen, and Zhangyang Wang. Robust pre-training by adversarial contrastive learning, 2020 Lijie Fan, Sijia Liu, Pin-Yu Chen, Gaoyuan Zhang, and Chuang Gan. When does contrastive learning preserve adversarial robustness from pretraining to finetuning?, 2021 A. Tuan Nguyen, Ser Nam Lim, and Philip Torr. Task-agnostic robust representation learning, 2022 Aleksandar Petrov and Marta Kwiatkowska. Robustness of Unsupervised Representation Learning without Labels, 2022

Questions

1. I did not understand the “Analysis of the selected target”. What is the AT model used? How was it trained? And why was an AT model preferred to a standardly trained one? It is also not particularly clear what Fig. 2a shows. Perhaps more clarity in the writing could help. 2. The notation in the “Similarity and entropy-based target selection for targeted attack” paragraph is confusing. $p’$ and $p$ are used in the equations but $p_i$ is defined below. Is $S_\text{entropy}$ a vector or a scalar? If $p$ is a vector of logits then isn’t $S_\text{entropy}$ a vector? Typo: - The sentence starting on line 361, an unnecessary “are” and “belonging” should be “belong”.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

2 fair

Presentation

4 excellent

Contribution

3 good

Limitations

As mentioned in Weaknesses.

Reviewer zysz7/10 · confidence 4/52023-07-06

Summary

This paper proposes a new adversarial attack on self-supervised learning methods which is called TARO. The method performs an attack "on the positive-pair that perturb the given instance toward the most confusing yet similar latent space, based on entropy and similarity of the latent vectors." Authors show that this attack can be used to improve adversarial robustness of the underlying semi-supervised learning framework.

Strengths

- The experimental evaluation shows that TARO can be used to improve adversarial robustness of positive-pair-only self-supervised learning approaches (SimSiam and BYOL). - The paper is mostly well-written and comprehensible. It also gives a useful overview of the necessary backgrounds.

Weaknesses

- Mathematical notation can be improved at some points: 1. In Section 3.1 the authors state that the dataset $\mathcal{D} = \\{X, Y\\}$ is a set of the training data and the corresponding labels. This does not make sense: $\mathcal{D}$ has to be a tuple and X and Y also need to be ordered sets. 2. For me it is not clear what is meant by ${z_{pos,neg}}$ in Equation 2. The used notation suggests that it is a set containing a single element. However, that does not make sense as the sum in the denominator should go over all positive and negative samples. 3. In Equation 3 it is not specified at all over which entries the sum is calculated. - The number of evaluated attacks is too small. The authors only compare against PGD and Autoattack. It might be interesting to compare against other attacks, e.g. Carlini-Wagner or black-box attacks. - Theorem 3.2 states that "...adversarial perturbations are *likely* to be larger than...". However, the next sentence states that this is always the case. I suggest that the authors reformulate that sentence. - Figure 1 is difficult to understand. I had to read some more sections first to understand that the positive-pair only attack is proposed in the paper. Maybe, the term should be mentioned earlier (perhaps even in the abstract.) Minor comment: - Using verbatim in formulars is quite uncommon. I suggest the authors use \text{}, but this is a matter of taste. - "positive-pair only" vs. "positive-pair-only" Overall, I see merit in this submission and willing to recommend acceptance after the weaknesses mentioned in my review were addressed.

Questions

- How improves adversarial training using TARO robustness against other attacks, e.g. Carlini-Wagner or black-box attacks? - Are there any other SSL methods besides BYOL and SimSiam which could benefit from TARO?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, 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

3 good

Limitations

Limitations are not discussed in the paper.

Reviewer A38P6/10 · confidence 3/52023-07-07

Summary

The paper proposed the targeted attack for adversarial self-supervised learning to solve the suboptimal learning issue in positive pair-only self-supervised learning. To improve the robustness of adversarial self-supervised learning (SSL), the author leverages the targeted selection mechanism based on the score function and generate the samples by selected targets for adversarial training. The paper empirically validates that target attacks can improve the adversarial robustness of several previous adversarial SSL methods including BYORL and SimSiam.

Strengths

The paper is well-organized and easy to follow. The proposed idea is clear and has good motivation.

Weaknesses

For the transferable robustness part, the author mentioned that TARO can transfer robustness from one task to another. In my opinion, CIFAR100 and CIFAR10 share a similar domain and is not trivial to transfer the robustness. Although the authors evaluate on AutoAttack, which is a well-known strongest attack so far, one thing that I might be curious about is the transferability from the PGD attack (known attack) to other kinds of unknown attacks such as the Patch attack, CW_l2.

Questions

Can the proposed method be applied to the transformer-based model, such as ViT?

Rating

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

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

yes, the authors adequately addressed the limitation

Reviewer aDD24/10 · confidence 5/52023-07-12

Summary

This paper investigates the problem of unsupervised adversarial training. It claims that previous non-contrastive, positive-only SSL frameworks suffer from ineffective learning with untargeted adversarial samples. Based on this, this paper proposes a new TARO paradigm, which conducts targeted attacks to select the most confusing but similar samples for guiding the gradients toward a desired direction. Experiments show some great results.

Strengths

1. The motivation of this paper is clear, which addresses the limitation so existing positive-only SSL frameworks. 2. The paper is well-organized and easy to read. 3. Supplementary file is provided.

Weaknesses

1. The novelty is incremental. Actually, the technical design of targeted adversarial SSL is too straightforward. Although many theorems are provided in the paper to support it, I don't think they are critical to the final model design. 2. Missing many related works. The references are out-of-data, they are all published before 2022. There are many recent papers of this topic, the authors should carefully revisit them and discuss with them. 3. The experiments are unconvincing. The baselines are old, the authors should conduct experiments with latest baselines. Moreover, the ablation study is also insufficient.

Questions

See above

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

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

2 fair

Presentation

3 good

Contribution

2 fair

Limitations

n/a

Reviewer zysz2023-08-14

I would like to thank the authors for their rebuttal and appreciate the effort put into the additional experiments. Overall, most of my concerns have been adequately addressed which is why I increased my rating to 7 and presentation score to 3. However, in my optinion the notation used for the $L_\text{nt-xent}$ loss is still misleading as $\\{z_\text{pos}\\}$ refers to a set containing a single element $z_\text{pos}$ which is not what the authors intent to say. I urge the authors to properly define the set of positive and negative examples.

Authorsrebuttal2023-08-14

Dear Reviewer, We sincerely thank you for your feedback. Your positive comments and detailed concerns have significantly helped improve our work. In light of your feedback, we will clarify z_pos and z_neg to prevent any misunderstandings for the readers. We greatly appreciate the time and effort you've dedicated to reviewing our work, and your insights have been invaluable. Best regards, \ Author

Reviewer Uc5D2023-08-14

Thank you for your detailed response and for providing the additional results. They do indeed show that the target selection increases the resulting robustness a bit over using random selection. I'd recommend adding these results to the manuscript. I have one outstanding question about __W1__ though: You say _Specifically, random targeted attacks boost the performance of the original RoCL and ACL. When we employ the score function to select a more effective target for the targeted attack, the model can achieve even better robustness._ but that doesn't seem to be true for ACL. The robust accuracy is lower there for the score function compared to the random selection. How do you reconcile this?

Authorsrebuttal2023-08-14

Apologize for the typo

Thank you for your comments. We apologize for the confusion. There appears to be a typo regarding the performance of 73.25/42.85. This performance actually corresponds to the random selection performance of SimSiam as referenced in the first table (second row). The correct performance is **78.31/39.74**. While the performance gain from the contrastive-based approach is not as significant as the positive-pair SSL framework, it's worth noting that the contrastive-based approach, SimCLR, mitigates TARO's effect by utilizing both positive and negative pairs in representation learning. This reduces the positive pair effect to 1/batch size in loss objectives (see Line 321-323). We appreciate your feedback. To provide clarity, we will revise the table in our initial response as soon as you find our corrections. Moreover, we will certainly adding these results in the manuscripts. Best regards, \ Author

Reviewer Uc5D2023-08-14

Thank you for the clarification. I think that answers my questions and concerns. I would strongly recommend you put the random target baseline in your camera ready and clearly explain under which conditions your method helps and when not. The fact that there is a significant improvement only for positive-pair SSL is somewhat of a limitation, but I think that, as long as it is properly discussed and disclosed (maybe also mention in a "Limitations" section), it does not negate the utility of your work. I have therefore increased my score.

Authorsrebuttal2023-08-14

Dear Reviewer, We sincerely thank you for your feedback. Your positive comments and detailed concerns have greatly enhanced the quality of our work. We will clearly describe our methodology related to the random target baseline and also include the experimental results in the manuscript. We deeply appreciate the time and effort you've dedicated to reviewing our work. Best regards, \ Author

Reviewer aDD22023-08-14

Thanks for the authors' clarification. The authors' response has addressed most of my concerns. However, I still think the contributions of this paper are not enough to meet the standards of the Neurips conference. Therefore, I will keep my rating.

Authorsrebuttal2023-08-14

Thank you for your comments and feedback. And we are glad that we resolve most of your initial concerns. However, we kindly seek clarity regarding the criteria by which our contributions did not meet the standards of the NeurIPS conference, especially since we have addressed most of the concerns you raised. Given our theoretical motivations and the results of our empirical experiments, we are confident that our work offers meaningful insights to the adversarial self-supervised learning community. Could you please elaborate on any remaining concerns about our contribution? We are willing to address them if possible. Best, \ Author

Reviewer A38P2023-08-18

Thanks for the authors' response and effort. The authors' response has addressed most of my concerns. I would expect the experiment of ViT with TARO can also get better performance. Thus, I will keep my rating.

Authorsrebuttal2023-08-21

Dear Reviewer, We apologize for the delay in our response. We encountered challenges because there is no baseline research that has explored either self-supervised learning with a small dataset or adversarial training on ViT. We had to identify an approach that fits within our computational budget while thoroughly evaluating the effectiveness of our TARO. Kindly understand that due to computational constraints, our initial efforts did not involve extensive hyper-parameter tuning. To explain the settings we implemented, we adopted the self-supervised ViT approach as described in [1]. Building on [1] which is pretrained on ImageNet1K, we further trained the model for 15 epochs by integrating adversarial self-supervised training using both untargeted and targeted attacks on CIFAR10. Here's a summarized table of our results: |Model|Clean Accuracy|Robustness| |-----|--------------|---------| |ViT [1]+untargeted attack|66.63%|56.36%| |ViT [1]+TARO|74.01%|67.23%| As illustrated in the table, **TARO has also demonstrated effectiveness when applied to ViT** since TARO is a model-agnostic approach. [1] Emerging Properties in Self-Supervised Vision Transformers Best, \ Author

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC