To Retain or to Adapt? Generalizing Continual Learning β€” part 6/15

Cleaned-text code points [77920, 93765). Bibliography omitted here; source.md includes it.

We view the learning algorithm π’œ \mathcal{A} as a discrete-time stochastic process { ΞΈ n } n β‰₯ 0 \{\theta_{n}\}_{n\geq 0} taking values in the parameter space Θ βŠ† ℝ d \Theta\subseteq\mathbb{R}^{d} . Parameter evolution is governed by a stochastic update rule U U . At step n n , the update depends on the current parameters ΞΈ n \theta_{n} and a data batch ΞΎ n \xi_{n} drawn from an algorithm-specific sampling distribution π’Ÿ n \mathcal{D}_{n} : ΞΈ n + 1 = U ⁑ ( ΞΈ n , ΞΎ n ) , where ​ ΞΎ n ∼ π’Ÿ n . \theta_{n+1}=U(\theta_{n},\xi_{n}),\quad\text{where }\xi_{n}\sim\mathcal{D}_{n}. (14) Crucially, the optimization distribution π’Ÿ n \mathcal{D}_{n} is distinct from the environmental distribution 𝒫 n \mathcal{P}_{n} . While 𝒫 n \mathcal{P}_{n} dictates the incoming data stream, π’Ÿ n \mathcal{D}_{n} determines the data used for the update. For replay-based algorithms (such as our JTL agent), π’Ÿ n \mathcal{D}_{n} may incorporate data from previous tasks.

Assuming the sampling strategy is consistent within task boundaries ( π’Ÿ n = π’Ÿ k \mathcal{D}_{n}=\mathcal{D}^{k} for all n ∈ S k n\in S_{k} ), the process induces a time-homogeneous Markov Transition Operator 𝒯 k \mathcal{T}^{k} . For any bounded measurable test function Ο• : Θ β†’ ℝ \phi:\Theta\to\mathbb{R} , the operator is defined as: ( 𝒯 k ​ Ο• ) ​ ( ΞΈ ) := 𝔼 ΞΎ ∼ π’Ÿ k ​ [ Ο• ⁑ ( U ⁑ ( ΞΈ , ΞΎ ) ) ] . (\mathcal{T}^{k}\phi)(\theta):=\mathbb{E}_{\xi\sim\mathcal{D}^{k}}[\phi(U(\theta,\xi))]. (15) The sequence of parameter distributions { Q n } n ∈ S k \{Q_{n}\}_{n\in S_{k}} evolves according to this linear operator, Q n + 1 = Q n ​ 𝒯 k Q_{n+1}=Q_{n}\mathcal{T}^{k} (following the Markov chain convention where measures act as row vectors).

###### Convergence.

A central aspect of our analysis is characterizing the long-term behavior of the learning algorithm. An algorithm is said to converge if its transition operator 𝒯 k \mathcal{T}^{k} admits a stationary distribution Q ∞ Q_{\infty} ; if run indefinitely, the process will converge to this distribution. This property allows us to rigorously decouple the effect of starting conditions (the transient phase) from asymptotic performance (the stationary phase).

###### Stochastic Gradient Descent Instantiations.

We analyze two canonical instances of SGD with a constant step-size Ξ· \eta . Both employ the standard gradient step ΞΈ n + 1 = ΞΈ n βˆ’ Ξ· βˆ‡ β„“ ( ΞΈ n , ΞΎ n ) \theta_{n+1}=\theta_{n}-\eta\nabla\ell(\theta_{n},\xi_{n}) , differing only in their sampling distributions π’Ÿ k \mathcal{D}^{k} and task-boundary initialization strategies.

###### ITL SGD ( π’œ ITL \mathcal{A}_{\text{ITL}} ).

