TL;DR
This paper investigates the adversarial robustness of self-supervised learning (SSL) vision encoders across various downstream tasks beyond just image classification. They find that current state-of-the-art defenses, primarily designed for classification, significantly degrade performance on other tasks like semantic segmentation and depth estimation, highlighting a critical need for more generalized robustness.
What Problem Does This Paper Address?
Foundation models, particularly those trained with self-supervised learning (SSL), have become ubiquitous in computer vision due to their impressive performance and adaptability to various downstream tasks with minimal fine-tuning. However, most research on the adversarial robustness of these models has focused exclusively on image classification. This leaves a significant gap in our understanding of how vulnerable these powerful models are to adversarial attacks when applied to other crucial tasks like semantic segmentation (understanding every pixel in an image) and depth estimation (determining the distance of objects). The authors aim to bridge this gap by comprehensively evaluating the robustness of SSL encoders across these diverse tasks.
Methods
The paper introduces a framework for evaluating SSL encoder robustness at two levels:
- Embedding-level Attack (EmbedAttack): This attack targets the internal representations (embeddings) generated by the SSL encoder. It aims to create imperceptible perturbations in the input image that cause substantial changes in the encoder's output embeddings. This is achieved by using projected gradient descent (PGD) in the embedding space.
- Downstream Task Attack: This involves crafting attacks that directly leverage the specific output of a downstream task. For classification, they use standard PGD attacks. For semantic segmentation, they employ SegPGD, which intelligently weights the loss for correctly and incorrectly classified pixels. For depth estimation, they use DepthPGD, which targets the pixel-wise depth estimation loss.
To defend against these attacks, they utilize Decoupled Adversarial Contrastive Learning (DeACL), a state-of-the-art method that fine-tunes existing SSL encoders to improve their robustness. DeACL aims to preserve the original encoder's representation quality while enhancing its resilience to adversarial perturbations.
Datasets
The paper evaluates SSL encoders on the following datasets:
- Classification: CIFAR10, CIFAR100, STL10.
- Semantic Segmentation: ADE20k, CityScapes, PASCAL VOC 2012.
- Depth Estimation: NYU-Depth v2.
The encoders themselves are primarily trained on ImageNet, with fine-tuning for robustness also performed using ImageNet-related data.
Key Insights and Ideas
- Robustness is Task-Specific: The most striking finding is that defenses effective for classification do not translate to robustness on other tasks. This suggests that adversarial robustness is not a universal property of an encoder but is highly dependent on the downstream task.
- DeACL's Limited Cross-Task Efficacy: While DeACL shows some promise in improving robustness against the embedding-level attack (EmbedAttack), it largely fails to protect against task-specific attacks like PGD (for classification), SegPGD (for segmentation), and DepthPGD (for depth estimation).
- The Trade-off is Real: The study confirms the well-known trade-off between clean performance and adversarial robustness. Fine-tuning for robustness often leads to a decrease in accuracy on clean, unperturbed data.
- Fine-tuning Dynamics: DeACL's impact is most significant in the initial epochs of fine-tuning. Prolonging training beyond a certain point yields diminishing returns, suggesting an optimal fine-tuning duration.
- Need for Broader Robustness: The findings underscore that for foundation models to be truly trustworthy and reliable, their robustness must be considered and enhanced across all their intended applications, not just classification.
Key Results
- Classification: Standard SSL encoders (DINO, DINOv2) are highly vulnerable to PGD attacks, with accuracy dropping to near random chance. DeACL fine-tuning improves robustness against EmbedAttack but offers minimal gains against PGD, except for a slight improvement on STL10 (a subset of ImageNet).
- Semantic Segmentation: EmbedAttack is highly effective, reducing mean Intersection over Union (mIoU) to near zero for standard encoders. DeACL improves robustness against EmbedAttack but remains largely ineffective against SegPGD.
- Depth Estimation: Both EmbedAttack and DepthPGD significantly increase Root Mean Square Error (RMSE). DeACL offers some protection against EmbedAttack but fails to improve robustness against DepthPGD.
- Clean Accuracy Degradation: In most cases, DeACL fine-tuning leads to a decrease in clean accuracy across all evaluated downstream tasks.
Limitations and Future Work
- Limited Defense Scope: The paper focuses on DeACL as the defense mechanism. The findings might differ with other robust SSL training methods.
- Task-Specific Attacks Remain Potent: The primary limitation highlighted is the continued effectiveness of task-specific adversarial attacks (PGD, SegPGD, DepthPGD) even after applying defenses designed for robustness.
- Future Directions: The authors suggest exploring multi-perturbation adversarial training, similar to approaches used in supervised learning, to make SSL models robust to a wider range of attacks. They also propose potentially performing robust tuning specifically for each intended downstream task, rather than relying on a single, general-purpose defense.
Summary updated