[Paper Review] LibMTL: A Python Library for Multi-Task Learning
LibMTL is a comprehensive, open-source Python library built on PyTorch that provides a unified, extensible framework for Multi-Task Learning (MTL), supporting 12 loss weighting strategies, 7 MTL architectures, and 84 combinations thereof. It enables reproducible, fair comparisons and rapid prototyping of SOTA MTL models across diverse applications through a modular design.
This paper presents LibMTL, an open-source Python library built on PyTorch, which provides a unified, comprehensive, reproducible, and extensible implementation framework for Multi-Task Learning (MTL). LibMTL considers different settings and approaches in MTL, and it supports a large number of state-of-the-art MTL methods, including 12 loss weighting strategies, 7 architectures, and 84 combinations of different architectures and loss weighting methods. Moreover, the modular design in LibMTL makes it easy-to-use and well extensible, thus users can easily and fast develop new MTL methods, compare with existing MTL methods fairly, or apply MTL algorithms to real-world applications with the support of LibMTL. The source code and detailed documentations of LibMTL are available at https://github.com/median-research-group/LibMTL and https://libmtl.readthedocs.io, respectively.
Motivation & Objective
- To address the lack of a unified, reproducible, and extensible framework for Multi-Task Learning (MTL) that supports diverse MTL settings and state-of-the-art methods.
- To enable fair and consistent comparison between different MTL algorithms across various application scenarios.
- To facilitate rapid development and deployment of new MTL models by providing a modular, extensible architecture.
- To support both single-input and multi-input MTL settings with comprehensive implementations of modern deep MTL models.
- To bridge the gap between research and real-world applications by offering production-ready, well-documented MTL implementations.
Proposed method
- LibMTL implements a modular architecture with distinct functional modules for data loading, loss computation, metrics, configuration, training, and model components.
- It supports 12 loss weighting strategies—including GradNorm, Uncertainty Weights, MGDA, DWA, PCGrad, CAGrad, and RLW—for balancing gradients and losses across tasks.
- It integrates 7 MTL architectures such as Hard Parameter Sharing, Cross-stitch, MMoE, MTAN, CGC, PLE, and DSelect-k to model task relationships.
- The library enables seamless combination of any architecture with any loss weighting strategy, resulting in 84 total method combinations.
- It uses command-line arguments for configuration and provides a unified Trainer module that abstracts training across different MTL settings and approaches.
- LibMTL is built on PyTorch and includes backbone networks (e.g., ResNet) and utilities for model analysis, enhancing usability and extensibility.
Experimental results
Research questions
- RQ1How can a unified, extensible, and reproducible framework for Multi-Task Learning be designed to support diverse MTL settings and state-of-the-art methods?
- RQ2To what extent can a modular library design enable fair comparison and rapid prototyping of new MTL models?
- RQ3How effectively can a single library support both single-input and multi-input MTL scenarios with a wide range of architectures and loss weighting strategies?
- RQ4What is the impact of combining modern loss weighting strategies with diverse MTL architectures on model performance and training efficiency?
- RQ5How does LibMTL compare in comprehensiveness and up-to-dateness with existing MTL libraries such as RMTL and MTLV?
Key findings
- LibMTL supports 12 loss weighting strategies, 7 MTL architectures, and 84 unique combinations, providing broad coverage of state-of-the-art MTL methods.
- The modular design allows users to easily plug in custom dataloaders, loss functions, metrics, and model components for new applications.
- The library enables consistent and reproducible comparisons between MTL methods across different settings and configurations.
- LibMTL is more comprehensive and up-to-date than existing libraries like RMTL and MTLV, especially in supporting deep learning-based MTL models.
- The library is actively maintained and includes detailed documentation and source code available at https://github.com/median-research-group/LibMTL and https://libmtl.readthedocs.io.
- All SOTA MTL methods in LibMTL are implemented from scratch, including those without official public codebases.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.