The ITL agent optimizes solely on the current data stream. Its sampling distribution matches the current task distribution ( π’Ÿ ITL k = 𝒫 k \mathcal{D}^{k}_{\text{ITL}}=\mathcal{P}^{k} ). At task boundaries, it resets its parameters to a fixed initialization distribution Q init Q_{\text{init}} , discarding prior knowledge to prevent negative transfer.

###### JTL SGD ( π’œ JTL \mathcal{A}_{\text{JTL}} ).

The JTL agent minimizes the average loss across all seen tasks. To maintain time-homogeneous dynamics within a task, we model experience replay as a fixed mixture approximation . The sampling distribution π’Ÿ JTL k \mathcal{D}^{k}_{\text{JTL}} is a weighted mixture of the current and preceding task distributions: π’Ÿ JTL k := βˆ‘ j = 1 k w j k ​ 𝒫 j , where ​ w j k = N j βˆ‘ i = 1 k N i . \mathcal{D}^{k}_{\text{JTL}}:=\sum_{j=1}^{k}w^{k}_{j}\,\mathcal{P}^{j},\quad\text{where }w^{k}_{j}=\frac{N_{j}}{\sum_{i=1}^{k}N_{i}}. (16) Unlike the ITL agent, the JTL agent inherits parameters from the previous task ( ΞΈ a k = ΞΈ b k βˆ’ 1 \theta_{a_{k}}=\theta_{b_{k-1}} ), enabling forward transfer.

##### A.2.2 Why use reset ITL as the reference?

The ITL baseline used throughout the main comparison is intentionally reset at task boundaries. This choice isolates the value of the JTL objective as a prediction of the future : JTL assumes that the accumulated past remains predictive, whereas reset ITL assumes no such structure and starts each task from the same prior. The comparison therefore measures the benefit and cost of injecting historical bias into the optimization process.

A warm-start current-task learner is also natural: it would set π’Ÿ k = 𝒫 k \mathcal{D}^{k}=\mathcal{P}^{k} as ITL does, but initialize task k k from the previous endpoint rather than from Q init Q_{\mathrm{init}} . In our decomposition, this variant has the same stationary distribution as ITL whenever the current-task optimizer is task-wise convergent, because both optimize only 𝒫 k \mathcal{P}^{k} . Thus its stationary gap against JTL is still the same instability term ℐ k \mathcal{I}^{k} . What changes is only the transient term: TE warm k = βˆ’ ℐ k + Ξ΄ k ​ ( π’œ warm ) βˆ’ Ξ΄ k ​ ( π’œ JTL ) . \mathrm{TE}^{k}_{\mathrm{warm}}=-\mathcal{I}^{k}+\delta^{k}(\mathcal{A}_{\mathrm{warm}})-\delta^{k}(\mathcal{A}_{\mathrm{JTL}}). Consequently, warm starts can shift the critical duration by reducing the current-task transient cost, but they do not remove the central trade-off: retaining past information helps only when the transient advantage it provides exceeds the stationary bias induced by optimizing against outdated tasks. The Window agent in Section 5 includes this case as W = 1 W=1 , making it a useful bridge between reset ITL, warm-start adaptation, and full JTL.

#### A.3 Decomposition: Instability and Transient Error

To rigorously analyze the source of the performance gap between ITL and JTL agents, we introduce a theoretical decomposition based on the asymptotic behavior of the learning process.

###### Definition 12 (Task-wise Convergence) .

An algorithm π’œ \mathcal{A} is Task-wise Convergent if, for any task k k , the associated Markov operator 𝒯 k \mathcal{T}^{k} admits a stationary probability measure Q ∞ k Q_{\infty}^{k} . Formally, if the task duration were infinite, the distribution of iterates Q n k Q^{k}_{n} would converge to Q ∞ k Q_{\infty}^{k} regardless of initialization: lim n β†’ ∞ W 2 ​ ( Q n k , Q ∞ k ) = 0 , \lim_{n\to\infty}W_{2}(Q^{k}_{n},Q_{\infty}^{k})=0, (17) where W 2 W_{2} is the Wasserstein-2 distance ( Villani, 2009 ) , standard in the convergence analysis of stochastic optimization algorithms.

