SMAAT: Scalable Manifold-Aware Adversarial Training for Large Language Models

Enes Altinisik, Safa Messaoud, Husrev Taha Sencar, Hassan Sajjad, Sanjay ChawlaOpenReview 2024 · Submission to ICLR 2024 · Rejected

Abstract

Adversarial Training (AT), the method of finetuning a deep learning model with adversarially generated examples, is the most reliable form of making a model robust against future adversarial perturbations. However, AT is substantially expensive than standard training as it requires several full forward and backward passes to compute adversarial examples. In this paper, we introduce SMAAT, an efficient AT method that uses only adversarial examples generated in the last layer to finetune encoder-based large language models. The basis of our approach are the following three observations (i) the intrinsic dimensionality of the embedding space spanned by different layers of a deep model is substantially lower than the explicit dimensionality of the token embeddings; (ii) Encoder-based language models exhibit a monotonic behavior in their intrinsic dimensionality, i.e., deeper layers (closer to the output) have much lower intrinsic dimensionality than the shallow layers (closer to the input); (iii) off-manifold examples tend to persist across layers, i.e., an image of an off-manifold example generated in a shallow layer continues to remain off-manifold with respect to the embedding space of the later layers. We empirically demonstrate the effectiveness of SMAAT and show that it increases robustness by 8.6%, 15.7%, and 28.8% for BERT and 6.0%, 5.8%, and 19.0% for RoBERTa over the previous state-of-the-art results on AGNEWS, IMDB, and YELP, respectively. These improvements are achieved while maintaining comparable generalization and reducing the computational cost to approximately 1/3 to 1/4 of the GPU times required by the Projected Gradient Descent algorithm.
BibTeX
@misc{altinisik2024smaat,
  author = {Enes Altinisik and Safa Messaoud and Husrev Taha Sencar and Hassan Sajjad and Sanjay Chawla},
  title = {{SMAAT: Scalable Manifold-Aware Adversarial Training for Large Language Models}},
  year = {2024},
  url = {https://openreview.net/forum?id=gtMbnrsyLA},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2024},
}

Loading related content...

Figure