M ULTIPLE M ODES FOR C ONTINUAL L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
Adapting model parameters to incoming streams of data is a crucial factor to deep learning scalability.
Interestingly, prior continual learning strategies in online settings inadvertently anchor their updated parameters to a local parameter subspace to remember old tasks, else drift away from the subspace and forget.
From this observation, we formulate a trade-off between constructing multiple parameter modes and allocating tasks per mode.
Mode-Optimized Task Allocation (MOTA), our contributed adaptation strategy, trains multiple modes in parallel, then optimizes task allocation per mode.
We empirically demonstrate improvements over baseline continual learning strategies and across varying distribution shifts, namely subpopulation, domain, and task shift.
I NTRODUCTION
As the world changes, so must our models of it.
The premise of continual (or incremental or lifelong) learning is to build adaptive systems that enable a model to return accurate predictions as the test-time distribution changes, such as a change in domain or task.
Training sequentially on multiple different task distributions tends to result in catastrophic forgetting (McCloskey & Cohen, 1989), where parameter updates benefiting the inference of the new task may worsen that of prior tasks.
Alleviating this is the motivation for our work.
To enable flexibility in adoption, we do not assume parameter adaptation with respect to task-specific information, and we assume only access to model parameters alone (no conditioning inputs, query sets, rehearsal or replay buffers, N -shot metadata, or any historical data).
This carries positive implications for adoption in online learning settings, and robustness towards different distribution shifts (e.g. sub-population, domain, task shifts).
Interestingly, prior work in non-rehearsal methods (notably regularization and parameter isolation methods) tend to "anchor" the parameter updates with respect to a local parameter subspace.
These methods begin with a model initialization, then update the model with respect to the first task, and henceforth all future parameter updates on new tasks are computed with respect to this local subspace (usually minimizing the number of parameter value changes).
The key question we ask here: what happens when we consider the global geometry of the parameter space?
Our pursuit of an adaptation method leveraging global geometry is supported by various initial observations.
When learning tasks 1 , ..., T , a multi-task learner tends to drift a large distance away from its previous parameters optimized for 1 , ..., T − 1 , indicating that when given information on all prior tasks, a multi-task learner would tend to move to a completely different subspace (Figure 3; Mirzadeh et al.
Catastrophic forgetting is intricately linked to parameter drift: unless drifting towards a multi-task-optimal subspace, if the new parameters drift further from the old parameter subspace, then accuracy is expected to drop for all prior tasks; not drifting sufficiently will retain performance on prior tasks, but fail on the new task.
Coordinating parameter updates between multiple parameter modes tend to keep the average parameter drift distance low (Figure 3).
Contributions.
Grounded on these findings, we introduce a new rehearsal-free continual learning algorithm
(Algorithm 1).
We initialize pre-trained parameters, maximize the distance between the parameters on the first task, then on subsequent tasks we optimize each parameter based on the loss with respect to their joint probability distribution as well as each parameter’s drift from its prior position (and reinforce with backtracking).
Evaluating forgetting per capacity, MOTA tends to outperform baseline algorithms (Table 3), and adapts parameters to sub-population, domain, and task shifts (Tables 1, 2).
Related Work.
Lange et al.
(2019) taxonomized continual learning algorithms into replay, regularization, and parameter isolation methods.
Replay (or rehearsal) methods store previous task samples to supplement retraining with the new task, such as iCaRL (Rebuffi et al., 2017), ER (Ratcliff, 1990; Robins, 1995; Riemer et al., 2018; Chaudhry et al., 2019), and A-GEM (Chaudhry et al., 2018b).
Regularization methods add regularization terms to the loss function to consolidate prior task knowledge, such as EWC (Kirkpatrick et al., 2017b), SI (Zenke et al., 2017), and LwF (Li & Hoiem, 2016).
These methods tend to rely on no other task-specific information or supporting data other than the model weights alone.
Parameter isolation methods allocate different models or subnetworks within a model to different tasks, such as PackNet (Mallya & Lazebnik, 2017), HAT (Serrà et al., 2018), SupSup (Wortsman et al., 2020), BatchEnsemble (Wen et al., 2020), and WSN (Kang et al., 2022).
Task oracles may be required to activate the task-specific parameters.
Ensembling strategies in this category may either require task indices to switch to a specific task model (e.g. Wen et al. (2020)), or update all ensemble models on all tasks but risk losing task-optimal properties of each parameter’s subspace (e.g. Doan et al. The loss landscape changes after each task (Figure 3).
Prior work either anchors to the local subspace of the first task, anchors each task to its specific local subspace, or anchors the entire parameter space to the last seen task. We are the first to leverage the global geometry of a loss landscape changing with tasks without compromising the task-optimal properties of each subspace nor requiring any task-specific information.
T RADE - OFF BETWEEN M ULTIPLE M ODES AND T ASK A LLOCATION
First we introduce the problem set-up of continual learning, with assumptions extendable to broader online learning settings.
Then we share the observations that motivate our study into multiple modes.
Finally we present a trade-off, which motivates our proposed learning algorithm.
Problem Setup.
A base learner receives T tasks (or batches) sequentially.
D t = { x t , y t } denotes the dataset of the t -th task.
In the continual learning setting, given loss function L , a neural network f
( θ ; x ) optimizes its parameters θ such that it can perform well on the t -th task while minimizing performance drop on the previous ( t − 1) tasks: θ ∗ :
= arg min θ (cid:80) Tt =
1 L ( f ( θ ; x t ) , y t ) .
We assume the only information available at test-time is the model(s) parameters and the new task’s data points.
The learner cannot access any prior data points from previous tasks, and capacity is not permitted to increase after each task.
Additionally, we do not assume parameter adaptation at test-time can be conditioned on task boundaries or conditioning inputs (task index, replay, K -shot query data, etc).
θ init θ 0, θ 0, θ 0, θ 1, θ 1, θ 1, θ 1, [Figure] θ MTL
SGD init
SGD MTL
SGD init
SGD init1 with task [Figure] θ 0 , 1 , we can leverage the functional diversity of other modes for optimal task allocation
Trade-off.
Many regularization-based methods are grounded on minimizing drift (change in parameters) to reduce forgetting on prior tasks.
Yet in Table 3, a multi-task learner has a higher average drift consistently between tasks than EWC, even when both begin from a shared starting point (init → task 1).
Given visibility to prior tasks, a multi-task learner will depart the subspace of the previous parameter, and drift far.
This contradicts with the notion of forcing parameters to reside in the subspace of the previous parameter.
The regularization-based methods essentially anchor all future parameters to the first task observed.
Results in mode connectivity (Garipov et al., 2018; Fort & Jastrzebski, 2019; Draxler et al., 2019) show that a single task can have multiple parameters ("modes") that manifest functional diversity.
We explored computing multiple modes with respect to task 1 to incorporate the broader geometry of the parameter space beyond the subspace of one mode.
To bring performance gains and capacity efficiency, we further obtained this trade-off between the number of modes, number of tasks allocated per mode, and capacity (Theorem 1).
We denote θ init as the initialization parameter, θ MTL(1,...,T) as the multi-task parameter trained on tasks 1 , ..., T , and θ i,t as the parameter of mode index i updated on task t .
Theorem
If the number of modes N is optimized against capacity | θ | and the set of tasks allocated per mode | T ( i ) = { t }| for i ∈ N , t ∈ T , then the total task drift is lower in the multi-mode setting than single-mode setting:
[Equation]
Proof.
See Appendix A.3.
As a result, our proposed algorithm is motivated to train multiple modes while optimizing for tasks learnt per mode.
Our total capacity cannot exceed that of our baselines.
Our improved performance in the continual learning setting also empirically validates Theorem 1.
M ODE -O PTIMIZED T ASK A LLOCATION
Mode-Optimized Task Allocation (MOTA)
To implement our method, there are two components: (i) initialize_ parameters initializing N modes/parameters, and (ii)
update_parameters updating a subset of modes/parameters.
Once the first task is received, we train N models in parallel such that the distance between them is maximized.
Then for each subsequent task, we coordinate the parameter updates of the modes such that the drift per mode is minimized, and only the minimum number of modes needed to solve the task will be updated.
3. M ODE INITIALIZATION
We begin with a pre-trained initialization (used for MOTA as well as all baselines).
We instantiate N models on this initialization of a fixed model architecture, and denote this set of parameters { θ i,t } N for i ∈ N and t ∈ T .
We train the parameters in parallel such that the distance between each other is maximized.
For each batch per epoch, we randomly generate weights { α i } N that sum to 1 and compute an interpolated parameter (cid:98) θ = Σ
Ni α
i θ i,t .
We compute the distance between the N modes Σ Nj,j ̸
= i dist ( θ i,t , θ j,t ) to be maximized (adjusted with a penalty coefficient β max ).
We update each mode with respect to the input loss (evaluated with (cid:98) θ ) and the distance maximization term.
For this distance maximization procedure, we used the average cosine similarity between each layer ℓ between every pair of models dist =
[Equation]
, out of M and N layers and models respectively.
Our coordination of distance maximization between a set of parameters is in-line with the methodology in Wortsman et al.
and Datta & Shadbolt (2022), though their cases specify a unique random initialization per mode.
3. M ODE ADAPTATION
The objective is to strategically update the parameters of a subset of modes required at the t -th task such that we minimize the overall drift from each mode’s prior state but infer accurately on the task t .
For each mode per epoch, we compute the loss with respect to a joint probability distribution.
We also compute a distance term between each mode’s parameters and its parameters at the ( t − 1) -th task dist ( θ i,t , θ i,t − 1 ) to be minimized (adjusted with a penalty coefficient β min ).
We use the EWC regularization term for distance minimization.
We update each mode with respect to the joint loss and its respective parameter drift, and checkpoint each update.
We iterate through the modes sequentially per epoch to minimize memory requirements for parallelized training.
We compute the gradient update for each mode with respect to the joint probability distribution between all the modes.
Specifically, we compute the average probability distribution returned at the last (softmax) layer ℓ = − 1 of each model ρ { θ i,t } N = 1 N Σ N i f
( θ ℓ = − 1 i,t ; x ) .
If a task has a high level of certainty, then only a small subset of models would need to be updated and return a probability distribution skewed toward the target class while the other non-updated / minimally-updated models would return a random distribution, and the resulting averaged distribution would still be slightly skewed towards the target class.
For a task of low certainty, then more models (of high functional diversity) would be updated to return a robust probability distribution.
Furthermore, ensemble learning usually requires each ensemble model be trained independently (and usually with a different
1: procedure update_parameters ( D t , { θ i,t } Ni =1 )
▷ Passanewtask D t toourcurrentparameters { θ i,t } Ni
=1 2: if t =1 then ▷ Checkifinitializingparametersforthefirsttime 3: { θ i,t } Ni =1 ← [-initialize_task
-]initialize_parameters ( D 1 , { θ i,t } Ni =1 ) 4: else 5: { θ i,t − 1 } Ni =1 ← { θ i,t } Ni = ▷ Retainacopyofthelasttask’sparameters 6: for e in epochs do 7: for θ i,t in { θ i,t } Ni =1 do 8: for ( x t , y t ) in D t do 9: ρ { θ i,t } Ni =1 =
joint_inference ( x t , { θ i,t } Ni =1 ) 10:
L t =
L ( ρ { θ i,t } N , y t ) + β min dist( θ i,t , θ i,t − 1 )
▷ Computelossw.r.t.
jointprobabilityanddrift 11: θ i,t := θ i,t − ∂ L t
∂θ
i,t ▷ Updateeachparameterindependently 12: { t ∗ , e ∗ } N := arg min { t,e } N L ( ρ { θ i,t,e } N , y t )
▷ Backtracking:
Enumeratethroughparametercombinations + Σ Ni =1 dist ( θ i,t,e , θ i,t − 1 ) for { θ i,t,e } Ni =1 ∼ { θ i,t,e } N × epochs i = 13: { θ i,t } Ni =1 ← { θ i,t ∗ ,e ∗ } Ni = 14: return { θ i,t } Ni =
1: procedure initialize_parameters ( D 1 , { θ i,t } Ni =1 ) ▷ Initializewithtask D 1 andemptyparametersset { θ i,t } Ni = 2: { θ i,t } Ni =1 ← { θ init } Ni = 3: for e in epochs do 4: for ( x t , y t ) in D 1 do 5: α i ∼ [0 , 1] ∀ i ∈ N s.t.
Σ Ni =
α i ≡6: (cid:98) θ = Σ Ni =
α i θ i,t ▷ Sampleinterpolatedparameter (cid:98) θ 7:
L t =
L ( f ( (cid:98) θ ); x t , y t ) + β max Σ Nj =1 ,j ̸
= i dist( θ i,t , θ j,t )
▷ Computelossanddistanceterm 8: θ i,t :
= θ i,t − ∂ L t
∂θ
i,t
▷ Updateeachparameterindependently 9: return { θ i,t } Ni =
1: procedure joint_inference ( x , { θ i,t } Ni =1 )
▷ Inferenceusingthesetofparameters { θ i,t } Ni = 2: ρ { θ i,t,e } N = 1 N Σ Ni =1 f ( θ ℓ = − 1 i,t ; x ) ▷ Takingaverageofthejointprobabilitydistributionreturnedatthesoftmaxlayer ℓ = −3: return ρ { θ i,t,e } N initialization) and the final predictions are obtained as an average of the predictions of each model. Averaging procedures during inference (e.g. averaging activations, averaging softmax) are not used during training, as each ensemble model should not influence the gradient computation of another, and all ensemble models are expected to be trained on all tasks. We checkpoint gradient updates per epoch, and can thus further optimize the sequence of mode updates by backtracking. Despite optimizing with respect to the joint probability distribution, one risk remains where a minimum number of gradient updates across all modes need to take place before a stable joint probability distribution can be computed.
In other words, by the time we have jointly-accurate modes, it is likely most of the modes have been over-optimized, and thus drifted more than needed.
Thus, we need to backtrack and find the optimal checkpoints across modes that minimize loss with respect to their checkpointed joint probability distribution and drift.
We adopted the simplest backtracking algorithm:
we enumerate through every combination of model checkpoint per epoch across the modes, and select the checkpoint combination that minimizes the loss with respect to the joint probability distribution for task t and minimizes total parameter drift.
To reduce the propensity of selecting earlier-epoch checkpoints (e.g. non-updated models), we can add a penalty term to distance regularization to reduce its relative weighting to input loss.
This helps mitigate the loss imbalance between the input loss term and distance term for earlier checkpoints.
E VALUATION
We state our experimental setup below, with configuration details in Appendix A.1.
We then review our results on MOTA’s improvement in task adaptation.
Incremental Learning (IL) Settings.
A task is a subsequent training phase with a new batch of data, pertaining to a new sub-population/domain, new label set, or different output space.
In instance-IL, each new task bring new instances from known classes.
In class/task-IL, each new task bring instances from new classes only.
Class-IL performs inference w.r
[Figure]
t. all observed classes.
Task-IL performs inference w.r
[Figure]
t. the label set of the task.
We evaluate on task-IL unless otherwise specified
[Figure]
Task-IL TinyImageNet (Stanford) is constructed by dividing 200 labels into 10 tasks (20 labels per task).
Architectures.
We initialize ResNets (He et al., 2015), loading ImageNet-pretrained weights from PyTorch. We train ResNet-18 ( 11 , 181 , 642 parameters), ResNet-50 ( 23 , 528 ,parameters), and ResNet-152 ( 58 , 164 , 298 parameters).
To retain comparable capacity, ResNet-50 (-18) is the default model for baselines (MOTA).
We do not assume task boundaries at test-time for parameter adaptation, and do not use task index to recompute task-specific parameters.
We evaluate against regularization methods (Elastic Weight Consolidation (Kirkpatrick et al., 2017b), Synaptic Intelligence (Zenke et al., 2017), Learning without Forgetting (Li & Hoiem, 2016)).
We also compare against four replay baselines (Experience Replay (Rolnick et al., 2018), Averaged Gradient of Episodic Memory (Chaudhry et al., 2018b), Gradient Projection Memory (Saha et al., 2021), and La-MAML (Gupta et al., 2020)), though they require a task replay buffer for parameter adaptation. We further evaluate against two parameter isolation baselines (BatchEnsemble (Wen et al., 2020), and Winning SubNetworks (Kang et al., 2022)).
We introduce two ablations: Ensemble (distance max.) which is an ensemble of modes obtained using MOTA’s distance maximization procedure and trained on all tasks, and Ensemble (independent seeds) which is an ensemble of modes trained on all tasks but from independent random initializations.
Metrics.
Single-Task Learning trains on each task independently.
Multi-Task Learning trains on all seen tasks simultaneously.
Primarily baselined against regularization methods, capacity is the number of trainable model parameters.
When considering replay methods as well, we distinguish capacity w.r.t.
model parameters from repay buffer, where the replay budget is 100 per class.
The average drift distance between tasks is the distance between the updated parameters and previous parameters, averaged for each task update instance.
For multiple model parameters, we take the cumulative distance.
We compute this from 1 T − 1 Σ
Tt =2 Σ
Ni dist ( θ i,t , θ i,t − 1 ) .
Given Acc ( θ, x t ) as the validation accuracy on the t -th task, average accuracy is the average validation accuracy across all seen tasks w.r.t.
the parameters updated at the t -th task.
We compute this from 1 t (cid:80) tv =1 Acc ( θ t , x v ) .
Backward Transfer (Lopez-Paz & Ranzato, 2017) measures the influence that learning a task has on the performance on previous tasks.
We compute this from 1 t − 1 (cid:80) t − 1 v =1 Acc ( θ t , x v ) − Acc ( θ v , x v ) .
Forward Transfer (Lopez-Paz & Ranzato, 2017) measures the influence that learning a task has on the performance of future tasks.
We compute this from 1 t − 1 (cid:80) tv =2 Acc ( θ v − 1 , x v ) − Acc ( θ init , x v ) .
Remembering (Díaz-Rodríguez et al., 2018) computes the forgetting part of Backward Transfer.
We compute this from 1 − | min(0 , 1 t − 1 (cid:80) t − 1 v =1 Acc ( θ t , x v ) − Acc ( θ v , x v )) | .
Forgetting (Chaudhry et al., 2018a) is calculated by the difference of the peak accuracy and ending accuracy of each task.
We compute this from 1 T − 1 (cid:80) T − 1 v =1 max t ∈{ 1 ,...,T − 1 } ( Acc ( θ t , x v ) − Acc ( θ T , x v )) .
4. E VALUATING CATASTROPHIC FORGETTING
We evaluate MOTA against different types of distribution shifts (Table 1, Figure 1, Table 2).
Evaluating on task shift in CIFAR100 and TinyImageNet, we observe improved backward and forward transfer with MOTA, indicating lower forgetting as well as improved feature transferability between tasks.
As task-specific information is not necessary for parameter adaptation, we can evaluate our method on settings that do not require an assumption of task boundaries or indexing, namely subpopulation and domain shift.
We find that our method also outperforms on backward/forward transfer on Instance-IL CIFAR100 (sub-population shift) and Task-IL DomainNet (domain shift).
We primarily baseline MOTA against other regularization-based methods (Table 3).
Though MOTA aims to find a combination of parameters that can perform close to the multi-task learning strategy, it falls shortly behind.
By optimizing (i) the number of modes throughout the parameter space against (ii) optimal task allocation per parameter, MOTA can outperform other regularization and replay methods.
In particular, MOTA outperforms its component baselines: EWC (where this baseline and
MOTA use the EWC regularization term in minimizing mode drift), and ensembling (where this baseline and MOTA use the same distance maximization procedure from init to return modes).
We show that the optimal combination of these components can yield superior performance.
Further evaluating MOTA against ensembles, an ablation multi-mode strategy where each ensemble mode is sequentially-trained on all tasks without any forgetting strategies, we find that ensembles underperform most baselines and MOTA.
Ensembling with independent seeds is almost equivalent in performance to single-task training.
Though ensembling maximizes functional diversity across
[Table] [Table]
[Table]
modes, contains diverse representations per task
[Table]
and increases the likelihood of a mode being closer to a multi-task parameter, it does not have a coordinated inference strategy (e
[Table]
g. weighted mode predictions) nor is it capacity-efficient with respect to tasks (updating all modes or a subset of modes).
Furthermore, ensembles are trained on all tasks and each mode returns an informed probability distribution conditioned on all tasks while MOTA dilutes the joint probability distribution with partially-conditioned probability distributions of updated models with random distributions of non-updated models, thus MOTA would be expected to underperform ensembling.
Unlike prior continual learning methods, we do not assume each parameter must have seen all prior tasks.
We introduce efficiency in task allocation per parameter.
This is similarly motivated to a multi-headed architecture (where distinct subnetworks are explicitly allocated to a different subset of tasks) with a shared header, though we do not need a task index to select a task-specific subnetwork.
4. T RADEOFF BETWEEN ACCURACY AND CAPACITY
[Figure]
A
[Figure] r a g [Figure]
A
[Figure]
In Figure 2, we vary the capacity as the number of total trainable parameters in proportion to the number of parameters for EWC (using a ResNet152 model).
2 × ResNet18 is similar in capacity to EWC (ResNet50), and the other architectures of varying number of modes have less than or similar capacity to
EWC (ResNet152).
We learn from ensemble performance in Table 3 that utilizing global geometry alone is not sufficient to improve average accuracy, and that we need to optimally allocate tasks per mode.
Similarly in Figure 2, we observe a similar inclination for a balance between capturing global geometry and optimizing tasks per mode.
We would expect that, given a constant number of tasks, an increasing number of modes would result in improved average accuracy.
Instead, the average accuracy gain between 2-6 ResNet18s is minimal.
We also observe a trade-off between the number of modes and optimal task allocation per mode.
Considering EWC (ResNet50; i.e. 1 × ResNet50) and 2 − 3 × ResNet50, an increase in the number of modes results in an increase in average accuracy.
Considering constant capacity, 4 × ResNet outperforms 2 × ResNet50; however, 3 × ResNet50 outperforms 6 × ResNet18.
4. C HANGES TO THE GEOMETRY OF THE PARAMETER SPACE
From Table 1, the average task drift (drift distance between the next and previous task’s parameters) tends to be lower for MOTA than EWC, Single-Task, and Multi-Task Learning.
This can be visually observed in the trajectory of the parameters in Figure 3.
We also observe from Figure 3 that the loss landscape changes drastically between tasks.
A region considered to be low-loss by a parameter at task t becomes a high-loss region with respect to the next task t + 1 .
As each task is added, the sharpness of the basin upon which the EWC parameter exists tends to increase.
This change in sharpness tends to be much smaller for the regions in which MOTA modes are located, where the basin still retains a similar level of flatness.
E W
C
[Table]
M o d e
M o d e loss
P
[Table]
[Table] [Table]
P
[Table] [Table]
[Table] [Table]
E W
C
M o d e M o d e
[Table] [Table]
[Figure]
C ONCLUSION
Driven by observations in the optimization behavior of multi-task learners, we hypothesize incorporating the broader geometry of the parameter space into a continual learner for improved adaptation between data distributions.
Supported by the formulation of a trade-off between the number of modes and task allocation per mode, we demonstrate that Mode-Optimized Task Allocation (MOTA) can outperform existing baselines.
It can retain a high average accuracy on current and previous data in sub-population, domain, and task shift settings.
We also present supporting results on how MOTA influences the sharpness of the loss landscape between tasks, and how accuracy varies with the total capacity of MOTA.
With this first step in leveraging the global geometry of loss landscapes changing with tasks, many potential future directions exist.
Next steps range from more efficient methods in leveraging the global geometry (e.g. using fewer modes or a single network alone, alternative task allocation schemes), to demonstrating improved properties with architecture modifications (e.g. improve robustness with changes to regularization terms), to supporting meta learning regimes (e.g. unseen tasks).
A A PPENDIX
This appendix is organized as follows:
• Appendix A.1: We provide detail on the experimental configurations.
• Appendix A.2: We review the EWC regularization term, given its regular usage as a baseline as well as its usage as a distance minimization term in MOTA.
• Appendix A.3: We provide our complete analysis for the trade-off between the number of modes and task allocation.
A. E XPERIMENTAL CONFIGURATIONS
• Training: We loaded pre-trained ImageNet weights for each ResNet architecture with PyTorch (Paszke et al., 2019).
We trained for 200 epochs, with batch size 512, using AdamW optimizer (learning rate 0.1 with 1cycle learning rate policy) train/val/test split of 70/10/20%, We train and evaluate (including when averaging the joint probability distribution) using a cross-entropy loss function.
We used the seed 3407 throughout all operations; for those requiring multiple unique random values (e.g. multiple randomly initialized models), the seed is the index of the object (1, 2, ...).
• Regularization methods: The regularization strength for weight penalty λ for EWC and SI is 1 , 000 and 100 respectively, with SI dampening term 0 .
1 , and LwF’s temperature for distillation loss 2 . 0 .
• Replay methods: The memory buffer’s budget per class is 100 . We use 10 − 7 A-GEM epsilon (parameter to ensure numerical stability of A-GEM).
For La-MAML (Gupta et al., 2020), a meta-learning approach with a replay buffer, we retain the per-parameter learning rate α 0 = 0 .
1 and the learning rate of α at 0.3.
We use 0.01 learning rate for GPM (Saha et al., 2021).
• Parameter isolation methods: For WSN (Kang et al., 2022), which selectively reuses and expands subnetworks within a network, we set layer-wise capacity to 0.5. BatchEnsemble (Wen et al., 2020) uses a base network (slow weights) and stores separate parameters (fast weights) to compute the parameters per ensemble, thus N ensembles do not require N sets of parameters. Each ensemble member is responsible for one task ( N = 10 ). We retain -0.
random sign init for fast weights and 0.5 fast weights learning rate multiplier.
• MOTA:
The distance maximization coefficient β max is 100.0.
For the distance minimization procedure in subsequent epochs, we retain the elastic weights consolidation procedure of computing the Fisher information matrix and computing its corresponding regularization term.
We retain EWC’s lambda β min =
λ = 1 , 000 .
• Ensembles methods: We used the same number of models in ensemble as the number of modes of the comparable MOTA ( N = 2 for Table 3).
We retain the same distance maximization coefficients as MOTA, and use unique seeds (1,2,...) for each model’s random initialization.
A. EWC REGULARIZATION TERM
Importance of each parameter is computed for each task by the parameter’s corresponding diagonal element from its Fisher Information matrix F .
Given the index of the parameters i ( i th element of θ t , i th diagonal element of F ), importance of the previous task compared to the next task λ , we can compute the EWC regularization term (Kirkpatrick et al., 2017a): (cid:80) | θ t [Equation] 1 | i [Equation]
[Equation]
A. A NALYSIS ON M ULTIPLE M ODES VS T ASK A LLOCATION T RADE - OFF
First we denote θ init as the initialization parameter, θ MTL(1,...,T) as the multi-task parameter trained on tasks 1 , ..., T , and θ i,t as the parameter of mode index i updated on task t .
Lemma 1 Iterating through each task t , for a reference multi-task parameter θ MTL , the cumulative distance between an updated θ i,t and previous θ i,t − 1 parameter with respect to θ MTL will exceed the drift between θ i,t and θ i,t − 1 :
[Equation]
Proof.
By the triangle inequality, the sum of the distances between the previous and the updated parameter with respect to θ MTL will exceed the drift between the previous and the updated parameter:
[Equation]
Thus, we can show that that the cumulative distance between an updated parameter with respect to θ MTL will exceed the drift between the updated and previous parameters.
Hence, this cumulative distance also measures the task drift.
[Equation]
Definition 1 (Task Allocation)
Task Allocation is defined as a procedure that allocates a set of tasks
T ( i ) = { t } to be learnt by a parameter mode θ i,t of index i .
Definition 1.1 (Optimal Task Allocation)
Optimal Task Allocation is defined as a procedure that maximizes the number of tasks |{ t }| allocated per mode of index i , while minimizing the total drift between parameter updates Σ Ni
=1 Σ T ( i ) t ( θ i,t − θ i,t − 1 ) .
Corollary 1 We can approximate Optimal Task Allocation by optimizing the number of tasks |{ t }| allocated to mode i against the cumulative distance between an updated θ i,t and previous θ i,t − 1 parameter with respect to θ MTL (Lemma 1).
This results in:
[Equation] [Equation]
In other words, T ( i ) ∝ 1 θ i,t − θ MTL .
At least one task must be allocated per mode | T ( i ) | ≥ 1 .
Corollary
Given L ( f ( θ MTL(1,...,T) ; x T ( i ) ) , y T ( i ) )
≈ L ( f ( θ T ( i ) ; x T ( i ) ) , y T ( i ) ) , we use θ MTL =
θ MTL(1,...,T) as the reference multi-task parameter.
Theorem
If the number of modes N is optimized against capacity | θ | and the set of tasks allocated per mode | T ( i ) = { t }| for i ∈ N , t ∈ T , then the total task drift is lower in the multi-mode setting than single-mode setting:
[Equation]
Proof.
Based on Lemma 1, given N modes and optimal task allocation T ( i ) with respect to the distance between each θ i and θ MTL , we can compute the total drift with respect to θ MTL as Σ Ni =1 Σ T ( i ) t ( θ i,t − θ MTL ) .
Note that the capacity of an evaluated mode changes between the multi-mode and single-mode setting.
We can compute the total drift normalized by capacity (specifically the number of parameter values) with the squared Euclidean distance averaged by number of dimensions
[Equation]
given | θ MTL | ≡ | θ i,t | .
From Corollary 1, | T ( i ) | is larger when θ i is closer to θ MTL .
Thus for a threshold T , we can decompose the total drift into:
[Equation]
Consequently, taking the difference in total drift (Eqt 4) between multiple-mode against single-mode settings result in the follow trade-off function (Eqt 5).
We add 1 /N to enable comparison between
[Equation]
[Table]
[Equation] [Table] [Equation] [Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table] Notably, for small T (e.g. T = 1 ), the Σ T ( i ) (cid:12)(cid:12)
[Equation]
T ( i [Equation] [Table] ≤T
[Table]
[Equation]
[Table] learns a few tasks per mode, lowers the capacity available per mode | θ | /N , and thus these capacity-inefficient modes are redundant .
Furthermore, as T decreases, the functional diversity of a mode is less important, and any random mode can generalize the set of tasks T ( i ) (cid:12)(cid:12) | T ( i ) | ≤ T .
Hence,
[Equation]
If N = 1 , then π = 0 , given:
[Equation]
Performance would be identical to the single-mode sequential learning case
[Equation] If N → ∞ (and redundant modes dominate) [Equation] then π >
[Equation]
given: [Equation] Though the terms where | T ( i ) | > T may reduce the cumulative distance compared to a singlemode setting, an extremely large number of modes will result in excess modes only storing one/few tasks.
These excess terms will increase, and the cumulative distance from θ MTL will be greater in the multi-mode setting than the single-mode setting [Equation]
If 0 < N < ∞ is optimized [Equation] then π <
[Equation]
given: [Equation] For | T ( i ) | ≤ T , any sampled mode will be similarly distant from θ MTL , thus we can cancel this term on both sides.
[Equation]
This result shows that, compared to single-mode sequential learning, if we optimize the number of modes N , then we can minimize the cumulative distance with respect to θ MTL , and thus minimize the total task drift.
In other words, we conclude that optimizing the number of modes N against capacity | θ | and tasks allocated per parameter | T ( i ) | can outperform training on a single mode.
If we increase N , then we can minimize the total task drift.
If N is too large, however, then the number of tasks allocated per parameter | T ( i ) | decreases, and thus increases the number of redundant mode terms (and total task drift).
[Equation]