If convergence holds, the Average Task Error ( ALE k \mathrm{ALE}^{k} ) can be split into two components: the stationary component (error at equilibrium) and the transient component (error accumulated while moving toward equilibrium).

###### Definition 13 (Instability ℐ k \mathcal{I}^{k} ) .

Let π’œ ITL \mathcal{A}_{\text{ITL}} and π’œ JTL \mathcal{A}_{\text{JTL}} be task-wise convergent algorithms with stationary distributions Q ∞ ITL Q_{\infty}^{\text{ITL}} and Q ∞ JTL Q_{\infty}^{\text{JTL}} . The Instability measures the performance gap in the asymptotic limit: ℐ k := β„’ k ​ ( Q ∞ JTL ) βˆ’ β„’ k ​ ( Q ∞ ITL ) . \mathcal{I}^{k}:=\mathcal{L}^{k}(Q_{\infty}^{\text{JTL}})-\mathcal{L}^{k}(Q_{\infty}^{\text{ITL}}). (18)

###### Definition 14 (Transient Error Ξ΄ k \delta^{k} ) .

For a task-wise convergent algorithm π’œ \mathcal{A} , the Transient Error captures the excess loss accumulated during the mixing phase. It is defined as the average deviation from the stationary risk over the task duration S k S_{k} : Ξ΄ k ​ ( π’œ ) := 1 N k ​ βˆ‘ n ∈ S k ( β„’ k ​ ( Q n ) βˆ’ β„’ k ​ ( Q ∞ π’œ ) ) . \delta^{k}(\mathcal{A}):=\frac{1}{N_{k}}\sum_{n\in S_{k}}\left(\mathcal{L}^{k}(Q_{n})-\mathcal{L}^{k}(Q_{\infty}^{\mathcal{A}})\right). (19)

This yields a rigorous decomposition of Transfer Efficiency, allowing us to treat the β€œquality of the final solution” and the β€œspeed of learning” as distinct analytical objects.

###### Lemma 15 (Exact TE Decomposition) .

For any task k k , assuming the algorithms are task-wise convergent, the Transfer Efficiency decomposes exactly as: TE k = βˆ’ ℐ k ⏟ Stationary Gap + ( Ξ΄ k ​ ( π’œ ITL ) βˆ’ Ξ΄ k ​ ( π’œ JTL ) ) ⏟ Learning Speed Gap . \mathrm{TE}^{k}=\underbrace{-\mathcal{I}^{k}}_{\text{Stationary Gap}}+\underbrace{\left(\delta^{k}(\mathcal{A}_{\text{ITL}})-\delta^{k}(\mathcal{A}_{\text{JTL}})\right)}_{\text{Learning Speed Gap}}. (20)

###### Proof.

By definition, ALE k ​ ( π’œ ) = β„’ k ​ ( Q ∞ π’œ ) + Ξ΄ k ​ ( π’œ ) \mathrm{ALE}^{k}(\mathcal{A})=\mathcal{L}^{k}(Q_{\infty}^{\mathcal{A}})+\delta^{k}(\mathcal{A}) . Substituting this into TE k = ALE k ​ ( π’œ ITL ) βˆ’ ALE k ​ ( π’œ JTL ) \mathrm{TE}^{k}=\mathrm{ALE}^{k}(\mathcal{A}_{\text{ITL}})-\mathrm{ALE}^{k}(\mathcal{A}_{\text{JTL}}) and rearranging terms yields the result. ∎

