Shaping the Safety Boundaries: Understanding and Defending Against Jailbreaks in Large Language Models

Jailbreaking in large language models (LLMs) poses major security risks by tricking models into generating harmful text.However, there is limited understanding of how jailbreaking operates, which makes it difficult to develop effective defenses.In this work, we conduct a large-scale analysis of seven jailbreak methods and uncover that inconsistencies in previous studies arise from insufficient observation samples.Our analysis reveals that jailbreaks shift harmful activations beyond a defined safety boundary, where LLMs become less sensitive to harmful information.We also find that the low and the middle layers are critical in driving these shifts, while deeper layers play a lesser role.Leveraging these insights, we propose a novel defense mechanism called Activation Boundary Defense (ABD), which adaptively constrains activations within the safety boundary.To further optimize performance, we use Bayesian optimization to select the most effective layers for ABD application and confirm that the low and middle layers have the greatest impact, consistent with our earlier observations.Experiments across multiple benchmarks demonstrate that ABD achieves an average defense success rate (DSR) of over 98% against various jailbreak attacks, with less than 2% impact on the model's overall capabilities.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.acl-long.1233
Primary Topic
Artificial Intelligence in Law
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Shaping the Safety Boundaries: Understanding and Defending Against Jailbreaks in Large Language Models

Xiangliang Zhang, Preslav Nakov, Xiuying Chen, Jiahui Geng et al.
Artificial Intelligence in Law
article

Shaping the Safety Boundaries: Understanding and Defending Against Jailbreaks in Large Language Models

Xiangliang Zhang, Preslav Nakov, Xiuying Chen, Jiahui Geng, Lang Gao
article en

Abstract

Jailbreaking in large language models (LLMs) poses major security risks by tricking models into generating harmful text.However, there is limited understanding of how jailbreaking operates, which makes it difficult to develop effective defenses.In this work, we conduct a large-scale analysis of seven jailbreak methods and uncover that inconsistencies in previous studies arise from insufficient observation samples.Our analysis reveals that jailbreaks shift harmful activations beyond a defined safety boundary, where LLMs become less sensitive to harmful information.We also find that the low and the middle layers are critical in driving these shifts, while deeper layers play a lesser role.Leveraging these insights, we propose a novel defense mechanism called Activation Boundary Defense (ABD), which adaptively constrains activations within the safety boundary.To further optimize performance, we use Bayesian optimization to select the most effective layers for ABD application and confirm that the low and middle layers have the greatest impact, consistent with our earlier observations.Experiments across multiple benchmarks demonstrate that ABD achieves an average defense success rate (DSR) of over 98% against various jailbreak attacks, with less than 2% impact on the model's overall capabilities.

Peace, Justice and strong institutions
Openalex Percentile: Top 77%
Artificial Intelligence in Law
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Shaping the Safety Boundaries: Understanding and Defending Against Jailbreaks in Large Language Models — Xiangliang Zhang, Preslav Nakov, et al. · (2025) | TGRS Research Map | TGRS