Papers
Topics
Authors
Recent
Search
2000 character limit reached

Exponential Weighted Boundary Loss (EWC)

Updated 15 December 2025
  • EWC is a regularization technique that anchors neural network parameters crucial for prior tasks to mitigate catastrophic forgetting.
  • It introduces a quadratic penalty based on the Fisher information matrix to preserve vital information from previous tasks during training.
  • Empirical results on datasets like Permuted-MNIST and Sequential Atari demonstrate its effectiveness in maintaining low error rates and stable performance.

Exponential Weighted Boundary Loss (EWC), more precisely known as Elastic Weight Consolidation, is a regularization technique designed to address catastrophic forgetting in sequential learning scenarios. Catastrophic forgetting is the phenomena where a neural network, when trained on multiple tasks in sequence, loses performance on previously learned tasks as it updates parameters to solve new tasks. EWC mitigates forgetting by selectively constraining parameters critical to past tasks, thereby enabling neural networks to maintain expertise on earlier tasks even after extensive training on new, unrelated data (Kirkpatrick et al., 2016).

1. Loss Function and Optimization Objective

EWC introduces a quadratic penalty to the standard loss function when learning a new task after completing a previous one. The total loss when training on task BB after task AA is defined as:

L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^2

where:

  • θRD\theta \in \mathbb{R}^D denotes all network parameters (including weights and biases),
  • LB(θ)L_B(\theta) is the standard loss for task BB,
  • θA\theta^*_{A} is the parameter vector optimized on task AA,
  • FiF_i is the diagonal element of the Fisher information matrix at θA\theta^*_{A},
  • AA0 is a hyperparameter modulating the penalty strength.

The penalty anchors parameters to their optimal values for the previous task, weighted by an importance factor AA1. The larger AA2, the higher the penalty for deviating from AA3. For supervised classification or policy learning, AA4 quantifies the average squared sensitivity (gradient) of the log-likelihood with respect to each parameter, approximated as:

AA5

2. Bayesian and Laplace Approximation Perspective

EWC has a principled Bayesian interpretation. After training on data AA6 for task AA7, the posterior is AA8; for task AA9, this posterior acts as the prior. The posterior on both tasks is:

L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^20

EWC approximates L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^21 as a Gaussian centered at L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^22 with precision given by the Fisher information:

L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^23

By maximizing the joint log-posterior, the augmented loss function emerges. The addition of L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^24 allows the empirical tuning of the regularization effect. Hence, the quadratic consolidation penalty is a Laplace (second-order) approximation of the log-posterior of parameters after task L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^25, interpreted as a locally quadratic constraint on the parameter space (Kirkpatrick et al., 2016).

3. Sequential Learning Procedure

The EWC method for continual learning is operationalized as follows:

  1. For a sequence of tasks L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^26 and regularization hyperparameter L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^27:
    • Initialize parameters L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^28 randomly.
  2. For each task L(θ)=LB(θ)+iλ2Fi(θiθA,i)2L(\theta) = L_B(\theta) + \sum_i \frac{\lambda}{2} F_i \left( \theta_i - \theta^*_{A,i} \right)^29 to θRD\theta \in \mathbb{R}^D0:

    • If θRD\theta \in \mathbb{R}^D1, add the penalty

    θRD\theta \in \mathbb{R}^D2

    to the optimizer’s loss, with θRD\theta \in \mathbb{R}^D3 the cumulative Fisher from all previous tasks. - Train θRD\theta \in \mathbb{R}^D4 on task θRD\theta \in \mathbb{R}^D5 using standard optimizers (SGD, RMSprop) until convergence (θRD\theta \in \mathbb{R}^D6). - Estimate θRD\theta \in \mathbb{R}^D7 by accumulating diagonal squared gradients of the log-likelihood over θRD\theta \in \mathbb{R}^D8 mini-batches sampled from θRD\theta \in \mathbb{R}^D9. - Update cumulative precision: for LB(θ)L_B(\theta)0, LB(θ)L_B(\theta)1; else LB(θ)L_B(\theta)2.

This procedure ensures that parameters crucial for previous tasks are protected during optimization for subsequent tasks by the sum-of-quadratics term (Kirkpatrick et al., 2016).

4. Hyperparameter Selection and Implementation Considerations

Key hyperparameters and details include:

  • Regularization strength LB(θ)L_B(\theta)3: Controls the trade-off between retaining performance on old tasks and learning new tasks. Small LB(θ)L_B(\theta)4 increases forgetting; large LB(θ)L_B(\theta)5 impedes new learning. Optimal values are determined via cross-validation. For example, on MNIST, typical values range from 1 to 100; for Atari, values near 400 are used.
  • Number of mini-batches LB(θ)L_B(\theta)6: Stable Fisher estimates on Atari are obtained with LB(θ)L_B(\theta)7.
  • Batch size and optimizer: These follow standard practice for the problem domain (e.g., batch size 200 for MNIST, 32 for DQN replay).
  • Penalty accumulation: EWC can accumulate quadratic penalties either by summing all prior tasks' terms or by one cumulative vector and anchor; both methods are mathematically equivalent.
  • Scalability: Each new task adds one diagonal vector (Fisher) and LB(θ)L_B(\theta)8 anchor, with linear scaling in the number of tasks.

5. Empirical Results on Permuted-MNIST and Sequential Atari

Extensive experiments demonstrate EWC's efficacy:

Permuted-MNIST Sequence (10 Tasks):

  • Baseline SGD exhibits catastrophic forgetting; after all tasks, error on the initial task grows from baseline to approximately 90%.
  • Uniform LB(θ)L_B(\theta)9 regularization underfits new tasks significantly.
  • EWC retains high accuracy across tasks; error rates on early tasks remain near 2–3% after training on all tasks.
  • Fisher-overlap analysis reveals parameter sharing when tasks are similar and allocation of new weights for divergent tasks (Kirkpatrick et al., 2016).

Sequential Atari 2600 (10 Games):

  • Standard DQN, trained sequentially, achieves an aggregate human-normalized score below 1, i.e., it only retains competency in one game.
  • DQN augmented with EWC achieves a steadily rising aggregate score, reaching 6–8 out of 10 across all games, without expanding network capacity.
  • Providing explicit task labels offers only marginal improvement beyond EWC with latent task recognition.
  • Weight-perturbation validated that the Fisher information reliably predicts parameter importance: perturbations along low-F directions degrade performance substantially less.

These results support the boundary-consolidation principle, where parameter “stiffness” induced by EWC prevents catastrophic forgetting in both supervised and reinforcement-learning domains (Kirkpatrick et al., 2016).

6. Discussion and Continual Learning Implications

EWC’s diagonal Fisher-based quadratic penalty framework is distinct from uniform BB0 or other regularizations. It leverages task-specific parameter importance, operationalized via the Fisher information, as a proxy for the posterior’s precision. This approach enables effective sequential multi-task learning without replay buffers or integration of old task data. The approach scales linearly with the number of tasks, offering practical feasibility for multi-task continual learning settings (Kirkpatrick et al., 2016). A plausible implication is that future work could extend beyond diagonal approximations to leverage full-rank covariance structures or enhance consolidation via more expressive posterior approximations.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Exponential Weighted Boundary Loss (EWC).