Abstract
Multi-Task Recurrent Modular Networks (MT-RMN) address the limitations of static architectures in multi-task learning (MTL) for sequence data. By employing a modular shared encoder with dynamic routing, the model adapts its parameter-sharing at each time step. This approach mitigates negative transfer and enhances compositional generalization, particularly in scenarios with loosely related tasks. Experimental results on functional MRI time-series and code-switched POS tagging demonstrate that MT-RMN consistently outperforms standard recurrent baselines and existing MTL frameworks.
Introduction
In multi-task learning for sequence processing, such as time-series analysis or natural language processing, models typically rely on static, predefined architectures to share knowledge between tasks. However, real-world task relationships are often dynamic; the strength of relatedness between tasks can fluctuate over time or vary based on specific input features.
Standard recurrent neural networks (RNNs) lack the flexibility to adapt their parameter-sharing on the fly, often leading to "negative transfer" where learning one task degrades performance on another. Furthermore, these models struggle with compositional generalization—the ability to handle novel, unseen tasks by recombining learned primitives. MT-RMN tackles these challenges by designing an RNN architecture that can dynamically rewire itself at every time step, learning which sub-components to share and which to keep separate based on the immediate context.
Methodology
The MT-RMN architecture is designed to be integrated into existing multi-task recurrent models. It consists of three primary components: a modular shared encoder, task-specific decoders, and policy networks for dynamic routing.
Modular Shared Encoder
The encoder is partitioned into layers of sub-networks. The initial layer comprises independent LSTM cells, while subsequent layers consist of Multi-Layer Perceptrons (MLPs) serving as sub-encoders. This modularity allows the network to treat sub-components as functional primitives.
Dynamic Routing via Policy Networks
At each time step $t$, lightweight policy networks determine the connectivity between sub-networks across layers. This mechanism allows the model to route similar tasks through shared sub-networks while isolating dissimilar tasks. To handle the non-differentiable nature of binary routing decisions, the authors utilize the Gumbel-Max trick with a straight-through estimator, enabling end-to-end training via backpropagation.
Sparsity and Specialization
To ensure that modules actually specialize, the authors apply sparsity constraints. These penalty terms act as a form of coarse-grained neural network pruning, preventing the model from defaulting to a fully connected state and forcing the sub-networks to learn distinct, reusable patterns.
Experimental Setup
The paper evaluates MT-RMN on two primary sequence processing domains:
- Task-Evoked Functional MRI (task-fMRI): Time-series data of brain region activations from participants performing various cognitive and sensory tasks. This dataset tests the model's ability to handle dynamic task relationships and generalize to unseen tasks.
- Code-Switched POS Tagging: A Hindi-English dataset where words from two languages are mixed within sentences, requiring rapid, token-level dynamic adaptation.
Results and Discussion
Performance and Negative Transfer
MT-RMN demonstrates superior performance, particularly when jointly training loosely related tasks. On the fMRI dataset, MT-RMN achieved 76.1% accuracy, outperforming the best baseline (RRNs at 75.4%). The performance gap is most pronounced in scenarios where tasks are less related, as the dynamic routing effectively limits task interference.
Compositional Generalization
A key strength of MT-RMN is its ability to solve novel tasks. By freezing a trained encoder and attaching a new, untrained decoder, the model leverages learned functional primitives to achieve high zero-shot accuracy. In fMRI experiments, MT-RMN reached 97.0% accuracy on unseen tasks, significantly higher than the 93.7% achieved by standard LSTMs.
Integration with Existing Models
In the Hindi-English POS tagging task, incorporating MT-RMN into the GIRNet base model resulted in a massive F1 score improvement from 46.6% to 62.6%, proving that the modular routing mechanism can significantly boost existing MTL architectures.
Conclusion
MT-RMN provides a flexible and interpretable framework for multi-task sequence learning. By treating network components as functional primitives and routing them dynamically, the model achieves state-of-the-art performance and robust generalization. Future work may explore the scalability of this approach to larger sequence-to-sequence problems like machine translation or its integration with automated Neural Architecture Search (NAS) frameworks.
Summary updated