When tasks have equal duration N N , we can state a general condition for when transfer is beneficial. To do so, we distinguish the average (per-step) Transient Error Ξ΄ k \delta^{k} from the cumulative Transient Error, defined as Ξ” k ​ ( π’œ ) := N β‹… Ξ΄ k ​ ( π’œ ) = βˆ‘ n ∈ S k ( β„’ k ​ ( Q n ) βˆ’ β„’ k ​ ( Q ∞ π’œ ) ) \Delta^{k}(\mathcal{A}):=N\cdot\delta^{k}(\mathcal{A})=\sum_{n\in S_{k}}(\mathcal{L}^{k}(Q_{n})-\mathcal{L}^{k}(Q_{\infty}^{\mathcal{A}})) .

###### Lemma 16 (The Critical Task Duration) .

Assume a sequence of K K tasks of equal duration N N . Let Ξ” Β― ​ ( π’œ ) = 1 K ​ βˆ‘ k = 1 K Ξ” k ​ ( π’œ ) \bar{\Delta}(\mathcal{A})=\frac{1}{K}\sum_{k=1}^{K}\Delta^{k}(\mathcal{A}) denote the expected cumulative Transient Error, and ℐ Β― = 1 K ​ βˆ‘ k = 1 K ℐ k \bar{\mathcal{I}}=\frac{1}{K}\sum_{k=1}^{K}\mathcal{I}^{k} the average instability. Assuming the learning process converges such that Ξ” Β― ​ ( π’œ ) ∈ o ​ ( N ) \bar{\Delta}(\mathcal{A})\in o(N) , and assuming ℐ Β― > 0 \bar{\mathcal{I}}>0 , there exists a critical task horizon N max ∞ N^{\infty}_{\max} beyond which transfer becomes detrimental ( TE < 0 \text{TE}<0 ). The breakeven horizon is given by: N max ∞ = Ξ” Β― ​ ( π’œ ITL ) βˆ’ Ξ” Β― ​ ( π’œ JTL ) ℐ Β― . N^{\infty}_{\max}=\frac{\bar{\Delta}(\mathcal{A}_{\text{ITL}})-\bar{\Delta}(\mathcal{A}_{\text{JTL}})}{\bar{\mathcal{I}}}. (21)

###### Proof.

For equal-duration tasks, the average Transfer Efficiency is positive if: 1 K ​ βˆ‘ k = 1 K ( Ξ΄ k ​ ( π’œ ITL ) βˆ’ Ξ΄ k ​ ( π’œ JTL ) ) > 1 K ​ βˆ‘ k = 1 K ℐ k . \frac{1}{K}\sum_{k=1}^{K}\left(\delta^{k}(\mathcal{A}_{\text{ITL}})-\delta^{k}(\mathcal{A}_{\text{JTL}})\right)>\frac{1}{K}\sum_{k=1}^{K}\mathcal{I}^{k}. By definition, the instability ℐ k \mathcal{I}^{k} relies on the stationary distribution and is independent of N N . Substituting Ξ΄ k ​ ( π’œ ) = Ξ” k ​ ( π’œ ) / N \delta^{k}(\mathcal{A})=\Delta^{k}(\mathcal{A})/N , the condition for positive transfer becomes: Ξ” Β― ​ ( π’œ ITL ) βˆ’ Ξ” Β― ​ ( π’œ JTL ) N > ℐ Β― . \frac{\bar{\Delta}(\mathcal{A}_{\text{ITL}})-\bar{\Delta}(\mathcal{A}_{\text{JTL}})}{N}>\bar{\mathcal{I}}. If ℐ Β― > 0 \bar{\mathcal{I}}>0 and the cumulative Transient Error is sub-linear ( Ξ” Β― ​ ( π’œ ) ∈ o ​ ( N ) \bar{\Delta}(\mathcal{A})\in o(N) ), the left-hand transient advantage vanishes with N N , while the stationary gap remains. Solving the breakeven equality yields the critical threshold N max ∞ N_{\max}^{\infty} . If ℐ Β― ≀ 0 \bar{\mathcal{I}}\leq 0 , the stationary component does not make JTL worse on average, so this argument does not imply an eventual detrimental-transfer horizon. ∎

