Estimating and Orthogonalizing Unknown Pre-training Gradients for Continual Fine-tuning of Large Language Models
Authors: Bing Wang, Changchun Li, Xin-Qiang Cai, Lin Yuanbo Wu, Ximing Li, Gang Niu, Masashi Sugiyama
Organizations: College of Computer Science and Technology, Jilin University · Key Laboratory of Symbolic Computation and Knowledge Engineering, MoE, Jilin University · RIKEN Center for Advanced Intelligence Project · University of Warwick · Graduate School of Frontier Sciences, University of Tokyo
Continual fine-tuning is essential for large language models (LLMs) to dynamically adapt to real-world environments, yet it inevitably suffers from catastrophic forgetting, particularly the performance degradation of previous tasks and LLMs' general-purpose knowledge. Although existing methods, such as orthogonal gradient projection, mitigate the forgetting across various fine-tuning tasks, they fundamentally fail to preserve pre-training LLMs' inherent general-purpose knowledge because the original data and gradients of off-the-shelf pre-training LLMs required by these methods are strictly unknown and highly diverse. To bridge this critical gap, we propose EoupCT, a novel framework designed to Estimate and Orthogonalize Unknown Pre-training gradients for Continual LLM fine-Tuning. Specifically, EoupCT estimates pre-training gradients by dynamically generating pseudo data that is most susceptible to forgetting for new tasks through a learnable soft prompt equipped with Gumbel-Softmax relaxation. Furthermore, we formulate a multi-objective optimization problem and introduce a first-order efficient Pareto optimizer that jointly optimizes LLM parameters and the soft prompt, rigorously enforcing orthogonality between new task updates and the estimated pre-training gradients. Extensive experiments across multiple LLMs demonstrate that EoupCT effectively preserves both task-specific proficiency and inherent general-purpose knowledge, successfully mitigating the catastrophic forgetting.
Figures & tables
Figure 1: Framework of EoupCT with pre-training gradient estimation and Pareto orthogonal optimization.
SuperNI
MMLU (average three task orders)
Method
Order 1
Order 2
Order 3
STEM
Humanity
Other
Rou.
Fgt.
Rou.
Fgt.
Rou.
Fgt.
Acc.
Fgt.
Acc.
Fgt.
Acc.
Fgt.
Qwen3-8B
+ LoRA
50.1
7.7
48.2
9.8
49.9
8.5
62.6
3.5
71.3
7.6
72.5
4.4
+ LoRAMoE
50.8
6.3
49.4
8.7
48.9
8.4
61.6
4.5
71.3
7.5
72.0
4.9
+ OLoRA
51.2
6.7
47.4
9.4
50.1
7.6
63.3
2.9
72.0
6.9
72.9
4.0
+ GainLoRA
50.0
6.6
49.7
8.0
49.2
8.1
62.7
3.4
72.7
6.2
72.4
4.4
Table 1: Results of EoupCT under two task types: task-specific knowledge by SuperNI and general-purpose knowledge by MMLU ( Rou. ↑ , Acc. ↑ , Fgt. ↓ ). The bold results represent the best scores.
Figure 2: Sensitivity analysis of soft prompt length L and surrogate sequence length M .
Ablation
Qwen3-4B
Llama3-3B
Gemma2-2B
SuperNI
MMLU
SuperNI
MMLU
SuperNI
MMLU
Rou.
Fgt.
Acc.
Fgt.
Rou.
Fgt.
Acc.
Fgt.
Rou.
Fgt.
Acc.
Fgt.
EoupCT
50.7
6.0
60.2
0.7
44.0
10.5
41.4
-0.8
46.7
10.3
38.5
0.8
w/o C2
47.6
10.3
59.0
2.0
42.3
13.0
40.4
0.2
44.8
10.1
36.9
2.3
w/o P&PO
47.3
9.2
57.8
3.1
42.1
12.2
40.3
0.3
43.5
13.0
36.9
2.4
w/o N&PO
47.4
8.7
57.9
3.0
41.9
12.2
40.0
0.6
44.2
13.3
36.6
2.6
Table 2: Ablation experiments of different constraints in EoupCT .
Figure 3: Forgetting dynamics of Qwen3-4B (left) and Llama3-3B (right) across MMLU .
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
LLM
LoRA
LoRAMoE (#expert=4)
LoRAMoE (#expert=8)
OLoRA
CLoRA
EoupCT
Qwen3-8B
88 (1 × )
223 (2.5 × )
225 (2.5 × )
237 (2.7 × )
191 (2.2 × )
162 (1.8 × )
Qwen3-4B
62 (1 × )
194 (3.1 × )
195 (3.1 × )
204 (3.3 × )
155 (2.5 × )
129 (2.1 × )
Llama3-8B
60 (1 × )
197 (3.3 × )
199 (3.3 × )
211 (3.5 × )
156 (2.6 × )
130 (2.1 × )
Llama3-3B
35 (1 × )
144 (4.1 × )
144 (4.1 × )
151 (4.3 × )
114 (3.2 × )
65 (1.8 × )
Gemma2-9B
76 (1 × )
260 (3.4 × )
262 (3.4 × )
271 (3.5 × )
210 (2.7 × )
178 (2.3 × )
Gemma2-2B
44 (1 × )
140 (3.2 × )
141 (3.2 × )
149 (3.4 × )
116 (2.6 × )
69 (1.5 × )
Appendix
Table 3: Empirical computational time (minutes) on 8 × GPUs.
Notation
Description
Fθ,θ
Frozen pre-training LLM and trainable LLM weights
Tt,T0
t -th new downstream task and original pre-training distribution
Pt,S(Pt)
Continuous soft prompt and generated surrogate sequence
Lnew,Lpre
Plasticity and stability objective functions
gnew,gpre
Task-specific and protection gradients w.r.t. θ
θvirt
Virtually updated weights simulating new task impact
Appendix
Table 4: Summary of primary notations used in EoupCT .
ID
Dataset
Task Type
Train
Eval
t1290
xsum_summarization
text summarization
1,000
100
t511
reddit_tifu_long_text_summarization
text summarization
1,000
100
t1572
samsum_summary
text summarization
160
20
t1729
personachat_generate_next
dialogue generation
1,000
100
t639
multi_woz_user_utterance_generation
dialogue generation
142
18
t1590
diplomacy_text_generation
dialogue generation
126
16
Appendix
Table 5: Overview of selected multi-task datasets from SuperNI [ Wang et al., 2022 ] .
Large language models (LLMs) often suffer from catastrophic forgetting in continual learning: after learning new tasks sequentially, they perform worse on earlier tasks. Existing methods mitigate catastrophic forgetting by data replay, parameter freezing, or regularization. However, these methods lack understanding of LLM mechanisms and cannot distinguish which parameters store important knowledge from previous tasks and which parameters can be updated for new tasks. To address this, we propose the attribution-guided continual fine-tuning framework that leverages Layer-wise Relevance Propagation (LRP) to estimate parameter importance based on the internal computational process of LLMs. During continual learning, parameters critical to previous tasks are constrained to receive smaller updates, while less relevant parameters remain available for learning new tasks. Extensive experiments show that, compared with baseline methods, our approach reduces catastrophic forgetting while preserving adaptability to new tasks, highlighting the value of mechanistic attribution for continual fine-tuning of LLMs.
Yazheng Liu, Yuxuan Wan, Rui Xu +3
The Hong Kong University of Science and Technology (Guangzhou), Guangzhou, China · The Beijing University of Posts and Telecommunications, Beijing, China
Continual learning in multimodal large language models (MLLMs) aims to sequentially acquire knowledge while mitigating catastrophic forgetting, yet existing methods face inherent limitations: architecture-based approaches incur additional computational overhead and often generalize poorly to new tasks, rehearsal-based methods rely on storing historical data, raising privacy and storage concerns, and conventional regularization-based strategies alone are insufficient to fully prevent parameter interference. We propose Octopus, a two-stage continual learning framework based on History-Free Gradient Orthogonalization (HiFGO), which enforces gradient-level orthogonality without historical task data. Our proposed two-stage finetuning strategy decouples task adaptation from regularization, achieving a principled balance between plasticity and stability. Experiments on UCIT show that Octopus establishes state-of-the-art performance, surpassing prior SOTA by 2.14% and 6.82% in terms of Avg and Last.
Yuehao Liu, Shanyan Guan, Weijia Zhang +4
MoE Key Lab of Artificial Intelligence, AI Institute, Shanghai Jiao Tong University · vivo Mobile Communication Co., Ltd.
Large language models (LLMs) acquire new skills through fine-tuning, but it can destroy capabilities they already have: catastrophic forgetting remains a central obstacle to continual learning in LLMs. Recent works connect forgetting to how far, and along which directions, fine-tuning moves the weights. On-policy methods such as reinforcement learning and on-policy distillation avoid updating the principal singular directions of weight matrices and thus forget less. In contrast, SFT concentrates updates along these directions and is susceptible to catastrophic forgetting. In this work, we introduce Subspace Tuning (SST), which restricts each weight update to the bottom singular subspace, eliminating changes along the principal directions. SST is optimizer-agnostic and composes well with fine-tuning recipes including SFT and self-distillation. SST combines tight subspace protection, dense gradient estimation, and a simple refresh mechanism, enabling stronger learning than prior orthogonal fine-tuning methods. With these mechanisms, protecting as much as 99% of the weight subspace substantially improves retention while preserving strong target-task performance. This behavior strengthens with model and data size and nearly eliminates forgetting in the large-model regime. SST also keeps the model close to its base distribution, inducing 2--4× less KL drift than the baseline recipes. Overall, SST advances the learning--forgetting Pareto frontier, making it a practical default for fine-tuning pre-trained language models.