Toward Adversarial Training on Contextualized Language Representation

05/08/2023
by   Hongqiu Wu, et al.
0

Beyond the success story of adversarial training (AT) in the recent text domain on top of pre-trained language models (PLMs), our empirical study showcases the inconsistent gains from AT on some tasks, e.g. commonsense reasoning, named entity recognition. This paper investigates AT from the perspective of the contextualized language representation outputted by PLM encoders. We find the current AT attacks lean to generate sub-optimal adversarial examples that can fool the decoder part but have a minor effect on the encoder. However, we find it necessary to effectively deviate the latter one to allow AT to gain. Based on the observation, we propose simple yet effective Contextualized representation-Adversarial Training (CreAT), in which the attack is explicitly optimized to deviate the contextualized representation of the encoder. It allows a global optimization of adversarial examples that can fool the entire model. We also find CreAT gives rise to a better direction to optimize the adversarial examples, to let them less sensitive to hyperparameters. Compared to AT, CreAT produces consistent performance gains on a wider range of tasks and is proven to be more effective for language pre-training where only the encoder part is kept for downstream tasks. We achieve the new state-of-the-art performances on a series of challenging benchmarks, e.g. AdvGLUE (59.1 → 61.1), HellaSWAG (93.0 → 94.9), ANLI (68.1 → 69.3).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/16/2023

Context-aware Adversarial Attack on Named Entity Recognition

In recent years, large pre-trained language models (PLMs) have achieved ...
research
07/23/2023

Downstream-agnostic Adversarial Examples

Self-supervised learning usually uses a large amount of unlabeled data t...
research
06/04/2020

Towards Understanding Fast Adversarial Training

Current neural-network-based classifiers are susceptible to adversarial ...
research
03/21/2022

A Prompting-based Approach for Adversarial Example Generation and Robustness Enhancement

Recent years have seen the wide application of NLP models in crucial are...
research
01/30/2023

On Robustness of Prompt-based Semantic Parsing with Large Pre-trained Language Model: An Empirical Study on Codex

Semantic parsing is a technique aimed at constructing a structured repre...
research
04/23/2020

On Adversarial Examples for Biomedical NLP Tasks

The success of pre-trained word embeddings has motivated its use in task...

Please sign up or login with your details

Forgot password? Click here to reset