###### On the Sub-Linear Transient Error Assumption.

The condition that the cumulative Transient Error grows sub-linearly ( Ξ” k ​ ( π’œ ) ∈ o ​ ( N ) \Delta^{k}(\mathcal{A})\in o(N) ) simply requires that the algorithm successfully converges toward its stationary risk, meaning the instantaneous error β„’ k ​ ( Q n ) βˆ’ β„’ k ​ ( Q ∞ ) \mathcal{L}^{k}(Q_{n})-\mathcal{L}^{k}(Q_{\infty}) vanishes as n β†’ ∞ n\to\infty . This is a mild assumption across standard optimization regimes: β€’ Convex Optimization (Linear Models): In stochastic strongly convex optimization, sub-optimality decays at π’ͺ ⁑ ( 1 / n ) \mathcal{O}(1/n) . Integrating over N N steps yields a cumulative error bounded by π’ͺ ⁑ ( log ⁑ N ) ∈ o ⁑ ( N ) \mathcal{O}(\log N)\in o(N) . Even in strictly convex or non-smooth cases with a rate of π’ͺ ⁑ ( 1 / n ) \mathcal{O}(1/\sqrt{n}) , the cumulative error is π’ͺ ⁑ ( N ) ∈ o ⁑ ( N ) \mathcal{O}(\sqrt{N})\in o(N) ( Bubeck, 2015 ) .

β€’ Non-Convex Optimization (Neural Networks): While deep networks optimize non-convex landscapes, they practically converge to local minima. Theoretically, under structural assumptions like the Polyak-Łojasiewicz (PL) condition ( Karimi et al., 2016 ) or the Neural Tangent Kernel regime ( Jacot et al., 2018 ) , SGD can achieve linear convergence rates, decaying exponentially as π’ͺ ⁑ ( e βˆ’ Ξ» ​ n ) \mathcal{O}(e^{-\lambda n}) . In such regimes, the cumulative Transient Error is bounded by a constant π’ͺ ⁑ ( 1 ) \mathcal{O}(1) , trivially satisfying the o ⁑ ( N ) o(N) condition.

#### A.4 Exact Analysis in the Quadratic Regime

We now specialize our analysis to the regime of quadratic loss functions. This setting allows for closed-form derivations of the learning dynamics, providing explicit expressions for both the asymptotic stability (Instability) and the convergence speed (Transient Error).

###### Assumption 17 (Quadratic Tasks) .

For every task j ∈ { 1 , … , K } j\in\{1,\dots,K\} , the loss function is defined as: β„’ j ​ ( ΞΈ ) = 1 2 ​ ( ΞΈ βˆ’ ΞΈ ⋆ j ) ⊀ ​ H j ​ ( ΞΈ βˆ’ ΞΈ ⋆ j ) + c j . \mathcal{L}^{j}(\theta)=\frac{1}{2}(\theta-\theta_{\star}^{j})^{\top}H_{j}(\theta-\theta_{\star}^{j})+c_{j}. (22) We assume the Hessian H j ≻ 0 H_{j}\succ 0 is symmetric positive definite. The scalar c j c_{j} represents the irreducible loss (or Bayes error) for task j j .

