Adversarial Training with Contrastive Learning in NLP
Not on the map. Why?
Abstract (arXiv)
For years, adversarial training has been extensively studied in natural language processing (NLP) settings. The main goal is to make models robust so that similar inputs derive in semantically similar outcomes, which is not a trivial problem since there is no objective measure of semantic similarity in language. Previous works use an external pre-trained NLP model to tackle this challenge, introducing an extra training stage with huge memory consumption during training. However, the recent popular approach of contrastive learning in language processing hints a convenient way of obtaining such similarity restrictions. The main advantage of the contrastive learning approach is that it aims for similar data points to be mapped close to each other and further from different ones in the representation space. In this work, we propose adversarial training with contrastive learning (ATCL) to adversarially train a language processing task using the benefits of contrastive learning. The core idea is to make linear perturbations in the embedding space of the input via fast gradient methods (FGM) and train the model to keep the original and perturbed representations close via contrastive learning. In NLP experiments, we applied ATCL to language modeling and neural machine translation tasks. The results show not only an improvement in the quantitative (perplexity and BLEU) scores when compared to the baselines, but ATCL also achieves good qualitative results in the semantic level for both tasks without using a pre-trained model.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 35 of its 42 references that are in the map. First posted on arXiv 19 Sep 2021.
Builds on
35 of 42 references.
References · 35
- 2017Attention Is All You Needcited by 59,932
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2013Intriguing properties of neural networkscited by 5,114
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2020Supervised Contrastive Learningcited by 2,803
- 2018Unsupervised Feature Learning via Non-Parametric Instance-level Discriminationcited by 1,838
- 2016Adversarial examples in the physical worldcited by 1,762
23 more
- 2015DeepFool: a simple and accurate method to fool deep neural networkscited by 1,315
- 2019Contrastive Multiview Codingcited by 1,297
- 2018Learning deep representations by mutual information estimation and maximizationcited by 1,265
- 2014Convolutional Neural Networks for Sentence Classificationcited by 1,124
- 2015The Limitations of Deep Learning in Adversarial Settingscited by 784
- 2019Data-Efficient Image Recognition with Contrastive Predictive Codingcited by 672
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2020A Survey on Contrastive Self-supervised Learningcited by 553
- 2018Generating Natural Language Adversarial Examplescited by 422
- 2020BAE: BERT-based Adversarial Examples for Text Classificationcited by 316
- 2016Adversarial Training Methods for Semi-Supervised Text Classificationcited by 280
- 2020DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representationscited by 249
- 2018An efficient framework for learning sentence representationscited by 197
- 2019Robust Neural Machine Translation with Doubly Adversarial Inputscited by 105
- 2018On Adversarial Examples for Character-Level Neural Machine Translationcited by 85
- 2019A Tensorized Transformer for Language Modelingcited by 85
- 2019Self-Knowledge Distillation in Natural Language Processingcited by 60
- 2021A Primer on Contrastive Pretraining in Language Processing: Methods, Lessons Learned and Perspectivescited by 41
- 2018Towards Robust Neural Machine Translationcited by 35
- 2018GILE: A Generalized Input-Label Embedding for Text Classificationcited by 22
- 2020Data-Efficient Pretraining via Contrastive Self-Supervisioncited by 14
- 2019Contrastive Attention Mechanism for Abstractive Sentence Summarizationcited by 13
- 2021Disentangled Contrastive Learning for Learning Robust Textual Representationscited by 2
Built on by
Citing papers per year: 2021: 2; 2022: 0; 2023: 0; 2024: 3; 2025: 1.
6 papers.
- 2024Mitigating the Risk of Health Inequity Exacerbated by Large Language Modelscited by 21
- 2025Improving Large Language Model Safety with Contrastive Representation Learningcited by 7
- 2021Simple Contrastive Representation Adversarial Learning for NLP Taskscited by 4
- 2024Extreme Miscalibration and the Illusion of Adversarial Robustnesscited by 4
- 2024RobustSentEmbed: Robust Sentence Embeddings Using Adversarial Self-Supervised Contrastive Learningcited by 2
- 2021Emotions are Subtle: Learning Sentiment Based Text Representations Using Contrastive Learningcited by 1
- 2025Improving Large Language Model Safety with Contrastive Representation Learning13 Jun 2025
- 2024Mitigating the Risk of Health Inequity Exacerbated by Large Language Models7 Oct 2024
- 2024RobustSentEmbed: Robust Sentence Embeddings Using Adversarial Self-Supervised Contrastive Learning17 Mar 2024
- 2024Extreme Miscalibration and the Illusion of Adversarial Robustness27 Feb 2024
- 2021Emotions are Subtle: Learning Sentiment Based Text Representations Using Contrastive Learning2 Dec 2021
- 2021Simple Contrastive Representation Adversarial Learning for NLP Tasks26 Nov 2021