paper-with-me

Papers

Layer-Level Self-Exposure and Patch: Affirmative Token Mitigation for Jailbreak Attack Defense

2025-01-05 · Yang Ouyang, Hengrui Gu, Shuhang Lin, Wenyue Hua, Jie Peng, Bhavya Kailkhura, Meijun Gao, Tianlong Chen, Kaixiong Zhou

As large language models (LLMs) are increasingly deployed in diverse applications, including chatbot assistants and code generation, aligning their behavior with safety and ethical standards has become paramount. However, jailbreak attacks, which exploit vulnerabilities to elicit unintended or harmful outputs, threaten LLMs' safety significantly. In this paper, we introduce Layer-AdvPatcher, a novel methodology designed to defend against jailbreak attacks by utilizing an unlearning strategy to patch specific layers within LLMs through self-augmented datasets. Our insight is that certain layer(s), tend to produce affirmative tokens when faced with harmful prompts. By identifying these layers and adversarially exposing them to generate more harmful data, one can understand their inherent and diverse vulnerabilities to attacks. With these exposures, we then "unlearn" these issues, reducing the impact of affirmative tokens and hence minimizing jailbreak risks while keeping the model's responses to safe queries intact. We conduct extensive experiments on two models, four benchmark datasets, and multiple state-of-the-art jailbreak attacks to demonstrate the efficacy of our approach. Results indicate that our framework reduces the harmfulness and attack success rate of jailbreak attacks without compromising utility for benign queries compared to recent defense methods. Our code is publicly available at: https://github.com/oyy2000/LayerAdvPatcher

📄 PDF Abstract BibTeX arXiv:2501.02629

Code (1)

oyy2000/layeradvpatcher 공식 구현 pytorch

Tasks

ChatbotCode Generation

Similar Papers 제목 키워드 기반

Interpreting Negation in GPT-2: Layer- and Head-Level Causal Analysis

2026-03-12 · Abdullah Al Mofael, Lisa M. Kuhn, Ghassan Alkadi, Kuo-Pao Yang arxiv

Negation remains a persistent challenge for modern language models, often causing reversed meanings or factual errors. In this work, we conduct a causal analysis of how GPT-2 Small internally processes such linguistic tr…

The Insurability Frontier of AI Risk: Mapping Threats to Affirmative Coverage, Silent Exposures, and Exclusions

2026-05-06 · Alex Leung, Rex Zhang, Ervin Ling, Kentaroh Toyoda 외 arxiv

The rapid diffusion of agentic AI has created a new coverage problem for commercial insurance: some AI-mediated losses are now affirmatively insured, some create silent-AI exposure under legacy cyber, technology errors-a…

A comparison between central- and self-dispatch storage management principles in island systems

2021-05-27 · Georgios N. Psarros, Pantelis A. Dratsas, Stavros A. Papathanassiou

This paper presents a comparative evaluation of central and self-dispatch management concepts for battery energy storage (BES) facilities in island power systems with a high renewable energy source (RES) penetration. BES…

Management

Finding Distributed Object-Centric Properties in Self-Supervised Transformers

2026-03-27 · Samyak Rawlekar, Amitabh Swain, Yujun Cai, Yiwei Wang 외 arxiv

Self-supervised Vision Transformers (ViTs) like DINO show an emergent ability to discover objects, typically observed in [CLS] token attention maps of the final layer. However, these maps often contain spurious activatio…

Visual Grounding

Understanding Self-Supervised Pretraining with Part-Aware Representation Learning

2023-01-27 · Jie Zhu, Jiyang Qi, Mingyu Ding, Xiaokang Chen 외

In this paper, we are interested in understanding self-supervised pretraining through studying the capability that self-supervised representation pretraining methods learn part-aware representations. The study is mainly …

Contrastive LearningObjectRepresentation Learning