We formulate a promising but challenging problem of continual domain generalization over temporal drift (CDGTD) and propose an Evolving Standardization (EvoS) approach for CDGTD. EvoS characterizes the evolving pattern and further achieves generalization by conducting the feature standardization.
-
The code is implemented with
Python 3.7.16
,CUDA 12.2
. To try out this project, it is recommended to set up a virtual environment first.# Step-by-step installation conda create --name evos python=3.7.16 conda activate evos # this installs the right pip and dependencies for the fresh python conda install -y ipython pip # install torch, torchvision and torchaudio pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html # this installs required packages pip install -r requirements.txt
- Download yearbook.pkl
- Download fmow.pkl and fmow_v1.1.tar.gz
- Download huffpost.pkl
- Download arxiv.pkl
- rmnist will automatically download while running the code.
The data folder should be structured as follows:
```
├── datasets/
│ ├── yearbook/
| | ├── yearbook.pkl
│ ├── rmnist/
| | ├── MNIST/
| | ├── rmnist.pkl
│ ├── huffpost/
| | ├── huffpost.pkl
│ ├── fMoW/
| | ├── fmow_v1.1/
| | | |── images/
| | |—— fmow.pkl
│ ├── arxiv/
| | ├── arxiv.pkl
```
-
for Eval-Fix manner:
# running for yearbook dataset: sh script_yearbook_eval_fix.sh # running for rmnist dataset: sh script_rmnist_eval_fix.sh # running for fmow dataset: sh script_fmow_eval_fix.sh # running for huffpost dataset: sh script_huffpost_eval_fix.sh # running for arxiv dataset: sh script_arxiv_eval_fix.sh
-
for Eval-Stream manner:
# running for yearbook dataset: sh script_yearbook_eval_stream.sh # running for huffpost dataset: sh script_huffpost_eval_stream.sh
This project is mainly based on the open-source project: Wild-Time. We thank its authors for making the source code publicly available.
If you find this work helpful to your research, please consider citing the paper:
@inproceedings{xie2023evos,
title={Evolving Standardization for Continual Domain Generalization over Temporal Drift},
author={Mixue Xie, Shuang Li, Longhui Yuan, Chi Harold Liu, Zehui Dai},
booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
year={2023}
}