Source code of "Towards Robust Low-Resource Fine-Tuning with Multi-View Compressed Representation" (ACL23)
This code is tested on:
- Python 3.6.12
- transformers 3.3.1
- pytorch 1.10.1
DATA_SEEDSeed used to sample data for low-resource scenarioNUM_SAMPLESNumber of training and dev dataTASKName of the task e.g. mnliNUM_DIM_SETNumber of dimension setsDIM_SETMVCR dimesion set e.g. 128,256,512LAYER_SETLayers that MVCR adds to e.g. 2,12GPUCUDA GPUSEEDRunnning seedRECON_LOSSRatio used for reconstruction lossDROPOUTDropout rate for all layersMIXOUTMixout rate- to run the model on the subsampled datasets, add
--sample_trainoption.
We provide the following sample scripts.
- To Train MVCR on sentence-level tasks:
bash aebert.sh bert-base-uncased DATA_SEED NUM_SAMPLES TASK NUM_DIM_SET DIM_SET LAYER_SET GPU SEED RECON_LOSS DROPOUT MIXOUT AE2TK
- To Train MVCR on token-level tasks:
bash panx.sh
If you find this code useful, please cite our paper:
@misc{liu2022robust,
title={Towards Robust Low-Resource Fine-Tuning with Multi-View Compressed Representations},
author={Linlin Liu and Xingxuan Li and Megh Thakkar and Xin Li and Lidong Bing and Shafiq Joty and Luo Si},
year={2022},
eprint={2211.08794},
archivePrefix={arXiv},
primaryClass={cs.CL}
}