Improved Text Classification via Contrastive Adversarial Training
Lin Pan, Chung-Wei Hang, Avirup Sil, Saloni Potdar
Abstract
We propose a simple and general method to regularize the fine-tuning of Transformer-based encoders for text classification tasks. Specifically, during fine-tuning we generate adversarial examples by perturbing the word embedding matrix of the model and perform contrastive learning on clean and adversarial examples in order to teach the model to learn noise-invariant representations. By training on both clean and adversarial examples along with the additional contrastive objective, we observe consistent improvement over standard fine-tuning on clean examples. On several GLUE benchmark tasks, our fine-tuned Bert_Large model outperforms Bert_Large baseline by 1.7% on average, and our fine-tuned Roberta_Large improves over Roberta_Large baseline by 1.3%. We additionally validate our method in different domains using three intent classification datasets, where our fine-tuned Roberta_Large outperforms Roberta_Large baseline by 1-2% on average. For the challenging low-resource scenario, we train our system using half of the training data (per intent) in each of the three intent classification datasets, and achieve similar performance compared to the baseline trained with full training data.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f3b9ab07-e201-4691-aef7-0933711f249bCited by top-tier papers12
- Efficient Adversarial Training in LLMs with Continuous AttacksSophie Xhonneux, Alessandro Sordoni, Stephan Günnemann, Gauthier Gidel et al.NeurIPS 2024 · 151 citations
- Soft Prompt Threats: Attacking Safety Alignment and Unlearning in Open-Source LLMs through the Embedding SpaceLeo Schwinn, David Dobre, Sophie Xhonneux, Gauthier Gidel et al.NeurIPS 2024 · 113 citations
- Evaluating Code Summarization Techniques: A New Metric and an Empirical CharacterizationAntonio Mastropaolo, Matteo Ciniselli, Massimiliano Di Penta, Gabriele BavotaICSE 2024 · 28 citations
- Towards Viewpoint-Invariant Visual Recognition via Adversarial TrainingShouwei Ruan, Yinpeng Dong, Hang Su, Jianteng Peng et al.ICCV 2023 · 23 citations
- Towards a Holistic Understanding of Mathematical Questions with Contrastive Pre-trainingYuting Ning, Zhenya Huang, Xin Lin, Enhong Chen et al.AAAI 2023 · 10 citations
Builds on11
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
- Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations
- SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
- MPNet: Masked and Permuted Pre-training for Language UnderstandingKaitao Song, Xu Tan, Tao Qin, Jianfeng Lu et al.NeurIPS 2020 · 1,957 citations
Related papers
- Supervised Contrastive Learning for Pre-trained Language Model Fine-tuningBeliz Gunel, Jingfei Du, Alexis Conneau, Veselin StoyanovICLR 2021 · 595 citations
- CoDA: Contrast-enhanced and Diversity-promoting Data Augmentation for Natural Language UnderstandingYanru Qu, Dinghan Shen, Yelong Shen, Sandra Sajeev et al.ICLR 2021 · 77 citations
- FreeLB: Enhanced Adversarial Training for Natural Language UnderstandingChen Zhu, Yu Cheng, Zhe Gan, Siqi Sun et al.ICLR 2020 · 502 citations
- Rethinking Denoised Auto-Encoding in Language Pre-TrainingFuli Luo, Pengcheng Yang, Shicheng Li, Xuancheng Ren et al.EMNLP 2021 · 8 citations
- Token-Aware Virtual Adversarial Training in Natural Language UnderstandingLinyang Li, Xipeng QiuAAAI 2021 · 54 citations
