Papers › Safety Alignment as Continual Learning: Mitigating the Alignment Tax via Orthogonal...

Safety Alignment as Continual Learning: Mitigating the Alignment Tax via Orthogonal Gradient Projection

8 Feb 2026arXiv:2602.07892added by Syntology

Guanglong Sun, Siyuan Zhang, Liyuan Wang, Jun Zhu, Hang Su, Yi Zhong

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Safety post-training can improve the harmfulness and policy compliance of Large Language Models (LLMs), but it may also reduce general utility, a phenomenon often described as the \emph{alignment tax}. We study this trade-off through the lens of continual learning: sequential alignment stages expose the model to shifted data distributions and objectives, and their gradients may interfere with directions that support previously acquired general capabilities. This view does not claim that all alignment degradation has a single cause; rather, it provides a useful first-order mechanism for mitigating one important source of capability regression. We propose \textbf{O}rthogonal \textbf{G}radient \textbf{P}rojection for \textbf{S}afety \textbf{A}lignment (\textbf{OGPSA}), a lightweight update rule that estimates a low-rank reference subspace from gradients on a small set of general-capability data and removes from each safety gradient the component lying in this subspace. The resulting update is the steepest local safety-descent direction subject to first-order preservation constraints on the reference objectives. OGPSA is compatible with standard post-training pipelines and avoids large-scale replay, although it introduces periodic reference-gradient computation. Across Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and sequential SFT→DPO settings, OGPSA improves the observed safety--utility trade-off over standard baselines. Under the sequential SFT→DPO pipeline, the average performance gain increases from 33.98\% to 42.74\% on Qwen2.5-7B-Instruct and from 19.74\% to 32.98\% on Llama3.1-8B-Instruct. We have open sourced our code at https://github.com/SunGL001/OGPSA.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2602.07892")

Code

Syntology Ran 0 of 18 code samples harvested from 1 repository linked to this paper; 18 have no recorded run.

By repository: found in paper text by Syntology: 18 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

SunGL001/OGPSA found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 0 ran; 0 honoured the contract we drafted; 18 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

18unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from SunGL001/OGPSA. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

build_gpt_eval_messages SunGL001/OGPSA/eval/HalluQA.py found in paper text by Syntology unverified MIT (permissive) · 4af073ea30776bc7 · report
build_gpt_eval_prompt SunGL001/OGPSA/eval/AIME2024.py found in paper text by Syntology unverified MIT (permissive) · 89e5642dfceebefd · report
build_gpt_eval_prompt SunGL001/OGPSA/eval/AdvGLUE.py found in paper text by Syntology unverified MIT (permissive) · 0d72969c11a70528 · report
build_gpt_eval_prompt SunGL001/OGPSA/eval/GPQA.py found in paper text by Syntology unverified MIT (permissive) · 1c27eb34b1f772b2 · report
build_gpt_eval_prompt SunGL001/OGPSA/eval/HHH.py found in paper text by Syntology unverified MIT (permissive) · 24d523840feeeb28 · report
detect_model_type_from_path SunGL001/OGPSA/eval/AlpacaEval.py found in paper text by Syntology unverified MIT (permissive) · 7bc66882c50c5fef · report
extract_answer SunGL001/OGPSA/eval/GPQA_Diamond.py found in paper text by Syntology unverified MIT (permissive) · a7b81f2f5969d9ab · report
extract_answer SunGL001/OGPSA/eval/MMLU.py found in paper text by Syntology unverified MIT (permissive) · b9ce5a37c260fee5 · report
extract_answer_from_response SunGL001/OGPSA/eval/AIME2024.py found in paper text by Syntology unverified MIT (permissive) · e704f14bfb984d51 · report
extract_answer_from_response SunGL001/OGPSA/eval/GPQA.py found in paper text by Syntology unverified MIT (permissive) · 996c1c7807871550 · report
extract_label_from_response SunGL001/OGPSA/eval/HHH.py found in paper text by Syntology unverified MIT (permissive) · 522a73213ca49776 · report
extract_model_identifier SunGL001/OGPSA/eval/AlpacaEval_pre.py found in paper text by Syntology unverified MIT (permissive) · 92c41ca5148de65a · report
get_prompt SunGL001/OGPSA/eval/AlpacaEval_pre.py found in paper text by Syntology unverified MIT (permissive) · fa528f9eb5d2a2af · report
get_token_count SunGL001/OGPSA/eval/AlpacaEval.py found in paper text by Syntology unverified MIT (permissive) · 3a11d80fea8ca185 · report
load_tokenizer_for_eval SunGL001/OGPSA/eval/AlpacaEval.py found in paper text by Syntology unverified MIT (permissive) · 10cae133e44ed5f1 · report
process_one SunGL001/OGPSA/eval/AdvGLUE.py found in paper text by Syntology unverified MIT (permissive) · b543cea785162e44 · report
process_one SunGL001/OGPSA/eval/GPQA_Diamond.py found in paper text by Syntology unverified MIT (permissive) · f4dc40dbd0a904af · report
process_one SunGL001/OGPSA/eval/MMLU.py found in paper text by Syntology unverified MIT (permissive) · 0364cbd97c9ad0de · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2602.07892, was issued in February 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections