Deployed language models are increasingly updated to follow users whose tastes change over time. The main tool for this, recency-weighted preference optimization, deliberately down-weights old feedback so that the model follows what people want now rather than what they wanted months ago. Safety training is also old feedback. If the refusal examples that taught a model to decline dangerous requests were collected at the start of deployment, a recency-weighted learner will steadily discount them until they carry almost no weight. The model then loses its guardrails. No one has to attack it; the learner is simply doing its job of forgetting the past.
We propose to measure this "safety half-life" directly and to fix it by changing how safety enters the objective. The obvious patch is to exempt safety data from discounting. We argue this fails in the opposite direction: undiscounted safety data accumulates relative weight without bound, and over-refusal grows with deployment time. Our method tracks drifting preferences with a discounted objective while enforcing safety as a constraint. A constraint has a fixed target (a harm rate on a held-out set of clearly harmful requests, plus a cap on refusals of benign-but-sensitive requests) and exerts pressure only when that target is violated.
Core Claim
Non-Stationary DPO (Right Now, Wrong Then) weights each preference pair collected at time $t_i$ by $\gamma^{T-t_i-1}$, where $T$ is the current step and $\gamma \in (0,1]$ is the discount. DPO, direct preference optimization, trains the model to prefer chosen over rejected responses without a separate reward model. Suppose $n$ utility pairs arrive per step. The total weight of utility data is then bounded by $n/(1-\gamma)$, so the learner has an effective memory of roughly $1/(1-\gamma)$ steps. Safety pairs seen only early in deployment receive weight $\gamma^{T}$ and vanish after about that many steps.
If instead we add $m$ safety pairs undiscounted at every step, their weight grows as $mT$. The ratio of safety weight to utility weight then climbs linearly with deployment time:
$$\frac{W_{\text{safe}}(T)}{W_{\text{util}}(T)} \approx \frac{mT(1-\gamma)}{n}.$$
This gives two falsifiable predictions. Under plain discounting, the onset of safety erosion should scale with the memory length $1/(1-\gamma)$. Under undiscounted safety, benign refusal rates should rise with $T$. Our fix replaces the weighted safety term with an online Lagrangian constraint:
$$\min_\theta \sum_i \gamma^{T-t_i-1}\,\ell_{\text{DPO}}(\theta; x_i) \quad \text{s.t.} \quad H(\theta) \le \epsilon,\;\; R(\theta) \le \rho.$$
Here $\theta$ are the model parameters, and $\ell_{\text{DPO}}$ is the per-pair DPO loss. $H(\theta)$ is a differentiable surrogate for harmful compliance on a fixed anchor set of harmful prompts, and $\epsilon$ is its allowed level. $R(\theta)$ is the refusal likelihood on a fixed set of benign sensitive prompts, and $\rho$ is its cap. Dual variables for each constraint are updated every step, so safety pressure depends on current violation rather than on the calendar.
This setup also addresses a tension in the NS-DPO evaluation itself. Its TV-HH benchmark treats the balance between helpfulness and harmlessness as something that may drift. We agree that some drift is legitimate, for example less hedging on sensitive but benign topics. We therefore constrain only a floor, meaning clearly harmful requests, and let everything above that floor drift freely.
Research Program
The work has three parts.
Diagnostic stream. We first build a stream in which utility preferences drift and safety supervision is concentrated at the start. The stream is assembled from TV-HH and the flipped and gradual-drift UltraFeedback splits of Right Now, Wrong Then, and from the sequential tasks (HH-RLHF, then TL;DR, then IMDB) used by COPR. The safety anchor set and the benign sensitive set are drawn from BeaverTails, using its harmful and safe meta-labels.
Mechanism separation. Running this stream for several values of $\gamma$ lets us separate two accounts of forgetting. The first is our weight-decay account. The second is the geometric account of The Geometry of Forgetting. That paper models alignment loss as $\tfrac12\delta^\top F_A\delta$, where $\delta$ is the parameter update and $F_A$ is the Fisher information of alignment data, and predicts quadratic accumulation over sequential steps. The two accounts make different predictions:
- If erosion onset tracks $1/(1-\gamma)$, forgetting is driven by the objective's weighting.
- If erosion instead tracks cumulative parameter displacement regardless of $\gamma$, forgetting is geometric, and a function-space constraint alone will not suffice.
Constrained method. Finally we implement the constrained learner. We also test a variant that adds per-step parameter projection, to find out whether the two forms of protection are complementary.
The role of each prior work is as follows:
- Supplies the drift-tracking objective: NS-DPO. We reuse its discounting unchanged; what we change is its treatment of safety as one more discountable preference.
- Supplies the dual-optimization tool: COPR uses Lagrangian duals to balance new and historical preferences. We borrow the tool for a different target, a safety floor. COPR never measures jailbreak or harm rates.
- Motivates the over-refusal cap: Unforgotten Safety shows logit replay preserves safety across a single two-task transition, but at up to 16.1% refusal on benign queries.
- Constrains how much the method can rely on staying near the aligned weights: evidence that safety sits in about 1% of parameters and is decided in the first few tokens (Superficial Safety Alignment Hypothesis; Zhao et al.). This is why the harm surrogate $H$ scores the first response tokens.
Baselines
Naive references. The first is plain DPO applied sequentially over the stream, which the NS-DPO authors show falls to about 50–55% reward accuracy after preference flips. The second is NS-DPO with safety data present only at the start. This is the configuration we predict will erode, and its reported strength on utility sets the bar we must match: reward accuracy above 60–70% on flipped UltraFeedback, and AlpacaEval 2.0 length-controlled win rate of 8.93 against 7.29 for DPO (Right Now, Wrong Then). We found no reported result on Lacuna for the safety metrics of NS-DPO on TV-HH.
Strongest safety competitor. This is Dark Experience Replay (DER), which stores safe prompts and matches the aligned model's logits on them. We re-run it every step inside the drifting stream. It is reported at 0.5% attack success on GSM8K against 66.0% for standard fine-tuning, and at up to 16.1% benign refusal (Unforgotten Safety).
Strongest parameter-space competitor. These are the projection defenses: Safe LoRA (3.03% attack success on the PureBad harmful fine-tuning set against 95.76% for standard LoRA) and the Fisher Alignment-Ellipsoid projection (FAE) from The Geometry of Forgetting. We apply each of them to every NS-DPO update.
Ablations isolating our key ingredient. The first is NS-DPO with undiscounted safety pairs, $\gamma=1$ on safety only. The second is NS-DPO with a fixed per-batch safety replay ratio. The third is our constrained learner with the dual variables frozen at their initial values, which turns the constraint back into a fixed penalty. The frozen-dual ablation directly tests whether violation-driven pressure is what matters.
Fairness. All methods use Llama-2-7B-Chat with the same LoRA rank. They see the same stream, the same safety and benign pools, and matched gradient steps. Each gets an equal tuning budget of twelve configurations, selected on the first 20% of the stream only.
What counts as beating a baseline. The constrained learner beats NS-DPO if it keeps HarmBench attack success within two points of the pre-deployment model at every checkpoint while staying within one point of NS-DPO reward accuracy. It beats DER if it matches DER's attack success with benign refusal below 5%.
Why not just…?
Why not just exempt safety data from discounting? This is the obvious patch. Our first equation predicts that it causes benign refusal to grow roughly linearly with deployment time. We test it as an ablation. If benign refusal stays flat over the full horizon, the prediction is wrong and the patch is enough.
Why not just replay a fixed fraction of safety examples in every batch? This is the real threat. A fixed ratio keeps safety weight constant, which avoids both failure modes. Its weakness is that the right ratio depends on drift speed and horizon: SPARD reports that generic safe replay either under- or over-protects depending on how relevant it is. The experiment settles this. We tune the ratio once on the first stream segment, then transfer it unchanged to faster and slower drift, including gradual drift and sudden flips. If one tuned ratio holds the safety floor and the refusal cap across all conditions, we will report that the constraint machinery is unnecessary.
Why not just project updates with Safe LoRA, FAE, or GuardSpace? These methods protect a neighborhood of the aligned weights. Drifting preferences, especially flips, can require large cumulative movement. The quadratic Fisher model is local, and the file notes that it breaks down under large updates and long horizons. Our mechanism-separation experiment measures whether projection alone holds the safety floor as displacement grows, and whether it costs reward accuracy on flipped segments.
Why not just periodically retrain from the aligned checkpoint? Resets discard accumulated user preferences. Repeated offline DPO also narrows output diversity, with the MSTTR diversity score collapsing to 0.541 against a human reference of 0.693 (COPR). We include resets every $1/(1-\gamma)$ steps as a baseline and report both reward accuracy and MSTTR.
Proposed Experiments
We run the full stream at $\gamma \in \{0.9, 0.95, 0.99\}$, logging five quantities at twenty checkpoints:
- attack success on HarmBench, graded with its classifier at the fixed 512-token length, since the benchmark reports that length can shift attack success by up to 30% (HarmBench);
- attack success on AdvBench;
- benign refusal on held-out safe BeaverTails prompts;
- reward accuracy on the current preference segment;
- MSTTR diversity.
Decisive check for the mechanism. We plot the erosion-onset step against $1/(1-\gamma)$. A slope near one, together with erosion that disappears under the constrained learner, supports the weight-decay account. If onset instead tracks cumulative update norm and projection helps where the constraint does not, the Fisher account wins, and we pivot to combining the two.
Decisive check for the over-refusal prediction. Benign refusal under the undiscounted-safety ablation should grow with $T$, while it stays flat under the constrained learner.
Transfer checks. We repeat the headline comparison on Mistral-7B. As a small out-of-distribution check, we insert a short segment of benign-looking but poisoned pairs mid-stream, following the poisoning setup of Unforgotten Safety. This tests whether dual variables that respond to violations react faster than fixed replay.
References
- Right Now, Wrong Then: Non-Stationary Direct Preference Optimization under Preference Drift
- COPR: Continual Human Preference Learning via Optimal Policy Regularization
- BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Dataset
- The Geometry of Forgetting: A Fisher-Information Framework for Alignment-Preserving Continual Adaptation
- Unforgotten Safety: Preserving Safety Alignment of Large Language Models with Continual Learning
- Superficial Safety Alignment Hypothesis
- Understanding and Enhancing Safety Mechanisms of LLMs via Safety-Specific Neuron
- Safe LoRA: The Silver Lining of Reducing Safety Risks when Finetuning Large Language Models
- SPARD: Defending Harmful Fine-Tuning Attack via Safety Projection with Relevance–Diversity Data Selection
- HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal