Our supplementary material enables the replication of two experiments:
- Colored MNIST
- DomainBed
Below are the steps to reproduce the results in Table 1:
cd colored_mnist
python train_coloredmnist.py --algorithm idmThe reported results of ERM, IRM, V-REx and Fishr are from Fishr repository.
The final hyper-parameters selected for IDM and IGA:
| Parameter | Distribution | IDM | IGA |
|---|---|---|---|
| hidden dimension | 433 | 138 | |
| weight decay | 0.00034 | 0.001555 | |
| learning rate | 0.000449 | 0.001837 | |
| warmup iterations | 154 | 118 | |
| regularization strength | 2888595.180638 | 17320494.495665 |
We implement IDM in algorithms.py and set the hyper-parameters in hparams_registry.py.
Below are the steps to reproduce the results in Table 2:
cd DomainBed
python -m domainbed.scripts.sweep launch\
--data_dir=/my/data/dir/\
--output_dir=/my/sweep/output/path\
--command_launcher multi_gpu
--datasets ColoredMNIST\
--algorithms IDMPlease refer to DomainBed repository for how to setup the DomainBed environment and download the datasets.