SyRuP: Enhancing System-Prompt Following via Reward-Guided Prediction in LLM Decoding
The paper introduces SyRuP, a decoding-time framework that enhances Large Language Model adherence to system prompts by training a cross-attention reward head to generate token-level adherence scores for reranking candidates without requiring base model tuning.
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 are talking to a very smart, well-read robot that has read almost every book in the library. This robot is a Large Language Model (LLM). Usually, when you ask it a question, it answers based on its training. But sometimes, you want to give it a specific set of rules before it starts talking. You might say, "Act like a grumpy pirate," or "Only answer in rhymes," or "Never mention violence." These rules are called system prompts. They are like the job description or the costume the robot wears for a specific conversation.
The problem is that these robots are used to following instructions that appear inside the conversation, not rules set in stone before the chat begins. When the rules get complicated—like "be a pirate, but also use 19th-century grammar, avoid the letter 'e', and keep it funny"—the robot often forgets the rules halfway through. It might start talking like a pirate, then suddenly switch to a modern teenager, or forget to avoid the letter 'e'. Scientists have tried to fix this by retraining the robot (which is expensive and slow) or by trying to guess the best answer after it's already written (which is like editing a novel after the author has already finished it). The big question is: Can we guide the robot to follow these complex rules while it is writing, without changing its brain or waiting until the end?
This is where a new method called SYRUP comes in. Think of the robot's brain as a massive, frozen library that we aren't allowed to rearrange. SYRUP is like a super-smart, tiny librarian who stands right next to the robot while it writes. Every time the robot picks a word to say next, this librarian checks two things: "Does this word fit the story?" and "Does this word fit the pirate costume?"
Here is how it works in practice. The robot has a list of its top 10 favorite words to say next. Usually, it just picks the number one favorite. But SYRUP intervenes. It looks at the "system prompt" (the pirate costume) as a separate, special memory card. It uses a special tool called a cross-attention reward head to ask the robot's current thoughts, "Hey, if you say this word, does it match the pirate vibe?" The librarian then gives a score to each of the top 10 words. If the robot wants to say "Hello," but the pirate costume requires "Ahoy," the librarian boosts the score for "Ahoy" and lowers the score for "Hello." The robot then picks the word with the highest combined score.
The paper suggests that this approach is much better than the old ways. The researchers tested SYRUP on three different robot brains and found that it consistently helped them follow complex rules better than just giving the robot a better prompt or trying to re-rank answers after they were written. In fact, on one test, SYRUP improved the robot's performance by about 5.6% compared to the next-best method. That might sound small, but in the world of AI, that's a huge jump.
The paper also rules out a few other ideas. It shows that simply merging the rules into the main conversation text (like hiding the pirate instructions inside the user's question) isn't enough; the robot needs the rules to be treated as a separate, distinct memory to really follow them. It also found that while you can make the robot follow rules better by retraining it from scratch, that takes too much time and money. SYRUP is a "decoding-time" method, meaning it works while the robot is thinking, keeping the original brain frozen and only training a tiny, lightweight add-on.
Interestingly, the researchers found that SYRUP works even on rules it hasn't seen before. They trained it on one set of complex instructions and then tested it on a completely different set of rules (like strict formatting or word counts), and it still performed well. This suggests the method teaches the robot a general skill for "listening to the boss" rather than just memorizing specific answers.
However, the paper is careful to note that this isn't a magic wand that solves everything. The method does add a tiny bit of extra time to the robot's thinking process because the librarian has to check the words. But the authors suggest this cost is very small compared to other complex methods that try to do the same thing. They also warn that if you push the "rule-following" too hard, the robot might start sounding weird or unnatural, so there has to be a balance.
In short, SYRUP suggests that if you want a robot to follow a complex set of rules without retraining its entire brain, you shouldn't just hope it remembers. Instead, you should give it a dedicated, real-time guide that checks every single word it wants to say against the rules, ensuring the final story stays true to the costume it was wearing from the very beginning.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.