title: Safety Arithmetic: A Framework for Test-time Safety Alignment of
    Language Models by Steering Parameters and Activations
summary: Ensuring the safe alignment of large language models (LLMs) with human values
  is critical as they become integral to applications like translation and
  question answering. Current alignment methods struggle with dynamic user
  intentions and complex objectives, making models vulnerable to generating
  harmful content. We propose Safety Arithmetic, a training-free framework
  enhancing LLM safety across different scenarios: Base models, Supervised
  fine-tuned models (SFT), and Edited models. Safety Arithmetic involves Harm
  Direction Removal to avoid harmful content and Safety Alignment to promote safe
  responses. Additionally, we present NoIntentEdit, a dataset highlighting edit
  instances that could compromise model safety if used unintentionally. Our
  experiments show that Safety Arithmetic significantly improves safety measures,
  reduces over-safety, and maintains model utility, outperforming existing
  methods in ensuring safe content generation.
paper_authors._id: 667321b1a0ea9fb0d7be1b05
paper_authors.name: Rima Hazra
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2024-06-19T21:10:27.967Z
paper_authors._id: 64be339512afb2f11951b217
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/64be339512afb2f11951b217/B-O3HH0lG0BOdmEE4sTAV.png
paper_authors.fullname: RIMA HAZRA
paper_authors.type: user
paper_authors.user: rimahazra
paper_authors._id: 667321b1a0ea9fb0d7be1b06
paper_authors.name: Sayan Layek
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-06-21T07:06:59.440Z
paper_authors._id: 653fc666625ef3d61e012fae
paper_authors.avatarUrl: /avatars/a222546e8378543cf5c2f7c552414143.svg
paper_authors.fullname: Sayan Layek
paper_authors.type: user
paper_authors.user: caprion
paper_authors._id: 667321b1a0ea9fb0d7be1b07
paper_authors.name: Somnath Banerjee
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-06-20T12:42:51.287Z
paper_authors._id: 62659abbe25d2b490db94d35
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1650829776213-62659abbe25d2b490db94d35.jpeg
paper_authors.fullname: Somnath Banerjee
paper_authors.type: user
paper_authors.user: leowin
paper_authors._id: 667321b1a0ea9fb0d7be1b08
paper_authors.name: Soujanya Poria
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2024-06-19T21:10:33.255Z
paper_authors._id: 626b626405fe1cb65725aca1
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/626b626405fe1cb65725aca1/aa-Lata46I3fXOmMetvXH.jpeg
paper_authors.fullname: Soujanya Poria
paper_authors.type: user
paper_authors.user: soujanyaporia
paper_title: Safety Arithmetic: A Framework for Test-time Safety Alignment of
    Language Models by Steering Parameters and Activations
paper_summary: Ensuring the safe alignment of large language models (LLMs) with human values
  is critical as they become integral to applications like translation and
  question answering. Current alignment methods struggle with dynamic user
  intentions and complex objectives, making models vulnerable to generating
  harmful content. We propose Safety Arithmetic, a training-free framework
  enhancing LLM safety across different scenarios: Base models, Supervised
  fine-tuned models (SFT), and Edited models. Safety Arithmetic involves Harm
  Direction Removal to avoid harmful content and Safety Alignment to promote safe
  responses. Additionally, we present NoIntentEdit, a dataset highlighting edit
  instances that could compromise model safety if used unintentionally. Our
  experiments show that Safety Arithmetic significantly improves safety measures,
  reduces over-safety, and maintains model utility, outperforming existing
  methods in ensuring safe content generation.
paper_ai_keywords: Safety Arithmetic Harm Direction Removal Safety Alignment NoIntentEdit Large language models (LLMs) Supervised fine-tuned models (SFT) Edited models Safe content generation Over-safety