MirrorShield: Towards Universal Defense Against Jailbreaks via Entropy-Guided Mirror Crafting
Fuente:
arXiv
Enregistré dans:
| Auteurs principaux: | , , , , , |
|---|---|
| Format: | Preprint |
| Publié: |
2025
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866910954530275328 |
|---|---|
| author | Pu, Rui Li, Chaozhuo Ha, Rui Zhang, Litian Qiu, Lirong Zhang, Xi |
| author_facet | Pu, Rui Li, Chaozhuo Ha, Rui Zhang, Litian Qiu, Lirong Zhang, Xi |
| contents | 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 universal 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2503_12931 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | MirrorShield: Towards Universal Defense Against Jailbreaks via Entropy-Guided Mirror Crafting Pu, Rui Li, Chaozhuo Ha, Rui Zhang, Litian Qiu, Lirong Zhang, Xi Cryptography and Security Artificial Intelligence 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 universal 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. |
| title | MirrorShield: Towards Universal Defense Against Jailbreaks via Entropy-Guided Mirror Crafting |
| topic | Cryptography and Security Artificial Intelligence |
| url | https://arxiv.org/abs/2503.12931 |