NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Modular Deep Learning

Jonas Pfeiffer, Sebastian Ruder, Ivan Vulić, Edoardo Ponti

Abstract

Transfer learning has recently become the dominant paradigm of machine learning. Pre-trained models fine-tuned for downstream tasks achieve better performance with fewer labelled examples. Nonetheless, it remains unclear how to develop models that specialise towards multiple tasks without incurring negative interference and that generalise systematically to non-identically distributed tasks. Modular deep learning has emerged as a promising solution to these challenges. In this framework, units of computation are often implemented as autonomous parameter-efficient modules. Information is conditionally routed to a subset of modules and subsequently aggregated. These properties enable positive transfer and systematic generalisation by separating computation from routing and updating modules locally. We offer a survey of modular architectures, providing a unified view over several threads of research that evolved independently in the scientific literature. Moreover, we explore various additional purposes of modularity, including scaling language models, causal inference and discovery, programme simulation, and hierarchical reinforcement learning. Finally, we report various concrete applications where modularity has been successfully deployed such as cross-lingual and cross-modal knowledge transfer.

The Monolithic Bottleneck

Modern AI is dominated by "monolithic" architectures—dense, fully connected networks where every parameter participates in every computation. While these models have achieved remarkable success, they face inherent limitations as we scale toward general intelligence.

First, they suffer from negative interference: in multi-task settings, gradients from disparate tasks often conflict, leading to a "curse of multilinguality" where adding more languages or tasks eventually degrades performance for all. Second, they are prone to catastrophic forgetting, where learning new information overwrites previously acquired knowledge. Finally, monolithic models lack systematic generalization; they struggle to recombine known concepts (e.g., "summarization" and "Swahili") in novel ways if that specific combination wasn't present in the training data.

Modular Deep Learning (MDL) proposes a shift toward systems composed of specialized, autonomous units. By mimicking the modularity found in biological brains, MDL aims to create models that are more efficient, interpretable, and adaptable.

A Taxonomy of Modularity

The core of MDL lies in a three-step process: routing, computation, and aggregation. This survey introduces a comprehensive taxonomy to categorize these methods across four dimensions.

Algorithm 1: The three-step forward pass of a modular function involving routing, computation, and aggregation.
  1. Computation Function: This defines the module's implementation. It can involve Parameter Composition (e.g., LoRA, where weights are modified), Input Composition (e.g., Prompt Tuning, where the input itself is augmented), or Function Composition (e.g., Adapter layers, where new sub-functions are inserted into the network).
  2. Routing Function: This determines which modules are activated for a given input. Routing can be Fixed (manually assigned by experts) or Learned. Learned routing can be "Hard" (selecting a single module) or "Soft" (creating a weighted combination of multiple modules).
  3. Aggregation Function: Once modules have processed the data, their outputs must be combined. This ranges from simple summation to complex attention-based mechanisms that weigh module contributions based on context.
  4. Training Setting: This describes the lifecycle of the modules—whether they are trained jointly with the base model (as in Mixture-of-Experts), added sequentially in a continual learning setup, or used for post-hoc adaptation of a frozen pre-trained model.

Key Insights: Scaling and Re-composition

A major contribution of this survey is the identification of a "Unified Functional Form". The authors demonstrate that most modular methods can be expressed as $f'(x) = f_\theta(x) + f_\phi(x)$, where a specialized term ($f_\phi$) is added to a general-purpose base function ($f_\theta$). This mathematical simplicity underlies the versatility of the field.

Comparison of modular architectures: (a) MAD-X for cross-lingual transfer, (b) Polytropon for multi-task learning, and (c) Mixture-of-Expert (MoE) Transformers for scaling.

Modularity is also the primary driver for efficient scaling. Mixture-of-Experts (MoE) architectures allow models to scale to trillions of parameters while keeping inference costs manageable, as only a small subset of "experts" is activated per token. Furthermore, frameworks like MAD-X enable "zero-shot re-composition," allowing a model to perform a task in a new language by simply swapping a language-specific module while keeping the task-specific module intact.

Performance and Efficiency

Empirical results across NLP and Vision benchmarks highlight the advantages of MDL:

  • Parameter Efficiency: Methods like LoRA can match full fine-tuning performance while updating less than 0.5% of total parameters.
  • Mitigating Interference: Language-specific modules effectively prevent the performance drop-off typically seen in massive multilingual models.
  • Sample Efficiency: By reusing existing modular "skills," these models require significantly fewer examples to adapt to novel downstream tasks.

Future Directions

Despite its promise, MDL faces several challenges. Routing stability remains a concern; models often experience "module collapse," where the router favors a few modules, leaving others underutilized. Additionally, the field lacks standardized metrics for measuring "modularity" itself, often relying solely on task accuracy. Future research into hierarchical modularity—creating modules within modules—may be necessary to capture the multi-level abstractions required for human-like reasoning.

Summary updated

BibTeX
@article{pfeiffer2023modular,
  author = {Jonas Pfeiffer and Sebastian Ruder and Ivan Vulić and Edoardo Ponti},
  title = {{Modular Deep Learning}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=z9EkXfvxta},
}
Figure