In continual learning and domain adaptation, models must master a sequence of distinct tasks or environments without suffering from catastrophic forgetting. A highly effective strategy to achieve this is modularity—segregating knowledge into task-specific heads, subnetwork masks, or parameter adapters. However, this introduces a critical dilemma at test time: if the system operates in a "task-agnostic" or "blind" setting where task labels are omitted, how does it know which module to route the input to?
The Core Intuition: Confidence as a Compass
The foundational insight across this research direction is that a model’s internal uncertainty acts as an implicit compass for task identification. When a specialized neural network module processes data from its own training distribution, it produces highly confident, sharp predictions. Mathematically, this manifests as a low-entropy output distribution. Conversely, when that same module is exposed to an out-of-distribution sample from a different task, its internal features fail to align, leading to highly uncertain, flat, and high-entropy predictions.
By passing an input through multiple candidate configurations and observing the resulting predictive or epistemic uncertainty, the system can autonomously deduce the correct task identity. The module that is the least confused is, by definition, the correct expert.
Routing Across Discrete Heads and Branches
The most straightforward implementation of this principle lies in multi-branch or multi-head architectures, where the input is evaluated across parallel pathways. For instance, in source-free domain adaptation, Akshay R. Kulkarni et al. demonstrate in Generalize then Adapt: Source-Free Domain Adaptive Semantic Segmentation that the most suitable specialized head for an unlabeled target domain can be identified purely by selecting the head yielding the lowest prediction entropy.
This concept translates naturally to class-incremental and continual learning settings. Saurav Jha et al. show in NPCL: Neural Processes for Uncertainty-Aware Continual Learning that evaluating predictive entropy across multiple task-specific heads enables robust, automated task identification without explicit test-time labels.
Similarly, parameter-efficient tuning methods utilize this routing mechanism to scale foundation models: Yipeng Lin et al. in GR-LoRA: Gradient-Recycling Low-Rank Adaptation for Class-Incremental Learning route inputs through parallel task branches using entropy metrics, while Elif Ceren Gok Yildirim et al. in Pruned Adaptation Modules: A Simple yet Strong Baseline for Continual Foundation Models pass inputs through pruned layers to select the pathway with the highest confidence score.
Task Inference in Generative and Parameter-Replay Systems
Rather than maintaining static, parallel branches, more complex architectures dynamically generate or replay task-specific parameters on the fly. Hypernetworks and meta-models can be trained to output target network weights conditioned on a task ID. When task IDs are missing at inference time, Johannes von Oswald et al. show in Continual learning with hypernetworks that prediction uncertainty allows the model to dynamically select the correct set of generated weights.
When extended to probabilistic frameworks, this selection can be driven by epistemic uncertainty. For example, Christian Henning et al. in Posterior Meta-Replay for Continual Learning evaluate inputs across stored task-specific posterior distributions, identifying the correct task by choosing the distribution with the lowest epistemic uncertainty. This strategy is mirrored by Honglin Li et al. in Continual Learning Using Bayesian Neural Networks, where the weight distribution exhibiting the lowest uncertainty is selected to make the final prediction.
In non-Bayesian generative setups, Haneol Kang et al. show in Recall-Oriented Continual Learning with Generative Adversarial Meta-Model that generating candidate models for all known tasks and selecting the output with the lowest predictive entropy provides superior task-agnostic performance.
Continuous Optimization and Superposition
Evaluating every discrete branch or generating every model variant sequentially can become computationally expensive as the number of tasks grows. To circumvent this, some approaches formulate task inference as a continuous optimization problem over a superposition of parameters.
In Supermasks in Superposition, Mitchell Wortsman et al. demonstrate that a model can infer an unknown task identity in a single gradient step. Instead of checking masks one by one, the model optimizes a weighted mixture of all learned binary masks to directly minimize the entropy of the output distribution. This concept is expanded by Dhrupad Bhardwaj et al. in ImpressLearn: Continual Learning via Combined Task Impressions, where minimizing output entropy allows the network to accurately pinpoint the correct task configuration from a continuous set of learned mask combinations.
Enhancing Signal Robustness
Relying strictly on a single raw entropy score can occasionally fail if an out-of-distribution input accidentally triggers a confident but incorrect prediction. To make entropy-based inference more reliable, recent frameworks introduce error-correction and stabilization techniques.
For instance, Weicheng Wang et al. introduce a reactive approach in Hybrid Re-matching for Continual Learning with Parameter-Efficient Tuning, treating high prediction entropy as an active alarm signal for parameter mismatches. When confidence drops below a threshold, the system dynamically tests the input against alternative candidate parameter sets to find the one that minimizes uncertainty.
Alternatively, to stabilize the inference signal in vision models, Anurag Roy et al. propose a consistency trick in Exemplar-Free Continual Transformer with Convolutions. They pass multiple augmented versions of a single input through all task heads and compute the entropy of the averaged predictions. The head that maintains the most consistent and confident prediction across these variations is selected, providing a highly robust proxy for task identification in blind settings.
Key Foundational Work
Posterior Meta-Replay for Continual Learning (2021) — contributed 2 concept elements to this direction.
Supermasks in Superposition (2020) — contributed 2 concept elements to this direction.
Continual Learning Using Bayesian Neural Networks (2021) — contributed 2 concept elements to this direction.