Towards Efficient Pareto Set Approximation via Mixture of Experts Based Model Fusion

Anke Tang, Li Shen, Yong Luo, Shiwei Liu, Han Hu, Bo Du

Abstract

Solving multi-objective optimization (MOO) problems for large deep neural networks is challenging due to the complexity of the loss landscape and the expensive computational cost of training and evaluating models. Efficient Pareto front approximation of large models enables multi-objective optimization for various tasks such as multi-task learning and trade-off analysis. We propose a practical and scalable approach to Pareto set learning via mixture of experts (MoE) based model fusion. By ensembling the weights of specialized single-task models, the MoE module can effectively capture the trade-offs between multiple objectives and closely approximate the entire Pareto set of large neural networks. Once the routers are learned and a preference vector is set, the MoE module can be unloaded, thus introducing no additional computational cost during inference. Experimental results on CLIP-ViT and GPT-2 demonstrate that our method efficiently approximates the entire Pareto front of large models with minimal trainable parameters and lower memory usage compared to standard baselines.

Introduction

In machine learning, we often want a single model to excel at multiple tasks, such as a vision model that identifies both object categories and textures. However, these tasks often conflict—improving performance on one might degrade another. This is a Multi-Objective Optimization Problem (MOOP). The goal is to find the Pareto set: a collection of models where no single model can be improved on one task without hurting another.

For massive models like CLIP or GPT-2, finding this set is traditionally difficult. Evolutionary algorithms are too computationally expensive, and "scalarization" (training a separate model for every possible task-weight combination) is prohibitively slow. This paper introduces PWE MoE, a highly efficient way to navigate these complex trade-offs in just minutes with minimal computational overhead.

The PWE MoE Framework

The authors propose treating Pareto set learning as a model-merging problem, executed in three primary steps:

  1. Model Upcycling: The process begins with several models fine-tuned on individual tasks from a common pre-trained base. These "experts" have specific layers (usually the MLPs) "upcycled" into a Mixture of Experts structure.
  2. Router Fine-tuning: A tiny "router" network—often a single-layer MLP with only a few hundred parameters—is introduced. This router takes a preference vector (e.g., "80% Task A and 20% Task B") and outputs weights to blend the expert models' parameters.
  3. MoE Unloading: Crucially, once a preference is chosen, the MoE module can be "unloaded." The weights are used to create a single, fused set of parameters, meaning the final model has zero additional inference cost compared to a standard model.
Overview of the PWE MoE framework and model up-scaling process.

Experimental Evaluation

The researchers evaluated their method across two major domains:

  • Computer Vision: Using CLIP-ViT (B/32 and L/14) on 8 downstream tasks including scene recognition (SUN397), satellite imagery (EuroSAT), and textures (DTD).
  • Natural Language Processing: Using GPT-2 on 7 tasks from the GLUE benchmark, such as sentiment analysis (SST-2) and paraphrase detection (MRPC).

Analysis of the parameter space revealed that while Attention blocks remain relatively similar across tasks, MLP blocks are highly task-specific. This insight justifies upcycling only the MLPs, which maximizes parameter efficiency.

Key Results

PWE MoE demonstrates significant advantages in speed, memory, and performance:

  • Efficiency: Approximating the entire Pareto set for two tasks takes just 2-3 minutes for a CLIP-ViT-B/32 model, whereas traditional methods could take hours or days.
  • Memory Efficiency: The method uses less GPU memory than standard linear scalarization because it only trains the tiny router weights.
  • Performance: In an 8-task vision setup, PWE MoE achieved an average accuracy of 83.5%, significantly outperforming standard model merging baselines like Task Arithmetic (69.0%) and Ties-Merging (72.8%).
Pareto front approximations across various vision tasks.

Conclusion

PWE MoE provides a scalable and efficient solution for multi-objective optimization in large-scale models. By leveraging parameter-space interpolation and lightweight routers, it enables rapid navigation of task trade-offs without increasing inference costs. Future work may extend this approach to non-Transformer architectures and explore more sophisticated router designs to further refine Pareto front representations.

Summary updated

Abstract

Solving multi-objective optimization problems for large deep neural networks is a challenging task due to the complexity of the loss landscape and the expensive computational cost of training and evaluating models. Efficient Pareto front approximation of large models enables multi-objective optimization for various tasks such as multi-task learning and trade-off analysis. Existing algorithms for learning Pareto set, including (1) evolutionary, hypernetworks, and hypervolume-maximization methods, are computationally expensive and have restricted scalability to large models; (2) Scalarization algorithms, where a separate model is trained for each objective ray, which is inefficient for learning the entire Pareto set and fails to capture the objective trade-offs effectively. Inspired by the recent success of model merging, we propose a practical and scalable approach to Pareto set learning problem via mixture of experts (MoE) based model fusion. By ensembling the weights of specialized single-task models, the MoE module can effectively capture the trade-offs between multiple objectives and closely approximate the entire Pareto set of large neural networks. Once the routers are learned and a preference vector is set, the MoE module can be unloaded, thus no additional computational cost is introduced during inference. We conduct extensive experiments on vision and language tasks using large-scale models such as CLIP-ViT and GPT-2. The experimental results demonstrate that our method efficiently approximates the entire Pareto front of large models. Using only hundreds of trainable parameters of the MoE routers, our method even has lower memory usage compared to linear scalarization and algorithms that learn a single Pareto optimal solution, and are scalable to both the number of objectives and the size of the model.
BibTeX
@misc{tang2024towards,
  author = {Anke Tang and Li Shen and Yong Luo and Shiwei Liu and Han Hu and Bo Du},
  title = {{Towards Efficient Pareto Set Approximation via Mixture of Experts Based Model Fusion}},
  year = {2024},
  eprint = {2406.09770},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.09770},
}
Figure