Back-Training excels Self-Training at Unsupervised Domain Adaptation of Question Generation and Passage Retrieval
by Devang Kulshreshtha, Robert Belfer, Iulian Vlad Serban and Siva Reddy
Code and data for reproducing the results of our paper available on arXiv.
The MLQuestions dataset can be found in data/ subdirectory.
Downloading pre-trained source domain NaturalQuestions checkpoint
- Download DPR IR model checkpoint pre-trained on NaturalQuestions. Instructions can be found in DPR official repository. Store it in IR/NQ-checkpoint subdirectory. The model file name will be bert-base-encoder.cp
- Download BART QG model trained on NaturalQuestions from here. Place the downloaded files config.json and pytorch_model.bin in QG/NQ-checkpoint subdirectory.
Instructions for running the code
- Run eval-no-adaptation.sh to run source to target domain without adaptation model (section 3 of paper).
- Run UDA-SelfTraining.sh and UDA-BackTraining.sh to run self-training and back-training experiments on MLQuestions data as described in section 4 of the paper.
- (Optional) You can also run consistency experiments by running any/all of UDA-SelfTraining-SC.sh, UDA-SelfTraining-CC.sh, UDA-BackTraining-SC.sh, UDA-BackTraining-CC.sh. SC denotes self-consistency and CC denotes cross-consistency.
Python Libraries and Dependencies
Please install python modules from requirements.txt file. Note: For METEOR score to be computed, Java must be installed. Otherwise only BLEU 1-4 will be computed for QG metrics.