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:
- 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.
- 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.
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.
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