Prior Knowledge-Guided Adversarial Training

Lis Pereira, Fei Cheng, Wan Jou She, Masayuki Asahara, Ichiro KobayashiACL 2024

TL;DR

This paper introduces Prior Knowledge-Guided Adversarial Training (PKG-ADV), a novel method to improve adversarial training for NLP tasks, particularly those with imbalanced class distributions. By leveraging task-specific label distribution to guide adversarial perturbations, PKG-ADV enhances model robustness and performance on challenging temporal reasoning tasks, outperforming standard fine-tuning and even large language models like ChatGPT.

What Problem Does This Paper Address?

Many real-world NLP tasks suffer from class imbalance, where certain categories appear far less frequently than others. This imbalance can lead to models performing poorly on minority classes. While adversarial training aims to improve model robustness by exposing it to slightly perturbed inputs, existing methods often generate perturbations that are not optimized for imbalanced scenarios. They might not effectively target the vulnerabilities created by class imbalance, potentially leading to misclassifications that favor majority classes. This paper tackles the challenge of making adversarial training more effective for imbalanced datasets, specifically in temporal reasoning tasks where such imbalances are common and problematic.

Methods

The core contribution is the Prior Knowledge-Guided Adversarial Training (PKG-ADV) algorithm. It builds upon the ALICE adversarial training framework but introduces a key modification: instead of generating a generic adversarial perturbation, PKG-ADV uses the task-specific label distribution to guide the perturbation.

Here's how it works:

  • Leveraging Prior Knowledge: The algorithm samples a target label ($y_t$) from the set of incorrect labels ($C \setminus y$). Crucially, this sampling is done proportionally to the frequency of each label in the training dataset. This means the algorithm prioritizes generating perturbations that would mislead the model towards more common incorrect predictions, effectively learning to distinguish between similar, imbalanced classes.
  • Targeted Perturbations: The adversarial perturbation is then crafted to steer the model's prediction towards this sampled target label ($y_t$), rather than just any incorrect label.
  • Building on ALICE: PKG-ADV retains ALICE's dual perturbation approach: one perturbation ($ \delta_1 $) aims to improve robustness against the true label, while another ($ \delta_2 $) enforces model smoothness. The innovation lies solely in how $ \delta_1 $ is generated.

Datasets

The authors evaluated PKG-ADV on several temporal reasoning datasets:

  • MATRES: For temporal ordering prediction.
  • TimeML: For event duration prediction.
  • MC-TACO: For temporal commonsense reasoning.
  • TB-Dense: For temporal relation extraction.
  • MAVEN-ERE: For temporal relation extraction.

These datasets are noted for their inherent class imbalance, particularly in temporal reasoning tasks. The paper provides detailed summaries of their label distributions and characteristics in Table 2 and Appendix A.

Key Insights and Ideas

  • Label Distribution is Key: The most significant insight is that simply adding random adversarial perturbations isn't enough for imbalanced datasets. By intelligently using the knowledge of which classes are more frequent (and thus more likely to be misclassified), we can create more effective adversarial examples.
  • Targeting Vulnerabilities: PKG-ADV doesn't just make the model "harder"; it makes it learn to better differentiate between specific, often confused, classes. This is crucial for tasks where minority classes are easily mistaken for majority ones.
  • Simplicity, Big Impact: The proposed modification is conceptually simple (just changing how the target label for perturbation is sampled) but yields substantial performance gains, highlighting the power of incorporating domain-specific knowledge into standard ML techniques.
  • Challenging LLMs: The fact that PKG-ADV, a method applied to a smaller model (RoBERTa), can outperform large language models like ChatGPT on these specific tasks is a strong indicator of its effectiveness and the persistent challenges in temporal reasoning for even advanced models.

Key Results

PKG-ADV demonstrated superior performance across several challenging temporal reasoning tasks:

  • Outperforms Standard Fine-Tuning: PKG-ADV consistently achieved better results than standard fine-tuning on the evaluated datasets.
  • Surpasses Strong Adversarial Baselines: It outperformed the ALICE adversarial training baseline, indicating the benefit of the prior knowledge guidance.
  • Competitive with or Better Than Larger Models: On the TB-Dense dataset, PKG-ADV (using RoBERTa-BASE) outperformed a much larger ALBERT XXLarge v2 model trained with multi-task learning, even without using additional datasets.
  • Significant Gap with ChatGPT: PKG-ADV showed a considerable performance advantage over various ChatGPT-based approaches (zero-shot, prompted, and in-context learning) on these temporal reasoning tasks. For instance, on MC-TACO, PKG-ADV achieved an F1 score of 49.93, while ChatGPT variants ranged from 23.30 to 44.90.

Limitations and Future Work

The authors acknowledge the following:

  • Limited Scope of Experiments: Experiments were conducted solely on English classification benchmarks using the RoBERTa model and focused on sentence-level tasks.
  • Generalizability: While the method is theoretically model- and language-agnostic, empirical validation was limited.

Future work directions include:

  • Expanding Experiments: Applying PKG-ADV to a wider range of tasks, models, and languages.
  • Incorporating Other Knowledge: Exploring the use of other forms of prior knowledge, such as annotator agreement data, to further enhance performance.
  • Sentence-Level Focus: While the method is general, current experiments are limited to sentence-level tasks.

Summary updated

BibTeX
@inproceedings{pereira2024prior,
  author = {Lis Pereira and Fei Cheng and Wan Jou She and Masayuki Asahara and Ichiro Kobayashi},
  title = {{Prior Knowledge-Guided Adversarial Training}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
}
Figure