TL;DR
While self-supervised vision foundation models excel at transferring to various downstream tasks, their adversarial robustness does not generalize as smoothly. This paper demonstrates that state-of-the-art defenses designed to secure these models actually fail against task-specific attacks on dense prediction tasks like semantic segmentation and depth estimation, while simultaneously degrading clean performance.
What Problem Does This Paper Address?
Vision foundation models trained via self-supervised learning (SSL)—such as DINO and DINOv2—have become highly popular due to their versatility. A single pre-trained encoder can be adapted to multiple downstream tasks, from simple image classification to complex, pixel-level dense predictions like semantic segmentation and depth estimation.
However, evaluating whether these foundation models are secure against adversarial attacks has historically been limited to a single task: image classification. This paper addresses a critical gap: Does adversarial robustness in SSL encoders transfer across diverse downstream tasks? If a foundation model is hardened against attacks in a task-agnostic way, does that protection hold up when a user deploys it for segmentation or depth estimation?
Methods
The authors propose a comprehensive framework to evaluate robustness at two distinct levels:
- Embedding-level Attack (
EmbedAttack): A task-agnostic attack operating directly on the encoder's representation space. It introduces imperceptible perturbations to an input image to drastically alter the resulting embedding vector ($z$). - Downstream Task Attacks: Task-specific attacks that leverage direct access to the final output of the downstream models. These include standard Projected Gradient Descent (PGD) for classification, SegPGD for semantic segmentation, and DepthPGD for depth estimation.
To defend the models, the authors evaluate a state-of-the-art defense framework called Decoupled Adversarial Contrastive Learning (DeACL). DeACL uses knowledge distillation to fine-tune an encoder, forcing its adversarial embeddings to match the clean embeddings of a frozen, pre-trained model.
Datasets
The framework was benchmarked across a wide variety of standard computer vision datasets:
- Linear Classification: CIFAR10, CIFAR100, and STL10.
- Semantic Segmentation: ADE20k, CityScapes, and PASCAL VOC 2012.
- Depth Estimation: NYU-Depth v2.
- Pre-training & Defense Fine-tuning: ImageNet.
Key Insights and Ideas
- The Defense is an Illusion for Dense Tasks: DeACL fine-tuning successfully defends encoders against the embedding-level attack (
EmbedAttack). However, it remains almost entirely ineffective against task-specific downstream attacks like SegPGD and DepthPGD. - The Distribution Alignment Trap: The defense only showed a slight improvement against classification PGD attacks when evaluated on the STL10 dataset. Why? Because STL10 is a subset of ImageNet (the dataset used for DeACL fine-tuning). On completely different distributions like CIFAR10, the defense failed entirely against downstream PGD.
- The Performance Trade-Off: Hardening the encoder via adversarial fine-tuning inherently degrades its "clean" performance (accuracy or mIoU on unperturbed images) across all downstream tasks.
- Rapid Saturation: During adversarial fine-tuning, robustness against embedding attacks peaks very early (around 10 epochs), after which prolonged training yields diminishing returns and further harms clean data accuracy.
Key Results
- Classification: On CIFAR10, a standard DINOv1 encoder's accuracy drops from 94% to 0% under a PGD attack. Applying the DeACL defense recovers
EmbedAttackaccuracy to 73%, but the downstream PGD attack still completely crushes it down to just 2%. - Semantic Segmentation: On the CityScapes dataset, both
EmbedAttackandSegPGDreduce a standard encoder's mean Intersection over Union (mIoU) from ~0.65 to nearly 0.01. While DeACL mitigatesEmbedAttack(bringing mIoU back up to 0.31), it leaves the model completely vulnerable toSegPGD(mIoU remains at a broken 0.03). - Depth Estimation: On NYU-Depth v2, adversarial attacks significantly increase the Root Mean Square Error (RMSE). DeACL fails to provide any notable protection against
DepthPGD.
Limitations and Future Work
The primary limitation highlighted by this work is that current representation-layer defenses are too narrow; they protect the embedding space but fail to anticipate how downstream task adaptors can be exploited.
To build truly robust foundation models, the authors suggest shifting toward multi-perturbation adversarial training (simultaneously training against multiple attack types like $\ell_1, \ell_2, \ell_\infty$). Furthermore, they conclude that practitioners cannot rely solely on a hardened encoder; they must also perform robust fine-tuning specifically tailored to each intended downstream task.
Summary updated