LessWrongsafety4h agoenergy 121

Detecting NSFW and Harmful Prompts Through Geometry: Learning What's Safe Instead of What's Harmful

image: LessWrong

⚠️ Content warning: This post contains potentially offensive text and images from our research paper, included solely to illustrate the safety risks associated with vision-language models. TL;DR: i) Can we detect harmful prompts by learning only what safe prompts look like? ii) In our ICLR 2026 paper, we introduce HyPE , a lightweight detector that uses hyperbolic geometry and learns just a single parameter from benign prompts. It shows strong detection performance, even against adversarial attacks. iii) We also introduce HyPS , a prompt sanitizer that identifies and replaces harmful words, making prompts safer while preserving much of their original meaning. Introduction Vision-language models are becoming increasingly powerful, but preventing them from producing harmful content when prompted by malicious users remains a major challenge. Most existing NSFW and harmful prompt detectors try to recognize these prompts using predefined rules, blacklist filters, or heavy classifier-based systems. However, attackers can often evade detection by rewording prompts, paraphrasing them, or adversarially optimizing them while preserving their harmful intent. For simplicity, throughout this po

read the original at LessWrong →
This source publishes only a summary in its feed, so the full article lives at the outlet. The link above and below goes to the original.