arXiv:2609.03322cs.CLSep 2026

Manuscript Offprint

arXiv:2609.03322

How Perturbations Propagate: A Multi-Level Analysis of Robustness in Large Language Models

Dun Li Chan, Emily Liu, Niyathi Allu, Christian Hoang

Abstract

Language models encounter typos, corrupted text, altered words, and disrupted token order, yet robustness is usually evaluated only through output behavior. We study how six naturalistic and synthetic input perturbations propagate through decoder-only language models at three levels: output behavior, hidden-state geometry, and attention-head function. We evaluate behavioral effects across four GPT-2 and two Qwen2.5 checkpoints by analyzing layerwise geometry using centered kernel alignment and intrinsic dimension, and examine attention-head responses in GPT-2. Perturbation types produce distinguishable metric profiles that are not fully captured by output measures and are only partly consistent across the tested checkpoints. Copying scores are especially associated with activation-patching recovery under token substitution and shuffling. Gradient-guided HotFlip perturbations also cause stronger behavioral and representational disruption than rate-matched random token substitutions in GPT-2; their behavioral effects are consistent across all six tested checkpoints. Our results show that robustness claims based on a single behavioral or representational metric can be misleading, and motivate multi-level evaluation of how perturbations alter language-model computation.

1 Introduction

Language models are often evaluated on clean and well-formed text, but deployed inputs usually contain typographical errors or character corruption from optical character recognition, which alter wording and disrupt token order. Prior work has shown that such changes can substantially degrade language-model behaviour even when they preserve much of the text's meaning for a human reader [Belinkov and Bisk, 2018, Pruthi et al., 2019]. Adversarial attacks make this vulnerability more explicit by selecting small input edits that optimise a model-level objective [Ebrahimi et al., 2018, Wallace et al., 2019, Jin et al., 2020]. However, output degradation alone does not explain how a perturbation changes the computation performed inside the model.

Two perturbations can yield similar changes in generated text while disrupting different representations or computational components. Conversely, a small output change may conceal a substantial shift in hidden-state geometry. Existing robustness evaluations therefore provide limited evidence about whether perturbation effects are shared across corruption types, localize to recognizable mechanisms, or generalize across model scales and families.

Thus, we address these questions through a multi-level analysis of perturbation propagation in decoder-only language models. We compare six naturalistic and synthetic perturbation types (character substitution, keyboard typos, random token substitution, token shuffling, word substitution, and synonym substitution) using WikiText-2 inputs. We measure output behavior using negative log-likelihood and generated-output divergence across GPT-2 models of increasing scale and Qwen2.5

*Corresponding author: emily.zf.liu@gmail.com

Preprint.

models; representation change using CKA [Kornblith et al., 2019] and intrinsic-dimension shifts [Facco et al., 2017, Aghajanyan et al., 2021]; and component-level responses using attention-head function scores and activation patching [Olsson et al., 2022, Wang et al., 2023, Heimersheim and Nanda, 2024]. Additionally, we also compare gradient-guided HotFlip perturbations against exactly rate-matched random token substitutions.

Our contributions are:

  • We provide a multi-level empirical analysis of six text perturbation types, jointly measuring output behavior, representation geometry, and attention-head responses.

  • We test whether perturbation effects are associated with functionally characterized attention heads using attention-based measurements and activation patching.

  • We evaluate the stability of perturbation signatures across GPT-2 scale and the Qwen2.5 model family.

  • We compare adversarial and rate-matched random token substitutions, separating adversarial optimization effects from edit rate alone.

References (22)