Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Study

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ponkshe, Kaustubh, Shah, Shaan, Singhal, Raghav, Vepakomma, Praneeth
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915785442590720
author Ponkshe, Kaustubh
Shah, Shaan
Singhal, Raghav
Vepakomma, Praneeth
author_facet Ponkshe, Kaustubh
Shah, Shaan
Singhal, Raghav
Vepakomma, Praneeth
contents Large Language Models (LLMs) rely on safety alignment to produce socially acceptable responses. However, this behavior is known to be brittle: further fine-tuning, even on benign or lightly contaminated data, can degrade safety and reintroduce harmful behaviors. A growing body of work suggests that alignment may correspond to identifiable directions in weight space, forming subspaces that could, in principle, be isolated or preserved to defend against misalignment. In this work, we conduct a comprehensive empirical study of this perspective. We examine whether safety-relevant behavior is concentrated in specific linear subspaces, whether it can be separated from general-purpose learning, and whether harmfulness arises from distinguishable patterns in activations. Across both weight and activation spaces, our findings are consistent: subspaces that amplify safe behaviors also amplify useful ones, and prompts with different safety implications activate overlapping representations. Rather than residing in distinct directions, we show that safety is highly entangled with the general learning components of the model. This suggests that subspace-based defenses face fundamental limitations and underscores the need for alternative strategies to preserve safety under continued training. We corroborate these findings with multiple experiments on five open-source LLMs from the Llama and Qwen families. Our code is publicly available at: https://github.com/CERT-Lab/safety-subspaces.
format Preprint
id arxiv_https___arxiv_org_abs_2505_14185
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Study
Ponkshe, Kaustubh
Shah, Shaan
Singhal, Raghav
Vepakomma, Praneeth
Machine Learning
Artificial Intelligence
Computation and Language
Large Language Models (LLMs) rely on safety alignment to produce socially acceptable responses. However, this behavior is known to be brittle: further fine-tuning, even on benign or lightly contaminated data, can degrade safety and reintroduce harmful behaviors. A growing body of work suggests that alignment may correspond to identifiable directions in weight space, forming subspaces that could, in principle, be isolated or preserved to defend against misalignment. In this work, we conduct a comprehensive empirical study of this perspective. We examine whether safety-relevant behavior is concentrated in specific linear subspaces, whether it can be separated from general-purpose learning, and whether harmfulness arises from distinguishable patterns in activations. Across both weight and activation spaces, our findings are consistent: subspaces that amplify safe behaviors also amplify useful ones, and prompts with different safety implications activate overlapping representations. Rather than residing in distinct directions, we show that safety is highly entangled with the general learning components of the model. This suggests that subspace-based defenses face fundamental limitations and underscores the need for alternative strategies to preserve safety under continued training. We corroborate these findings with multiple experiments on five open-source LLMs from the Llama and Qwen families. Our code is publicly available at: https://github.com/CERT-Lab/safety-subspaces.
title Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case Study
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2505.14185