One Perturbation, Two Failure Modes: Probing VLM Safety via Embedding-Guided Typographic Perturbations
This paper reveals that multimodal embedding distance strongly predicts the success of typographic prompt injection attacks on Vision Language Models by simultaneously influencing text readability and safety alignment, and leverages this insight to develop a model-agnostic red teaming tool that optimizes perturbations to bypass safety filters.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very smart robot assistant (a Vision-Language Model, or VLM) that can look at pictures and read the text inside them. You can give it instructions by writing them on a piece of paper and taking a photo. This is how it works in a safe world.
But what if someone tries to trick the robot? They write a harmful command on the paper, but they make the text look weird—maybe it's tiny, blurry, or turned sideways. This is called a Typographic Prompt Injection. The goal is to sneak a bad instruction past the robot's safety filters by hiding it in plain sight within a messy image.
This paper asks a simple question: Why do some messy pictures trick the robot, while others don't? And can we use that knowledge to test how safe the robot really is?
Here is the breakdown of their findings, using some everyday analogies:
1. The "Distance" Meter
The researchers discovered a hidden ruler that predicts whether a trick will work. They call it Embedding Distance.
Think of the robot's brain as having two different "languages": one for seeing pictures and one for reading words.
- When the text in the image is clear, the robot's "picture language" and "word language" are standing right next to each other, holding hands. They understand each other perfectly.
- When the text is blurry, tiny, or rotated, the robot gets confused. Its "picture language" and "word language" drift far apart in a mental space.
The paper found a strong rule: The farther apart these two languages are, the less likely the robot is to follow the command.
- High Distance (Far apart): The robot thinks, "I can't read this," or "This doesn't make sense," and it ignores the command.
- Low Distance (Close together): The robot thinks, "Ah, I see what this says," and it follows the instruction—even if that instruction is dangerous.
2. The Two Ways to Break the Robot
The researchers found that when they tried to "fix" the messy images to make the robot's two languages stand closer together again, two different things happened. It's like trying to fix a broken radio; sometimes you just need to turn up the volume, and other times you need to convince the radio to ignore its "Do Not Play" list.
Mode A: The "Can You Hear Me?" Fix (Readability)
Sometimes the text is so blurry or tiny that the robot literally cannot read it. It's like trying to read a sign through a thick fog.
- The Fix: The researchers used a special math trick to nudge the pixels just enough so the robot's "eyes" could finally make out the letters.
- The Result: The robot suddenly realizes, "Oh, I can read this now!" and follows the command. This happened a lot with heavy blur and tiny fonts.
Mode B: The "Don't Say No" Fix (Safety Bypass)
Sometimes the robot can read the text perfectly fine, but it refuses to do it because its safety rules say, "No, that's a bad request."
- The Fix: The researchers nudged the image slightly. This didn't make the text clearer (it was already clear), but it changed the "vibe" or "shape" of the image in the robot's mind just enough to confuse its safety guard.
- The Result: The robot still sees the bad request, but its safety filter gets confused and says, "Okay, I guess I can do this." This happened a lot with rotated text.
3. The "Red Teaming" Tool
The authors built a tool (a "Red Team" tool, which is like a professional hacker hired to test security) that uses this "Distance Meter."
Instead of guessing how to trick the robot, the tool automatically tweaks the messy images to bring the robot's "picture language" and "word language" closer together. It does this without needing to see the robot's internal code or safety rules. It just tries to make the image "look more like the text" to a set of other AI models acting as stand-ins.
What they found:
- When they ran this tool on different robots (like GPT-4o, Claude, Mistral, and Qwen), it successfully made the robots follow commands they previously refused.
- The Catch: For some robots, the tool worked by making the text readable. For others, it worked by confusing the safety filter. It depends on how strong the robot's safety guard is and how messy the original image was.
The Bottom Line
The paper concludes that safety isn't just about what the image looks like to a human. It's about how the image is represented inside the robot's brain.
If you can make a messy image look "closer" to the text in the robot's internal math, you can often trick it into ignoring its safety rules. This means future safety systems need to be tough not just against blurry pictures, but against these subtle internal "distances" that confuse the robot's understanding.
Limitations: The researchers only tested this on specific types of text (black on white) and a specific set of bad instructions. They also noted that their tool takes a long time to run and requires powerful computers. They didn't test if this method works against defenses designed to catch hackers.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.