Representation Bending for Large Language Model Safety

Ashkan Yousefpour, Taeheon Kim, Ryan S. Kwon, Seungbeen Lee, Wonje Jeung +5 more
4/2/2025
cs.LGcs.CLcs.CR

No official code found. Best implementation: AIM-Intelligence/RepBend (16 stars, last commit 2025-07-15).

Abstract

Large Language Models (LLMs) have emerged as powerful tools, but their inherent safety risks - ranging from harmful content generation to broader societal harms - pose significant challenges. These risks can be amplified by the recent adversarial attacks, fine-tuning vulnerabilities, and the increasing deployment of LLMs in high-stakes environments. Existing safety-enhancing techniques, such as fine-tuning with human feedback or adversarial training, are still vulnerable as they address specific threats and often fail to generalize across unseen attacks, or require manual system-level defenses. This paper introduces RepBend, a novel approach that fundamentally disrupts the representations underlying harmful behaviors in LLMs, offering a scalable solution to enhance (potentially inherent) safety. RepBend brings the idea of activation steering - simple vector arithmetic for steering model's behavior during inference - to loss-based fine-tuning. Through extensive evaluation, RepBend achieves state-of-the-art performance, outperforming prior methods such as Circuit Breaker, RMU, and NPO, with up to 95% reduction in attack success rates across diverse jailbreak benchmarks, all with negligible reduction in model usability and general capabilities.

View on arXivView PDF

Code Implementations(1)

Code for Representation Bending Paper

163Shell, PythonMar 27, 20251 years ago

Similar Papers

Cite this paper

@article{yousefpour2025representation,
  title  = {Representation Bending for Large Language Model Safety},
  author = {Ashkan Yousefpour and Taeheon Kim and Ryan S. Kwon and Seungbeen Lee and Wonje Jeung and Seungju Han and Alvin Wan and Harrison Ngan and Youngjae Yu and Jonghyun Choi},
  year   = {2025},
  eprint = {2504.01550},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.01550v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.01550.svg)](https://codeofpaper.com/paper/2504.01550)

Discussion