The Shape of Vulnerability: How Adversarial Perturbations Reshape the Topology of Language Model Latent Spaces

Angelina Tsai, Shreya Subramanian, Catherine Liu, Kimberly Lopez, Leif Zinn-Brooks, Alexia E. Schulz, Adaku Uchendu


Abstract
Adversarial perturbations in the context of large language models (LLMs) are subtle changes added to input data (i.e., images or text) that are designed to alter predictions or outputs of machine learning models. We introduce several novel visualizations using topological data analysis (TDA) (leveraging persistent homology) to characterize how adversarial perturbations act on text inputs, specifically, how sandbagging and code-injection attacksalter the geometric structure of attention heads in transformer models. By computing persistent homology metrics from attention maps across different model architectures (such as BERT, RoBERTa, ELECTRA, DistilGPT, etc.), we find that adversarial inputs alter higher-dimensional topological features (H1 loops and H2 voids) in ways that distinguish them from clean, non-adversarial inputs.
Anthology ID:
2026.acl-srw.24
Volume:
Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (ACL 2026)
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Santosh T.Y.S.S., Juan Diego Rodriguez, Ona de Gibert
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
290–306
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.acl-srw.24/
DOI:
Bibkey:
Cite (ACL):
Angelina Tsai, Shreya Subramanian, Catherine Liu, Kimberly Lopez, Leif Zinn-Brooks, Alexia E. Schulz, and Adaku Uchendu. 2026. The Shape of Vulnerability: How Adversarial Perturbations Reshape the Topology of Language Model Latent Spaces. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (ACL 2026), pages 290–306, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
The Shape of Vulnerability: How Adversarial Perturbations Reshape the Topology of Language Model Latent Spaces (Tsai et al., ACL 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.acl-srw.24.pdf