MAGIC: 견고한 LLM 안전성을 위한 공진화하는 공격자-방어자 적대적 게임
MAGIC: A Co-Evolving Attacker-Defender Adversarial Game for Robust LLM Safety
대규모 언어 모델(LLM)의 견고한 안전성 정렬을 보장하는 것은 매우 중요하지만, 기존 방어 기법들은 정적이고 사전에 수집된 데이터 분포에 의존하기 때문에 진화하는 적대적 공격에 뒤처지는 경우가 많습니다. 본 논문에서는 LLM 안전성 정렬을 적대적 비대칭 게임으로 공식화한 새로운 다중 턴 다중 에이전트 강화 학습 프레임워크인 MAGIC을 소개합니다. 구체적으로, 공격자 에이전트는 원본 쿼리를 기만적인 프롬프트로 반복적으로 재작성하는 방법을 학습하고, 동시에 방어자 에이전트는 이러한 입력을 인식하고 거부하도록 정책을 최적화합니다. 이러한 동적 과정은 공진화를 촉발하며, 여기서 공격자의 끊임없이 변화하는 전략은 롱테일 취약점을 지속적으로 발견하게 하고, 방어자는 보지 못한 공격 패턴에 대해 일반화하도록 유도합니다. 놀랍게도, 초기 추론 능력을 갖춘 공격자가 반복적인 강화 학습 훈련을 통해 새롭고 이전에 본 적 없는 조합 전략을 진화시키는 것을 관찰하였으며, 이는 우리 방법의 상당한 잠재력을 강조합니다. 이론적으로, 우리는 더 견고한 게임 균형에 대한 통찰력을 제공하고 안전성 보장을 도출합니다. 광범위한 실험을 통해 우리 프레임워크의 효과를 검증하였으며, 모델의 유용성을 훼손하지 않으면서도 우수한 방어 성공률을 입증하였습니다. 코드는 https://github.com/BattleWen/MAGIC 에서 확인할 수 있습니다.
Ensuring robust safety alignment is crucial for Large Language Models (LLMs), yet existing defenses often lag behind evolving adversarial attacks due to their \textbf{reliance on static, pre-collected data distributions}. In this paper, we introduce \textbf{MAGIC}, a novel multi-turn multi-agent reinforcement learning framework that formulates LLM safety alignment as an adversarial asymmetric game. Specifically, an attacker agent learns to iteratively rewrite original queries into deceptive prompts, while a defender agent simultaneously optimizes its policy to recognize and refuse such inputs. This dynamic process triggers a \textbf{co-evolution}, where the attacker's ever-changing strategies continuously uncover long-tail vulnerabilities, driving the defender to generalize to unseen attack patterns. Remarkably, we observe that the attacker, endowed with initial reasoning ability, evolves \textbf{novel, previously unseen combinatorial strategies} through iterative RL training, underscoring our method's substantial potential. Theoretically, we provide insights into a more robust game equilibrium and derive safety guarantees. Extensive experiments validate our framework's effectiveness, demonstrating superior defense success rates without compromising the helpfulness of the model. Our code is available at https://github.com/BattleWen/MAGIC.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.