Explaining the role of Intrinsic Dimensionality in Adversarial Training
Enes Altinisik, Safa Messaoud, Husrev Taha Sencar, Hassan Sajjad, Sanjay Chawla
TL;DR
This work explains why adversarial training yields different robustness and generalization outcomes across vision models, encoder-based LLMs, and decoder-based LLMs by linking these trends to layerwise intrinsic dimensionality (ID) and the manifold conjecture. It shows that off-manifold adversarial examples (OFM-AEs) promote robustness, while on-manifold adversarial examples (ONM-AEs) promote generalization, with the layer-specific ID shaping the ONM/OFM mix. Building on this, the authors introduce SMAAT, which perturbs the layer with the lowest ID to generate OFM-AEs efficiently, reducing the PGD chain length and achieving faster training while boosting robustness across sentiment classification, safety filtering, and RAG retrieval tasks. Empirical results demonstrate that SMAAT delivers superior robustness with comparable generalization to standard training and offers substantial runtime savings, making AT more practical for encoder-based models in real-world pipelines. The findings offer a principled path to balance robustness and generalization by controlling perturbations across intermediate layers, with potential for broader adoption in diverse AI systems.
Abstract
Adversarial Training (AT) impacts different architectures in distinct ways: vision models gain robustness but face reduced generalization, encoder-based models exhibit limited robustness improvements with minimal generalization loss, and recent work in latent-space adversarial training (LAT) demonstrates that decoder-based models achieve improved robustness by applying AT across multiple layers. We provide the first explanation for these trends by leveraging the manifold conjecture: off-manifold adversarial examples (AEs) enhance robustness, while on-manifold AEs improve generalization. We show that vision and decoder-based models exhibit low intrinsic dimensionality in earlier layers (favoring off-manifold AEs), whereas encoder-based models do so in later layers (favoring on-manifold AEs). Exploiting this property, we introduce SMAAT, which improves the scalability of AT for encoder-based models by perturbing the layer with the lowest intrinsic dimensionality. This reduces the projected gradient descent (PGD) chain length required for AE generation, cutting GPU time by 25-33% while significantly boosting robustness. We validate SMAAT across multiple tasks, including text generation, sentiment classification, safety filtering, and retrieval augmented generation setups, demonstrating superior robustness with comparable generalization to standard training.
