When a machine learning model learns sequentially, it faces a fundamental dilemma: how to integrate new knowledge without destroying what it has already learned. In continual learning, this challenge is typically split into two paradigms: Task-Incremental Learning (TIL) and Class-Incremental Learning (CIL).
In a TIL setting, the model is given a "cheat sheet" during inference—a task identifier that tells it exactly which subset of classes an input could belong to (e.g., "This image belongs to Task 3, which only contains keyboard and mouse classes").
In real-world deployments, however, this task identifier is completely missing. This is the domain of Class-Incremental Learning, where a model must perform task-agnostic inference. Given an input, the model must evaluate it against every single class it has ever encountered across its entire lifecycle, without any external context to narrow down the possibilities (van de Ven et al.; Madireddy et al.).
Understanding why CIL is so difficult—and how modern architectures solve it—requires looking at how neural networks manage decision boundaries when operating without task labels.
The Core Obstacle: Global Competition and Recency Bias
Why does a network that performs perfectly in a task-aware setting fail catastrophically in a task-agnostic one? The root cause is global competition (Kim et al.).
When a model learns sequentially, it updates its weights to minimize error on the current batch of classes (Task $N$). Because it does not see data from previous tasks (Tasks $1$ to $N-1$), the network naturally optimizes its internal representations and output logits for the new categories.
Task-Aware Inference (TIL):
Input ──► [Task ID Known] ──► Evaluate only Task N Classes ──► Correct Prediction
Task-Agnostic Inference (CIL):
Input ──► [Task ID Unknown] ──► Evaluate ALL Historical Classes ──► Recency Bias ──► Misclassification
Without a task identifier at test time, the model must pass the input through a single, unified output head (Sokar et al.). Because of the sequential training process, the logit magnitudes for the most recently learned classes are typically much larger than those for older classes. This creates a severe recency bias: the model misclassifies old concepts into new categories simply because the global decision boundaries have drifted (Kim et al.). To overcome this, a model must find a way to reconstruct or infer the missing task context autonomously.
Decomposing CIL into OOD Detection
One of the most elegant conceptual breakthroughs in this field is the mathematical decomposition of the CIL problem. As proven by Kim et al., solving Class-Incremental Learning is mathematically equivalent to simultaneously solving two distinct sub-problems:
- Within-Task Prediction (WP): Given that an input belongs to a specific task, how accurately can the model choose the correct class?
- Out-of-Distribution (OOD) Detection: How accurately can the model determine whether an input does not belong to a given task?
If a model possesses a set of task-specific "expert" heads, and it can perfectly identify which task the input belongs to (OOD detection), it can seamlessly route the input to the correct expert head for final classification (WP). Kim et al. demonstrated that achieving high accuracy in both WP and OOD detection is both a necessary and sufficient condition for solving CIL.
This insight shifts the strategy: instead of trying to train a single, massive, unbiased classifier across all classes, researchers can build models where individual components act as expert OOD detectors. For example, the MORE framework (Kim et al.) leverages memory replay data not to retrain old classes, but specifically as OOD examples to sharpen the boundaries between different task heads.
Dynamic Task Inference Mechanisms
Building on this decomposition, several architectural strategies focus on explicitly predicting the missing task identifier at inference time.
Multi-Centroid Task Descriptors
Rather than relying on a single output head, some architectures use a multi-branch structure where a dedicated "gate network" predicts the task ID. Cai et al. developed a method using a multi-centroid task descriptor. During training, the model maps the feature space of each task. At inference time, the gate network compares the input's features against these historical centroids to identify the most likely task origin, allowing the model to activate the exact parameters needed for classification.
Context Detectors and Prompt Routing
In rehearsal-free scenarios (where storing past data is prohibited due to memory or privacy constraints), models must infer context directly from the input distribution. Gurbuz introduced NICE, an architecture that groups neurons into maturation stages and uses an internal context-detector to autonomously determine which subset of its knowledge base matches the input.
Similarly, in prompt-based vision architectures, Wang et al. designed INCPrompt, which uses a "key-learner" to dynamically predict the task context at test time. This predicted context routes the input to task-specific prompts, bypassing the need for explicit task labels.
Input ──► [Key-Learner / Context-Detector] ──► Infers Task Context ──► Activates Task-Specific Parameters ──► Final Class
Gradient-Based Inference
When networks expand over time to accommodate new tasks, identifying which sub-network or "expert" to activate becomes a bottleneck. Roy et al. introduced a gradient-based task inference method. By evaluating how the input interacts with the internal gradients or loss surfaces of different network branches, the system can back-infer which task parameters are the most compatible with the test sample.
Maintaining a Unified Decision Space
An alternative to explicitly predicting a task ID is to eliminate the need for one by maintaining a single, continuously calibrated global decision space.
While parameter-masking methods can completely eliminate forgetting within isolated tasks, they often require exhaustive, computationally expensive forward passes across every single task configuration at test time to find the right output (Masana et al.).
To avoid this computational bottleneck, frameworks often use Generative Replay. Instead of storing raw user data, a generative model (such as a GAN or a feedback-driven generator) learns the distribution of past tasks (van de Ven et al.; Ostapenko et al.). When Task $N$ is being trained, the generator synthesizes pseudo-samples of Tasks $1$ to $N-1$.
By interleaving these synthetic past representations with real current data, the model optimizes a single, unified decision boundary. The model doesn't need to infer a task ID because the global competition between old and new classes is resolved during the training process itself.
Key Foundational Work
Multilayer Neuromodulated Architectures for Memory-Constrained Online Continual Learning (2020) — contributed 2 concept elements to this direction.
Brain-inspired replay for continual learning with artificial neural networks (2020) — contributed 1 concept elements to this direction.
Learning to Remember: A Synaptic Plasticity Driven Framework for Continual Learning. (2019) — contributed 1 concept elements to this direction.