TL;DR
This paper introduces a novel adversarial defense method for vision-language models like CLIP that leverages human brain activity data. By integrating brain signals with augmented image features, the method achieves robust performance against adversarial attacks without requiring adversarial examples during training, thus overcoming the typical trade-off between robustness and clean image accuracy.
What Problem Does This Paper Address?
Large-scale vision-language models (LVLMs), such as those based on CLIP, are incredibly powerful but also vulnerable to adversarial attacks. These attacks subtly alter images, making them imperceptible to humans but causing models to misclassify them, severely degrading performance on downstream tasks. Traditional defense methods, like adversarial training, often require knowledge of the specific attack and lead to a performance drop on clean, unperturbed images. This creates a dilemma: a model can be robust to attacks or accurate on normal data, but not both. The authors aim to break this trade-off by developing a defense that is robust to unknown attacks and maintains high accuracy on clean data.
Methods
The core of the proposed method, termed "PM" (Proposed Method), lies in integrating human brain activity data with image processing. Instead of using adversarial examples, the approach utilizes functional magnetic resonance imaging (fMRI) data collected while subjects viewed original images.
Here's a breakdown:
- Augmented Image Set Creation: For each original image, a set of augmented images is generated using techniques inspired by SimCLR (e.g., cropping, resizing, flipping, rotation, grayscale, Gaussian blur). This aims to capture diverse visual features.
- Feature Extraction and Integration:
- Visual features are extracted from the augmented images using a pre-trained CLIP image encoder.
- Brain features are extracted from the corresponding fMRI data using a specialized fMRI decoder (MindBridge).
- These visual and brain features are concatenated to form "integrated features."
- Training: A three-layer multilayer perceptron (MLP) is trained to predict the original visual features from the integrated features. The training objective is to maximize the cosine similarity between the predicted and original visual features. This encourages the model to learn features that are invariant to image perturbations, mimicking how humans perceive images despite minor changes.
Crucially, this method does not use adversarial examples during training, making it inherently robust to unseen attack types.
Datasets
- Natural Scene Dataset (NSD) [36]: Used for both training and testing. This dataset contains pairs of original images (from MSCOCO) and corresponding fMRI data capturing human brain activity while viewing those images. The authors used 9841 samples from a single subject, with 8859 for training and 982 for testing.
Key Insights and Ideas
- Brain Activity as a Robust Feature: The central hypothesis is that human brain activity exhibits invariant representations of objects and scenes, even when presented with slightly perturbed images. This inherent robustness of human perception can be harnessed to defend machine learning models.
- Bypassing Adversarial Examples: The most significant insight is that effective adversarial defense can be achieved without explicitly training on adversarial examples. This circumvents the need to know the attack type and avoids the associated accuracy degradation on clean data.
- Bridging Modalities: The method successfully integrates visual information from images with neural information from fMRI, creating a richer, more robust representation.
- Human Perception as a Gold Standard: By aligning model outputs with human brain responses, the approach implicitly leverages the perceptual robustness of humans.
Key Results
- Enhanced Robustness: The proposed method (PM) significantly improved robustness against various adversarial attacks (PGD, APGD, CW, Gao et al.) compared to baseline CLIP and other defense methods like Randomized Smoothing (RS) and Random Self-Ensemble (RSE). For instance, PM achieved average cosine similarities between 0.713 and 0.973 for adversarial examples, significantly higher than CLIP's (0.120-0.722).
- Maintained Clean Accuracy: PM demonstrated excellent performance on clean images, achieving high cosine similarities (e.g., 0.973 for image similarity, 0.258 for text similarity), often outperforming even the baseline CLIP.
- Attack Independence: PM showed consistent robustness across different attack types, even those it wasn't trained on, unlike "ideal" adversarial training methods (AT) which are attack-specific.
- Effective Image-to-Text Retrieval: In image-to-text retrieval tasks, PM significantly outperformed baselines and even AT methods in retrieving correct captions for adversarial examples, while maintaining competitive performance on clean images. For example, PM achieved a Rank of 117.71 for PGD attacks, compared to CLIP's 494.31.
Limitations and Future Work
- fMRI Data Impracticality: A major limitation acknowledged is the impracticality of using fMRI data during inference. fMRI is expensive, requires specialized equipment, and is difficult to obtain frequently, making real-time application challenging.
- fMRI Decoder Specificity: The current fMRI decoder (MindBridge) is personalized, which limits its ease of use with new subjects and analysis across different brain regions.
- Future Directions:
- Multimodal Knowledge Distillation: Exploring training a single model with multiple modalities (fMRI, EEG, images) and transferring weights to enable inference using a single modality.
- Improved fMRI Decoders: Developing simpler, more accurate fMRI decoders that are versatile and can analyze different brain regions.
- Empirical Dataset Creation: Building a multisubject dataset for more comprehensive analysis of adversarial robustness with brain activity.
Summary updated