Under this assumption, the expected risk for task k k , 𝔼 ΞΈ ​ [ β„’ k ​ ( ΞΈ n ) ] \mathbb{E}_{\theta}[\mathcal{L}^{k}(\theta_{n})] , is completely determined by the first two moments of the parameter distribution: the mean ΞΌ n = 𝔼 ⁑ [ ΞΈ n ] \mu_{n}=\mathbb{E}[\theta_{n}] and the covariance Ξ£ n = Cov ​ ( ΞΈ n ) \Sigma_{n}=\text{Cov}(\theta_{n}) : 𝔼 ⁑ [ β„’ k ​ ( ΞΈ n ) ] = 1 2 ​ β€– ΞΌ n βˆ’ ΞΈ ⋆ k β€– H k 2 ⏟ Bias Contribution + 1 2 ​ Tr ​ ( H k ​ Ξ£ n ) ⏟ Variance Contribution + c k . \mathbb{E}[\mathcal{L}^{k}(\theta_{n})]=\underbrace{\frac{1}{2}\|\mu_{n}-\theta_{\star}^{k}\|_{H_{k}}^{2}}_{\text{Bias Contribution}}+\underbrace{\frac{1}{2}\text{Tr}(H_{k}\Sigma_{n})}_{\text{Variance Contribution}}+c_{k}. (23)

##### A.4.1 SGD Dynamics on Quadratic Landscapes

Before analyzing the JTL/ITL trade-offs, we recall two fundamental results regarding the behavior of constant step-size SGD on quadratic objectives.

###### Lemma 18 (Convergence of the Mean) .

Consider the update ΞΈ n + 1 = ΞΈ n βˆ’ Ξ· ​ g ^ n \theta_{n+1}=\theta_{n}-\eta\hat{g}_{n} where 𝔼 ⁑ [ g ^ n ∣ ΞΈ n ] = H ⁑ ( ΞΈ n βˆ’ ΞΈ ⋆ ) \mathbb{E}[\hat{g}_{n}\mid\theta_{n}]=H(\theta_{n}-\theta_{\star}) . The expected parameter ΞΌ n \mu_{n} converges linearly to the optimum: ΞΌ n βˆ’ ΞΈ ⋆ = ( I βˆ’ Ξ· ​ H ) n ​ ( ΞΌ 0 βˆ’ ΞΈ ⋆ ) . \mu_{n}-\theta_{\star}=(I-\eta H)^{n}(\mu_{0}-\theta_{\star}). (24) Convergence is guaranteed if the step-size satisfies Ξ· < 2 / Ξ» max ​ ( H ) \eta<2/\lambda_{\max}(H) , where H H is the Hessian matrix of the objective being optimized.

###### Proof.

Taking expectations of the update rule yields ΞΌ n + 1 = ΞΌ n βˆ’ Ξ· ​ H ​ ( ΞΌ n βˆ’ ΞΈ ⋆ ) \mu_{n+1}=\mu_{n}-\eta H(\mu_{n}-\theta_{\star}) . Subtracting ΞΈ ⋆ \theta_{\star} from both sides gives the recurrence ΞΌ n + 1 βˆ’ ΞΈ ⋆ = ( I βˆ’ Ξ· ​ H ) ​ ( ΞΌ n βˆ’ ΞΈ ⋆ ) \mu_{n+1}-\theta_{\star}=(I-\eta H)(\mu_{n}-\theta_{\star}) , which unrolls to the stated result. ∎

###### Lemma 19 (Parameter Covariance) .

Consider a learning process with constant step-size Ξ· \eta . The parameter covariance Ξ£ n \Sigma_{n} evolves according to the linear recursion: Ξ£ n + 1 = ( I βˆ’ Ξ· ​ H ) ​ Ξ£ n ​ ( I βˆ’ Ξ· ​ H ) ⊀ + Ξ· 2 ​ C n , \Sigma_{n+1}=(I-\eta H)\Sigma_{n}(I-\eta H)^{\top}+\eta^{2}C_{n}, where C n = Cov ​ ( g ^ n ) C_{n}=\text{Cov}(\hat{g}_{n}) is the covariance of the batch gradient. For small step-sizes, the stationary covariance matrix Ξ£ ∞ \Sigma_{\infty} satisfies the continuous-time Lyapunov equation: H ​ Ξ£ ∞ + Ξ£ ∞ ​ H = Ξ· ​ C ∞ . H\Sigma_{\infty}+\Sigma_{\infty}H=\eta C_{\infty}.

###### Proof.