Representation Noising: A Defence Mechanism Against Harmful Finetuning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Rosati, Domenic, Wehner, Jan, Williams, Kai, Bartoszcze, Łukasz, Atanasov, David, Gonzales, Robie, Majumdar, Subhabrata, Maple, Carsten, Sajjad, Hassan, Rudzicz, Frank
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913568248561664
author Rosati, Domenic
Wehner, Jan
Williams, Kai
Bartoszcze, Łukasz
Atanasov, David
Gonzales, Robie
Majumdar, Subhabrata
Maple, Carsten
Sajjad, Hassan
Rudzicz, Frank
author_facet Rosati, Domenic
Wehner, Jan
Williams, Kai
Bartoszcze, Łukasz
Atanasov, David
Gonzales, Robie
Majumdar, Subhabrata
Maple, Carsten
Sajjad, Hassan
Rudzicz, Frank
contents Releasing open-source large language models (LLMs) presents a dual-use risk since bad actors can easily fine-tune these models for harmful purposes. Even without the open release of weights, weight stealing and fine-tuning APIs make closed models vulnerable to harmful fine-tuning attacks (HFAs). While safety measures like preventing jailbreaks and improving safety guardrails are important, such measures can easily be reversed through fine-tuning. In this work, we propose Representation Noising (RepNoise), a defence mechanism that operates even when attackers have access to the weights. RepNoise works by removing information about harmful representations such that it is difficult to recover them during fine-tuning. Importantly, our defence is also able to generalize across different subsets of harm that have not been seen during the defence process as long as they are drawn from the same distribution of the attack set. Our method does not degrade the general capability of LLMs and retains the ability to train the model on harmless tasks. We provide empirical evidence that the efficacy of our defence lies in its ``depth'': the degree to which information about harmful representations is removed across all layers of the LLM. We also find areas where RepNoise still remains ineffective and highlight how those limitations can inform future research.
format Preprint
id arxiv_https___arxiv_org_abs_2405_14577
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Representation Noising: A Defence Mechanism Against Harmful Finetuning
Rosati, Domenic
Wehner, Jan
Williams, Kai
Bartoszcze, Łukasz
Atanasov, David
Gonzales, Robie
Majumdar, Subhabrata
Maple, Carsten
Sajjad, Hassan
Rudzicz, Frank
Computation and Language
Machine Learning
Releasing open-source large language models (LLMs) presents a dual-use risk since bad actors can easily fine-tune these models for harmful purposes. Even without the open release of weights, weight stealing and fine-tuning APIs make closed models vulnerable to harmful fine-tuning attacks (HFAs). While safety measures like preventing jailbreaks and improving safety guardrails are important, such measures can easily be reversed through fine-tuning. In this work, we propose Representation Noising (RepNoise), a defence mechanism that operates even when attackers have access to the weights. RepNoise works by removing information about harmful representations such that it is difficult to recover them during fine-tuning. Importantly, our defence is also able to generalize across different subsets of harm that have not been seen during the defence process as long as they are drawn from the same distribution of the attack set. Our method does not degrade the general capability of LLMs and retains the ability to train the model on harmless tasks. We provide empirical evidence that the efficacy of our defence lies in its ``depth'': the degree to which information about harmful representations is removed across all layers of the LLM. We also find areas where RepNoise still remains ineffective and highlight how those limitations can inform future research.
title Representation Noising: A Defence Mechanism Against Harmful Finetuning
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2405.14577