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

GeoDetect: Geometric Adversarial Detection for VLPs

Afsaneh Hasanebrahimi, Hanxun Huang, Christopher Leckie, James Bailey, Sarah Erfani

TL;DR

Vision-Language Pre-trained models (VLPs) are highly vulnerable to adversarial attacks, but traditional defenses like adversarial training are computationally heavy and degrade standard performance. This paper introduces GeoDetect, a lightweight, task-agnostic framework that detects adversarial examples by exploiting the unique, anisotropic geometry of VLP embedding spaces. By demonstrating that adversarial perturbations push representations into "off-manifold" regions, the authors use simple geometric metrics to reliably flag attacks without requiring model fine-tuning.

What Problem Does This Paper Address?

Vision-Language Pre-trained models (VLPs) like CLIP or ALBEF have revolutionized multimodal AI, enabling tasks ranging from zero-shot classification to image-text retrieval. However, they remain highly susceptible to adversarial examples (AEs)—inputs intentionally manipulated to deceive the model.

While adversarial training can mitigate this vulnerability, it is computationally expensive and often forces a trade-off between model robustness and clean performance. Detecting AEs before they are processed is a more flexible alternative. Unfortunately, existing adversarial detectors designed for single-modality models (vision or language alone) do not transfer well to VLPs. Multimodal contrastive learning fundamentally reshapes the embedding space, creating a unique geometry that requires a tailored, theoretically grounded detection strategy.

Methods

The authors introduce GeoDetect, a framework that extracts deep representations from VLP encoders and applies classical geometric metrics to compute adversarial detection scores.

The GeoDetect pipeline operates in three primary stages:

  1. Generation: Adversarial examples are generated using standard unimodal or multimodal attacks to create a balanced evaluation set.
  2. Extraction: Deep embeddings are extracted from the VLP. Using a clean reference batch of data, GeoDetect computes local neighborhood statistics using four classical geometric metrics:
  3. Local Intrinsic Dimensionality (LID): Evaluates the local complexity and distance distribution layer-wise across intermediate layers.
  4. k-Nearest Neighbours (k-NN) distance: Measures the average distance to the closest clean reference points.
  5. Mahalanobis distance: Utilizes data covariance to identify outliers in a scale-invariant manner.
  6. Kernel Density Estimation (KDE): Estimates the local probability density of the embedding.
  7. Detection: For k-NN, Mahalanobis, and KDE, a simple threshold-based rule determines if an input is adversarial. For LID, a logistic regression classifier is trained on the multi-layer features.
Fig. 1: Pipeline of geometric score extraction for GeoDetect.

Datasets

The authors comprehensively evaluated GeoDetect across two primary downstream tasks using standard benchmarks:

  • Zero-Shot Classification: Evaluated on ImageNet-1k, CIFAR10, CIFAR100, STL-10, and Food-101.
  • Image-Text Retrieval: Evaluated on Flickr30K and MS-COCO.

The experiments covered both aligned VLP architectures (CLIP-ViT, CLIP-CNN) and fused VLP architectures (ALBEF, TCL).

Key Insights and Ideas

  • Structured Anisotropy: The authors empirically verify that VLP embedding spaces are highly anisotropic compared to standard supervised unimodal models. VLP representations are unevenly dispersed, concentrating heavily in a narrow, low-aperture cone.
Fig. 2: Comparison of isotropy metrics and effective ranking for VLPs vs. supervised model. Iteration refers to the batch index during evaluation.
  • The Off-Manifold Shift: The core theoretical contribution shows that because VLP spaces are anisotropic, adversarial perturbations inherently push representations off the clean data manifold. The attack suppresses the components tangent to the manifold and amplifies the components normal to it.
  • Expected Distance Gap: Due to this off-manifold deviation, an adversarial example will consistently exhibit a significantly larger expected geometric distance to randomly sampled clean points than its unperturbed counterpart. This geometric discrepancy serves as a highly reliable detection signal.

Key Results

  • High Detection Accuracy: GeoDetect consistently outperformed baseline methods like MCM. On zero-shot classification tasks across datasets like CIFAR10, CIFAR100, and STL-10, geometric metrics like LID and k-NN achieved perfect or near-perfect Area Under the ROC Curve (AUC = 100% or >99%) alongside exceptionally low False Positive Rates (FPR95).
  • Task and Architecture Agnostic: Unlike prior VLP defenses restricted to specific tasks (like Visual Question Answering), GeoDetect successfully identifies AEs across both classification and label-free retrieval settings without needing task-specific labels.
  • Robustness to Adaptive Attacks: The authors tested GeoDetect against white-box adaptive attacks, where the adversary explicitly attempts to bypass the detector by optimizing against the geometric metrics. Even in this challenging setting, GeoDetect (particularly using LID features) maintained strong discrimination power, continuing to reliably separate clean and adversarial samples.

Limitations and Future Work

  • Performance Drop Under Adaptive Attacks: While GeoDetect proves resilient, its detection performance (AUC) does experience a noticeable decrease when facing sophisticated white-box adaptive attacks compared to standard non-adaptive attacks.
  • Dependency on Clean Reference Data: The framework relies on minibatch sampling from a clean reference dataset to estimate local neighborhood statistics, meaning defenders must maintain access to a verified clean data subset during inference.

Summary updated

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