MirrorShield: Towards Dynamic Adaptive Defense Against Jailbreaks via Entropy-Guided Mirror Crafting

Authors

  • Rui Pu Beijing University of Posts and Telecommunications
  • Chaozhuo Li Beijing University of Posts and Telecommunications
  • Rui Ha Beijing University of Posts and Telecommunications
  • Litian Zhang Beijing University of Posts and Telecommunications
  • Lirong Qiu Beijing University of Posts and Telecommunications
  • Xi Zhang Beijing University of Posts and Telecommunications

DOI:

https://doi.org/10.1609/aaai.v40i39.40553

Abstract

Defending large language models (LLMs) against jailbreak attacks is crucial for ensuring their safe deployment. Existing defense strategies typically rely on predefined static criteria to differentiate between harmful and benign prompts. However, such rigid rules fail to accommodate the inherent complexity and dynamic nature of real-world jailbreak attacks. In this paper, we focus on the novel challenge of adaptive defense against diverse jailbreaks. We propose a new concept "mirror'', which is a dynamically generated prompt that reflects the syntactic structure of the input while ensuring semantic safety. The discrepancies between input prompts and their corresponding mirrors serve as guiding principles for defense. A novel defense model, MirrorShield, is further proposed to detect and calibrate risky inputs based on the crafted mirrors. Evaluated on multiple benchmark datasets and compared against ten state-of-the-art attack methods, MirrorShield demonstrates superior defense performance and promising generalization capabilities.

Downloads

Published

2026-03-14

How to Cite

Pu, R., Li, C., Ha, R., Zhang, L., Qiu, L., & Zhang, X. (2026). MirrorShield: Towards Dynamic Adaptive Defense Against Jailbreaks via Entropy-Guided Mirror Crafting. Proceedings of the AAAI Conference on Artificial Intelligence, 40(39), 32746–32754. https://doi.org/10.1609/aaai.v40i39.40553

Issue

Section

AAAI Technical Track on Natural Language Processing IV