← Latest papers
💻 computer science

Matching Ranks Over Probability Yields Truly Deep Safety Alignment

This paper introduces the PRESTO method, which enhances deep safety alignment in open-source LLMs by matching token ranks in the target distribution to effectively counter the novel Rank-Assisted Prefilling (RAP) attack, achieving up to a 4.7x improvement in safety compared to standard data augmentation defenses.

Original authors: Jason Vega, Gagandeep Singh

Published 2026-07-23
📖 3 min read☕ Coffee break read

Original authors: Jason Vega, Gagandeep Singh

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 a world where computers can write stories, solve math problems, and chat just like humans. These are called Large Language Models (LLMs), and they are like super-smart digital assistants. But because they are so smart, there's a worry: what if someone tricks them into saying something dangerous, like how to build a bomb or how to hurt someone? To stop this, scientists teach these models to say "No, I can't do that" when asked for bad things. This is called "safety alignment." However, just like a lock on a door, these safety rules can sometimes be picked. One tricky way to do this is called a "prefilling attack." Imagine you are writing a story with a friend, but instead of letting them start the next sentence, you sneakily write the first few words yourself, like "Here is the plan to build a bomb..." and then ask them to finish the sentence. Because the computer is designed to keep your story going smoothly, it might forget to say "No" and just keep writing the dangerous plan.

Recently, researchers found a way to fix this by teaching the model to say "No" even after you sneak in those first few words. But, as this new paper shows, that fix wasn't quite strong enough. The authors discovered a new way to trick the model, called the "Rank-Assisted Prefilling" (RAP) attack. Instead of just letting the computer pick the most likely word to say next, a hacker can look at a list of the top 20 words the computer is thinking about and pick the one that sounds dangerous, even if the computer thinks it's very unlikely to say it. It's like a game where the computer is trying to pick the safest path, but the hacker is allowed to peek at all the paths and choose the scary one, ignoring the computer's warnings. The paper finds that this new trick works surprisingly well, breaking the safety of models that were thought to be safe.

To stop this, the authors propose a new training method called PRESTO. Instead of just trying to make the computer say "No" with high confidence, PRESTO teaches the model to completely ignore the sneaky words you wrote at the start. It's like training a guard dog to ignore the voice of a thief whispering instructions and only listen to the owner's command. By doing this, the model stops letting the dangerous words influence its choices. The researchers tested this on three popular AI models and found that PRESTO made it much, much harder for hackers to trick the models—up to 4.7 times harder—without making the models worse at doing their normal jobs. This suggests that by changing how the model pays attention to what you say, we can build AI that is truly safe, even when someone tries to outsmart it.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →