TL;DR
This paper introduces a novel way to detect adversarial attacks in multimodal models (like CLIP and BLIP) by looking at the "shape" of their data. By leveraging Topological Data Analysis (TDA), the authors identify unique topological signatures that emerge when adversarial perturbations disrupt the alignment between image and text embeddings, leading to significantly more powerful and robust detection methods.
What Problem Does This Paper Address?
Multimodal Machine Learning systems, which align different types of data (like images and text) into a shared mathematical space, are becoming the backbone of modern AI. However, they are highly vulnerable to adversarial attacks—subtle, intentional tweaks to input data that trick a model into making wrong predictions.
While we have many ways to defend single-mode models (e.g., just image classifiers), defending multimodal systems is much harder. The primary challenge is that image and text data come from completely different domains and lack a direct one-to-one index for comparison. The authors tackle this by asking: Can we detect attacks by monitoring how they distort the underlying geometric structure (the manifold) of the aligned embeddings?
Methods
The authors turn to Persistent Homology, a tool from TDA that tracks how topological features (like clusters, holes, and voids) appear and disappear as you look at data at different scales. They introduce two new Topological-Contrastive (TC) losses:
- Total Persistence (TP) Loss: A holistic summary that measures the cumulative importance of all topological features in a dataset.
- Multi-scale Kernel (MK) Loss: A robust method to compare the topological features of image embeddings against text embeddings across multiple scales.
A key innovation is their ability to backpropagate these global topological losses to individual input samples. This allows them to calculate "topological features"—essentially gradients that show how much each specific image contributes to the overall topological distortion. These features are then integrated into a Maximum Mean Discrepancy (MMD) test, a statistical tool used to determine if two sets of data come from the same distribution (clean vs. adversarial).
Datasets
The researchers evaluated their methods using three standard benchmarks:
- ImageNet
- CIFAR-10
- CIFAR-100
They tested these across various model architectures, including five CLIP variants (ResNet and Vision Transformers) and three BLIP variants. To ensure robustness, they employed six different adversarial attack methods, ranging from simple ones like FGSM to sophisticated ones like AutoAttack.
Key Insights and Ideas
- The Monotonicity Discovery: One of the most striking findings is that topological losses change monotonically as the proportion of adversarial samples in a batch increases. This predictable trend makes these signatures incredibly reliable for detection.
- Adversarial Scattering: The authors hypothesize that attacks work by "scattering" data points. While a clean cluster of images for "dog" is tightly packed, adversarial "dog" images (which might actually be tweaked cats) are less organized.
- MST Connection: For 0-dimensional topology (connected components), the Total Persistence is equivalent to the length of a Minimum Spanning Tree (MST). Through Monte Carlo simulations, they proved that more scattered (adversarial) data leads to longer MSTs, providing a theoretical basis for why TP loss increases under attack.
Key Results
The proposed methods, TPSAMMD and MKSAMMD, consistently outperformed existing state-of-the-art (SOTA) detection tests.
- Higher Detection Power: In ImageNet and CIFAR-10, the topological tests achieved nearly 100% test power across many attack types, even when the adversarial noise was very small ($\epsilon = 1/255$).
- Robustness to Small Perturbations: The advantage of the topological approach became even more pronounced as attacks became subtler, where traditional methods often fail.
- Accuracy Gains: For certain BLIP models, the topological features provided an accuracy gain of up to 16.7% over standard semantic-aware MMD tests.
- Controlled False Positives: All while keeping the Type-I error (false alarms) strictly under the 5% threshold.
Limitations and Future Work
- Computational Complexity: Constructing Vietoris–Rips filtrations for TDA can be computationally expensive. The authors mitigated this using a batch-processing approach, but scaling to massive real-time streams remains a challenge.
- Attack Specificity: While most attacks showed clear monotonic trends, the simplest attack (FGSM) sometimes behaved non-monotonically, likely because its large, "unrealistic" distortions disrupt the point cloud differently than refined attacks.
- Future Directions: The authors plan to extend this topological analysis to other multimodal configurations, such as video-text and audio-text systems, to further strengthen the resilience of general AI models.
Summary updated