Configure MTL Algorithm (MTL)
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.
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 ) |
Make sure the algorithm is compatible with the MTL dataset and backbone.