Code and Data for the *SEM paper
We propose a new task, compositional structured explanation generation (CSEG), to facilitate research on compositional generalization in reasoning. CSEG tests a model's ability to generalize from generating entailment trees with a limited number of inference steps to more steps.
We propose a new dynamic modularized reasoning model, MORSE, that factorizes the inference process into modules, where each module represents a functional unit.
- Prepare the dataset
- Do pre-training with primitve data args.do_finetuning = "p1"
- Do fine-tuning with composition data args.do_finetuning = "p2"
- Run the script
sh run-test-module.sh
We reset the data for compositional generalization tests. Details can be found in our paper.
Files: data for DBPedia and EnatailmentBank
For evaluation, we follow 'Explaining Answers with Entailment Trees':
- Download the bleurt-large-512 model from https://github.com/google-research/bleurt/blob/master/checkpoints.md under 'scorer folder/'
- Set the evaluation parameter 'evaluation_root_dir'
- Run the script
@inproceedings{fu-frank-2024-compositional,
title = "Compositional Structured Explanation Generation with Dynamic Modularized Reasoning",
author = "Fu, Xiyan and Frank, Anette",
editor = "Bollegala, Danushka and Shwartz, Vered",
booktitle = "Proceedings of the 13th Joint Conference on Lexical and Computational Semantics (*SEM 2024)",
month = jun,
year = "2024",
address = "Mexico City, Mexico",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2024.starsem-1.31/",
doi = "10.18653/v1/2024.starsem-1.31",
pages = "385--401",
}
```