PaMaL

June 30, 2026 · View on GitHub

Official implementation of Pareto Manifold Learning: Tackling multiple tasks via ensembles of single-task models.

PaMaL is continued in PaLoRA (Pareto Low-Rank Adapters), which develops a more computationally efficient approach to multi-task learning with preferences using low-rank adapters.

PaMaL

Installation

git clone https://github.com/nik-dim/pamal.git && cd pamal

# Method 1: Conda
conda create -n pamal python=3.10
conda activate pamal
pip install -r requirements.txt

# Method 2: Dockerfile
docker build -t pamal .

Running Experiments

The experiments are configured using Hydra. Hydra uses a hierarchical structure to define experiments. See here for more details.

The configuration files are in the configs/ directory and are further split into two directories. The first, configs/general/, houses the definitions of methods, optimizers, datasets etc, while the second one, configs/experiment/ makes uses of these definitions to configure the experiments for each dataset. The supported methods are outlined here and the supported datasets here.

For example, we can run experiments on the MultiMNIST dataset as follows:

# run experiment on MultiMNIST using the proposed method (PaMaL) 
python multimnist.py method=pamal data.root=/path/to/data

# ...modify the `inner_method` parameter specific to pamal
python multimnist.py method=pamal data.root=/path/to/data method.inner_method=ls # or gradnorm or rwa

# run the same experiment for a baseline
python multimnist.py data.root=/path/to/data method=ls # or mgda or phn etc

To launch multiple experiments at the same time (e.g. ablation studies), we can use the --multirun (-m) flag. Note that this flag is sometimes problematic in conjunction with Weights&Biases logging. For example, to run the ablation study for the proposed method, we can run:

# launch the previous experiment for multiple seeds
python multimnist.py -m method=pamal seed=0,1,2

Alternatively, check the run.sh script for launching multiple experiments.

Supported Methods

This repository supports the methods outlined in the table below. Apart from the proposed method pamal, we support Pareto Front Approximation methods phn and cosmos, as single solution methods, such as rlw, graddrop, autol, rotograd, cagrad, nashmtl, pcgrad, dwa, si, mgda, uw, ls, stl.

In order to select one baseline set method=XXX where XXX is the ticker presented below. For example, to run the ls baseline, run python census.py method=ls.

TickerPaper
stlXSingle-Task Learning for task X, X=0,1,2...
lsFixed Weighting (e.g. equal)
uwMulti-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics
mgdaMulti-Task Learning as Multi-Objective Optimization
siSee Multi-Task Learning as a Bargaining Game for details
dwaEnd-to-End Multi-Task Learning with Attention
pcgradGradient Surgery for Multi-Task Learning
imtlTowards Impartial Multi-task Learning
cagradConflict-Averse Gradient Descent for Multi-task Learning
nashmtlMulti-Task Learning as a Bargaining Game
rlwA Closer Look at Loss Weighting in Multi-Task Learning
graddropJust Pick a Sign: Optimizing Deep Multitask Models with Gradient Sign Dropout
autolAuto-Lambda: Disentangling Dynamic Task Relationships
rotogradRotoGrad: Gradient Homogenization in Multitask Learning
phnLearning the Pareto Front with Hypernetworks
cosmosScalable Pareto Front Approximation for Deep Multi-Objective Learning
pamalPareto Manifold Learning: Tackling multiple tasks via ensembles of single-task models

Supported Datasets

The repository supports the datasets in the table below. By default, the datasets will be downloaded to the ~/benchmarks/data directory. The root path can be modified in src/datasets/base_data_module.py.

DatasetNotes
MultiMNISTneeds to be created
Censusneeds to be downloaded
MultiMNIST3needs to be created
UtkFaceneeds to be downloaded
Cityscapesneeds to be downloaded
CelebAneeds to be downloaded

MultiMNIST data and reproducibility

The MultiMNIST results can depend on the randomness used when generating the dataset. The experiments reported in the paper used a single dataset generated at the beginning of the project and kept fixed throughout. To reproduce the reported setup, download that dataset from Google Drive and pass its location through data.root.

Extending the codebase

The code is structured similar to PyTorch Lightning. We have used various codebase sources for baselines. For this reason, the API is not consistent for all baselines. Most baselines can be found in src/methods/weight_methods.py. However, graddrop, autol, rotograd, phn and cosmos are implemented in their own specific way. In order to add a new single solution method, check src/methods/weight_methods.py where multiple loss and gradient balancing methods can be found. For multi solution methods check src/trainer/multi_solution_trainer.py.

If you have any questions, please contact me. We plan to merge and unify the baselines, with method-specific callbacks. For the moment, this is the case only for Auto-λ\lambda in src/utils/callbacks/auto_lambda_callback.py.

References

The reporsitory makes heavy use of previously developped codebases. Specifically, we use:

  1. https://github.com/lorenmt/mtan
  2. https://github.com/AvivNavon/nash-mtl
  3. https://github.com/AvivNavon/pareto-hypernetworks
  4. https://github.com/ruchtem/cosmos
  5. https://github.com/adrianjav/rotograd
  6. https://github.com/intel-isl/MultiObjectiveOptimization

Citation

If you find this code or the PaMaL/PaLoRA line of work useful, please cite both papers:

@inproceedings{
    dimitriadis2023pareto,
    title={Pareto Manifold Learning: Tackling multiple tasks via ensembles of single-task models},
    author={Dimitriadis, Nikolaos and Frossard, Pascal and Fleuret, Fran{\c{c}}ois},
    booktitle={International Conference on Machine Learning},
    year={2023},
    url={https://arxiv.org/abs/2210.09759}
}

@inproceedings{
    dimitriadis2025pareto,
    title={Pareto Low-Rank Adapters: Efficient Multi-Task Learning with Preferences},
    author={Dimitriadis, Nikolaos and Frossard, Pascal and Fleuret, Fran{\c{c}}ois},
    booktitle={International Conference on Learning Representations},
    year={2025},
    url={https://openreview.net/forum?id=icDoYdUhRa}
}

Contact

If you have any questions, please contact nikolaos.dimitriadis@epfl.ch.