arXiv:2610.12667cs.CLOct 2026

Manuscript Offprint

arXiv:2610.12667

perturber: A Stateless Service for Semantics-Preserving Text Perturbations

Khoi-Nguyen Tran

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language model (LLM) evaluations on clean benchmarks overstate model robustness: real inputs arrive perturbed, and these meaning-preserving variants routinely move model answers. Studying this systematically requires applying perturbations one at a time, reproducibly, and identically wherever they run, yet existing tools couple them to a benchmarking stack rather than packaging them as a reusable transform layer. We present perturber, a stateless service and Python library that applies exactly one semantics-preserving perturbation per call, drawn from a first-party catalog of 68 perturbations across 11 families. It turns on a single primitive, with composition left to the caller chaining calls, so the service and the library produce identical output by construction. We evaluate the tool itself, its correctness, reproducibility, and cost, rather than any model's robustness, measuring meaning-preservation per perturbation rather than assuming it. The demonstration adds a live playground, an introspectable catalog for benchmark selection, and a one-command reproducible evaluation.

1 Introduction

Large language models (LLMs) are evaluated on clean, static benchmarks, but they are used on messy text: real inputs arrive with typos, inconsistent casing, ad hoc formatting, and reworded phrasing. These changes leave the meaning intact, yet a growing body of work shows that they move model answers. A recent study reports accuracy degradation of up to 12%, a reversal of the ranking between two models under a single perturbation in 63% of cases, and input phrasing accounting for as much as half of a model's measured performance variance (Romanou et al., 2026). A benchmark run on clean text can therefore overstate a model's robustness, and can even rank a more fragile model above a more stable one.

Measuring this fragility credibly imposes strict demands on the perturbation step: each transformation must be applied one at a time and reproducibly, its provenance must be clear, and it must behave identically whether a harness calls it as a library, from a shell, or over the network. These are demands on tooling, and no existing tool meets them as a standalone transform. BrittleBench, for instance, bundles the perturbations with model inference and scoring rather than exposing a transform layer a harness can call in isolation. So each study reimplements the perturbations it needs, and small differences between those reimplementations leave robustness numbers from different studies not directly comparable.

We present perturber, a stateless service and Python library that fills this gap. It serves no model, computes no score, and holds no state; it is the transformation layer a robustness harness invokes, exposing a first-party catalog of 68 perturbations across 11 families. Our contributions are fourfold. First, and most important, a standard set of perturbation definitions: each of the 68 is named, scoped, and typed once, so two studies applying the same perturbation apply the same transformation and their robustness numbers become comparable. Second, a single-primitive design, perturb(text, name, params, seed), in which composition is the caller chaining calls, so the library and the network service are byte-identical by construction and the deterministic tier is a pure function of its arguments, a reproducibility contract augmentation libraries do not offer. Third, an introspectable catalog from which a downstream harness selects its own benchmark, with an optional tier that wraps an external engine for direct comparison. Fourth, a reproducible fidelity harness that measures semantics-preservation per perturbation rather than assuming it, catching two defects in the transform layer. perturber is open source and pip-installable at https://github.com/IBM/perturber.