Exploring Training on Heterogeneous Data with Mixture of Low-rank Adapters

Yuhang Zhou, Zihua Zhao, Siyuan Du, Haolin li, Jiangchao Yao, Ya Zhang, Yanfeng Wang

Abstract

Training unified models on diverse datasets often leads to "gradient interference," where conflicting updates from different tasks or domains hinder overall performance. This paper introduces Mixture of Low-rank Adapters (MoLA), an architecture that addresses this by incorporating multiple low-rank adapters into a shared backbone. MoLA effectively disentangles shared and task-specific knowledge, achieving state-of-the-art results across various benchmarks while maintaining significant parameter efficiency compared to traditional Mixture-of-Experts (MoE) models.

Introduction: The Challenge of Heterogeneity

In the pursuit of Artificial General Intelligence (AGI), models are increasingly trained on heterogeneous data—ranging from distinct domains (e.g., artistic vs. real-world images) to varied tasks (e.g., depth estimation vs. semantic segmentation). However, this diversity often triggers a "tug-of-war" in the parameter space. When a single set of parameters receives conflicting gradient instructions from different tasks, the model's ability to scale is suppressed, often leading to performance that is inferior to task-specific models.

Categorizing Data Heterogeneity

The researchers identify three primary forms of data heterogeneity that challenge unified model training:

  1. Domain Heterogeneity: Learning the same object across different styles (e.g., Art, Clipart, Product).
  2. Multi-input Task Heterogeneity: Performing different tasks on different input types (e.g., medical imaging tasks for different organs).
  3. Single-input Task Heterogeneity: Extracting multiple types of information from a single input (e.g., segmentation and depth from one scene).
Overview of the three types of data heterogeneity addressed by MoLA: domain, multi-input task, and single-input task heterogeneity.

The MoLA Architecture

MoLA bridges the gap between efficient Hard Parameter Sharing (HPS) and the high-capacity but parameter-heavy Soft Parameter Sharing (SPS) or Mixture-of-Experts (MoE) approaches. By attaching multiple low-rank adapters (similar to LoRA) to a shared backbone, MoLA allows for task-specific adaptation without the massive overhead of full expert branches.

The framework offers two operational modes:

  • MoLA-Grad (Target-Aware): Assigns specific adapters to known tasks during inference, explicitly isolating gradients.
  • MoLA-Router (Target-Agnostic): Employs a dynamic router to mix adapter outputs. A Task-wise Decorrelation (TwD) loss is used to ensure the router learns distinct, non-redundant weight combinations for different tasks.
The Multi-gate Mixture-of-Experts (MMOE) architecture, a traditional approach to multi-task learning that MoLA improves upon in terms of parameter efficiency.

Key Insights: Rank Discrepancy and Parameter Space

A core innovation of MoLA is the Rank Discrepancy Trick. The high-rank backbone captures shared features, while the low-rank adapters capture complementary, task-specific nuances. PCA analysis reveals that MoLA utilizes a larger portion of the model's available "directions" (eigenvectors) compared to standard models, effectively unlocking more of the parameter space to handle complexity.

Results and Performance

MoLA consistently outperforms established Multi-Task Learning (MTL) methods like MMoE and CGC. Notably, in medical imaging benchmarks (RadImageNet), MoLA achieved superior accuracy with significantly fewer parameters than MoE-based competitors. For example, MoLA-Grad (r=4) maintained a much lower parameter count than MMoE while delivering higher accuracy. The MoLA-Router variant also demonstrated robustness in scenarios where task identifiers are unavailable at inference time.

Conclusion

MoLA provides a scalable and efficient solution for training on heterogeneous data. While currently focused on computer vision, future work aims to explore its application in the massive heterogeneity of Large Language Model (LLM) pre-training and further refine target-agnostic routing mechanisms.

Summary updated

BibTeX
@inproceedings{zhou2024exploring,
  author = {Yuhang Zhou and Zihua Zhao and Siyuan Du and Haolin li and Jiangchao Yao and Ya Zhang and Yanfeng Wang},
  title = {{Exploring Training on Heterogeneous Data with Mixture of Low-rank Adapters}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=NQ6KDfSDFK},
}
Figure