VaccineBooster: A Hybrid Perturbation Defense for Alignment Against Harmful Fine-TuningSafer Content or Firmer Refusals? A Hybrid Perturbation Defense for Alignment under Harmful Fine-tuning
VaccineBooster performs embedding perturbation and gradient decay simultaneously at the alignment stage; on Llama-2-7B, content safety and refusal retention show a trade-off.
The attacker only uses the fine-tuning-as-a-service interface to upload data, mixing harmful instruction–response pairs into downstream task data, with the goal that the fine-tuned model still completes the task but outputs harmful content; the attacker does not modify the alignment process or the base model. The defender is the model provider, who controls only the alignment stage, cannot see user fine-tuning data, and does not know the harmful proportion p. The experiment instantiates the attack as purely harmful fine-tuning with p=1.
- Under fine-tuning-as-a-service, a small number of harmful samples mixed into benign fine-tuning data can weaken the safety behavior of an aligned model, yet this is hard to detect by looking only at task utility. Filtering and post-hoc repair require access to user data or locating the altered samples, which providers often cannot do.
- VaccineBooster, during the provider-controlled alignment stage, does two things at each step: perturbs attention-layer embeddings as in Vaccine, simulates harmful weight updates and applies gradient decay as in Booster, then combines the two gradient paths into a single update. Default strengths are ρ=2.0, ε=0.1, λ=0.001; it does not inspect user fine-tuning data and does not change subsequent fine-tuning or inference.
- After aligning Llama-2-7B on BeaverTails for 3 epochs, fine-tune on 500 purely harmful samples for 1 epoch. In Table 1, VaccineBooster's post-attack OpenAI moderation is 0.315 with a 20% refusal rate; Booster-Only has a 50% refusal rate and moderation 0.401. The authors view this as a trade-off between content safety and explicit refusal, and note that with ten prompts and a single unseeded run, it is not treated as a statistically resolved effect.
- The authors state that the evaluation uses only ten prompts, one unseeded sample per configuration, and that refusal-rate differences are not significant under Fisher's exact test; they plan first to expand the evaluation set and average over multiple seeds. The experiments test only Llama-2-7B and BeaverTails, the attack is purely harmful fine-tuning with p=1, downstream task utility is not reported; in the λ ablation, refusal rate does not vary monotonically with λ.
- Evaluated models
- Llama-2-7B
- Benchmarks
- BeaverTails
- Metrics
- Harm scoreRefusal rateOpenAI moderation scoreFlagged rateResilience score
VaccineBooster merges embedding-vector perturbation with weight-level gradient decay into a single alignment training step to defend against harmful fine-tuning attacks in fine-tuning-as-a-service. After alignment on BeaverTails and a poisoned fine-tuning attack on Llama-2-7B, its OpenAI moderation score is 0.315, the lowest among compared defenses; the Booster-only variant retains the highest post-attack refusal rate of 50%. Ablations show a trade-off: embedding perturbation mainly reduces flagged harmful content, while gradient decay mainly preserves explicit refusal behavior; because only 10 prompts were used and each configuration was run once without a fixed random seed, the authors treat these as observed patterns rather than statistical conclusions.
Paper analysis
What problem does this paper attempt to solve?
Can the alignment stage use both embedding perturbation and weight gradient decay to resist harmful fine-tuning.
When embedding perturbation and weight-level gradient decay are combined in the same alignment step, can content safety and explicit refusal both be preserved after harmful fine-tuning, or do the two trade off against each other?
- Scenario: The authors say fine-tuning-as-a-service lets users adapt an aligned model with their own data, but a small number of harmful instruction–response pairs mixed into a benign fine-tuning set lowers refusal and raises the likelihood of harmful answers, while task performance still looks normal, making it hard for a provider that only checks task utility to detect.
- Shortcomings of existing methods: The authors say data filtering misses rewritten or covert samples, and privacy and operational constraints make comprehensive inspection infeasible; filtering also cannot handle data that is not clearly harmful but still pushes the model away from aligned behavior. Post-hoc repair often does not know which samples, how the model was changed, or whether it will be fine-tuned again. Existing alignment-stage defenses Vaccine and Booster act on embeddings and weights respectively, but are evaluated separately and often summarized with a single total score, which the authors believe masks "strengthening one facet of safety while exposing another."
- Core question: When embedding-level perturbation and weight-level gradient decay are placed in the same alignment, do they complement each other and improve overall safety, or do they create a trade-off between different safety facets?
- What this paper proposes: An alignment-stage method, VaccineBooster, which performs embedding perturbation and weight-level gradient decay simultaneously at each training step; it does not need to know the later fine-tuning data and does not change the user fine-tuning interface or inference.
- Threat model:
- Attacker goal: The fine-tuned model produces harmful content when requested while still completing the stated task; the authors say the attack counts as successful because task accuracy remains, thereby masking the loss of safe behavior.
- Attacker knowledge and capability: The attacker uses the provider's fine-tuning interface and uploads downstream task data, mixing in some proportion of harmful instruction–response pairs; the authors assume the attacker controls only the uploaded fine-tuning data and does not modify the alignment process or the base model.
- Defender: The model provider controls only the alignment stage and, before any user data arrives, aligns the base model on a safe dataset of harmful prompts paired with safe refusals; the provider cannot see user fine-tuning data and does not know the harmful proportion p, so the defense cannot be tailored to any specific attack.
- Formalization: User data is D_user = (1−p) D_B + p D_H. The defender must choose an alignment process so that, without having seen D_user and with p unknown at alignment time, the model still retains safe behavior after fine-tuning. The experiment instantiates this mixture as purely harmful fine-tuning with p=1, rather than the small harmful proportion emphasized in the threat model.
What related research exists?
Related work is divided into alignment, harmful fine-tuning attacks, and alignment-stage defenses; this paper asks whether the two types of perturbation are complementary.
Safety alignment
- Supervised fine-tuning and RLHF (works cited by Bai et al., Ouyang et al.): use demonstration data and reinforcement learning from human feedback to make the model refuse harmful requests and answer benign ones; the authors say human feedback is expensive, and a separate reward model is also expensive.
- Constitutional AI (Bai et al., 2022) and Direct Preference Optimization (Rafailov et al., 2023): the former uses the model to generate critiques according to fixed principles to replace part of the human feedback; the latter removes the explicit reward model and optimizes the policy directly from preference pairs. The authors say these methods establish refusal at release and share the same vulnerability: subsequent training can weaken the installed alignment.
Harmful fine-tuning attacks
- Qi et al. (2024): the authors say very few harmful samples suffice to remove safe behavior, and safety can decline even when the user has no such intent and is merely fine-tuning on benign tasks.
- Yang et al. (2023, Shadow alignment): a small number of malicious samples can subvert an already safety-aligned model while preserving its usefulness. The authors summarize the common feature of such attacks as covertness: the harmful proportion is small, task capability remains after fine-tuning, and a provider who only looks at task performance cannot see the safety loss.
Defenses against harmful fine-tuning
- Post-hoc repair or constraint (a set of works cited by the authors): repair or constrain the model after fine-tuning, but this requires the provider to know which model or which samples were corrupted, which the authors say rarely holds.
- Alignment-stage defenses: Vaccine makes hidden embeddings more robust to harmful drift; Booster attenuates the effect of harmful gradients on weights. Related representation-level and tamper-resistant defenses include RepNoise (injecting noise into representations so the information needed for harmful fine-tuning is harder to recover) and TAR (training protection into open-weight models so safety persists under adversarial fine-tuning). The authors restrict this paper to the alignment-stage family and say the open question these methods leave is whether embedding-level and weight-level defenses reinforce each other when combined in a single alignment.
- Post-hoc attribution: The authors note that their defense setting differs from post-fine-tuning causal attribution; alignment-stage defenses must reduce the impact of harmful fine-tuning before a safety failure occurs.
Baseline methods and benchmarks: The main comparison baselines are Vaccine-Only (embedding perturbation only) and Booster-Only (weight-level gradient decay only) under the same number of alignment epochs. Alignment, weight perturbation term, and simulated attack data all come from BeaverTails; the tested model is Llama-2-7B. Metrics are keyword harm score, refusal rate, OpenAI moderation score, flagged rate, and the resilience score the authors explicitly do not use for ranking.
The authors position this paper as studying how two existing perturbations interact, not as introducing a new underlying mechanism: evaluating them separately and summarizing with a single total score would hide "one safety facet getting stronger while another remains exposed," so they measure content safety and refusal retention separately and combine a defense that mainly affects the former with one that mainly affects the latter.
How does the paper address this problem?
Each step first computes Booster's decay term, then takes the safety gradient in Vaccine's perturbed forward pass and adds them together.
VaccineBooster puts Vaccine's embedding perturbation and Booster's weight perturbation with gradient decay into the same alignment update: the former changes the representations produced by the forward pass, the latter changes how weights respond to harmful gradients, and the two are added rather than treated as two separate sequential pipelines.
Problem setup and the two perturbations
- Alignment object: pretrained model M with parameters θ and language modeling loss L(x; θ). Alignment fine-tunes on instruction-refusal pairs in a safe dataset D_safe; attack occurs on later user data.
- Embedding perturbation: acts on the output embedding h_l of the attention module at layer l. Take the gradient of the alignment loss with respect to that embedding, normalize to a fixed norm, and add it back into the forward pass: δ_l = ρ g_l / ‖g_l‖, h̃_l = h_l + δ_l. The authors say δ_l is the direction of steepest ascent of the alignment loss, a bounded worst-case shift; maintaining safe behavior under h̃_l means requiring the embedding to be safe in a neighborhood of its current value. Larger ρ means a larger neighborhood and a harder alignment objective to fit.
- Weight perturbation and gradient decay: on a harmful batch x_h, first compute the harmful gradient g_h, then take a bounded step along that direction to get θ̃ = θ − ε g_h / ‖g_h‖, and compute the harmful gradient g̃_h again at the perturbed point. The difference g_h − g̃_h is used by the authors to indicate how quickly a small harmful update can reduce the harmful loss. With safety gradient g_s, the composite gradient is g_final = g_s + λ (g_h − g̃_h). ε determines the size of the simulated harmful step, and λ determines the weight of the decay term relative to fitting the safe data.
The merged alignment step
Algorithm 1 proceeds as follows: compute g_h at the current weights, temporarily perturb the weights along the harmful direction and compute g̃_h at the perturbed point, then restore the weights; then do one backward pass on the safe batch to collect embedding gradients at each attention layer, construct δ_l, compute g_s under the perturbed embeddings, and finally return g_final.
- Order: the authors emphasize that the safety update is computed from the original parameters. The perturbed weights are used only to estimate the decay term; the final safety update is not applied from the harmful update direction.
- Perturbation location: only the output of the attention module is perturbed. The authors' stated reason is that these representations contain features important for safety alignment and are directly affected by harmful fine-tuning.
- Normalization: both perturbations are first normalized to unit norm and then multiplied by ρ and ε respectively. The authors say this makes strength independent of gradient magnitude, so the same value is more comparable across batches. The authors also say that because the two terms are added rather than composed, changing one strength mainly affects one behavioral dimension: ρ enters only the perturbed safety gradient g_s and mainly affects generated content; λ enters only the decay term and mainly affects sensitivity to harmful updates. The authors present this role separation as a working interpretation and say confirming it requires a larger evaluation set than this paper's.
Overhead and deployment constraints
- Compute: standard supervised alignment does one forward and one backward pass per step on the safe batch. VaccineBooster adds two backward passes on the harmful batch to form g_h and g̃_h, and uses two on the safe batch: one to collect the embedding gradients that define the perturbation, and one to compute the perturbed g_s. The authors say a single step is roughly four forward-backward passes instead of one; this overhead is paid once at the provider's alignment stage and does not change the cost of user fine-tuning or inference.
- Memory: perturbations are computed with forward and backward hooks on attention layers, and perturbed weights are restored in place without keeping a separate copy. The authors say the extra memory is modest.
- Data independence: the method does not inspect user fine-tuning data, nor does it rely on the harmful proportion being identifiable or on filters.
Settings used for training and success determination
- Data split: Llama-2-7B; from BeaverTails, 5,000 instruction-refusal pairs for alignment, 1,000 harmful samples for the weight perturbation term, and 500 harmful samples for the simulated attack. These 500 are all harmful instruction-response pairs, corresponding to p=1 in Section 3 rather than a small harmful proportion. The authors therefore interpret the experiment as measuring how much safety behavior remains after one unadorned harmful fine-tuning; because the poisoned set contains no benign task data, downstream task utility is not reported.
- Optimization: both alignment and attack use LoRA with rank r=32 and scaling α=4 on query, key, and value projections, so all methods have the same trainable parameters. Alignment runs 3 epochs with batch size 4 and learning rate 1×10^−5; the simulated attack fine-tunes on poisoned data for 1 epoch with learning rate 2×10^−5. Unless otherwise stated, ρ=2.0, ε=0.1, λ=0.001. All methods use the same number of alignment epochs. Implementation is PyTorch, Hugging Face Transformers, and PEFT, in bfloat16.
- Determination: both before and after attack, harm score and refusal rate are measured. Harm score is a 0–100 keyword check counting harm-related words in categories such as violence, illegal activity, dangerous information, privacy violation, and deception; refusal rate is the proportion of responses containing an explicit refusal pattern. OpenAI moderation score is returned by the moderation API, lower is safer; flagged rate is the proportion of responses flagged by that API. Resilience combines post-attack harm, harm increase, and post-attack refusal into one number; the authors say the weights are hand-set, not calibrated to an external standard, and serve only as a descriptive summary, not for ranking methods. Evaluation uses a fixed set of ten harmful prompts covering the harm categories used by the harm score, shared by all methods and hyperparameters. Generation uses temperature 0.7, a 150-token budget, and no fixed random seed, so each reported number is one random sample.
What experiments did the paper conduct?
The main comparison and the ρ and λ ablations all point to a trade-off between content safety and refusal rate, with large run-to-run variation.
Experimental setup
- Models and data: The only tested model is Llama-2-7B. Alignment uses 5,000 safe samples from BeaverTails, the weight perturbation term uses 1,000 harmful samples, and the simulated attack uses 500 purely harmful samples (p=1). Downstream task utility is not reported.
- Methods: VaccineBooster, Vaccine-Only, Booster-Only, all aligned for 3 epochs. Default ρ=2.0, ε=0.1, λ=0.001. The ρ ablation fixes ε=0.1 and λ=0.001; the λ ablation fixes ρ=2.0 and ε=0.1. The paper does not report experiments varying ε alone.
- Metrics: Keyword harm score (lower is better), refusal rate (higher is better), OpenAI moderation score (lower is safer), flagged rate, and resilience computed by Eq. (9). The second term of resilience can exceed 25 when the keyword harm score decreases, so the total can exceed the intuitive upper bound the authors describe; Appendix B explains that a decrease in harm score can also come from measurement artifacts unrelated to safety.
- Review: Moderation and flagged come from the OpenAI moderation API; the paper does not specify the exact model version or threshold, only labeling "Typical Flag Threshold" in the Figure 2 caption, with no numerical threshold value in the main text. The keyword list and refusal pattern list are in Appendix A, not itemized in the main text.
- Scale and repetition: Each configuration is evaluated once on a fixed set of 10 harmful prompts. Decoding uses temperature 0.7, a maximum of 150 tokens, and no fixed seed. The default configuration is independently trained and evaluated twice (once in Table 1, once in the corresponding rows of Tables 2 and 3). All experiments including the two ablations, the authors state, take about three hours on a single A100.
Main results
Before the attack, all three methods have a 100% refusal rate; the authors say they are indistinguishable at release, and differences appear only after poisoned fine-tuning. Table 1 is the main run; the default configuration in Tables 2 and 3 is a separate alignment, and the two sets of numbers differ, which the authors choose to report side by side.
Swipe horizontally to read the table
Method Condition Harm Pre→Post Refusal Post Mod. Flagged Resil. VaccineBooster Table 1, 3 epochs 24→20 20% 0.315 Not reported 72.0 Vaccine-Only Table 1, 3 epochs 26→26 30% 0.411 Not reported 69.5 Booster-Only Table 1, 3 epochs 27→19 50% 0.401 Not reported 82.0 VaccineBooster repeat Tables 2–3 and Table 4, ρ=2, ε=0.1, λ=0.001 32→20 40% 0.329 40% 81.0 Harm, Refusal, Mod., and Resil. in the table are from Table 1 and Table 4; Table 1 does not give the flagged rate. Pre-refusal is 100% for all three methods.
- The authors' reading: Moderation and refusal rate have no single winner. VaccineBooster has the lowest moderation (0.315) and a lower refusal rate (20%); Booster-Only has the highest refusal rate (50%), moderation 0.401, and resilience 82.0. Vaccine-Only's harm score is 26 both before and after the attack, with the remaining metrics behind.
- Resilience is not used for ranking: The authors substitute the repeated VaccineBooster run from Table 1 into Eq. (9) and obtain 81.0, a difference from Booster-Only's 82.0 smaller than the run-to-run variation set up in this paper. In Figure 2, the three resilience values span 12.5 points, which the authors say is comparable to the roughly 9-point run-to-run variation in Appendix C, so they do not read a ranking from that panel. Figure 2 labels moderation as 0.315, 0.411, 0.401 and resilience as 72.0, 69.5, 82.0, consistent with Table 1.
- Keyword harm score: In Figure 1, post-attack harm is 20 for VaccineBooster, 26 for Vaccine-Only, and 19 for Booster-Only, with refusal rates of 20%, 30%, and 50%. The authors say the post-attack keyword harm score does not rise consistently: it decreases for VaccineBooster and Booster-Only and stays flat for Vaccine-Only; keyword matching counts whether predefined words appear, so they do not treat it as an independent indicator of post-attack safety, instead using OpenAI moderation as the primary content safety metric and reporting it alongside refusal rate.
Embedding perturbation strength ρ
Table 2 varies ρ with ε=0.1 and λ=0.001. The authors say that as ρ increases, moderation and flagged rate generally decrease, reaching the table's lowest values of 0.221 and 30% at ρ=4.0; post-attack harm score is lowest at ρ=2.0 (20) and rises slightly to 23 at ρ=4.0. Refusal rate does not vary monotonically with ρ: 40% at ρ=0.5, 20% at ρ=1.0, and 40% at both ρ=2.0 and 4.0.
- What was tested: Only the embedding perturbation strength was varied, at four values: 0.5, 1.0, 2.0, 4.0.
- Results: The external content safety metric is lowest at the strongest perturbation ρ=4.0; keyword harm is lowest at the default ρ=2.0.
- The authors' interpretation: This is consistent with "embedding perturbation mainly affects the content the model generates, rather than forcing a particular refusal template." If deployment mainly looks at moderation, larger ρ is more attractive; the default ρ=2.0 gives the lowest keyword harm score. The Figure 3 caption says larger ρ lowers moderation and flagged content, with the best harm score at ρ=2.0. The horizontal axis in the figure goes to 4.0 and is labeled "Optimal"; the main text does not give a separate numerical value for that label.
Gradient decay strength λ
Table 3 takes λ=0.0001, 0.001, 0.01, 0.1 with ρ=2.0 and ε=0.1. The authors say the default λ=0.001 gives the best balance: post-attack harm 20 and refusal rate 40%. λ=0.1 has the lowest moderation at 0.283 and the lowest flagged rate at 20%, but the refusal rate drops to 30%. Across the four values, refusal rate only moves between 30% and 40%, with harm 26, 20, 25, 23 and moderation 0.362, 0.329, 0.338, 0.283.
- The authors' interpretation: These four runs cannot establish that "λ controls refusal retention the way ρ controls content safety." What they show is that the largest tried λ=0.1 buys a change in content safety without an accompanying refusal benefit. The Figure 4 caption says the default λ=0.001 balances harm and refusal, and large λ favors content safety over refusal.
- Comparison with the main comparison: The authors say the role of weight-level decay as "mainly preserving explicit refusal" rests on Booster-Only in Table 1, not on the λ ablation; in the λ ablation, refusal rate is non-monotonic. They therefore present it as an interpretation consistent with the evidence, not a measured effect. Figure 5 plots four axes on their own original scales: harm reduction as 100 minus post-attack harm score, refusal retention as post-attack refusal rate, OpenAI safety as 100(1−Mod), and overall resilience on the raw scale of Eq. (9). The caption says VaccineBooster leads on OpenAI safety, Booster-Only leads on refusal retention, and Vaccine-Only is lowest on the content safety axis.
Other ablations and analyses
- Two independent repeats (Table 4, Appendix C): For the same default configuration, the Table 1 run has Pre-Harm 24, Post-Harm 20, Post-Refusal 20%, Mod. 0.315, Flagged 40%, Resil. 72.0; the Tables 2/3 run has 32, 20, 40%, 0.329, 40%, 81.0. Post-attack harm and flagged rate are the same, moderation differs by 0.014, pre-attack harm differs by 8 points, and post-attack refusal rate differs by 20 percentage points (two responses). The authors say this magnitude is on the same order as the gaps between several methods in Table 1.
- Statistics: With ten prompts, the 95% Wilson interval for a 50% refusal rate is [24%, 76%]. Booster-Only's 50% versus VaccineBooster's main-run 20% is five versus two responses, with a two-sided Fisher exact test p=0.35; versus the repeated run's 40%, it is five versus four responses, p=1.00. The authors say that under conventional power, distinguishing such proportions would require roughly forty prompts per condition, and distinguishing 50% from 40% would require several hundred.
- Range of the keyword score: Appendix B says that across all methods and hyperparameter settings, the harm score falls only between 19 and 32, equivalent to a range of two to three matching keywords. Appendix B also explains: a completion that contains none of the listed words but is specific and genuinely dangerous would be scored 0; when refusal is replaced by a compliant response, the refusal vocabulary the detector relies on disappears, and the harm score can decrease. The second term of Eq. (9) rewards a decreased harm score, so resilience directly inherits this artifact.
- Refusal before and after the attack: All reported methods have a 100% refusal rate before the attack (Table 1); after the attack it drops to 20%–50% (Table 1) or 20%–40% in the ablations (Tables 2, 3). The paper does not report results for adaptive attacks, other harmful proportions p, or other base models.
- ε: The default ε=0.1 is fixed in both ablations. The paper does not report metrics when ε is varied.
- Cost: The authors give forward–backward counts at the step level (roughly four versus one) and do not report step-by-step timing beyond wall-clock time; all experiments take about three hours on a single A100.
What are some points that can be further explored?
The authors believe the prompt set should first be expanded and multiple seeds averaged; the current differences do not pass significance testing.
Limitations and future directions noted by the authors
- Evaluation scale: The abstract and Section 1 state that the evaluation uses ten prompts, one unseeded run per configuration, so the trade-off between content safety and refusal is reported as an observed pattern rather than a statistically resolved effect. Appendix C says that expanding the evaluation set and averaging over multiple seeds is the first change the authors would make to this study. (Abstract, Section 1, Appendix C)
- Construction of resilience: Section 5 says its weights are hand-set and not calibrated against an external standard; the second term has no upper bound and can exceed 25 when the keyword harm score decreases, thus rewarding measurement artifacts the same way as genuine improvement. Appendix B says this score inherits the keyword-matching artifact. The authors therefore treat it only as a descriptive summary and do not use it for ranking. (Section 5, Appendix B)
- Keyword harm score: Section 6.2 says it counts whether predefined words appear, rather than whether a response is actually safe or harmful in context, and is therefore not treated as an independent indicator of post-attack safety. (Section 6.2)
- The role of λ is not established by ablation: Sections 4.5 and 7 say λ's effect on refusal rate is weak and non-monotonic; "weight-level decay mainly preserves refusal" relies mainly on the Booster-Only comparison in Table 1, not on the λ ablation. The authors present it as a working interpretation and say confirmation would require a larger evaluation set than this paper's. (Sections 4.5, 7)
- Statistical power: Appendix C reports that the difference between the 50% and 20% refusal rates in Table 1 has p=0.35 under a two-sided Fisher exact test, and p=1.00 compared with the 40% from the repeated run; by the authors' calculation, distinguishing such proportions under conventional power would require roughly forty prompts per condition, and distinguishing 50% from 40% would require several hundred. (Appendix C)
- Note on inconsistency between threat model and experimental instantiation: Section 5 states that all 500 poisoned samples are harmful pairs, instantiating the mixture from Section 3 as p=1 rather than the small harmful proportion in the motivation; the poisoned set contains no benign task data, so downstream task utility is not reported. This is an explicit limitation of the experimental setup, not an item the authors list as future work. (Section 5)
Experimental coverage
- Models and data: Experiments use only Llama-2-7B; alignment, harmful batches, and attack data all come from BeaverTails, with sizes of 5,000, 1,000, and 500 samples respectively (Section 5).
- Attack form: The simulated attack is LoRA fine-tuning for 1 epoch with learning rate 2×10^−5, with a poisoned set of purely harmful samples, i.e., p=1; the paper states that downstream task utility is therefore not reported (Section 5).
- Defense comparison: The main table compares VaccineBooster, Vaccine-Only, and Booster-Only under the same 3 epochs; ablations vary only ρ (0.5, 1.0, 2.0, 4.0) or λ (0.0001, 0.001, 0.01, 0.1), with ε fixed at 0.1 (Tables 1–3).
- Evaluation protocol: Fixed 10 harmful prompts, temperature 0.7, 150-token budget, no fixed seed; the default configuration has two independent retraining runs (Table 4, Appendix C). External content safety metrics are OpenAI moderation score and flagged rate; refusal is determined by explicit refusal patterns (Section 5, Appendix A).
- Approaches discussed but not included in experiments: Related work mentions post-hoc repair, RepNoise, and TAR, but the experimental baselines are only Vaccine-Only and Booster-Only; the authors say the paper stays within the alignment-stage family and asks whether embedding-level and weight-level defenses reinforce each other when combined (Section 2). The paper reports Fisher exact tests and Wilson intervals but does not report metrics averaged over multiple seeds.
Summarize the main content of the paper
VaccineBooster combines two alignment-stage perturbations in one step, yielding more content safety but less refusal retention.
VaccineBooster is an alignment-stage defense: while the provider still sees the training process and has not yet touched user fine-tuning data, it combines embedding perturbation and weight-level gradient decay into the same update to cope with later untrusted fine-tuning.
Harmful fine-tuning can mix in only a few harmful instruction-response pairs, weakening refusal and increasing the likelihood of harmful outputs while task utility still looks good. Filtering misses hidden samples, and post-hoc repair often does not know where to fix. Vaccine hardens representations near the output embeddings of attention, and Booster simulates one step of harmful weight update and decays its influence. The authors ask whether putting both into the same alignment step yields overall greater safety or trades off across different safety dimensions.
Each step first estimates the gradient difference g_h − g̃_h on a harmful batch, restores the weights, then perturbs attention embeddings per Vaccine on a safe batch and computes the safety gradient, and finally uses g_final = g_s + λ (g_h − g̃_h). Defaults are ρ=2.0, ε=0.1, λ=0.001. Extra computation occurs only at the alignment stage, roughly four forward-backward passes per step instead of one, without changing the user fine-tuning interface or adding inference overhead. Experiments align Llama-2-7B on BeaverTails for 3 epochs, then fine-tune on 500 purely harmful samples for 1 epoch (p=1), and evaluate on 10 fixed harmful prompts.
- In the main run of Table 1, all three methods have a 100% refusal rate before attack. After attack, VaccineBooster has OpenAI moderation of 0.315 and refusal rate 20%; Booster-Only has refusal rate 50% and moderation 0.401; Vaccine-Only keeps harm score at 26 and moderation at 0.411.
- Another run with the same default configuration (Table 4) gives a post-attack refusal rate of 40% and moderation of 0.329. Fisher's exact test for 50% vs. 20% gives p=0.35. The authors do not use the resilience ranking: Booster-Only is 82.0, and VaccineBooster is 72.0 and 81.0 in the two runs.
- As ρ increases from 0.5 to 4.0, moderation and flagged rate generally decrease, reaching 0.221 and 30% at ρ=4.0; refusal rate is not monotonic. Across three orders of magnitude of λ, refusal rate varies only between 30% and 40%; at λ=0.1, moderation is 0.283, flagged rate is 20%, and refusal rate is 30%.
The authors conclude that embedding perturbation mainly reduces flagged harmful content, while the evidence linking gradient decay to explicit refusal preservation is weaker and comes mainly from Booster-Only rather than the λ ablation. This is therefore a direction providers can tune by product need—valuing content safety more or refusal preservation more—rather than two already separated roles or statistically resolved effects. The authors consider expanding the evaluation set and averaging over multiple seeds as next steps.
Related papers
- TRACEAnalysis / interpretabilityarXiv