← Latest papers
💬 NLP

A Self-Evolving Multi-Agent Framework Defense against LLM Jailbreak Attacks

This paper proposes a self-evolving, parameter-free multi-agent defense framework that utilizes a persistent cross-interaction rule memory to abstract successful jailbreak attempts into generalizable method-level rules, enabling LLMs to dynamically adapt to evolving attack strategies without compromising benign utility or increasing over-refusal.

Original authors: Tongyan Hu, Bryan Hooi

Published 2026-08-27
📖 5 min read🧠 Deep dive

Original authors: Tongyan Hu, Bryan Hooi

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 powerful tools that can write stories, solve problems, and answer questions, but they have a significant weakness: they can be tricked into ignoring their safety rules. Imagine a highly trained assistant who has been taught never to give dangerous instructions, like how to build a weapon or bypass a security system. A clever trickster can still get this assistant to comply by wrapping the dangerous request in a complex disguise, such as pretending to be a character in a story or hiding the request inside a computer code. These tricks, known as "jailbreaks," exploit the model's desire to follow instructions, allowing harmful ideas to slip past its defenses. For years, the standard way to protect these models has been to set up a fixed barrier, like a static list of forbidden words or a rigid set of instructions programmed into the system. However, just as a thief can eventually pick a lock they have studied, attackers keep inventing new disguises that these static barriers cannot recognize, leaving the models vulnerable to evolving threats.

Researchers at the National University of Singapore have proposed a different approach to this problem, one that allows the defense system to learn and grow stronger over time. Instead of relying on a fixed set of rules that never changes, they built a system that treats every failed attempt to break the safety rules as a lesson. When the system encounters a new type of trick that successfully bypasses its defenses, it does not just block that single request and move on. Instead, it analyzes the structure of the trick, strips away the specific harmful topic, and creates a new, reusable rule that targets the method used to disguise the request. This new rule is stored in a persistent memory, much like a security guard writing down the specific uniform a thief wore, so that the guard can spot anyone wearing that same uniform in the future, regardless of what they are trying to steal.

The system operates through a team of four specialized components that work together during every interaction. First, a classifier looks at an incoming request to see if it is using a known trick. If the request is harmless, it is answered normally. If the request looks like a trick, the system checks its memory for a rule that matches the specific style of the disguise. If a matching rule exists, the system immediately applies a strict refusal or a safe alternative response. If the request is a brand-new type of trick that the system has never seen before, it is allowed to pass through initially. If the model then accidentally produces a harmful answer, a reflection agent steps in. This agent analyzes the failure, identifies the structural pattern of the attack, and writes a new rule into the memory bank. This new rule is then available to protect against all future requests that use the same structural pattern, effectively turning a single failure into a permanent shield against an entire family of similar attacks.

The researchers tested this self-evolving defense on several different models, including both open-source programs and powerful commercial systems that cannot be modified directly. They subjected these models to four distinct families of jailbreak attacks, which included methods like role-playing, code obfuscation, and multi-step manipulation. The results showed that as the system encountered more attacks and added more rules to its memory, its ability to stop them improved dramatically. In the early stages, when the memory was empty, the system was vulnerable, but after learning from just a few examples, it reduced the success rate of these attacks to near zero. Crucially, this learning happened without changing the underlying model's brain; the system simply became smarter about how it processed inputs by adding external notes to its memory.

A key finding of the study is that this method does not make the system overly cautious or rude to normal users. The researchers checked to see if the growing list of rules would cause the model to refuse harmless requests, a problem known as over-refusal. They found that even as the memory filled with rules from different types of attacks, the system remained accurate in distinguishing between dangerous tricks and safe questions. The system only refused requests that matched the specific structural patterns of the attacks it had learned to recognize. This suggests that the defense is precise, targeting the method of the attack rather than the topic of the conversation. The study also showed that the system remained robust even when attackers tried to combine different tricks to evade detection, indicating that the memory-based approach can adapt to complex, evolving threats.

This work represents a shift from static protection to dynamic adaptation. While previous defenses were like a locked door that could be picked if the right tool was found, this new framework acts more like a security team that updates its watch list after every breach. By converting failures into reusable knowledge, the system builds a defense that grows stronger the more it is tested. The researchers demonstrated that this approach works across different types of models and attack styles, offering a promising path toward making artificial intelligence safer in a world where attackers are constantly inventing new ways to bypass the rules. The study concludes that while no system is perfect, giving a model the ability to learn from its own mistakes in real-time provides a level of resilience that static defenses simply cannot achieve.

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 →