Task-Agnostic Inference for Modular Continual Learning

This direction is merged into another direction: task-agnostic inference (task-aware inference dependency). Its last version stays readable and citable here.

Version 1 of 161 papers63 conceptsfrozen 2026-10-04

In the pursuit of Artificial General Intelligence, a primary obstacle is catastrophic forgetting: the tendency for neural networks to overwrite old knowledge when learning new tasks. To combat this, researchers have developed modular architectures that isolate knowledge into specialized "islands"—such as task-specific adapters, masks, or prompts.

However, these modular systems often suffer from a hidden dependency: they require a Task Identifier (Task-ID) at inference time. This "Oracle" assumption—knowing exactly which task an input belongs to before processing it—is a luxury rarely found in the real world. Recent research has shifted toward task-agnostic inference, developing mechanisms that allow models to autonomously identify context and route data to the correct parameters without external guidance.

The Modular Isolation Strategy

To understand why we need task-agnostic inference, we must first look at how modern continual learning (CL) prevents forgetting. The most effective methods involve architectural expansion or masking:

  • Adapters and LoRA: Chang Che and colleagues in LiLoRA use low-rank decompositions to create task-specific weights. Similarly, Jiangpeng He's CL-LoRA splits modules into shared and specific components.
  • Feature Masking: Marc Masana and Joost van de Weijer developed Ternary Feature Masks, which freeze weights and apply task-specific masks to activations to ensure "zero forgetting."
  • Prompting: Zifeng Wang and others in Learning to Prompt use learnable prompts to instruct a frozen backbone on how to handle different tasks.

While these methods effectively "quarantine" new knowledge, they create a selection problem. If a model has 50 different adapters for 50 different tasks, how does it know which one to use for a raw, unlabeled input? As Ronald Kemker and Christopher Kanan argue in their benchmarking work, relying on a Task-ID prevents these systems from being truly autonomous.

Mechanisms for Autonomous Routing

To eliminate the Task-ID, researchers are building "routers" or "indexers" that look at the input data and decide which internal module is most relevant.

Generative and Index Modules

One approach is to train a secondary module to recognize the task. Jangho Kim and Nojun Kwak introduced StackNet, which uses a GAN-based Index Module. This module acts as a gatekeeper, identifying the task context from the input data itself, allowing the model to "stack" new filters without losing the ability to retrieve old ones.

Mixture-of-Experts (MoE) and Gating

Other researchers adapt the Mixture-of-Experts framework for continual learning. In OrchMoE, Tao Sun and his team use a dual-router system to categorize inputs into "skills" and "abstract tasks." This eliminates the need for manual labels by treating task selection as a learnable routing problem. Similarly, Donato Crisostomi's MASS uses subspace selection to merge specialized models into a single generalist system that recovers expert performance without needing an oracle.

Information Bottlenecks and Latent Variables

A more fundamental approach involves changing how the model processes information. Andor Diera and Lukas Galke proposed the Discrete Key-Value Bottleneck (DKVB). By forcing information through a discrete set of learnable keys, the model naturally learns to route inputs to the appropriate values, bypassing the need for Task-IDs entirely.

Taking a probabilistic view, Saurav Jha and Dong Gong developed NPCL, which models tasks as latent variables. This allows the model to use uncertainty estimates to "guess" the correct task during testing, providing a robust way to handle unknown or ambiguous inputs.

Why This Works: Building Intuition

The shift toward task-agnostic inference works by transforming the selection problem into a representation problem.

In traditional "Task-Incremental Learning," the model is a collection of silos, and the human provides the map. In "Class-Incremental" or "Generalized Continual Learning," the model must learn the map itself. By training routers (like in OrchMoE) or using attention-based retrieval (like in ESSENTIAL), the model learns to associate specific input features with specific parameter clusters.

When the model sees a new input, it doesn't just ask "What is the answer?" but first asks "Which of my learned skills does this look like?" This internal "self-routing" is what allows the Scalable Language Model (SLM) by Bohao Peng to acquire new skills sequentially while remaining a single, unified interface for the user.

The Path Forward

The ultimate goal of this research direction is to bridge the gap between controlled laboratory benchmarks and the messy reality of open-world deployment. As Mohammad Saidur Rahman notes in his critique of CL for malware, models that rely on Task-IDs often collapse in real-world scenarios. By focusing on autonomous task identification and task-agnostic fusion (as seen in TITA), the field is moving toward AI that can learn, remember, and—most importantly—recognize what it has learned without being told.

Papers in this version

Showing 60 of 61 papers.

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_task_agnostic_inference_for_modular_cont_df73c859,
  title = {Task-Agnostic Inference for Modular Continual Learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/task-agnostic-inference-for-modular-continual-learning/rdr_df73c85991f14a90bd3d1feef17cbc0f},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_task_agnostic_inference_for_modular_cont_df73c859_v1,
  title = {Task-Agnostic Inference for Modular Continual Learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/task-agnostic-inference-for-modular-continual-learning/rdr_df73c85991f14a90bd3d1feef17cbc0f/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}