NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Robustness to Programmable String Transformations via Augmented Abstract Training

Yuhao Zhang, Aws Albarghouthi, Loris D'Antoni

Abstract

Deep neural networks for Natural Language Processing (NLP) are often brittle, with small perturbations like typos or synonym swaps causing significant performance drops. We present Augmented Abstract Training (A3T), a framework that combines search-based data augmentation with symbolic mathematical abstractions. A3T allows developers to programmatically specify allowed transformations and trains models to be robust across the entire resulting perturbation space. Our results show that A3T achieves superior "exhaustive accuracy" on benchmarks like AG News and SST2 without sacrificing performance on clean data.

Introduction

Deep learning models in NLP frequently fail when faced with minor text variations. A sentiment classifier might correctly identify a review as positive, yet flip its prediction if "nice" is replaced with "pleasant" or if a typo like "huose" is introduced. Unlike the continuous pixel space in computer vision, the perturbation space for text is discrete and massive, making it difficult to find worst-case scenarios using standard gradient-based methods.

Existing defenses typically fall into two categories:

  1. Augmentation: Searching for specific adversarial examples to include in training. While fast, this often misses the global worst-case scenario.
  2. Abstraction: Using symbolic mathematics to prove robustness over a set of changes. This is thorough but often overly conservative, leading to "loose" bounds that degrade performance on clean data.

The A3T Framework

A3T addresses these limitations by decomposing the problem into complementary parts. It utilizes a domain-specific language that allows developers to define "programmable" transformations, such as vowel swaps or word deletions.

Comparison of Augmentation, Abstraction, and the proposed A3T approach.

The core innovation of A3T is its hybrid training algorithm:

  • Decomposition: Transformations are split into two groups. One group is handled via Augmentation (e.g., using HotFlip to search for the worst-case sample), and the other is handled via Abstraction (e.g., using Interval Bound Propagation to create a "safety envelope").
  • Hybrid Training: For each training step, A3T identifies a "bad" input through search and then constructs a symbolic "convex hull" around it to account for all other possible symbolic transformations. The model is trained to minimize loss over this entire symbolic region.

Experimental Evaluation

The researchers evaluated A3T on two standard benchmarks: AG News (for character-level robustness) and SST2 (for word-level robustness involving synonym swaps and deletions).

Key Results

  • Superior Robustness: On AG News, A3T achieved an exhaustive accuracy of 86.8%, significantly outperforming normally trained models (60.1%) and those using only HotFlip augmentation (84.9%).
  • Complex Attack Resistance: On SST2, A3T outperformed the best baseline by nearly 9% when facing combinations of deletions, duplications, and synonym swaps.
  • Stability: A3T maintains high robustness even as the "perturbation budget" (the number of allowed edits) increases, whereas standard models see a rapid decline in exhaustive accuracy.

Discussion and Future Work

A3T demonstrates that augmentation and abstraction have complementary strengths. Abstraction excels at substitutions that map well to vector spaces (like synonyms), while augmentation is better suited for structural changes (like deletions) that are difficult to represent symbolically.

However, several challenges remain:

  • Architecture Constraints: The current abstraction technique is limited to models with an initial affine transformation layer (e.g., CNNs), excluding RNNs for now.
  • Manual Decomposition: Users must currently decide which transformations to augment versus abstract. Automating this process is a key area for future research.
  • Computational Cost: The inner search and symbolic propagation steps make A3T more computationally intensive than standard training.

Despite these limitations, A3T provides a path toward NLP models that are provably robust against a wide array of programmatic attacks.

Summary updated

BibTeX
@inproceedings{zhang2020robustness,
  author = {Yuhao Zhang and Aws Albarghouthi and Loris D'Antoni},
  title = {{Robustness to Programmable String Transformations via Augmented Abstract Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=ijBjR_fJ8-B},
}
Figure