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. Components
  2. STL Algorithm
  • Welcome to CLArena
  • Getting Started
  • Configure Pipelines
  • Continual Learning (CL)
    • CL Main Experiment
    • Save and Evaluate Model
    • Full Experiment
    • Output Results
  • Continual Unlearning (CUL)
    • CUL Main Experiment
    • Full Experiment
    • Output Results
  • Multi-Task Learning (MTL)
    • MTL Experiment
    • Save and Evaluate Model
    • Output Results
  • Single-Task Learning (STL)
    • STL Experiment
    • Save and Evaluate Model
    • Output Results
  • Components
    • CL Dataset
    • MTL Dataset
    • STL Dataset
    • CL Algorithm
    • CUL Algorithm
    • MTL Algorithm
    • STL Algorithm
    • Backbone Network
    • Optimizer
    • Learning Rate Scheduler
    • Trainer
    • Metrics
    • Lightning Loggers
    • Callbacks
    • Other Configs
  • Implement Your Modules (TBC)
  • API Reference
  1. Components
  2. STL Algorithm

Configure STL Algorithm (STL)

Modified

August 26, 2025

Single-task learning algorithm is the core part of single-task learning, determining how the task are learned.

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

Example

configs
β”œβ”€β”€ __init__.py
β”œβ”€β”€ entrance.yaml
β”œβ”€β”€ experiment
β”‚   β”œβ”€β”€ example_stl_train.yaml
β”‚   └── ...
β”œβ”€β”€ stl_algorithm
β”‚   └── single_learning.yaml
...
configs/experiment/example_stl_train.yaml
defaults:
  ...
  - /stl_algorithm: single_learning.yaml
  ...
configs/stl_algorithm/single_learning.yaml
_target_: clarena.stl_algorithms.SingleLearning

Supported STL algorithms & Required Config Fields

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

To choose a STL algorithm, assign the _target_ field to the class name of the STL algorithm. For example, to use the SingleLearning algorithm, set _target_ field to clarena.stl_algorithms.SingleLearning. Each STL 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 (STL algorithms) Source Code (STL algorithms)

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

STL algorithm Description Required Config Fields
SingleLearning The most naive way for single-task learning. It directly trains the task. Same as SingleLearning class arguments (excluding backbone and heads)
Warning

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

Back to top
MTL Algorithm
Backbone Network
 
 

©️ 2025 Pengxiang Wang. All rights reserved.