Where Do Prompt Perturbations Break Generation? A Segment-Level View of Robustness in LoRA-Tuned Language Models

Zhuoyun Li, Boxuan Wang, Jinwei Hu, Zhenglin Huang, Qisong He, Xinmiao Huang, Guangliang Cheng, Xiaowei Huang, Yi DongarXiv 2026

TL;DR

Minor prompt perturbations can cause critical local semantic drift in LLM outputs—such as flipping a number or a medical condition—even when the overall sequence remains globally similar. To fix this, the authors introduce $S^2R^2$, a fine-tuning framework that decomposes text into semantic segments, aligns them using optimal transport, and penalizes the worst-case local drifts while constraining LoRA adapter growth. This approach significantly improves LLM robustness against typos, paraphrases, and synonyms, while demonstrating superior zero-shot transfer to unseen datasets.

What Problem Does This Paper Address?

When we introduce minor, meaning-preserving changes to an LLM prompt (like a typo or a paraphrase), the model's output can degrade. Existing robustness techniques try to solve this by enforcing consistency across the entire sequence (e.g., minimizing global KL-divergence between outputs from clean and perturbed prompts).

The authors argue that this holistic view hides a critical failure mode: language is inherently non-uniform, and semantic risk is concentrated in specific keywords, entities, or conclusions. A perturbed model response might achieve a high sequence-level similarity score while completely failing on a critical detail (e.g., changing a medical diagnosis or a numerical value). This paper shifts the focus from "is the whole output similar?" to "where exactly does the generation break?", proposing a segment-level framework to track and mitigate local semantic drift.

Methods

The authors introduce $S^2R^2$ (Semantic Segment Robustness Regularisation), a robust fine-tuning framework designed for Low-Rank Adaptation (LoRA). It operates on two fronts:

  1. Output-Side Segment Alignment ($L_{sem}$): The framework decomposes clean and perturbed generations into semantic segments (using a lightweight punctuation-based discourse splitter). It maps these segments to each other using an optimal transport plan based on the cosine distance of their hidden states. Instead of averaging the drift across all segments, it applies a smooth maximum function (LogSumExp) to explicitly penalize the segments that suffer the worst-case meaning drift.
  2. Mechanism-Side Adapter Stability ($L_{stab}$): Input perturbations don't just change the output; they alter how attention weights allocate evidence internally. The authors show that large LoRA updates can interact with and amplify these input perturbations. To prevent this, they introduce a regularizer that bounds the Frobenius norms of the trainable LoRA matrices ($A$ and $B$) in the query and key projections.
Figure 1: Overview of S2R2. The framework aligns clean and perturbed generations at the segment level and emphasises the worst-drift semantic segments. The mechanism-side branch, labelled as attention shift in the schematic, is implemented as an adapter-stability term Lstab that controls LoRA update growth as a proxy for limiting perturbation-amplified attention reallocation. Together with LCE and Lsem, this encourages robust generation by preserving critical semantic content rather than only enforcing whole-sequence consistency.

Datasets

The framework was evaluated across three distinct summarization benchmarks to test different generation styles and domain complexities:

  • CNN/DailyMail: A relatively extractive dataset used to evaluate factual stability.
  • XSum: A highly abstractive dataset that stresses semantic coherence.
  • PubMed: A specialized biomedical dataset containing technical terminology, serving as a domain-specific stress test.

Key Insights and Ideas

  • Semantic Vulnerability is Asymmetric: Whole-sequence metrics dilute local failures. By focusing optimization on the "worst-drift" segments, $S^2R^2$ ensures that critical details (entities, relations) remain stable even if the surface syntax shifts.
  • Adapters Can Amplify Noise: Low-rank updates ($Q$ and $K$ projections) act as levers inside the attention mechanism. Unconstrained adapter growth gives the model more freedom to reallocate attention drastically when faced with minor prompt noise. Bounding the product of the LoRA factor norms ($\|B\|_F \|A\|_F$) acts as a highly effective proxy for stabilizing internal attention shifts.
  • The PAC-Bayesian Connection: From a complexity perspective, keeping the learned LoRA posterior close to the frozen pre-trained prior prevents the model from overfitting to specific perturbation patterns seen during training. This explains why the model generalizes so well to entirely unseen noise types and datasets.
Figure 2: PAC-Bayesian complexity view of LoRA adaptation. The frozen pre-trained model defines the prior centre, while LoRA fine-tuning induces a pos- terior over a restricted adapter hypothesis space. We use this view to interpret the adapter-stability term as a complexity-oriented control on the movement from the pre-trained model. The figure is intended as an explana- tory view of complexity-adjusted robustness, not as a standalone certification claim.

Key Results

The authors evaluated $S^2R^2$ against competitive robustness baselines (SMART and R3F) using models like BART-base, Flan-T5-base, and Mistral-7B-Instruct-v0.2 under various noise types (typos, deletions, synonyms, paraphrasing).

  • Substantial Drop in Performance Degradation: On the CNN/DailyMail benchmark using BART-base, $S^2R^2$ achieved an average Performance Drop Rate (PDR) of just 0.0012—an 81% reduction in ROUGE-L degradation compared to SMART.
  • Controlled Parameter Growth: Across all models and datasets, $S^2R^2$ consistently maintained a much lower LoRA Frobenius norm footprint than the baselines, validating its conservative adaptation trajectory.
  • Excellent Cross-Dataset Transfer: In zero-shot settings (e.g., fine-tuning on general news via CNN/DailyMail and testing on biomedical text via PubMed), $S^2R^2$ achieved the lowest empirical risk and best semantic stability, proving that segment-level alignment learns a generalizable robustness pattern.

Limitations and Future Work

While the lightweight, punctuation-based text segmentation used in the main experiments is highly efficient, it is a proxy for true semantic boundaries. The authors experimented with a more precise T5-based semantic segmentation model, but found it to be 60 times more computationally expensive, making it impractical for full-scale training.

Future work aims to explore more structured, neuro-symbolic segmentation modules that can isolate atomic factual propositions (like entity-predicate-argument tuples) without incurring massive computational overhead. The authors also plan to conduct deeper ablation studies to isolate the individual impacts of the norm-only vs. segment-only constraints.

Summary updated

BibTeX
@misc{li2026where,
  author = {Zhuoyun Li and Boxuan Wang and Jinwei Hu and Zhenglin Huang and Qisong He and Xinmiao Huang and Guangliang Cheng and Xiaowei Huang and Yi Dong},
  title = {{Where Do Prompt Perturbations Break Generation? A Segment-Level View of Robustness in LoRA-Tuned Language Models}},
  year = {2026},
  eprint = {2605.01605},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.01605},
}
Figure