Skip to main content
QUICK REVIEW

[Paper Review] On Robust Prefix-Tuning for Text Classification

Zonghan Yang, Yang Liu|arXiv (Cornell University)|Mar 19, 2022
Topic ModelingComputer Science10 citations
TL;DR

This paper proposes a robust prefix-tuning framework that enhances adversarial robustness in text classification without modifying pretrained model parameters. By tuning a batch-specific prefix during inference using layerwise activations from correctly classified training data as a reference, the method improves robustness against diverse textual attacks while maintaining high accuracy on clean inputs and preserving the modularity and efficiency of prefix-tuning.

ABSTRACT

Recently, prefix-tuning has gained increasing attention as a parameter-efficient finetuning method for large-scale pretrained language models. The method keeps the pretrained models fixed and only updates the prefix token parameters for each downstream task. Despite being lightweight and modular, prefix-tuning still lacks robustness to textual adversarial attacks. However, most currently developed defense techniques necessitate auxiliary model update and storage, which inevitably hamper the modularity and low storage of prefix-tuning. In this work, we propose a robust prefix-tuning framework that preserves the efficiency and modularity of prefix-tuning. The core idea of our framework is leveraging the layerwise activations of the language model by correctly-classified training data as the standard for additional prefix finetuning. During the test phase, an extra batch-level prefix is tuned for each batch and added to the original prefix for robustness enhancement. Extensive experiments on three text classification benchmarks show that our framework substantially improves robustness over several strong baselines against five textual attacks of different types while maintaining comparable accuracy on clean texts. We also interpret our robust prefix-tuning framework from the optimal control perspective and pose several directions for future research.

Motivation & Objective

  • To address the lack of robustness in prefix-tuning against textual adversarial attacks while preserving its parameter efficiency and modularity.
  • To develop a defense mechanism that does not require auxiliary model updates or storage, maintaining the lightweight nature of prefix-tuning.
  • To formalize robust prefix-tuning as a closed-loop control problem from an optimal control perspective.
  • To enable robustness enhancement through dynamic, batch-level prefix tuning during inference using activation-based supervision.
  • To maintain high performance on clean inputs while significantly improving robustness under various adversarial attack types.

Proposed method

  • The framework uses layerwise activations from correctly classified training samples as a reference for 'correct' model behavior, projected onto low-dimensional canonical manifolds.
  • During inference, an additional batch-level prefix is tuned per input batch to align the model’s activations with the canonical manifolds of correct predictions.
  • The optimization process minimizes the distance between the model’s layerwise activations and the canonical manifolds, using the original prefix as a fixed base.
  • The method leverages the discrete-time method of successive approximations (MSA) to solve the optimization problem, which is equivalent to back-propagation.
  • The framework is formalized as a closed-loop control system where the dynamic prefix acts as a control input to steer the model toward correct predictions under perturbations.
  • The approach preserves the original prefix-tuning setup and only introduces a lightweight, per-batch tuning mechanism at inference time.

Experimental results

Research questions

  • RQ1Can we improve the robustness of prefix-tuning against textual adversarial attacks without modifying the pretrained model parameters?
  • RQ2Can we maintain the modularity and low storage characteristics of prefix-tuning while enhancing robustness?
  • RQ3How can we define and enforce 'correct' model behavior during inference using activation patterns from clean data?
  • RQ4Can we formalize robust prefix-tuning as a closed-loop control problem to improve generalization under adversarial inputs?
  • RQ5Does the proposed method achieve strong robustness gains across diverse attack types while preserving clean accuracy?

Key findings

  • The proposed framework achieves substantial robustness improvements over strong baselines across five different types of textual adversarial attacks on three text classification benchmarks.
  • The method maintains comparable accuracy on clean test sets, demonstrating that robustness gains do not come at the cost of performance on clean data.
  • The framework effectively reduces prediction errors under adversarial perturbations by aligning batch-level activations with canonical manifolds derived from correctly classified training examples.
  • Theoretical analysis shows that the robust prefix-tuning process is equivalent to closed-loop control, providing a principled interpretation of its robustness mechanism.
  • The method is computationally efficient and does not require additional model storage or parameter updates, preserving the modularity of prefix-tuning.
  • The framework is effective against universal adversarial triggers (UAT) and other attack types that target prompt-based models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.