Papers
Topics
Authors
Recent
Search
2000 character limit reached

Complementary Anchor Replay (CAR)

Updated 3 July 2026
  • CAR is a continual learning algorithm that augments standard experience replay with learned anchor points to mitigate catastrophic forgetting in neural networks.
  • It leverages a bilevel optimization framework that combines traditional replay loss with an anchoring penalty to preserve predictions on key data points.
  • Empirical results show significant accuracy improvements and reduced forgetting on benchmarks like Permuted MNIST, Split CIFAR-100, and miniImageNet.

Complementary Anchor Replay (CAR), also referred to as Hindsight Anchor Learning (HAL), is a continual learning algorithm designed to mitigate catastrophic forgetting in neural networks exposed to non-stationary data streams. CAR augments standard experience replay strategies by incorporating a learned set of anchor points, optimized to identify and preserve predictions most susceptible to forgetting upon subsequent learning phases. The method leverages bilevel optimization, episodic memory, and a bespoke anchoring loss to ensure retention of decision boundaries crucial to prior tasks while accommodating new information, offering consistent performance improvements across standard lifelong learning benchmarks (Chaudhry et al., 2020).

1. Objective and Core Formulation

The primary objective of CAR is to enable deep models to retain knowledge acquired from previous tasks while learning new ones, particularly in supervised continual learning scenarios. Conventional experience replay minimizes the standard supervised loss over the union of a current minibatch DcurrD_\text{curr} and a sampled subset BMB_M of episodic memory MM:

(θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)

where θRP\theta \in \mathbb{R}^P denotes the model parameters.

CAR augments this with an anchoring penalty, added to each SGD update, that constrains the change in model predictions on a set of learned anchor points {ei}\{ e_i \}. The two-step procedure for every gradient descent step is:

  1. Temporary update: θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)
  2. CAR update:

θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]

where fθ(,ti)f_\theta(\cdot, t_i) is the task-conditioned output, λ>0\lambda > 0 modulates the strength of anchoring, and the summation is over anchor points for all previous tasks. This combined loss penalizes deviation of the network’s predictions on anchors after a small future ("look-ahead") update, effectively preserving information most at risk of being lost.

2. Bilevel Optimization in CAR

CAR is formulated as a bilevel optimization problem in both the parameter update and anchor selection phases.

  • Parameter update as bilevel problem:
    • Outer: BMB_M0
    • where BMB_M1 and BMB_M2
    • Inner: BMB_M3
  • Anchor selection as bilevel problem:
    • Inner: BMB_M7 (fine-tuning on memory)
    • Outer:

BMB_M8

Here, BMB_M9 is the feature embedding, MM0 a running mean feature for task MM1, and MM2 regularizes the anchor’s proximity to the data manifold.

3. Loss Functions

The CAR methodology involves three principal loss functions:

  • Classification loss: For any set MM3,

MM4

where MM5 is the cross-entropy loss.

  • Anchoring loss: On learned anchors,

MM6

  • Forgetting loss (anchor selection):

MM7

4. Anchor Selection and Update Procedure

Anchor points are learned at the completion of each task using gradient ascent to maximize the proxy forgetting loss:

  1. Initialize MM8 for each class MM9 in task (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)0 (random initialization or mean-embedding).
  2. Update via (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)1 gradient-ascent steps:

(θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)2

  1. Freeze (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)3 for use as an anchor in subsequent iterations.

The feature extractor (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)4 is defined as the penultimate layer of the network; (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)5 is tracked online with exponential moving average: (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)6, with decay (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)7.

5. Algorithmic Workflow

The CAR/HAL workflow is structured as follows:

  • Maintain an episodic memory (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)8 with a per-class ring buffer for storage of past examples.
  • After each new task is learned:

    1. Update (θ;DcurrBM)\ell(\theta; D_\text{curr} \cup B_M)9 with examples from the task.
    2. Compute θRP\theta \in \mathbb{R}^P0 (feature mean) online.
    3. After completing the task, fine-tune parameters on θRP\theta \in \mathbb{R}^P1 to obtain θRP\theta \in \mathbb{R}^P2.
    4. For each class, optimize the anchor θRP\theta \in \mathbb{R}^P3 via θRP\theta \in \mathbb{R}^P4 steps of gradient ascent on the forgetting objective.
  • During training on each minibatch:

    1. Sample replay batch θRP\theta \in \mathbb{R}^P5 from θRP\theta \in \mathbb{R}^P6.
    2. Compute look-ahead parameters θRP\theta \in \mathbb{R}^P7.
    3. Update θRP\theta \in \mathbb{R}^P8 using the combined loss: standard replay plus anchoring on all current anchors.

