This is the original implementation of the paper Improving Domain-Adapted Sentiment Classification by Deep Adversarial Mutual Learning publicized in AAAI-2020.
Python3.7
- Tensorflow 1.14
- colored
- tqdm
- figlet (install from your system package manager, e.g. apt in Ubuntu or brew in MacOS)
To run the naive baseline, just run
python train_naive.py --dataset SOURCE_DOMAIN --unlabeled_dataset TARGET_DOMAIN
To run any other model, just run
python adv_train.py --model MODEL --dataset SOURCE_DOMAIN --unlabeled_dataset TARGET_DOMAIN
If the datasets are not downloaded automatically through git clone, please check the following link to get the dataset and the word embedding:
- https://drive.google.com/file/d/1Pd05BvEkyT0fXy-IcFO5n4rsY4qei8l6/view?usp=sharing
- https://drive.google.com/file/d/1UdMPBUjRRm4npeKKnMuVfRdzXOyS7Z0N/view?usp=sharing
The following model names are available, just as filenames show:
dann | adversarial cross-domain training framerwork without Mutual Learning |
sml | standard Mutual Learning framework |
ml | the proposed Mutual Learning framework |
ml3 | the proposed Mutual Learning framework with 3 models involved |
ml4 | the proposed Mutual Learning framework with 4 models involved |
The following dataset names are available, just as shown in directory data/:
- imdb
- yelp13
- elc (Amazon Electronics)
- clt (Amazon Clothing)
- cd (Amazon CD)