Learning Style, Forgetting Semantics: A Case Study of SFT and RFT on Classification Tasks
Haodong Liang, Yanhao Jin, Krishnakumar Balasubramanian, Lifeng Lai
ABSTRACT
Why does supervised fine-tuning (SFT) lead to more forgetting than reinforcement fine-tuning (RFT), even when all teacher demonstrations are semantically correct? We study this question on classification tasks where tokens within each semantic class express the same semantic answer in different styles. The tasks share an underlying semantic rule but differ in their prompt distributions and teachers' stylistic preferences. Using a tractable linear-softmax policy, we derive an exact decomposition of the updates into semantic and style components. We show that, at a common policy and prompt, SFT and RFT have parallel semantic updates but differ in their style dynamics. Starting from a policy with no within-class style preference, RFT with exact policy gradients preserves this symmetry, whereas SFT with a nonuniform teacher develops off-axis style drift along a nonzero task mean under population updates. We use this drift to establish a separation under explicit conditions: for population updates from a common perfectly fitted checkpoint, SFT forgetting admits a strictly positive lower bound over a finite training interval, while RFT retains zero semantic error. Simulations over task sequences support these theoretical predictions.
1 Introduction
Fine-tuning plays a central role in adapting pretrained foundation models to downstream tasks and enhancing their task-specific capabilities (Howard & Ruder, 2018; Devlin et al., 2019; Raffel et al., 2020). For example, instruction tuning on diverse demonstrations improves language models' ability to follow instructions and generalize to unseen tasks (Ouyang et al., 2022; Chung et al., 2024); reward-based fine-tuning improves mathematical and coding performance by optimizing model-generated responses against verifiable outcomes (Shao et al., 2024; Guo et al., 2025). However, as models learn new tasks, they may lose previously acquired capabilities, a phenomenon known as forgetting (Wang et al., 2024; Luo et al., 2025; Chen et al., 2026). Preserving existing capabilities while adapting to new tasks is therefore an important consideration, highlighting the need to understand when and why fine-tuning can degrade them.
Two widely used fine-tuning methods are supervised fine-tuning (SFT), which fits teacher demonstrations, and reinforcement fine-tuning (RFT), which updates the model using rewards for its own sampled responses. Empirical studies find that RFT often preserves existing capabilities better than SFT (Chen et al., 2026; Lai et al., 2026). This gap can arise even with correct supervision:
Chu et al. (2025) observe that SFT on correct expert demonstrations degrades existing performance under input distribution shifts that preserve the task rules, whereas RFT from the same checkpoint improves it. Existing theories offer distributional explanations for such differences. Shenfeld et al. (2026b) identify an implicit bias of online RL toward the solution closest to the initial policy in KL divergence among those that solve the new task. Balasubramanian & Kasiviswanathan (2026) quantify how forward- and reverse-KL objectives affect the preservation of the old-task component in a two-component Gaussian mixture. These accounts, however, leave a specific mechanistic question unanswered: how does fitting a distribution of correct responses induce errors on previously mastered tasks?
The ParityMNIST experiments of Shenfeld et al. (2026b) make this issue concrete: the two SFT baselines, trained on different distributions over equally correct labels, exhibit different retention trade-offs, but both preserve prior-task performance less effectively than RFT. Related language-model studies show that SFT can teach response formats (Zhou et al., 2023), but that imitation can accompany declines in factual accuracy (Gudibande et al., 2024). To understand this phenomenon, we isolate the role of these preferences in a classification case study, separating an answer's semantic content from its particular expression, which we call its style. For example, “4,” “four,” and “The answer is 4” are all correct responses to 2+2, but a teacher may prefer one expression over the others. In our setting, SFT fits this preference, whereas RFT rewards semantic correctness regardless of style. This distinction motivates our central question:
Can fitting the teacher’s style preference alone cause semantic forgetting, even when every demonstration is correct?
We study this question in a tractable classification model with a linear-softmax policy, where tasks share the same semantic rule but differ in their input distributions and teachers' stylistic preferences. For this policy class, we derive an exact decomposition of the updates into semantic and style components, allowing us to trace how style fitting induces errors on a previously mastered task. Under explicit conditions and population updates, we prove that SFT causes strictly positive semantic forgetting even when every demonstration is correct, whereas RFT preserves zero error.
Our main contributions are:
• An exact decomposition of the update. We split the policy parameters into a semantic channel and a style channel and characterize the update direction in each channel under SFT and RFT. The semantic updates are parallel, whereas the style updates differ: from a policy with no style preference, RFT keeps the style channel exactly zero throughout training, while SFT drifts along the task mean (Theorems 1 and 2).
• A provable population retention gap between SFT and RFT. Starting from a checkpoint that perfectly fits the previous task and has no style preference, we prove a positive lower bound on SFT forgetting under population updates when the next task has a nonzero prompt mean and the teacher's style preference is stronger in one semantic class than in the other, whereas RFT retains perfect semantic accuracy (Theorem 3).
• A finite-sample bound on off-axis energy. On top of the population-level analysis, we account for the additional effects of finite-sample fluctuations on the off-axis parameter energy of SFT and RFT. Our bounds cover both semantic and style components and show that RFT admits a smaller upper bound on the expected off-axis energy than SFT (Theorem 4), and the resulting bounds are consistent with our population-level analysis in the large-sample limit.
Together, these results suggest that fitting a teacher’s style preference is by itself sufficient to cause semantic forgetting under SFT, even when the teacher is always correct, whereas RFT avoids it because learning from its own on-policy samples induces no style drift. In Section 4, we provide empirical evidence for this mechanism by simulating the model over multi-task sequences under population and finite-sample updates; the results illustrate the mechanisms in Theorems 2 and 3 and the finite-sample effects studied in Theorem 4. We also report ablation studies in Appendix E to examine the model's behavior when some of the theoretical conditions are not satisfied.
Additional related work: We provide a detailed discussion of more related work in Appendix A.
2 Preliminaries
2.1 Problem setup
We take a case study on a family of tasks that share a binary-valued semantic rule but differ in their prompt distributions and in teachers' preferences among semantically equivalent outputs.
Semantic classes. Let x∈Rp denote a prompt representation and A a finite output vocabulary. A map σ:A→{0,1} defines two semantic classes, Ab=σ−1(b), with ∣A0∣=∣A1∣=M≥2. Tokens within a class express the same semantic answer in different styles. A unit direction u∈Rp, shared by all tasks, determines the correct class and reward:
b⋆(x)=1{⟨u,x⟩>0},R(a,x)=1{σ(a)=b⋆(x)}.(1)
Thus each prompt rewards exactly one class, regardless of expression style. Figure 1 illustrates this relationship. For RFT, we assume access to an accurate semantic reward signal, which may be provided by human correctness judgments or an automatic verifier.
Notations. Throughout our analysis, we refer to components parallel to the shared semantic direction u as on-axis and those orthogonal to it as off-axis. We write v⊥:=v−⟨v,u⟩u for vectors and apply this projection rowwise to matrices, i.e., V⊥:=V(Ip−uu⊤).
Tasks. Each task t specifies a prompt distribution x∼N(μt,Ip), and an SFT teacher. The teacher always selects a token from the correct semantic class, but may favor particular styles of expressing the correct answer. For each task t and semantic class b∈{0,1}, the teacher has a fixed within-class preference distribution ρt,b, which may differ across tasks. The teacher distribution is
Thus the teacher is always semantically correct. Throughout the analysis, we assume ⟨μt,u⟩=0 for every task t, which allows task-specific prompt shifts while keeping the semantic coordinate ⟨u,x⟩∼N(0,1), therefore isolating the role of style drift in semantic forgetting.
Policy. We use a linear-softmax policy, a standard parameterization in policy-gradient reinforcement learning (Sutton et al., 1999; Kakade, 2001; Agarwal et al., 2021). This linear-softmax form is also used for classification heads in supervised fine-tuning of pretrained language models (Radford et al., 2018; Devlin et al., 2019); our analysis holds the prompt representations fixed. The policy is parameterized by W∈R2M×p, with rows wa:
Figure 1: Semantic classes and expression styles. (a) The same token space is partitioned into semantic classes A0 and A1. The prompt determines which class is rewarded; all tokens within a class receive the same reward. Here, x denotes the prompt's vector representation. (b) Teachers favor different expression styles across tasks.
The policy outputs the highest-scoring token, with semantic class b^W(x)=σ(argmaxa⟨wa,x⟩).
Under this setup, SFT learns to match the teacher's distribution over individual tokens, whereas RFT optimizes a reward that depends only on the semantic class. We next specify the corresponding learning rules.
2.2 Learning rules
On task t, SFT aims to match the teacher's token distribution by minimizing cross-entropy, whereas RFT aims to maximize the expected semantic reward. For a prompt x, SFT and RFT minimize the following losses, respectively:
Both methods process one prompt at a time with step size η, starting from W=0. SFT draws a demonstration a⋆∼qt(⋅∣x) and takes a stochastic gradient step on (4); RFT takes a stochastic gradient step on (5) using its exact policy gradient. 1 For every a∈A,
where RˉW(x)=∑a′∈AπW(a′∣x)R(a′,x) is the expected reward. A derivation of these update rules is given in Lemma B.1. For task t, we write the population versions of the updates in (6) in terms of the parameter matrix W:
We train the policy sequentially on tasks t=1,…,T and denote its parameters after task t by Wt. We evaluate both its final performance across tasks and its retention of earlier tasks.
For task t, we define the semantic accuracy and error under its prompt distribution as
Following standard practice in continual learning (Chaudhry et al., 2018; 2019; Lin et al., 2023), we evaluate the final checkpoint WT using the average generalization error across all tasks and the average forgetting over earlier tasks:
For each earlier task, forgetting compares its final accuracy with its best accuracy over all preceding task checkpoints. Negative values of F(T) indicate positive backward transfer.
3 Main Results
In this section, we compare SFT and RFT by decomposing the policy parameters into semantic and style channels (Section 3.1). We first show that, at the same policy and prompt, the two methods update the semantic channel in the same direction (Theorem 1). Despite this alignment, their style dynamics differ: starting from a policy uniform within each class, RFT preserves zero style deviation, whereas SFT develops population style drift along a nonzero task mean when the teacher has within-class style preferences (Theorem 2). We then show that this style drift can produce a strict separation in forgetting between SFT and RFT at the population level (Theorem 3). Finally, we complement the population analysis with finite-sample bounds on the off-axis drifting energy of both methods under fresh sampling (Theorem 4).
1Here, "exact" means that we compute the expected reward by summing over all actions under the current policy and take its exact gradient, while prompt sampling remains stochastic. We discuss the sampled REINFORCE updates in Appendix D.1.
3.1 Semantic-style decomposition
We decompose the policy parameters into a semantic channel α=(α(0),α(1)), which represents the mean weight associated with each semantic class, and a style channel β=(βa)a∈A, which captures the policy's preferences among semantically equivalent tokens within each class. Specifically, for b∈{0,1},
Thus, a within-class style preference can change the semantic prediction when ξβ(x) reverses the sign of ⟨Δα,x⟩. If Δα,β are on-axis, i.e., Δα=γu and βa=cau for every token a, the policy's decision boundary coincides with the true semantic boundary whenever γ>2maxa∣ca∣ (Lemma B.2). In particular, for a class-uniform policy (β=0), this decision boundary is determined solely by Δα. We next compare how SFT and RFT update these two channels, beginning with the semantic component.
3.2 The semantic channel: a shared update direction
Define the cumulative probability assigned to semantic class b by
Pb(W,x):=a∈Ab∑πW(a∣x).(12)
We first show that SFT and RFT update the semantic channel in the same direction.
Theorem 1 (Shared Semantic direction). Under the setup of Section 2.1, the following hold.
(i) (per-sample identity) For any W and prompt x, the semantic channel moves as
In particular, at a fixed policy and prompt, the SFT semantic update in (13) does not depend on which style token the teacher sampled, while the RFT update is rescaled by the probability assigned to the correct class. Moreover, both coefficients in (14) are strictly positive, so both population updates increase the semantic margin along u. Despite this shared semantic update direction, the two methods differ in how they update the style channel, as we show next.
3.3 The style channel: RFT freezes, SFT drifts
We next examine whether SFT and RFT preserve uniformity within each semantic class. The following theorem shows that RFT preserves zero style deviation, whereas SFT can develop population style drift when the teacher has within-class preferences.
Theorem 2 (Style dynamics). Under the setup of Section 2.1, the following hold.
(i) (RFT: style invariance) The RFT updates (6) preserve β≡0.
(ii) (SFT: style drift) For any W and prompt x, the SFT update (6) gives
Theorem 2 gives us intuition for why SFT can be more prone to forgetting than RFT: starting from a class-uniform policy ( β=0), SFT can develop off-axis population drift along the task mean by fitting the teacher's style preferences, while RFT preserves within-class symmetry. A special case is when either teachers have no within-class style preferences (i.e., ρt,b(a)=1/M) or task means are zero (i.e., μt=0), in which case both methods avoid off-axis population style drift. When drift does arise, it can shift the semantic decision boundary through ξβ in (11). In Section 3.4, we show that this mechanism causes forgetting under explicit conditions.
3.4 From Style Drift to Semantic Error
We now compare how SFT and RFT retain a previously learned task when trained on the next one. Both methods start from the same checkpoint, which perfectly classifies the previous task and whose policy is uniform within each semantic class. The following theorem establishes a finite-time separation in semantic error on both the previous and current tasks.
Theorem 3 (Population error separation from a perfectly fitted checkpoint). Under the setup of Section 2.1, suppose that:
(a) (Common start) SFT and RFT start from the same checkpoint W1, which fits the previous task perfectly and has no style preference:
L1(W1)=0,β(W1)=0.
(b) (Next task) The next task has a nonzero mean μ2=0, and its teacher's style preference is stronger in one semantic class than in the other, after relabeling the two classes if necessary: Δρ:=maxa∈A1ρ2,1(a)−maxa∈A0ρ2,0(a)>0.
(c) (Training) Each method runs k2≥1 population updates (7) on task 2 with step size η2>0; write τ2:=k2η2 for the effective training time and W2 for the resulting checkpoint.
Then:
(i) (RFT preserves perfect accuracy on both tasks) For every η2>0 and k2≥1,
L1(W2)=L2(W2)=0.
(ii) (SFT incurs semantic error on both tasks) There is a threshold τ0>0, given in (C.34) that depends only on ∥μ2∥, Δρ, and M, such that for every 0<τ2≤τ0 and r∈{1,2},
where ϕ and Φ denote the standard Gaussian density and distribution function, respectively.
The proof of Theorem 3 is in Appendix C.3.
Theorem 3(ii) implies that SFT introduces errors on two tasks that were initially classified perfectly. The lower bound measures the probability of a region where style drift overturns the correct semantic prediction. This error region grows with stronger teacher's preference Δρ, smaller initial semantic margin ∥Δα(W1)∥, or longer training time τ2. Old-task prompts are more likely to fall into this region when μ1 has a larger projection onto the direction of the new task mean μ2.
Together with (8), these error bounds imply strictly positive forgetting and generalization error for SFT when 0<τ2≤τ0, whereas both metrics remain zero for RFT. This separation is, however, a finite-time phenomenon: under continued population SFT updates with a sufficiently small step size, both task errors converge to zero as τ2→∞, as shown in Appendices D.2 and D.3.
3.5 Finite-sample off-axis energy
The separation result in Theorem 3 is established under population updates. In finite-sample training, prompt sampling can introduce additional deviations from the shared semantic direction u. In the next theorem, we provide a bound on the expected off-axis energy E∥W⊥∥F2 of both SFT and RFT.
Theorem 4 (Off-axis parameter energy of SFT and RFT). Under the setup of Section 2.1, let t(s) denote the task index at step s. Run the SFT and RFT updates (6) from W(0)=0 with constant step size η>0. At each step s, independently draw xs∼N(μt(s),Ip), with a fresh teacher demonstration for SFT. For every N≥0, both methods satisfy
Theorem 4 shows that, even under finite sampling, RFT admits a smaller upper bound on the expected off-axis energy than SFT. The following remark discusses how these bounds reflect sampling effects and relate to the population dynamics.
Remark 1 (Sampling effects and population drift). We discuss the following cases as η→0 with effective training time τ=Nη fixed. This keeps the cumulative step size unchanged while increasing the number of independent samples.
(i) Zero task means. If μt=0 for all tasks, the RFT and SFT bounds reduce to τη(p−1)/(8M) and 2τη(p−1), respectively. Both bounds vanish in the limit η→0. This is consistent with Lemma B.5, which shows that the expected parameters remain on the semantic axis for both methods when all task means are zero.
(ii) Bounded nonzero task means. The RFT bound (18) remains O(τη) and vanishes, consistent with its on-axis population dynamics (Theorems 1(ii) and 2(i)). The SFT bound (19), however, does not vanish, since the term η∑s=0N−1∥μt(s)∥ remains nonzero. This is consistent with the population style drift dynamics identified in Theorem 2(ii).
Together, these results show how fitting style can interfere with shared semantic knowledge even when all demonstrations are semantically correct. At a common policy and prompt, SFT and RFT share a semantic update direction, but RFT with exact policy gradients preserves an initially zero style channel, whereas SFT can develop off-axis population style drift that causes finite-time forgetting. In addition, when sampling is finite, it introduces additional off-axis fluctuations, for which RFT admits a smaller energy upper bound than SFT. We examine these mechanisms empirically in section 4.
4 Experiments
The experiments simulate the model of Section 2.1 and examine three aspects of the learning dynamics: (1) RFT maintains zero off-axis energy under population updates (Theorem 1 and 2(i)); (2) nonzero task means and nonuniform teacher preferences induce SFT population off-axis style drift and can lead to semantic forgetting (Theorems 2(ii) and 3); (3) finite-sample training produces additional off-axis parameter fluctuations, even when population off-axis drift is absent; we measure the final off-axis energy, whose expectation under Gaussian prompts is bounded in Theorem 4.
Teacher parameterization. To construct the teachers for the simulations, we assign each token a fixed style embedding ha∈Rd describing how its semantic answer is expressed. A task- and class-dependent teacher preference vector vt,b∈Rd determines the within-class distribution:
Expressions with larger compatibility scores ⟨vt,b,ha⟩ receive higher probability; vt,b=0 gives a uniform teacher within the class. Figure 1 illustrates such teacher preferences schematically.
Setup. We train SFT and RFT from W=0 on T=8 sequential tasks, with prompt dimension p=24, two semantic classes of M=6 tokens each, and style dimension d=3. We draw u uniformly on the unit sphere, M style embeddings h1,…,hM∼N(0,I3/3) assigned to the tokens of each class, and teacher preference vectors vt,b∼N(0,36I3). 2 Prompts are Gaussian as in Section 2.1, with task means μt∼N(0,Ip−uu⊤), so that μt⊥u. These task parameters are sampled once and held fixed across runs.
Training and evaluation. For finite-sample runs, we sample n=25 prompts per task and process them in a single pass in random order, averaging over 50 seeds that control the training prompts, demonstrations, and their order. For population runs, we approximate (7) by averaging updates over 10,000 fresh prompts at each step, take 25 steps per task to match the number of finite-sample updates, and average over 10 seeds that control the Monte Carlo prompts. In both settings, we sweep η∈[10−4,0.5] on a log-spaced grid and evaluate each task on a fixed set of 1,000 held-out prompts from its own distribution. We report generalization error G(T), forgetting F(T), and the final off-axis parameter energy ∥WT⊥∥F2, all averaged across seeds.
Results. The main results are shown in Figure 2. In panel (a), population RFT maintains zero generalization error and forgetting throughout the learning-rate sweep, whereas population SFT exhibits strictly positive values at every tested learning rate. The persistence of this separation under population updates is consistent with off-axis style drift driven by nonzero task means and nonuniform teacher preferences (Theorem 3). In the finite-sample runs, prompt sampling introduces off-axis fluctuations that also raise RFT's error (Theorem 4), yet RFT still achieves lower generalization error and forgetting than SFT at every matched learning rate. Panel (b) gives a complementary view: population SFT develops off-axis parameter energy, while population RFT remains close to zero (Theorem 1 and Theorem 2), with small residual energy from Monte Carlo prompt sampling. Finite-sample updates produce additional off-axis energy, which grows with the learning rate and is one to two orders of magnitude larger for SFT than for RFT. The observed energy gap qualitatively agrees with the smaller upper bound available for RFT in Theorem 4.
2The variance 1/d normalizes the style embeddings to unit scale, E∥hj∥2=1, so that the within-class logits ⟨vt,b,ha⟩ in (20) have standard deviation controlled by vt,b alone, here about 6. This makes the teachers strongly nonuniform while leaving their preferences varied across tasks and classes.
(a) Pareto plane
(b) Final off-axis parameter energy
Figure 2: SFT and RFT under population and finite-sample updates. (a) Generalization-forgetting plane, for finite-sample (dashed, faint) and population (solid) updates; selected learning rates are annotated. (b) Final off-axis parameter energy ∥WT⊥∥F2, averaged across seeds, versus learning rate, with a logarithmic energy axis.
Control and ablation experiments. We provide additional experiments in Appendix E to isolate the roles of task means and teacher style preferences and to relax the assumptions behind RFT's style invariance. With either zero task means (Figure E.1) or uniform teachers (Figure E.2), the population SFT–RFT gap vanishes, while finite-sample SFT still accumulates more off-axis energy and higher generalization error than RFT; replacing Gaussian prompts by Laplace prompts leaves the results nearly unchanged (Figure E.3). We also compare the methods under corrupted rewards and under REINFORCE with finitely many sampled actions, and find that population RFT retains low forgetting in both cases; see Figure E.4 for details.
5 Conclusion
This work provides intuition on why supervised fine-tuning forgets more than reinforcement fine-tuning, even when every demonstration is semantically correct, through a case study on classification tasks with a linear-softmax policy. We show that semantically correct supervision can still induce forgetting when training also fits task-specific style preferences. In our model, fitting these preferences can shift the semantic decision boundary and disrupt previously learned predictions, even in the absence of sampling noise. RFT avoids this source of interference by preserving within-class symmetry under exact policy gradients from a symmetric initialization. The finite-sample bounds and simulations further characterize the off-axis deviations introduced by prompt sampling.
Limitations. Our theoretical analysis focuses on a tractable setting with a single-token linear-softmax model and a shared semantic rule across tasks. Future work could extend the analysis to more general settings such as nonlinear policies, multi-token outputs, and tasks with evolving semantic rules.
References
Alekh Agarwal, Sham M. Kakade, Jason D. Lee, and Gaurav Mahajan. On the theory of policy gradient methods: Optimality, approximation, and distribution shift. Journal of Machine Learning Research, 22(98):1–76, 2021. URL https://jmlr.org/papers/v22/19-736.html.
Krishnakumar Balasubramanian and Shiva Prasad Kasiviswanathan. A quantitative characterization of forgetting in post-training. arXiv preprint arXiv:2603.12163, 2026. doi: 10.48550/arXiv.2603.12163. URL https://arxiv.org/abs/2603.12163.
Arslan Chaudhry, Marc'Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with A-GEM. In International Conference on Learning Representations (ICLR), 2019. URL https://openreview.net/forum?id=Hkf2_sC5FX.
Howard Chen, Noam Razin, Karthik Narasimhan, and Danqi Chen. Retaining by doing: The role of on-policy data in mitigating forgetting. In International Conference on Machine Learning (ICML), 2026. URL https://arxiv.org/abs/2510.18874.
Tianzhe Chu, Yuexiang Zhai, Jihan Yang, Shengbang Tong, Saining Xie, Dale Schuurmans, Quoc V. Le, Sergey Levine, and Yi Ma. SFT memorizes, RL generalizes: A comparative study of foundation model post-training. In International Conference on Machine Learning (ICML), volume 267 of Proceedings of Machine Learning Research, pp. 10818–10838, 2025. URL https://proceedings.mlr.press/v267/chu25c.html.
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1–53, 2024. URL https://www.jmlr.org/papers/v25/23-0870.html.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186. Association for Computational Linguistics, 2019. doi: 10.18653/v1/N19-1423. URL https://aclanthology.org/N19-1423/.
Meng Ding, Kaiyi Ji, Di Wang, and Jinhui Xu. Understanding forgetting in continual learning with linear regression. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 10978–11001. PMLR, 2024. URL https://proceedings.mlr.press/v235/ding24c.html.
Itay Evron, Edward Moroshko, Gon Buzaglo, Maroun Khriesh, Badea Marjieh, Nathan Srebro, and Daniel Soudry. Continual learning in linear classification on separable data. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 9440–9484. PMLR, 2023. URL https://proceedings.mlr.press/v202/evron23a.html.
Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al. DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature, 645:633–638, 2025. doi: 10.1038/s41586-025-09422-z. URL https://www.nature.com/articles/s41586-025-09422-z.
Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 328–339. Association for Computational Linguistics, 2018. doi:10.18653/v1/P18-1031. URL https://aclanthology.org/P18-1031/.
James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526, 2017. doi:10.1073/pnas.1611835114. URL https://arxiv.org/abs/1612.00796.
Song Lai, Haohan Zhao, Rong Feng, Changyi Ma, Wenzhuo Liu, Hongbo Zhao, Xi Lin, Dong Yi, Qingfu Zhang, Hongbin Liu, Gaofeng Meng, and Fei Zhu. Reinforcement fine-tuning naturally mitigates forgetting in continual post-training. In International Conference on Machine Learning (ICML), 2026. URL https://arxiv.org/abs/2507.05386.
Sen Lin, Peizhong Ju, Yingbin Liang, and Ness Shroff. Theory on forgetting and generalization of continual learning. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 21078–21100. PMLR, 2023. URL https://proceedings.mlr.press/v202/lin23f.html.
Yun Luo, Zhen Yang, Fandong Meng, Yafu Li, Jie Zhou, and Yue Zhang. An empirical study of catastrophic forgetting in large language models during continual fine-tuning. IEEE Transactions on Audio, Speech and Language Processing, 33:3776–3786, 2025. doi: 10.1109/TASLPRO.2025.3606231. URL https://arxiv.org/abs/2308.08747.
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems (NeurIPS), 2022. URL https://arxiv.org/abs/2203.02155.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67, 2020. URL https://www.jmlr.org/papers/v21/20-074.html.
Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. DeepSeekMath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024. URL https://arxiv.org/abs/2402.03300.
Idan Shenfeld, Mehul Damani, Jonas Hübotter, and Pulkit Agrawal. Self-distillation enables continual learning. In International Conference on Machine Learning (ICML), 2026a. URL https://arxiv.org/abs/2601.19897.
Liyuan Wang, Xingxing Zhang, Hang Su, and Jun Zhu. A comprehensive survey of continual learning: Theory, method and application. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(8):5362–5383, 2024. doi: 10.1109/TPAMI.2024.3367329. URL https://arxiv.org/abs/2302.00487.
Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3–4):229–256, 1992. URL https://doi.org/10.1007/BF00992696.
Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In International Conference on Machine Learning (ICML), volume 70 of Proceedings of Machine Learning Research, pp. 3987–3995, 2017. URL https://proceedings.mlr.press/v70/zenke17a.html.
Zhihao Zhang, Qiaole Dong, Qi Zhang, Enyu Zhou, Jun Zhao, Zhiheng Xi, Senjie Jin, Xiaoran Fan, Yuhao Zhou, Mingqi Wu, Yanwei Fu, Tao Ji, Tao Gui, Xuanjing Huang, and Kai Chen. Why reinforcement fine-tuning preserves prior knowledge better: A data perspective. In International Conference on Learning Representations (ICLR), 2026. URL https://openreview.net/pdf/3b5fda354275f890c9404d61311720aac059b79d.pdf.
Empirical findings on SFT and RFT. Recent studies compare how supervised and reinforcement fine-tuning affect generalization and forgetting in foundation models. Chu et al. (2025) find better generalization under RL to changes in reasoning rules and visual conditions, while Lai et al. (2026) report less forgetting of earlier tasks and general capabilities under RFT across sequential multimodal tasks. Studies of on-policy and model-generated supervision further highlight the role of the supervision distribution. Chen et al. (2026) show that approximately on-policy supervision reduces forgetting under SFT. Zhang et al. (2026) link the retention benefits of SFT on filtered model-generated trajectories to the magnitude and direction of example-induced updates. In self-distillation fine-tuning, Shenfeld et al. (2026a) use a demonstration-conditioned teacher to supervise student-generated trajectories without an explicit reward function, reducing forgetting during skill learning.
Distributional explanations of the SFT–RFT gap. Shenfeld et al. (2026b) relate forgetting to the KL divergence from the initial policy and contrast SFT's fitting of an external supervision distribution with online RL's information-projection bias toward small policy changes. Building on the output-mixture simulations of Chen et al. (2026), Balasubramanian & Kasiviswanathan (2026) compare divergence-based post-training objectives by quantifying loss of old-component mass and drift within an old component. Their forward-KL objective fits new-mode data, whereas their reverse-KL objective fits a mixture that includes old behavior; the forgetting comparison therefore depends on both the objectives and their target distributions.
Forgetting in continual-learning models. Complementary theoretical work examines how task structure, optimization, and architecture affect forgetting. In overparameterized linear regression, Lin et al. (2023) derive expressions for expected forgetting and generalization error that reveal the effects of model size, task similarity, and task order. For sequential stochastic gradient descent in linear regression with a shared ground-truth parameter, Ding et al. (2024) quantify how task covariances, ordering, and step size affect forgetting. In linear classification with jointly separable tasks, Evron et al. (2023) connect weakly regularized training to sequential max-margin learning and show that forgetting can arise despite joint separability. In an overparameterized mixture-of-experts regression setting, Li et al. (2025) relate expert specialization and routing to forgetting and generalization.
Explicit methods for mitigating forgetting. Replay methods maintain access to earlier experience: Rolnick et al. (2019) combine on-policy learning with off-policy updates and behavioral cloning from a replay buffer to reduce forgetting in continual reinforcement learning. Parameter regularization penalizes changes to weights estimated to be important for past tasks. Elastic weight consolidation uses the diagonal Fisher information to weight these penalties (Kirkpatrick et al., 2017), while synaptic intelligence estimates parameter importance from contributions to loss reduction along the learning trajectory (Zenke et al., 2017). For parameter isolation, Mallya & Lazebnik (2018) iteratively prune a network, freeze weights allocated to earlier tasks, and train subsequent tasks using the remaining capacity. They provide complementary ways to control forgetting beyond the choice of SFT or RFT.
B Supporting lemmas
Lemma B.1 (SFT and RFT gradient updates). Fix a prompt x. A stochastic-gradient step on (4) using a⋆∼qt(⋅∣x) and an exact gradient step on (5), both with step size η, yield the SFT and RFT updates in (6), respectively.
Proof. For SFT, given a sampled demonstration a⋆∼qt(⋅∣x), define
ℓSFT(W;x,a⋆)=−logπW(a⋆∣x).
Its expectation over the teacher is exactly (4); hence its gradient is an unbiased stochastic gradient of LSFT. To compute its gradient, first expand the log-softmax as
Lemma B.2 (Correct classification with on-axis channels). Suppose the channels in (9) satisfy Δα=γu with γ>0 and βa=cau for every a∈A. Set B:=maxa∈A∣ca∣. If γ>2B, then the decision rule (11) satisfies
b^W(x)=b⋆(x)foreveryx∈Rp.
In particular, its decision boundary is {x:⟨u,x⟩=0}, and Lt(W)=0 for every task t.
Proof. Write z:=⟨u,x⟩. Since ⟨βa,x⟩=caz, (11) gives
Dw(x)=γz+ξβ(x),∣ξβ(x)∣≤2a∈Amax∣caz∣=2B∣z∣.
For z=0, it follows that
zDw(x)≥γz2−∣z∣∣ξβ(x)∣≥(γ−2B)z2>0.
Thus DW(x) has the same sign as z. When z=0, all style scores and DW(x) vanish, so both (11) and (1) assign class 0. Hence the two rules agree everywhere and have the stated boundary.
Lemma B.3 (Gaussian projection decomposition). Under the setup of Section 2.1, fix a task t and let x∼N(μt,Ip). Define
Lemma B.4 (Vectors invariant under Gu). Let u∈Rp be nonzero and define
Gu={Q∈O(p):Qu=u}.(B.4)
Then Qv=v for every Q∈Gu if and only if v∈span(u).
Proof. First suppose v=cu. For every Q∈Gu,
Qv=cQu=cu=v,
which proves one direction.
Conversely, suppose Qv=v for every Q∈Gu. Decompose v as
v=cu+v⊥,c=∥u∥2⟨u,v⟩,v⊥⊥u.
Suppose, toward a contradiction, that v⊥=0. Define
e=∥v⊥∥v⊥,Q=Ip−2ee⊤.
Because ∥e∥=1,
Q⊤Q=(Ip−2ee⊤)2=Ip−4ee⊤+4e(e⊤e)e⊤=Ip.
Hence Q∈O(p). Since e⊥u, we also have
Qu=u−2ee⊤u=u,
and therefore Q∈Gu. On the other hand,
Qv⊥=v⊥−2ee⊤v⊥=v⊥−2v⊥=−v⊥.
It follows that
Qv=cQu+Qv⊥=cu−v⊥=cu+v⊥=v,
contradicting the assumption that every Q∈Gu fixes v. Thus v⊥=0 and v∈span(u).
Lemma B.5 (Rotation equivariance of zero-mean trajectories). Assume μt=0 for every task and W(0)=0. Fix a task sequence and suppose each step uses a fresh prompt independent of the training history and, for SFT, a fresh teacher draw conditional on that prompt. Let Gu be as defined in (B.4); these are the orthogonal transformations that leave u fixed and act only on its orthogonal complement u⊥. Let Gu act rowwise on the parameter matrix, (Q⋅W)a=Qwa. Under either the SFT or RFT update, for every Q∈Gu and every step τ,
Q⋅W(τ)=dW(τ).(B.5)
Consequently, for every token a,
E[wa(τ)],E[Δα(τ)],E[βa(τ)]∈span(u).(B.6)
Proof. Let ω denote the random input used in one update. For SFT, write ω=(x,a⋆) and define Q⋆ω=(Qx,a⋆); for RFT, write ω=x and define Q⋆ω=Qx. Since x∼N(0,Ip), the linear transformation rule for Gaussian vectors and QQ⊤=Ip give
Qx∼N(Q0,QIpQ⊤)=N(0,Ip).
Thus Qx=dx, so the prompt law is invariant under Q. Moreover, since Q is orthogonal and Qu=u, we also have Q⊤u=u. Therefore,
The SFT teacher is invariant as well, since (2) depends on the prompt only through b⋆(x); the RFT reward is invariant for the same reason. Let Φ(W,ω) denote the updated parameter matrix W+obtained by applying the SFT or RFT update in (6), and let Φa denote its ath row. For SFT, using the invariance of the policy shown above, we have
Thus the following identity holds rowwise under either update rule:
Φ(Q⋅W,Q⋆ω)=Q⋅Φ(W,ω).(B.7)
We prove (B.5) by induction. It holds at τ=0 because W(0)=0, and hence Q⋅W(0)=W(0). Now suppose Q⋅W(τ)=dW(τ). Let ωτ be the fresh sample used at step τ. It is independent of W(τ), and the invariance of the sample law proved above gives Q⋆ωτ=dωτ. Therefore, the induction hypothesis and independence imply the joint distributional identity
(Q⋅W(τ),Q⋆ωτ)=d(W(τ),ωτ).(B.8)
By the definition of the one-step update map, W(τ+1)=Φ(W(τ),ωτ). Together with (B.7) and (B.8), we have
It follows that QE[wa(τ)]=E[wa(τ)] for every Q∈Gu. Lemma B.4 therefore implies that E[wa(τ)]∈span(u). The remaining claims follow because Δα and βa are fixed linear combinations of the rows.
Lemma B.6 (Lipschitz continuity of softmax). The softmax map is 1-Lipschitz in the Euclidean norm: for all h,h′∈R2M,
∥softmax(h)−softmax(h′)∥2≤∥h−h′∥2.
Proof. For π=softmax(h), differentiating gives the Jacobian
The first inequality follows because the expression is a variance under π, and the last uses 0≤πa≤1. Thus J(h) is symmetric positive semidefinite with eigenvalues at most 1, so ∥J(h)∥op≤1 for every h. Integrating the derivative along the line segment from h′ to h therefore gives
If b⋆(x)=1, then 2b⋆(x)−1=1, Pb⋆(x)(W,x)=P1(W,x), and P0(W,x)=1−Pb⋆(x)(W,x); if b⋆(x)=0, then 2b⋆(x)−1=−1, Pb⋆(x)(W,x)=P0(W,x), and P1(W,x)=1−Pb⋆(x)(W,x). Therefore (C.3) becomes the SFT line of (13).
For RFT, the reward is R(a,x)=1{σ(a)=b⋆(x)}, so (6) gives
Again splitting on b⋆(x) and using P0(W,x)+P1(W,x)=1, the right side of (C.7) is
M2η(2b⋆(x)−1)Pb⋆(x)(W,x)(1−Pb⋆(x)(W,x))x,(C.8)
which is the RFT line of (13).
Part (ii): population semantic update. Now assume additionally that β=0 and Δα=cu for some c∈R. Then (10) implies that the class probabilities Pb(W,x) depend on W only through Δα. Fix task t and use the notation of Lemma B.3:
z=⟨u,x⟩,ξ⊥=(Ip−uu⊤)(x−μt).
Lemma B.3 gives z∼N(0,1), z⊥ξ⊥, and
x=zu+μt+ξ⊥.
It follows that
⟨Δα,x⟩=c⟨u,zu+μt+ξ⊥⟩=cz,
because both μt and ξ⊥ are orthogonal to u. Hence (10) implies that P1(W,x)=(1+e−cz)−1 and P0(W,x)=1−P1(W,x). Since b⋆(x)=b⋆(z):=1{z>0}, the correct-class probability has the one-dimensional representation
Pb⋆(x)(W,x)=P⋆(z):=1+e−c∣z∣1.
This function is even in z. Also 2b⋆(x)−1=sign(z) almost surely.
The last term vanishes because sign(z)(1−P⋆(z)) is a function of z alone, z is independent of ξ⊥, and E[ξ⊥]=0. The μt term also vanishes: 1−P⋆(z) is even, so sign(z)(1−P⋆(z)) is odd, and its expectation under the symmetric z∼N(0,1) is zero. Since sign(z)z=∣z∣, the remaining scalar expectation is
Again the last term vanishes by independence and E[ξ⊥]=0. The μt term vanishes as well because P⋆(z)(1−P⋆(z)) is even, so its product with sign(z) is odd. Using sign(z)z=∣z∣ and again integrating against the standard normal density gives
Hence an update preserves β=0. Induction over the prompt sequence gives βRFT(τ)=0 at every step.
Part (ii): SFT style updates. For convenience, define the within-class probability deviation
δa(W,x):=πW(a∣x)−M1Pσ(a)(W,x).(C.18)
For an arbitrary current matrix W, the SFT row update and its class average are exactly (C.1) and (C.2), respectively. Subtracting (C.2) at b=σ(a) from (C.1) gives
Now fix a task t, a token a∈Ab, and a current parameter matrix W with β=0. Since W has identical rows within each class, all rows in the same semantic class have the same logit at every prompt. Therefore the policy is uniform within each semantic class:
πW(a∣x)=M1a′∈Ab∑πW(a′∣x)=M1Pb(W,x)(a∈Ab).
Substituting this identity into the definition of δa gives
δa(W,x)=πW(a∣x)−M1Pσ(a)(W,x)=0.
Thus the policy-centering feedback in the exact style update (15) vanishes. For this fixed prompt and teacher draw, (15) becomes
βa+−βa=η[1{a=a⋆}−M11{b⋆(x)=b}]x.
Now take expectation only over the teacher demonstration, conditional on the prompt x. By the teacher model (2), if b⋆(x)=b then the teacher places no mass on token a∈Ab, and both terms inside the brackets have conditional mean zero. If b⋆(x)=b, then P(a⋆=a∣x)=ρt,b(a), so the conditional mean of the bracket is ρt,b(a)−1/M. Combining the two cases,
Substituting these two moment identities into (C.21) proves (16).
Finally, project (16) orthogonally to span(u). The term proportional to u is removed, while μt is unchanged because μt⊥u. This gives the off-axis identity in (16).
C.3 Proof of Theorem 3
Proof.
Step 1: perfect initial fit and RFT retention. Since β(W1)=0, the class-score difference is DW1(x)=⟨Δα(W1),x⟩. Since the old Gaussian law has positive density everywhere, L1(W1)=0 means that
Δα(W1)=∥Δα(W1)∥u,∥Δα(W1)∥>0.
Subtracting the common row average c:=(2M)−1∑aw1,a from every row preserves policy probabilities, predictions, and both update increments. We therefore use these centered weights throughout the proof, so that
w1,a=22σ(a)−1∥Δα(W1)∥u,a∑w1,a=0.
Write z:=⟨u,x⟩. Both tasks share the semantic rule b⋆(x)=1{z>0}. Lemma B.2, applied with B=0, therefore shows that W1 classifies both tasks perfectly:
a1(W1)=a2(W1)=1.(C.22)
Theorem 2(i) ensures β=0 throughout RFT training, both updates preserve ∑awa=0, and Theorem 1(ii) gives strictly positive on-axis RFT increments. Thus every RFT iterate W satisfies
wa=22σ(a)−1∥Δα(W)∥u,∥Δα(W)∥≥∥Δα(W1)∥>0.
Applying Lemma B.2 again with B=0 shows that every RFT iterate classifies both tasks correctly, proving part (i).
Step 2: quantifying the style drift under SFT. Let μ^2:=μ2/∥μ2∥ and y:=⟨μ^2,x⟩. By Lemma B.3, under task 2 we can write x=zu+μ2+ξ⊥, where z∼N(0,1) is independent of ξ⊥∼N(0,Ip−uu⊤). Since μ^2⊥u and ∥μ^2∥=1,
y=⟨μ^2,x⟩=∥μ2∥+⟨μ^2,ξ⊥⟩∼N(∥μ2∥,1).
Moreover, y depends only on ξ⊥, so it is independent of z.
Define V:=span{u,μ^2}. We will show that every parameter row remains in V throughout task-2 training. Define the residual ξV:=x−zu−yμ^2, which is the projection of x onto V⊥. Since μ2∈V, the residual has mean zero:
E2[ξV]=μ2−0⋅u−∥μ2∥μ^2=0.
Orthogonality of the Gaussian projections also makes ξV independent of (z,y). Initially, w1,a=22σ(a)−1∥Δα(W1)∥u∈V. If all current rows lie in V, write
Thus, for fixed current parameters, πa depends on x only through (z,y). Meanwhile, the teacher definition (2) gives
q2(a∣x)=1{σ(a)=b⋆(x)}ρ2,b⋆(x)(a),b⋆(x)=1{z>0}.
By the teacher specification in Section 2.1, the within-class distribution ρ2,b is fixed for each class and does not depend on x, so q2(a∣x) depends on the input only through the sign of z. Consequently, q2(a∣x)−πa is a function of (z,y) alone. By (7), the V⊥ component of the SFT parameter increment is
The last equality follows because ξV is independent of (z,y) and has mean zero. Each updated row therefore remains in V. By induction, (C.23) holds at every task-2 SFT iterate, so it suffices to track the two scalar coefficients ζa and ωa for each token.
Since ∥u∥=1 and u⊥μ^2, the decomposition (C.23) gives ζa=⟨wa,u⟩. Taking the inner product of the SFT population update (7) with u and using z=⟨u,x⟩ yields
Collect the coefficients in (C.23) into a matrix Θj∈R2M×2, whose row indexed by token a is (ζa(j),ωa(j)) after j task-2 steps. For r:=(z,y)⊤, each entry of Θjr is the corresponding token's logit:
(Θjr)a=ζa(j)z+ωa(j)y=⟨wa(j),x⟩.
Thus softmax( Θjr) is the model's probability vector. The SFT population update (7), expressed in these coordinates, becomes
Here Δ(Θ) denotes the population SFT update direction at Θ. It has the same shape as Θ: its first and second columns give the update directions for ζa and ωa, respectively. Explicitly, its row indexed by a has entries
where πa=[softmax(Θr)]a. At W1 (represented by Θ0), recall that α(b)=M−1∑a∈Abwa is the class-b semantic channel; see (9). Theorem 1(ii) shows that the population update of α(1)−α(0) is parallel to u. From (C.2), a single SFT step on a prompt x updates the two components of the semantic channel by
where the indicators add to 1 because exactly one class is correct, and P0+P1=1 is by definition (12), so α(0)+α(1) is unchanged by every SFT step. Writing α(b)=21[(α(0)+α(1))±(α(1)−α(0))], the sum does not move and the difference moves only along u, so each semantic channel's population update at W1 is parallel to u. Since u⊥μ^2, its projection onto μ^2 is zero. By (9), α(b) is the average of wa over a∈Ab, so its update is the average of the updates of those token parameters. Thus, for the first task-2 step from W1,
Here each Δωa(Θ0) describes the update direction of one token's ωa coefficient; summing and dividing by M gives the corresponding direction for the semantic channel. The left-hand side is zero, so
M1a∈Ab∑Δωa(Θ0)=0,b∈{0,1}.(C.26)
Individual rows can still move along μ^2 through their within-class deviations βa=wa−α(σ(a)), and Theorem 2(ii) quantifies this: since β(W1)=0, (16) with t=2 gives, for a∈Ab,
As wa=α(σ(a))+βa and the α-step has no μ^2-component, the μ^2-component of the row step is that of the β-step. Using that the initial rows are parallel to u,
Two bounds on the update map Δ defined in (C.25) control the right-hand side. First, ∣q2(a∣x)−πa∣≤1, E2∣z∣≤1, and E2∣y∣≤∥μ2∥+1 (as y∼N(∥μ2∥,1)) bound each entry of Δ, so summing squares over the 2M rows,
where Cpop:=21(∥μ2∥2+2)2M(∥μ2∥+2). For any matrix A, each entry satisfies ∣Aa,2∣≤(∑b,c∣Ab,c∣2)1/2=∥A∥F. Applying this inequality to the (a,2) entry of Θk2−Θ0−τ2Δ(Θ0) gives
Choose a∘∈argmaxa∈A1ρ2,1(a). For a′∈A0, assumption (b) gives ρ2,1(a∘)−ρ2,0(a′)≥Δρ. Since σ(a∘)=1 and σ(a′)=0, (C.32) gives a lower bound for ωa∘(W2) and an upper bound for ωa′(W2):
So on E the highest-scoring token lies in A1 and b^W2(x)=1, while z<0 means b⋆(x)=0. This pointwise conclusion holds under either task distribution, so Lr(W2)≥Pr(E) for r∈{1,2}. Under task r, Lemma B.3 gives independent coordinates z∼N(0,1) and y∼N(⟨μr,μ^2⟩,1). Integrating over z<0 with the substitution z=−t, t>0, yields
where strict positivity follows because the integrand is positive for every t > 0.
Substituting the definitions of κ and μ^2=μ2/∥μ2∥ into (C.38) proves part (ii) for both tasks. □
C.4 Proof of Theorem 4
Proof of Theorem 4.
Step 1: conditional sampling and integrability. For either method, let Fs denote its training history strictly before step s, including the previous teacher draws for SFT. For the trajectory under consideration, write Ws:=W(s) and ms:=μt(s). Set P⊥:=Ip−uu⊤ and define
All expectations used below are finite. Indeed, for SFT the coefficient vector in (6) has norm at most 2, since it is the difference of two probability vectors. For RFT, each coefficient has absolute value at most πWs(a∣xs), because (1) gives 0≤R,Rˉ≤1; hence the coefficient vector has norm at most 1. In both cases,
∥Ws∥F≤2ηj=0∑s−1∥xj∥.
The right-hand side has finite moments of every order for finite s, as the prompts are Gaussian and the task sequence is fixed.
Step 2: the exact semantic-style energy decomposition. For either update in (6), the sum of all token parameters is preserved. In SFT,
a∈A∑(wa+−wa)=η(a∑1{a=a⋆}−a∑πW(a∣x))x=0.
In RFT, the definition of RˉW following (6) gives
Step 3: the SFT update and the teacher's conditional mean. We first prove part (ii). Write πs=(πWs(a∣xs))a∈A as a column vector, and let eas∗∈R2M be the one-hot vector of the teacher token. Right-multiplying the SFT update in (6) by P⊥ gives
Rs+1=Rs+η(eas⋆−πs)ys⊤.(C.43)
Under (2), the vector qt(s)(zs)=(qt(s)(a∣xs))a∈A depends on the prompt only through the sign of zs. The fresh teacher draw therefore satisfies
E[eas⋆∣Fs,xs]=qt(s)(zs).
Using iterated conditional expectation and then (C.40), we obtain
Thus its Jacobian, with one row per token, is (diag(π)−ππ⊤)W. For x∼N(ms,Ip), integration by parts coordinatewise yields E[(xj−ms,j)πW(a∣x)]=E[∂πW(a∣x)/∂xj]; the boundary term vanishes because the softmax is bounded, and its derivatives are bounded for fixed W. Define πˉs:=E[πs∣Fs]. Conditional on Fs, this identity and right multiplication by P⊥ give, since P⊥ms=ms,
Since Hs⪰0, each column r of Rs satisfies r⊤Hsr≥0; summing over columns shows that the trace in (C.46) is nonnegative. Both qˉs and πˉs are probability vectors, so their squared norms are at most 1 and their inner product is nonnegative. Thus ∥qˉs−πˉs∥≤2, and Cauchy–Schwarz gives
⟨Rs,(qˉs−πˉs)ms⊤⟩F≤2∥Rs∥F∥ms∥.
Moreover, for every demonstrated token a and probability vector π,
We claim es≤As+Vs. The claim holds at s=0. For the induction step, use the elementary inequality
(A+V+c)2+d≤A+c+V+d,A,V,c,d≥0.
Indeed, the square of the right-hand side minus the square of the left-hand side is 2(A+c)(V+d−V)≥0, and both sides are nonnegative. Apply it with A=As, V=Vs, c=2η∥ms∥, and d=2η2(p−1). By (C.48) and the induction hypothesis,
By (C.39), this is precisely (19), proving part (ii).
Step 7: reduce RFT to its semantic channel. We now consider the RFT trajectory and prove part (i). Since W0=0, Theorem 2(i) gives β(s)=0 for every step, for each realization of the prompts. By (3) and (12), equal class sizes then give
Here we used (C.39) to write Δα(s)=csu+vs and xs=zsu+ys. Let εs:=2b⋆(xs)−1. By (1), εs=sign(zs) almost surely and εszs=∣zs∣; the event zs=0 has probability zero. Substituting (C.51) into the exact semantic update (13), and projecting onto u and u⊥, gives
where ϕ is the standard normal density. The second line follows by splitting the integral at zero, substituting z↦−z in the negative half, and using the evenness of both ϕ and f. Differentiating (C.50) gives f′(r)=−f(r)tanh(r/2), so f is nonincreasing on [0,∞). For c,z,t≥0, the inequality ∣cz+t∣≥∣cz−t∣ therefore implies f(cz+t)≤f(cz−t). Equation (C.53) then yields hc(t)≤0 for t≥0. The same equation gives hc(−t)=−hc(t), hence
thc(t)≤0foreveryc≥0andt∈R.(C.54)
Write the conditional mean of the unscaled off-axis increment as
gs:=E[εsf(cszs+⟨vs,ys⟩)ys∣Fs].
By the conditional independence in (C.40), we may first average over zs while holding ys fixed. Using (C.53) then gives
The inequality uses (C.55), f2≤1/16 from (C.50), and the second moment in (C.40). Taking expectations and summing (C.56) from s=0 to N−1, with v0=0, yields
which is (18) and proves part (i). Both parts include N = 0, with empty sums and zero initial energy. Fresh sampling is essential to the conditional calculations in (C.40) and the subsequent expectations; the proof does not directly apply to reuse of a fixed prompt sample. For RFT, exact per-prompt gradients are also essential to the pathwise style invariance used in Step 7; sampled action gradients are discussed separately in Appendix D.1.
D Additional results
D.1 Exact and sampled policy gradients
The invariance in Theorem 2(i) concerns the exact per-prompt gradient (6). Here “exact” means that the expectation over actions is evaluated by summing over all tokens at the current policy and prompt. When this summation is computationally impractical, REINFORCE provides an unbiased gradient estimate using actions sampled from the current policy. This subsection explains how action sampling may change the style dynamics.
An unbiased gradient estimate. Fix W and x, and draw A∼πW(⋅∣x). The REINFORCE estimator without a baseline (Williams, 1992) gives the update
where δa is defined in (C.18). When β=0, δa=0 and (D.2) implies EA[Δβa]=0. Nevertheless, if M>1 and the sampled token is rewarded, its style increment is η(1−1/M)x, while every other token in the same class receives −ηx/M. Tokens in the other class receive zero style increment. For η>0 and x=0, a rewarded step produces β+=0. An unrewarded sample produces no update for this estimator.
Let Δβ collect the style increments over all tokens. When β=0, the conditional squared style increment is
EA[∥Δβ∥F2]=η2Pb∗(x)(W,x)(1−M1)∥x∥2.(D.4)
Indeed, a rewarded sample occurs with probability Pb∗(x)(W,x), and its squared coefficients sum to (1−1/M)2+(M−1)/M2=1−1/M. Since the conditional mean increment is zero when β=0, (D.4) is also the total conditional variance. The corresponding off-axis expression replaces x by x⊥. Hence a zero mean style increment can coexist with positive expected style energy after one step.
Averaging actions and following the trajectory. If each update averages K independent action-gradient estimates computed at the same W,x, its conditional mean is the RFT update in (6), while the variance in (D.4) is divided by K. Finite K therefore reduces style noise but does not guarantee that every update preserves β=0. Once a sampled trajectory develops β=0, the zero mean style-increment statement above no longer applies: subsequent conditional means follow the exact gradient at the new, generally nonuniform policy. Theorem 2(i) consequently does not imply zero style drift along sampled trajectories.
We compare REINFORCE updates with different numbers of sampled actions per prompt against exact RFT in Appendix E.2 (Figure E.4(b,d)).
D.2 Limiting behavior under continued task-2 training
Theorem 3 establishes positive SFT semantic error on both tasks over a finite training interval. We now consider continued training on task 2. In the unregularized population setting, sufficiently small fixed steps eventually drive the semantic errors on both tasks to zero, even though the teacher's style preferences can cause errors at intermediate times.
Proposition D.1 (Vanishing semantic error under continued population SFT). Under the setup of Section 2.1, let W(0)=W1 be any finite checkpoint, and run population SFT on task 2 with a fixed step size satisfying
0<η2≤1+∥μ2∥22.(D.5)
Then, as k→∞,
L1(W(k))⟶0,L2(W(k))⟶0.(D.6)
In particular, from the checkpoint in Theorem 3,
FSFT(2)⟶0,GSFT(2)⟶0,
whereas RFT keeps both quantities identically zero throughout training.
Proof. Let f2 denote the task-2 population token cross-entropy, and let f2,∗ be its infimum over finite parameter matrices:
We first show that approaching this infimum forces semantic error to vanish, and then verify that population optimization approaches it.
Separating class and style losses. For a∈Ab, write πW(a∣x,b):=πW(a∣x)/Pb(W,x). This conditional policy depends only on the style channel β. Since the teacher is always semantically correct,
Let S2,∗ be the infimum of S2 over finite style channels whose rows sum to zero within each class. We claim that f2,∗=S2,∗. The inequality f2,∗≥S2,∗ follows from C2≥0. Conversely, fix such a style channel and set wa[s]=βa+(2σ(a)−1)su/2 for s≥0. This leaves S2 unchanged. With z=⟨u,x⟩ and b=b⋆(x), the class loss is
It tends to zero almost surely and is bounded by its value at s=0, which is integrable because the fixed linear logits have finite Gaussian first moments. Dominated convergence yields C2(W[s])→0, hence f2,∗≤S2(β) for every finite style channel. Taking the infimum proves the claim and gives
0≤C2(W)≤f2(W)−f2,∗.(D.8)
From objective values to semantic errors. If greedy decoding selects a wrong-class token, every correct-class token has probability at most that selected token's probability, and thus at most the total wrong-class mass. Consequently, Pb(W,x)≤M(1−Pb(W,x)) on the error event, including ties resolved to the wrong class. The class loss there is at least log(1+1/M), so
Both tasks share the same semantic rule and hence the same error event EW={x:b^W(x)=b∗(x)}. Writing δ=μ1−μ2, the density ratio of their prompt distributions is
where π=πW(⋅∣x). Here the categorical covariance has operator norm at most 1/2, since its absolute row sums are 2πa(1−πa)≤1/2, and E2[xx⊤]=Ip+μ2μ2⊤. Hence f2 is L-smooth for L=(1+∥μ2∥2)/2. Under (D.5), convexity and the descent inequality give, for every finite comparator V,
Summing and using monotonicity of the objective yields
f2(W(k))−f2(V)≤2kη2∥W1−V∥F2.(D.11)
First letting k→∞ and then taking the infimum over V proves f2(W(k))→f2,∗ without assuming that a finite minimizer exists. Equations (D.9) and (D.10) now imply (D.6). When L1(W1)=0, forgetting equals the final task-1 error, and generalization error is the average of the two task errors, proving the asserted metric limits.
What converges. The objective approaches its infimum and semantic errors vanish, but the parameters do not converge to a finite minimizer. Indeed, if U has rows (2σ(a)−1)u/2, then at every finite W,
dsdf2(W+sU)s=0=−E2[∣z∣(1−Pb⋆(x)(W,x))]<0.
Thus no finite matrix attains f2,∗, and any sequence approaching this infimum must have ∥W∥F→∞; otherwise a bounded subsequence would yield a finite minimizer by continuity. The token cross-entropy need not tend to zero, and exact matching of the teacher's style preferences is unnecessary for vanishing semantic error. The finite-time errors in Theorem 3 therefore do not persist at a positive level in this population limit. This does not assert monotone semantic improvement or zero error after finitely many steps.
D.3 Numerical illustration of finite-time forgetting
We illustrate the finite-time separation in Theorem 3 and the subsequent recovery described in Appendix D.2 by varying training time at a fixed step size.
Setup. We take p=2, M=2, u=(1,0)⊤, and Gaussian task means μ1=(0,2)⊤ and μ2=(0,3)⊤. The task-2 teachers are ρ2,0=(0.5,0.5) and ρ2,1=(0.99,0.01), giving Δρ=0.49. Both methods start from the constructed checkpoint wa=(2σ(a)−1)u/2, so that Δα=u and β=0. This checkpoint already classifies both tasks perfectly because they share the same semantic rule. We then train only on task 2, using population updates with fixed step size η=10−3 for 106 steps, up to τ=kη=1000. Here L1 equals forgetting, and G(2)=(L1+L2)/2. The guaranteed interval in (C.34) ends at τ0≈0.00334; the chosen step size also satisfies the sufficient condition (D.5) for eventual recovery.
Numerical evaluation. We evaluate the SFT teacher term analytically and its policy term by deterministic Gaussian quadrature, with 12 Gauss–Legendre nodes on each of six intervals in positive z=⟨u,x⟩ and their negative reflections, and 40 Gauss–Hermite nodes in the orthogonal coordinate (5760 nodes in total; ∣z∣≤11). RFT follows its scalar on-axis semantic recursion from Theorem 1(ii), preserving zero style and zero semantic error. SFT errors are computed by conditioning on z, evaluating the Gaussian probability of the greedy decision region in the other coordinate, and integrating over z.
(a) Old-task error
(b) New-task error
(c) Off-axis style
SFT --- RFT (exact) Guaranteed interval: 0<τ≤τ0
Figure D.1: Two-task population dynamics at a fixed step size. (a) Old-task error, equal to forgetting from the common perfectly fitted checkpoint. (b) New-task error. (c) Off-axis style norm ∥β⊥∥F. The horizontal axis is logarithmic outside a small linear neighborhood of zero. Shading marks 0<τ≤τ0; the inset compares the first three SFT steps with the old-task error lower bound in Theorem 3 (dotted). Later times illustrate behavior beyond that guaranteed interval.
Results. In Figure D.1, SFT's old- and new-task errors rise from zero to approximately 13.4% and 19.4%, respectively, near τ=0.8, then decline to 1.25% and 1.81% at τ=1000. The shaded steps lie inside the guaranteed interval and have positive old-task error above the theorem's lower bound. RFT retains zero error on both tasks throughout. SFT's error reduction occurs while its off-axis style norm remains nonzero (as the semantic margin grows). Thus this example exhibits substantial recovery without eliminating style drift.
E Control and ablation experiments
E.1 Control experiments
We isolate the roles of task means and teacher preferences in population style drift. Unless specified below, all settings follow Section 4.
Zero task means. Setting μt=0 removes population off-axis style drift. Both population methods then achieve negligible generalization error and forgetting (Figure E.1); their small residual off-axis energies reflect Monte Carlo prompt sampling. Finite-sample SFT still develops greater off-axis energy and a worse generalization–forgetting tradeoff than RFT, illustrating sampling effects even when population drift is absent.
Uniform teachers. Keeping the nonzero task means of the main experiment, we set vt,b=0 in (20), giving ρt,b(a)=1/M. Removing teacher preferences also eliminates the population performance gap (Figure E.2). Population SFT now preserves β=0 because its updates are constant within each semantic class, including under Monte Carlo prompt averaging. Its residual off-axis energy therefore comes from the semantic component. Finite-sample SFT still introduces style fluctuations by sampling individual teacher tokens. RFT is unchanged from Figure 2, since it does not use the teacher and the prompts and seeds are shared.
(a) Pareto plane with zero task means
(b) Final off-axis parameter energy
Figure E.1: Zero task means. We set μt=0 for every task. As in Figure 2, panel (a) shows generalization error versus forgetting, and panel (b) shows final off-axis energy versus learning rate. Solid and dashed curves denote population and finite-sample updates, respectively.
(a) Pareto plane with uniform teachers
(b) Final off-axis parameter energy
Figure E.2: Uniform teachers. We retain the nonzero Gaussian task means of Figure 2 and set ρt,b(a)=1/M for every task and class. The layout and line styles match Figure E.1.
E.2 Ablation experiments
We examine sensitivity to three assumptions: Gaussian prompts, correct semantic rewards, and exact action expectations. Unless specified otherwise, we follow the setup of Section 4.
Non-Gaussian prompts. We keep the task means of Figure 2 and replace the Gaussian prompt noise by independent Laplace(0, 1/ 2) coordinates, x=μt+ε, which preserves the means and the identity covariance. The results are nearly unchanged from Figure 2 (Figure E.3): population SFT develops essentially the same off-axis energy and forgetting, and the finite-sample curves are close. Population RFT keeps forgetting below 0.3% but acquires a small off-axis energy (about 3×10−2 at η=0.5, versus 2.5×10−4 with Gaussian prompts) and error up to 1.5%: its algebraic style invariance holds for any prompt law, whereas its exactly on-axis population direction relies on Gaussian prompts.
(a) Pareto plane with Laplace prompts
(b) Final off-axis parameter energy
Figure E.3: Non-Gaussian prompts. Prompt noise coordinates are drawn independently from Laplace(0, 1/ 2) around the task means of Figure 2, giving identity covariance. The layout and line styles match Figure E.1.
Imperfect rewards. For q∈{0,0.05,0.1,0.2}, we apply either a class flip, replacing the entire reward vector by 1−R(⋅,x) with probability q, or token flips, independently reversing each token's reward with probability q. Corruptions are sampled independently for each prompt, including within Monte Carlo (MC) batches. RFT sums exactly over actions using the corrupted rewards; SFT continues to receive correct demonstrations. Both methods are evaluated using clean semantic labels.
Class flips preserve within-class reward symmetry and hence RFT's zero-style invariance, whereas token flips introduce style fluctuations. Across the tested noise levels, MC RFT exhibits little forgetting, while token flips induce more forgetting than class flips in finite-sample runs (Figure E.4(a,c)).
Finite action sampling. With clean rewards, we replace the exact sum over 2M=12 actions by the no-baseline REINFORCE estimator of Appendix D.1, averaging K∈{1,4,16,64,256,1024} independent actions per prompt at the current policy. The estimator is unbiased for every K by (D.2). MC updates additionally average over 10,000 prompts, so even K = 1 uses 10,000 action samples per update. Prompt and update counts are matched within each protocol, but action-query and computation budgets differ across K and the exact baseline.
At the reference learning rate, REINFORCE forgetting moves closer to the exact RFT baseline as K increases in both settings (Figure E.4(b,d)).
(a) Reward errors
(b) Action sampling
(c) Reward errors
(d) Action sampling
Reward error rate q
Actions per prompt K
Figure E.4: Forgetting under two assumption ablations. Top: MC population updates; bottom: finite-sample updates. Columns vary reward corruption and the number of REINFORCE actions per prompt, respectively. All panels use η≈0.121 and the same vertical scale. Training prompts are paired across methods. Shading gives pointwise 95% Student-t intervals over 10 MC seeds and mean ±1.96 standard errors over 50 finite-sample seeds, conditional on the fixed world and test sets. Negative forgetting indicates backward improvement.
References (82)
On the theory of policy gradient methods: Optimality, approximation, and distribution shift
Why reinforcement fine-tuning preserves prior knowledge better: A data perspective
LIMA: Less is more for alignment
Chu et al. (2025) find better generalization under RL to changes in reasoning rules and visual conditions, while Lai et al. (2026) report less forgetting of earlier tasks and general capabilities under RFT across sequential multimodal tasks
Fix a prompt x
Decompose $\mathbf{v}$ as
Moreover, since $\mathbf{Q}$ is orthogonal and $\mathbf{Q}\mathbf{u} = \mathbf{u}$, we also have $\mathbf{Q}^\top \mathbf{u} = \mathbf{u}$
Let $\Phi(\mathbf{W}, \omega)$ denote the updated parameter matrix $\mathbf{W}^{+}$obtained by applying the SFT or RFT update in (6), and let $\Phi_{a}$ denote its ath row
Together with the policy invariance, this also gives
Together with (B.7) and (B.8), we have
Therefore (C.3) becomes the SFT line of (13)
Hence (10) implies that $P_1(\mathbf{W}, \mathbf{x}) = (1 + e^{-cz})^{-1}$ and $P_0(\mathbf{W}, \mathbf{x}) = 1 - P_1(\mathbf{W}, \mathbf{x})$
Substituting into (C.10) gives the SFT line of (14)
Therefore if $a, a'$ lie in the same class
Subtracting (C.2) at $b = \sigma(a)$ from (C.1) gives
Since $\mathbf{W}$ has identical rows within each class, all rows in the same semantic class have the same logit at every prompt
By the teacher model (2), if $b^\star(\mathbf{x}) \neq b$ then the teacher places no mass on token $a \in \mathcal{A}_b$, and both terms inside the brackets have conditional mean zero
The event $b^\star = b$ depends only on $z$: it is $\{z > 0\}$ for $b = 1$ and $\{z < 0\}$ for $b = 0$
The term proportional to u is removed, while $\mu_t$ is unchanged because $\mu_t \perp u$
Since $\beta(\mathbf{W}_1) = \mathbf{0}$, the class-score difference is $D_{\mathbf{W}_1}(\mathbf{x}) = \langle \Delta \boldsymbol{\alpha}(\mathbf{W}_1), \mathbf{x} \rangle$
We therefore use these centered weights throughout the proof, so that
Both tasks share the semantic rule $b^\star(\mathbf{x}) = \mathbf{1}\{z > 0\}$
Thus every RFT iterate $\mathbf{W}$ satisfies
We will show that every parameter row remains in $V$ throughout task-2 training
Meanwhile, the teacher definition (2) gives
Consequently, $q_{2}(a \mid \mathbf{x}) - \pi_{a}$ is a function of $(z, y)$ alone
Each updated row therefore remains in $V$
For $\mathbf{r} := (z, y)^\top$, each entry of $\Theta_j \mathbf{r}$ is the corresponding token's logit:
The left-hand side is zero, so
since $\beta(\mathbf{W}_1) = \mathbf{0}$, (16) with $t = 2$ gives, for $a \in \mathcal{A}_b$
Using that the initial rows are parallel to $\mathbf{u}$
By the triangle inequality and (C.24) with $j = k_2$
This pointwise conclusion holds under either task distribution, so $\mathcal{L}_r(\mathbf{W}_2) \geq \mathbb{P}_r(E)$ for $r \in \{1, 2\}$
For either method, let $\mathcal{F}_s$ denote its training history strictly before step $s$, including the previous teacher draws for SFT. For the trajectory under consideration, write $\mathbf{W}_s := \mathbf{W}(s)$ and $\mathbf{m}_s := \boldsymbol{\mu}_{t(s)}$
Consequently, for each class
We first prove part (ii)
The fresh teacher draw therefore satisfies
Since $P_0 = 1 - P_1$, either value of the correct class satisfies
Using (C.53) then gives
Expanding the second line of (C.52), taking conditional expectations, and using $\varepsilon_{s}^{2}=1$ gives
Taking expectations and summing (C.56) from $s = 0$ to $N - 1$, with $\mathbf{v}_0 = \mathbf{0}$, yields
Both parts include N = 0, with empty sums and zero initial energy
Since $\mathbb{E}_A[R(A, \mathbf{x})\mathbf{1}\{a = A\}] = \pi_{\mathbf{W}}(a \mid \mathbf{x})R(a, \mathbf{x})$, we have
Since the conditional mean increment is zero when $\beta = \mathbf{0}$, (D.4) is also the total conditional variance
If each update averages $K$ independent action-gradient estimates computed at the same $\mathbf{W}, \mathbf{x}$, its conditional mean is the RFT update in (6), while the variance in (D.4) is divided by $K$
For $a \in \mathcal{A}_b$, write $\pi_{\mathbf{W}}(a \mid \mathbf{x}, b) := \pi_{\mathbf{W}}(a \mid \mathbf{x}) / P_b(\mathbf{W}, \mathbf{x})$
We claim that $f_{2,*} = S_{2,*}$
Dominated convergence yields $C_2(\mathbf{W}^{[s]}) \to 0$, hence $f_{2,*} \leq S_2(\boldsymbol{\beta})$ for every finite style channel
Writing $\delta = \mu_1 - \mu_2$, the density ratio of their prompt distributions is
Equations (D.9) and (D.10) now imply (D.6)
Unless specified below, all settings follow Section 4
Unless specified otherwise, we follow the setup of Section 4
Across the tested noise levels, MC RFT exhibits little forgetting, while token flips induce more forgetting than class flips in finite-sample runs (Figure E.4(a,c))