Pseudocode

fθ(,ti)f_\theta(\cdot, t_i)2

6. Empirical Results and Comparative Analysis

CAR/HAL was evaluated on multiple supervised continual learning benchmarks: Permuted MNIST (23 tasks × 10 classes), Rotated MNIST (23 × 10), Split CIFAR-100 (20 × 5), and Split miniImageNet (20 × 5), across varying episodic memory budgets—1, 3, or 5 examples per class per task. Baselines included Finetune, EWC, VCL (with/without random replay), ICARL, AGEM, MER, ER-Ring, MIR, and oracle strategies.

Performance metrics comprised final average accuracy θRP\theta \in \mathbb{R}^P9 and final forgetting {ei}\{ e_i \}0. With 1 example per class memory:

  • On Permuted MNIST: HAL achieved {ei}\{ e_i \}1 vs. MIR {ei}\{ e_i \}2, ER-Ring {ei}\{ e_i \}3, MER {ei}\{ e_i \}4

  • On Rotated MNIST: HAL {ei}\{ e_i \}5, ER-Ring {ei}\{ e_i \}6
  • On Split CIFAR: HAL {ei}\{ e_i \}7, MIR {ei}\{ e_i \}8, ER-Ring {ei}\{ e_i \}9
  • On Split miniImageNet: HAL θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)0, MIR θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)1, ER-Ring θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)2

Relative forgetting was consistently reduced by 15–25%. Increasing memory to 5 examples per class further increased HAL’s accuracy—approximately θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)3 on MNIST tasks, θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)4 on Split CIFAR—always outperforming the compared replay or meta-learning methods.

7. Hyperparameters and Implementation Considerations

Key hyperparameters and implementation aspects include:

  • Learning rate θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)5: θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)6; selected as θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)7 for MNIST, θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)8 for CIFAR/ImageNet.
  • Anchor-loss weight θ~θαθ(θ;DcurrBM)\tilde{\theta} \leftarrow \theta - \alpha \, \nabla_\theta \ell(\theta; D_\text{curr} \cup B_M)9: same grid, set as θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]0 for MNIST, θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]1 for CIFAR, θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]2 for miniImageNet.
  • Mean-embedding regularizer θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]3: typically θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]4.
  • Decay θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]5 for running mean-embedding: θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]6.
  • Anchor-learning steps θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]7: θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]8 per anchor, anchor step size θθαθ[(θ;DcurrBM)+λifθ(ei,ti)fθ~(ei,ti)2]\theta \leftarrow \theta - \alpha \nabla_\theta \left[ \ell(\theta; D_\text{curr} \cup B_M) + \lambda \sum_i \left\| f_\theta(e_i,t_i) - f_{\tilde{\theta}}(e_i,t_i) \right\|^2 \right]9.
  • Feature extractor fθ(,ti)f_\theta(\cdot, t_i)0: penultimate network activation.
  • Episodic memory: per-class ring buffer of size fθ(,ti)f_\theta(\cdot, t_i)1; sampling is uniform.
  • Computational cost: CAR approximately doubles computation time over vanilla replay and remains substantially faster than meta-experience replay (MER).
  • Anchor initialization: random Gaussian initialization in input space is effective; mean-embedding initialization is a possible alternative.

A plausible implication is that the computational efficiency, combined with modest memory usage and scalable performance, makes CAR suitable for practical large-scale continual learning.


CAR/HAL thus functions as a principled extension to experience replay, leveraging trajectory-sensitive anchor points—discovered via explicit maximization of forgetting—to maintain essential decision boundaries. The method demonstrates consistent gains in both accuracy and forgetting metrics relative to multiple strong baselines, with transparent and reproducible optimization and implementation strategies (Chaudhry et al., 2020).

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 Complementary Anchor Replay (CAR).