DUET: Dual-Teacher On-Policy Distillation via Same-Weight Disagreement for Prohibition Compliance
The paper proposes DUET, a token-selective on-policy distillation method that leverages the per-token disagreement between two identical-weight teachers (one with and one without prohibition context) to generate a clean supervision signal for training models to comply with dynamic, request-specific prohibitions while preserving general utility.
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
Large language models are the engines behind many modern digital assistants, capable of generating human-like text, solving problems, and answering questions. However, in the real world, these models often operate under strict, shifting rules that are not hard-coded into their brains but are instead injected into their instructions at the moment they are used. A company might tell a model to never reveal its internal tools, while a hospital might demand it never mention patient names. These rules change depending on who is asking and what the situation is. The challenge for developers is to teach the model to obey these specific, temporary prohibitions without making it so cautious that it refuses to answer harmless questions, or so confident that it accidentally breaks the rules. If a model fails to follow these instructions, it can lead to leaked data or brand safety incidents; if it becomes too afraid to speak, it becomes useless.
Researchers at Tencent have developed a new method called DUET to solve this specific problem of teaching models to follow runtime rules. Instead of trying to retrain the model from scratch or simply showing it examples of good and bad answers, they created a system that acts like a pair of identical twins. One twin sees the forbidden rule in its instructions, while the other twin, who has the exact same knowledge and abilities, does not see the rule. Because these two "teachers" are otherwise identical, any difference in what they say must be caused solely by the presence or absence of that specific rule. The researchers use this disagreement to pinpoint exactly where the model is likely to make a mistake.
The process works by having the student model generate a response while both teacher twins watch. When the two teachers agree on what the next word should be, the system ignores that part of the conversation, assuming it is safe and unimportant. However, when the teachers disagree—one suggesting a word that reveals a secret and the other suggesting a safe alternative—the system flags that specific moment as a critical learning opportunity. This allows the student model to focus its attention only on the few words where the rule actually matters, rather than wasting effort on the thousands of words that are perfectly fine. The student is then gently pushed away from the teacher who ignores the rule and pulled toward the teacher who respects it, effectively learning to navigate the boundary between helpfulness and compliance.
This approach addresses a flaw in older methods where models were trained on entire conversations. In those older systems, if a model made a single mistake in a long answer, the whole answer was often treated as bad, which confused the model about which specific words were the problem. By isolating the disagreement to the exact token, or word unit, where the violation occurs, the new method provides a much cleaner signal. The researchers tested this on a variety of tasks, including protecting personal information, following safety guidelines, and adhering to business tool definitions. They found that the models trained with this dual-teacher method were significantly better at refusing to break rules while still remaining helpful for legitimate questions.
The results showed that the new method outperformed existing techniques across different sizes of models, from smaller ones with 1.5 billion parameters to larger ones with 8 billion. In their tests, the models achieved a compliance rate of over 72% to 85% on violating requests, meaning they successfully refused to break the rules, while still maintaining a high level of usefulness for normal questions, preserving between 88% and 93% of their ability to answer correctly. Crucially, the models did not lose their general intelligence; they remained just as good at math and logic puzzles as before. The study suggests that by using two identical models to find the exact spot where a rule matters, developers can create AI assistants that are both safe and useful, navigating complex, changing instructions without needing massive amounts of new data or losing their core capabilities.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.