NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

GeoDetect: Geometric Adversarial Detection for VLPs

Afsaneh Hasanebrahimi, Hanxun Huang, Christopher Leckie, James Bailey, Sarah Monazam Erfani · Submission to ICLR 2026 · Rejected

TL;DR

GeoDetect is a lightweight, training-free framework that identifies adversarial attacks on vision-language models (VLPs) by analyzing the geometry of their embedding spaces. By leveraging the fact that VLP embeddings are highly "stretched" (anisotropic), the authors show that adversarial perturbations inevitably push inputs into "off-manifold" regions that are geometrically distinct from clean data.

What Problem Does This Paper Address?

Vision-Language Pre-trained models (VLPs) like CLIP have revolutionized how AI handles multimodal data, powering everything from image search to zero-shot classification. However, they share a common Achilles' heel with other deep learning models: adversarial examples (AEs). Small, often imperceptible perturbations to an image or text can trick these models into making confident, incorrect predictions.

Defending against these attacks usually involves "adversarial training"—essentially showing the model millions of attacked examples during training. This is computationally ruinous for large-scale VLPs and often degrades the model's performance on clean data. Existing detection methods (which flag and reject suspicious inputs) have mostly focused on single-modality models (just vision or just text). GeoDetect fills this gap by providing a theoretically grounded, multimodal detection framework that doesn't require expensive retraining.

Methods

The core of GeoDetect is the observation that VLP embedding spaces are anisotropic. Instead of data being spread uniformly, it clusters into narrow, cone-like or ellipsoidal regions.

The authors propose a pipeline called GeoDetect that uses a family of four geometric metrics to spot "weird" behavior in these spaces:

  1. Local Intrinsic Dimensionality (LID): Measures how the data "fills" the space around a point.
  2. k-Nearest Neighbors (k-NN) Distance: Simply looks at how far away the closest clean examples are.
  3. Mahalanobis Distance: A distance metric that accounts for the "stretch" (covariance) of the data distribution.
  4. Kernel Density Estimation (KDE): Estimates the local density of the data.

The Workflow: * Extraction: The system extracts embeddings from various layers of the VLP (both the image encoder and, for fused models, the multimodal encoder). * Comparison: It compares the query embedding against a small reference batch of clean data using the metrics above. * Classification: A simple threshold or a lightweight logistic regression model (in the case of LID) determines if the input is adversarial based on these geometric scores.

Datasets

The authors evaluated GeoDetect across a wide range of tasks and architectures:

  • Zero-shot Classification: Evaluated on ImageNet, CIFAR10, CIFAR100, STL-10, and Food-101.
  • Image-Text Retrieval: Evaluated on Flickr30K and MS-COCO.
  • Models: They tested both "aligned" architectures (like CLIP-ViT and CLIP-ResNet) and "fused" architectures (like ALBEF and TCL).

Key Insights and Ideas

  • Anisotropy as a Shield: The "flaw" of VLP embedding spaces—their extreme anisotropy—actually makes adversarial detection easier. Because clean data lives in such a narrow region, an attack that tries to change the model's output almost always pushes the representation into "empty" space where clean data never goes.
  • Off-Manifold Deviation: The paper provides a formal theoretical proof (Theorem 3.5) showing that in these anisotropic spaces, the expected distance between an adversarial example and a clean point is significantly larger than the distance between two clean points.
  • Layer-wise Sensitivity: For models like ALBEF, the authors found that checking the multimodal layers (where vision and text interact) is crucial for catching sophisticated attacks that target the relationship between the two modalities.

Key Results

  • Near-Perfect Detection: On many datasets like CIFAR10 and STL-10, GeoDetect achieved an AUC of 100% (perfect separation between clean and adversarial). On the more challenging ImageNet, it maintained a very high AUC (e.g., ~99% for k-NN on CLIP).
  • Superiority over Baselines: It significantly outperformed MCM, the only other major baseline for VLP adversarial detection.
  • Efficiency: Feature extraction for detection takes only a few minutes on a single GPU, whereas alternative defenses like adversarial fine-tuning can take hours or days.
  • Robustness to Adaptive Attacks: Even when the researchers simulated an "aware" attacker who tries to minimize the geometric discrepancy while attacking (an adaptive attack), GeoDetect remained remarkably effective, particularly the LID-based variant.

Limitations and Future Work

  • Reference Data Requirement: GeoDetect requires a small batch of clean reference embeddings to calculate distances. While this is usually easy to obtain, the system's performance is tied to the quality of this reference set.
  • Computational Overhead of LID: While much faster than retraining, calculating LID across multiple layers is more time-consuming than simple k-NN or Mahalanobis distances.
  • Task Specificity: While the framework is "task-free," the authors note that different metrics perform slightly better on different tasks (e.g., Mahalanobis is particularly strong for image-level perturbations in fused models).
  • Future Directions: The authors suggest exploring how these geometric properties could be used not just to detect attacks, but to purify them—moving the adversarial point back onto the clean manifold.

Summary updated

BibTeX
@misc{hasanebrahimi2026geodetect,
  author = {Afsaneh Hasanebrahimi and Hanxun Huang and Christopher Leckie and James Bailey and Sarah Monazam Erfani},
  title = {{GeoDetect: Geometric Adversarial Detection for VLPs}},
  year = {2026},
  eprint = {2607.14737},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.14737},
}
Figure