Shawn’s Blog
  • πŸ—‚οΈ Collections
    • πŸ–₯️ Slides Gallery
    • πŸ§‘β€πŸ³οΈ Cooking Ideas
    • 🍱 Cookbook
    • πŸ’¬ Language Learning
    • 🎼 Songbook
  • βš™οΈ Projects
    • βš› Continual Learning Arena
  • πŸ“„ Papers
    • AdaHAT
    • FG-AdaHAT
  • πŸŽ“ CV
    • CV (English)
    • CV (Mandarin)
  • About
  1. Multi-Task Learning (MTL)
  2. Configure MTL Experiment
  3. MTL Algorithm
  • Welcome to CLArena
  • Get Started
  • Continual Learning (CL)
    • Configure CL Main Experiment
      • Experiment Index Config
      • CL Algorithm
      • CL Dataset
      • Backbone Network
      • Optimizer
      • Learning Rate Scheduler
      • Trainer
      • Metrics
      • Lightning Loggers
      • Callbacks
      • Other Configs
    • Save and Evaluate Model
    • Full Experiment
    • Output Results
  • Continual Unlearning (CUL)
    • Configure CUL Main Experiment
      • Experiment Index Config
      • Unlearning Algorithm
      • Callbacks
    • Full Experiment
    • Output Results
  • Multi-Task Learning (MTL)
    • Configure MTL Experiment
      • Experiment Index Config
      • MTL Algorithm
      • MTL Dataset
      • Backbone Network
      • Optimizer
      • Learning Rate Scheduler
      • Trainer
      • Metrics
      • Callbacks
    • Save and Evaluate Model
    • Output Results
  • Single-Task Learning (STL)
    • Configure STL Experiment
      • Experiment Index Config
      • STL Dataset
      • Backbone Network
      • Optimizer
      • Learning Rate Scheduler
      • Trainer
      • Metrics
      • Callbacks
    • Save and Evaluate Model
    • Output Results
  • Implement Your Modules (TBC)
  • API Reference
  1. Multi-Task Learning (MTL)
  2. Configure MTL Experiment
  3. MTL Algorithm

Configure MTL Algorithm (MTL)

Modified

August 16, 2025

Multi-task learning algorithm is the core part of multi-task learning, determining how tasks are joint learned and managing interactions between them.

MTL algorithm is a sub-config under the experiment index config (MTL). To configure a custom MTL algorithm, you need to create a YAML file in mtl_algorithm/ folder. Below shows an example of the MTL algorithm config.

Example

configs
β”œβ”€β”€ __init__.py
β”œβ”€β”€ entrance.yaml
β”œβ”€β”€ experiment
β”‚   β”œβ”€β”€ example_mtl_train.yaml
β”‚   └── ...
β”œβ”€β”€ mtl_algorithm
β”‚   └── joint_learning.yaml
...
configs/experiment/example_mtl_train.yaml
defaults:
  ...
  - /mtl_algorithm: joint_learning.yaml
  ...
configs/mtl_algorithm/joint_learning.yaml
_target_: clarena.mtl_algorithms.JointLearning

Supported MTL algorithms & Required Config Fields

In CLArena, we implemented many MTL algorithms as Python classes in clarena.mtl_algorithms module that you can use for your experiment.

To choose a MTL algorithm, assign the _target_ field to the class name of the MTL algorithm. For example, to use the JointLearning algorithm, set _target_ field to clarena.mtl_algorithms.JointLearning. Each MTL algorithm has its own hyperparameters and configurations, which means it has its own required fields. The required fields are the same as the arguments of the class specified by _target_ (excluding backbone and heads). The arguments of each MTL algorithm class can be found in API documentation.

API Reference (MTL algorithms) Source Code (MTL algorithms)

Below is the full list of supported MTL algorithms. Note that the β€œMTL algorithm” is exactly the class name that the _target_ field is assigned.

MTL algorithm Description Required Config Fields
JointLearning The most naive way for multi-task learning. It directly trains all tasks. Same as JointLearning class arguments (excluding backbone and heads)
Warning

Make sure the algorithm is compatible with the MTL dataset and backbone.

Back to top
Experiment Index Config
MTL Dataset
 
 

©️ 2025 Pengxiang Wang. All rights reserved.