Abstract
Foundation Vision-Language Models (VLMs) such as CLIP and DINOv2 have become cornerstones of modern computer vision, yet they remain susceptible to adversarial attacks—small, human-imperceptible perturbations that significantly degrade model performance. Traditional adversarial fine-tuning often suffers from a "stability gap" and a heavy "accuracy tax," where gains in robustness come at the expense of clean-data performance. This paper introduces LORE (Lagrangian-Optimized Robust Embeddings), a framework that treats robustness as a constrained optimization problem. By utilizing a dual network to dynamically balance competing objectives, LORE achieves a superior trade-off between security and accuracy, shifting the Pareto front for robust visual encoders.
Introduction
The rise of Foundation Models has revolutionized the way machines understand the visual world by mapping images and text into a shared latent space. However, these models possess a significant vulnerability: adversarial fragility. When subjected to targeted noise, the embeddings generated by these encoders can be easily manipulated, leading to failures in downstream tasks like zero-shot classification and semantic segmentation.
Existing attempts to harden these models typically rely on naive regularization, adding a fixed penalty term to the loss function. This approach frequently leads to two primary issues: the Stability Gap, where the model loses its pre-trained knowledge during the early stages of adversarial training, and the Accuracy Tax, where the model's performance on uncorrupted data drops significantly. LORE addresses these challenges by reframing adversarial training through the lens of Lagrangian duality.
Methodology
LORE departs from standard regularization by formulating the training process as a Constrained Optimization problem. The objective is to maximize the robustness of the embeddings while ensuring they remain within a specific distance of the original, high-performing pre-trained model’s embeddings.
Lagrangian Duality and the Dual Network
To manage the trade-off between robustness and clean-data fidelity, LORE employs a dual network—a lightweight Multi-Layer Perceptron (MLP). Unlike static penalty weights, this dual network dynamically determines the optimal constraint enforcement for each specific image. This allows the model to adapt its learning strategy based on the complexity and features of individual samples.
Sample-Specific Margins
Recognizing that a "one-size-fits-all" approach to embedding proximity is suboptimal, LORE introduces sample-specific margins. These safety zones scale based on the magnitude of the original embedding, ensuring the constraints remain scale-invariant and preserving the structural integrity of the latent space.
Primal-Dual Optimization
The training regime follows a primal-dual approach, alternating between updating the image encoder (the primal step) and the dual network (the dual step). This iterative process ensures that the proximity constraints are strictly met, acting as "safety rails" that prevent the model from converging into poor local minima during the volatile early phases of training.
Experimental Results
The researchers evaluated LORE across a diverse array of benchmarks, including ImageNet, ImageNet-100, and CIFAR10, alongside 13 zero-shot datasets such as CalTech and OxfordPets.
Performance and Robustness
On the ImageNet-100 benchmark using a ViT-B/16 architecture, LORE demonstrated a significant improvement over previous state-of-the-art methods like FARE:
- Clean Accuracy: LORE achieved 74.7%, compared to FARE’s 70.4%.
- Robust Accuracy: Under a standard adversarial attack (ε=2), LORE maintained 47.7% accuracy, whereas the baseline fell to 34.9%.
Zero-Shot and Out-of-Distribution (OOD) Generalization
LORE’s benefits extend beyond the training distribution. In zero-shot evaluations across 13 datasets, LORE consistently outperformed baselines by margins of 3-5%. Furthermore, testing on ImageNet-C revealed that LORE-tuned models are more resilient to common corruptions like blur, snow, and JPEG compression. In several instances, the robust LORE model actually outperformed the original pre-trained CLIP on corrupted data.
Interpretability and Architecture Agnosticism
Interestingly, the enforcement of robustness constraints improved the semantic alignment of the embeddings. LORE-tuned image embeddings showed higher alignment with GPT-4 generated text descriptions than the original CLIP model. The framework also proved to be architecture-agnostic, showing successful implementation on both ConvNeXt and self-supervised models like DINOv2.
Discussion and Limitations
While LORE represents a major advancement in creating production-ready robust models, it is not without limitations. The framework’s performance is inherently tied to the quality of the "anchor" or reference model; a weak pre-trained model will limit the potential of the robust version. Additionally, the dual network's architecture is currently based on heuristics, suggesting that further optimization of the MLP structure could yield even better results. Finally, while empirical evidence is strong, further theoretical work is needed to fully map the trade-offs inherent in unsupervised adversarial training.
Conclusion
LORE provides a robust path forward for visual encoders, proving that security does not have to come at the cost of performance. By utilizing constrained optimization and dynamic dual networks, LORE stabilizes the training process and delivers models that are both highly accurate and resilient to adversarial manipulation.
Summary updated