Skip to main content
QUICK REVIEW

[Paper Review] Sparsely Activated Mixture-of-Experts are Robust Multi-Task Learners

Shashank Gupta, Subhabrata Mukherjee|arXiv (Cornell University)|Apr 16, 2022
Domain Adaptation and Few-Shot LearningComputer Science8 citations
TL;DR

This paper proposes a task-aware gating mechanism for sparsely activated Mixture-of-Experts (MoE) models to improve multi-task learning in NLP. By routing tokens from different tasks to task-specific experts while sharing a subset of weights, the model achieves higher parameter efficiency and robustness—demonstrating superior transfer to low-resource tasks, sample-efficient generalization to unseen tasks, and resistance to catastrophic forgetting compared to dense models.

ABSTRACT

Traditional multi-task learning (MTL) methods use dense networks that use the same set of shared weights across several different tasks. This often creates interference where two or more tasks compete to pull model parameters in different directions. In this work, we study whether sparsely activated Mixture-of-Experts (MoE) improve multi-task learning by specializing some weights for learning shared representations and using the others for learning task-specific information. To this end, we devise task-aware gating functions to route examples from different tasks to specialized experts which share subsets of network weights conditioned on the task. This results in a sparsely activated multi-task model with a large number of parameters, but with the same computational cost as that of a dense model. We demonstrate such sparse networks to improve multi-task learning along three key dimensions: (i) transfer to low-resource tasks from related tasks in the training mixture; (ii) sample-efficient generalization to tasks not seen during training by making use of task-aware routing from seen related tasks; (iii) robustness to the addition of unrelated tasks by avoiding catastrophic forgetting of existing tasks.

Motivation & Objective

  • Address interference in multi-task learning where competing tasks pull model parameters in conflicting directions.
  • Overcome limitations of dense models that use all weights for every input, leading to parameter conflict and suboptimal performance.
  • Enable sparse MoE models to be adapted for multi-task learning by designing task-aware gating mechanisms that route inputs to task-specific experts.
  • Evaluate robustness of sparse MoE models across three key dimensions: transfer to low-resource tasks, generalization to unseen tasks, and resistance to catastrophic forgetting.
  • Demonstrate that sparse MoE with task-aware routing outperforms dense multi-task models in transferability, sample efficiency, and stability under task addition.

Proposed method

  • Adopt a Transformer-based architecture with Mixture-of-Experts (MoE) layers, where each layer contains multiple task-specific experts and a task-aware gating network.
  • Design a gating mechanism that uses task-specific gates to route input tokens to appropriate experts based on the task identity, reducing interference between tasks.
  • Initialize the MoE model using pre-trained BERT weights to enable effective multi-task adaptation from a strong foundational representation.
  • Use top-1 routing with load balancing to maintain computational efficiency while enabling conditional computation and high parameter capacity.
  • Train the model jointly on a mixture of diverse NLU tasks using a shared encoder and task-specific expert heads, with routing decisions made per token based on task identity.
  • Implement a routing strategy that avoids competition for shared gates by decoupling routing decisions per task, enabling specialization without interference.

Experimental results

Research questions

  • RQ1Can task-aware gating in sparse MoE models reduce inter-task interference in multi-task NLP learning compared to shared-gate MoE or dense models?
  • RQ2To what extent can sparse MoE models transfer knowledge to low-resource tasks using related tasks in the training mixture?
  • RQ3How well can sparse MoE models generalize to unseen tasks using only few examples, leveraging routing from related seen tasks?
  • RQ4How robust are sparse MoE models to the addition of unrelated tasks, particularly in avoiding catastrophic forgetting of previously learned tasks?
  • RQ5Does the use of task-aware routing in MoE models lead to improved performance and stability compared to dense multi-task models on diverse NLU benchmarks?

Key findings

  • The proposed MT-TaG model achieves a 2.28-point absolute improvement on the Small Tasks subset of GLUE++ (83.56 vs. 81.28) compared to single-task baselines.
  • On the full All Tasks benchmark, MT-TaG achieves 86.46 average score, outperforming the single-task baseline (85.00) and demonstrating strong scalability to diverse tasks.
  • The model shows strong transfer performance to low-resource tasks, such as RTE, MRPC, and WiC, by leveraging related tasks in the training mixture.
  • MT-TaG generalizes sample-efficiently to unseen tasks by effectively routing inputs from related seen tasks to appropriate experts, reducing the need for large fine-tuning data.
  • The model maintains performance on previously learned tasks even after adding unrelated tasks, demonstrating robustness to catastrophic forgetting.
  • Empirical results confirm that task-aware MoE routing significantly outperforms shared-gate MoE and dense multi-task models in all three key robustness dimensions: transfer, generalization, and forgetting resistance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.