Code for EMNLP 2021 paper "Exploring Decomposition for Table-based Fact Verification"
Available in ./Data, including:
- train_decomp_type_detect_lm.json: training data for decomposition type detection
- train_decomp_generation_lm.json: training data for decomposition generation
- Fine-tune BERT model for decomposition type detection (5-way classification).
- Predict decomposition type for all samples in the TabFact dataset.
- Fine-tune GPT-2 model for decomposition generation.
- Generate decomposition for all samples in the TabFact dataset.
-
After getting the decomposed sub-problems for samples in the TabFact, we solve them to obtain corresponding answers.
-
How to verify the decomposed sub-statements?
We used the TAPAS model fine-tuned on the TABFACT (Chen et al., 2020) for sub-statement verification, and the model is available here.
-
How to answer the decomposed sub-questions?
We used the TAPAS model fine-tuned on the WikiTableQuestions (Pasupat and Liang, 2015) for sub-question answering, and the model is available here.
-
Data
cd ./Data/TabFact_data tar -zxvf table.tar.gz
-
Download model checkpoint here, and put them in the ./ckpt folder.
-
Re-train the model
If you would like to re-train the verification model:
cd ./Code python run.py --do_train --do_eval --tune_tapas_after10k --load_tapas_model ../ckpt/base.pt --data_dir ../Data/TabFact_data
-
Test the model
Or you can evaluate the model using the provided checkpoint:
cd ./Code python run.py --do_eval --do_test --do_simple_test --do_complex_test --do_small_test --tune_tapas_after10k --load_model ../ckpt/model.pt --data_dir ../Data/TabFact_data
For any questions, please send email to the author.