Abstract
Neural networks frequently suffer from catastrophic forgetting when learning tasks sequentially. While most Continual Learning (CL) research focuses on artificial task boundaries, real-world scenarios often lack such structure. We present Dark Experience Replay (DER), a simple yet effective baseline for General Continual Learning (GCL). By leveraging "dark knowledge"—the model's past logits—DER maintains consistency with its own optimization history. Our method achieves state-of-the-art performance across multiple benchmarks, including a new, more realistic dataset, MNIST-360, while remaining computationally efficient.
Introduction
The primary challenge in Continual Learning is catastrophic forgetting, where new information overwrites previously learned knowledge. Traditional CL benchmarks often rely on "task boundaries" (e.g., learning classes in discrete sets), which do not reflect the continuous nature of real-world data streams. This paper advocates for General Continual Learning (GCL), characterized by the absence of task boundaries during training, no task IDs at test time, and a fixed memory budget.
Existing complex methods often fail to outperform simple Experience Replay (ER) under these realistic constraints. We propose Dark Experience Replay (DER) to bridge this gap by preserving the model's internal logic through past output scores.
Methodology
Dark Experience Replay (DER)
Standard rehearsal methods store past examples $(x, y)$ in a buffer. DER extends this by also storing the model's logits ($z$) at the time the sample was first processed. The training objective includes an $L_2$ loss between current logits and stored "dark" logits:
$$\mathcal{L}_{DER} = \mathcal{L}_{task} + \alpha \|z - z_{old}\|_2^2$$
This encourages the model to retain the "rich description" of data—relationships between classes—rather than just the final label.
DER++
DER++ further incorporates a cross-entropy loss on the ground-truth labels of buffered samples:
$$\mathcal{L}_{DER++} = \mathcal{L}_{task} + \alpha \|z - z_{old}\|_2^2 + \beta \mathcal{L}_{CE}(x, y)$$
This anchors the model to correct classifications while maintaining historical consistency.
Memory Management
To handle the lack of task boundaries, we employ reservoir sampling. This ensures that at any point in the stream, every sample seen has an equal probability of residing in the fixed-size memory buffer.
Experiments and Datasets
We evaluate DER on Sequential CIFAR-10, Tiny ImageNet, and MNIST variants. To better simulate real-world conditions, we introduce MNIST-360.
MNIST-360 presents a stream of digits that are slowly and continuously rotated. This requires the model to handle both the emergence of new classes and gradual distribution shifts within those classes.
Results and Discussion
Performance
DER and DER++ consistently outperform state-of-the-art methods like iCaRL, GEM, and EWC. On CIFAR-10 Class-IL with a 200-sample buffer, DER++ achieves 64.88% accuracy, significantly higher than regularization-based methods (e.g., EWC at 19.49%). On MNIST-360, DER++ maintains approximately 76% accuracy, outperforming MER and GSS.
Optimization Landscape
Analysis reveals that DER leads the model toward flatter minima. In the context of CL, flatter regions of the loss landscape allow for greater parameter shifts during new task learning without significantly degrading performance on previous tasks. This property is crucial for maintaining performance on old tasks while adapting to new ones.
Efficiency and Calibration
DER is computationally light, avoiding the complex optimization steps required by methods like GEM. Furthermore, DER models exhibit superior calibration, with confidence scores that more accurately reflect true predictive probability. This is vital for safety-critical real-world applications.
Conclusion
Dark Experience Replay provides a powerful, simple baseline for General Continual Learning. By matching past logits, the model preserves its "dark experience," leading to better generalization and resilience to forgetting. Its simplicity and performance on benchmarks like MNIST-360 make it a practical choice for real-world applications.
Summary updated