Robustifying Language Models with Test-Time Adaptation

Noah Thomas McDermott, Junfeng Yang, Chengzhi Mao
10/29/2023
cs.CLcs.LG

No confident code implementation found for this paper. 7 possible matches can be shown below.

Abstract

Large-scale language models achieved state-of-the-art performance over a number of language tasks. However, they fail on adversarial language examples, which are sentences optimized to fool the language models but with similar semantic meanings for humans. While prior work focuses on making the language model robust at training time, retraining for robustness is often unrealistic for large-scale foundation models. Instead, we propose to make the language models robust at test time. By dynamically adapting the input sentence with predictions from masked words, we show that we can reverse many language adversarial attacks. Since our approach does not require any training, it works for novel tasks at test time and can adapt to novel adversarial corruptions. Visualizations and empirical results on two popular sentence classification datasets demonstrate that our method can repair adversarial language attacks over 65% o

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 7 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mcdermott2023robustifying,
  title  = {Robustifying Language Models with Test-Time Adaptation},
  author = {Noah Thomas McDermott and Junfeng Yang and Chengzhi Mao},
  year   = {2023},
  eprint = {2310.19177},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.19177v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.19177.svg)](https://codeofpaper.com/paper/2310.19177)

Discussion