Preventing large language models from learning harmful behaviorsMaking Harmful Behaviors Unlearnable for Large Language Models
The paper proposes a controllable training framework that introduces security vectors during fine-tuning, preventing large language models from learning harmful behaviors from harmful data. Security vectors are a small number of additional parameters separable from the model; when activated during fine-tuning, they make the model's outputs consistent with the harmful behavior, leading the model to believe the behavior has already been learned and no further optimization on harmful data is needed; disabling these parameters at inference restores normal behavior. Experimental results show that security vectors generated from 100 harmful samples are sufficient to prevent the model from learning 1000 harmful samples while preserving the ability to learn other useful information. This work addresses the problem that fine-tuning data often contains explicit or implicit harmful content and that safety-aligned models are easily fine-tuned into harmful assistants.