JANUS: Post-Hoc Rectification Solves Catastrophic Forgetting in LLM Fine-Tuning
Tsinghua and DiDi researchers introduce JANUS, a post-hoc rectification framework that corrects fine-tuned LLM parameters to recover forgotten knowledge while preserving new task performance, achieving over 100% historical knowledge retention with only ~1% drop in new task accuracy on LLaMA-2-7B.
Problem: Catastrophic Forgetting in LLM Fine-Tuning
Large language models suffer from catastrophic forgetting when learning new tasks: they acquire new skills (plasticity) but lose previously learned knowledge (stability). Traditional approaches impose constraints during training, such as subspace orthogonality ( ΔW · M = 0), which restricts parameter updates to directions orthogonal to historical knowledge subspaces. While sufficient to reduce interference, this condition is stricter than necessary and shrinks the available learning space as historical samples grow.
Key Insight: From Sufficient to Necessary and Sufficient Condition
The JANUS team re-examined the mathematical requirement for zero forgetting. They observed that parameters act as a collective whole and can share the responsibility of preserving old knowledge. This leads to a relaxed condition: the trace of the product of parameter update ΔW and historical knowledge matrix M must be zero ( Tr(ΔW · M) = 0). Unlike subspace orthogonality, which constrains row/column spaces separately, this trace condition treats ΔW and M as vectors in the high-dimensional parameter space and only requires their orthogonality. The authors prove this condition is both necessary and sufficient for first-order invariance of historical loss, granting the model a much larger update space for new tasks.
JANUS Algorithm: Post-Hoc Rectification via Jacobian Null-Space Projection
JANUS ( JA cobian NU ll S pace Projection) does not modify the training pipeline. Instead, after any fine-tuning method (full-parameter, LoRA, PiSSA, etc.) completes, JANUS rectifies the resulting parameter update ΔW by projecting it onto the null space of the Jacobian of historical task losses. This ensures the corrected update leaves historical losses unchanged to first order.
Because the Jacobian-based direction is only locally valid, a single large projection can drift off the constant-loss manifold. JANUS therefore employs a multi-step adaptive rectification : it takes small steps, recomputes the Jacobian at each step, and uses a JANUS shift metric (comparing row-space changes of successive Jacobians) to adaptively choose step sizes. This is analogous to walking along contour lines of the historical loss landscape. Additional engineering tricks — Ghost operations and SVD compression — reduce compute and memory overhead, enabling correction of a 7B model on a single A100 GPU in ~30 minutes.
Experimental Results
Evaluated on LLaMA-2-7B and LLaMA-3-8B across math, code, and instruction-following tasks. Baselines include standard fine-tuning (full, LoRA, PiSSA) and forgetting-aware methods (CorDA, MiLoRA, LoRA-Null). Metrics: AP₁ (stability, historical knowledge retention), AP₂ (plasticity, new task performance), and AP (arithmetic mean).
On LLaMA-2-7B math tasks, JANUS-P (JANUS applied to PiSSA) raised AP₁ from 67.55% to 106.16% while AP₂ dropped only 1.02 percentage points .
On code tasks, AP₁ improved from 79.71% to 109.83% with AP₂ decreasing 0.75 points .
Instruction-following showed similar stability recovery to near pre-training levels with higher overall AP.
JANUS-P outperformed all baselines on both stability and plasticity simultaneously, and gains generalized across base models, downstream tasks, and fine-tuning methods.
Significance: Shifting from Training-Time Constraints to Post-Training Repair
JANUS demonstrates that the stability-plasticity dilemma need not be addressed by restricting learning during training. By decoupling forgetting mitigation from the fine-tuning algorithm, it becomes a reusable post-processing step. This offers a practical path for continual learning scenarios where models must frequently adapt to new tasks without re-training from scratch.
Paper: https://arxiv.org/abs/2609.19985 (NeurIPS 2026). Code: https://github.com/zhengzl18/JANUS.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
