Official implementation of "Auxiliary Learning as an Asymmetric Bargaining Game".
conda create -n auxinash python=3.9
conda activate auxinash
conda install pytorch==1.9.0 torchvision==0.10.0 cudatoolkit=10.2 -c pytorchInstall the repo:
git clone https://github.com/AvivSham/auxinash.git
cd auxinash
pip install -e .To run NYUv2 experiment:
cd experiment/nyuv2
python trainer.py --method=auxinashFollow instruction on the experiment README file for more information regarding, e.g., datasets.
You can also replace auxinash with on of the following Auxiliary / MTL methods.
We also support experiment tracking with Weights & Biases with two additional parameters:
python trainer.py --method=auxinash --wandb_project=<project-name> --wandb_entity=<entity-name>We support the following Auxiliary & MTL methods with a unified API. To run experiment with MTL method X simply run:
python trainer.py --method=X| Method (code name) | Paper (notes) |
|---|---|
Auxilearn (auxilearn) |
Auxiliary Learning by Implicit Differentiation |
GCS (gcs) |
Adapting Auxiliary Losses Using Gradient Similarity |
Nash-MTL (nashmtl) |
Multi-Task Learning as a Bargaining Game |
CAGrad (cagrad) |
Conflict-Averse Gradient Descent for Multi-task Learning |
PCGrad (pcgrad) |
Gradient Surgery for Multi-Task Learning |
Linear scalarization (ls) |
- (equal weighting) |
If you find AuxiNash to be useful in your own research, please consider citing the following paper:
@article{shamsian2023auxiliary,
title={Auxiliary Learning as an Asymmetric Bargaining Game},
author={Shamsian, Aviv and Navon, Aviv and Glazer, Neta and Kawaguchi, Kenji and Chechik, Gal and Fetaya, Ethan},
journal={arXiv preprint arXiv:2301.13501},
year={2023}
}