Code for the paper "Memory-Based Invariance Learning for Out-of-Domain Text Classification" in EMNLP'2023
The code is built based on the open-source toolkit OpenPrompt.
python >= 3.7
torch >= 1.10.0
transformers >= 4.10.0
Dataset The full preprocessed datasets are available at Dir
Training command
python experiments/cli.py --config_yaml classification_manual_prompt.yaml
When you use the our paper, we would appreciate it if you cite the following:
@inproceedings{jia2023memory,
title = "Memory-Based Invariance Learning for Out-of-Domain Text Classification",
author = "Jia, Chen and Zhang, Yue",
booktitle = "Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing",
year = "2023",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.emnlp-main.101",
pages = "1635--1647"
}