This repo contains the source code for CAGrad, which has been accepted to NeurIPS 2021.
To run the toy example:
python toy.py
The supervised multitask learning experiments are conducted on NYU-v2 and CityScapes datasets. We follow the setup from MTAN. The datasets could be downloaded from NYU-v2 and CityScapes. After the datasets are downloaded, please follow the respective run.sh script in each folder. In particular, modify the dataroot variable to the downloaded dataset.
update 2021/11/22: Thank @lushleaf for finding that replacing the last backward(retain_graph=True)
to backward()
saves much GPU memory.
The MTRL experiments are conducted on Metaworld benchmarks. In particular, we follow the mtrl codebase and the experiment setup in this paper.
-
Install mtrl according to the instructions.
-
Git clone Metaworld and change to
d9a75c451a15b0ba39d8b7a8b6d18d883b8655d8
commit (Feb 26, 2021). Install metaworld accordingly. -
Copy the
mtrl_files
folder under mtrl of this repo to the cloned repo of mtrl. Then
cd PATH_TO_MTRL/mtrl_files/ && chmod +x mv.sh && ./mv.sh
Then follow the run.sh
script to run experiments (We are still testing the results but the code should be runnable).
If you find our work interesting or the repo useful, please consider citing this paper:
@article{liu2021conflict,
title={Conflict-Averse Gradient Descent for Multi-task Learning},
author={Liu, Bo and Liu, Xingchao and Jin, Xiaojie and Stone, Peter and Liu, Qiang},
journal={arXiv preprint arXiv:2110.14048},
year={2021}
}