Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Harnessing Hyperbolic Geometry for Harmful Prompt Detection and Sanitization

About

Vision-Language Models (VLMs) have become essential for tasks such as image synthesis, captioning, and retrieval by aligning textual and visual information in a shared embedding space. Yet, this flexibility also makes them vulnerable to malicious prompts designed to produce unsafe content, raising critical safety concerns. Existing defenses either rely on blacklist filters, which are easily circumvented, or on heavy classifier-based systems, both of which are costly and fragile under embedding-level attacks. We address these challenges with two complementary components: Hyperbolic Prompt Espial (HyPE) and Hyperbolic Prompt Sanitization (HyPS). HyPE is a lightweight anomaly detector that leverages the structured geometry of hyperbolic space to model benign prompts and detect harmful ones as outliers. HyPS builds on this detection by applying explainable attribution methods to identify and selectively modify harmful words, neutralizing unsafe intent while preserving the original semantics of user prompts. Through extensive experiments across multiple datasets and adversarial scenarios, we prove that our framework consistently outperforms prior defenses in both detection accuracy and robustness. Together, HyPE and HyPS offer an efficient, interpretable, and resilient approach to safeguarding VLMs against malicious prompt misuse.

Igor Maljkovic, Maria Rosaria Briglia, Iacopo Masi, Antonio Emanuele Cin\`a, Fabio Roli• 2026

Related benchmarks

TaskDatasetResultRank
Harmful prompt detectionViSU
Precision98
11
Harmful prompt detectionMMA
Precision98
6
Harmful prompt detectionI2P
Accuracy66
6
Harmful prompt detectionNSFW56k
Accuracy99
6
Harmful prompt detectionadv-MMA
Precision98
6
Harmful prompt detectionSneakyprompt
Precision68
6
Harmful prompt detectionCOCO
Accuracy99
6
Harmful prompt detectionadv-ViSU
Precision97
6
NSFW DetectionViSU
Precision97
5
Harmful prompt detectionViSU-sp
Precision73
5
Showing 10 of 14 rows

Other info

Follow for update