Precision vs. Perturbation: Robustness Analysis of Synonym Attacks in Ukrainian NLP
Paper · 2025 · Volodymyr Mudryi and Oleksii Ignatenko
Summary
A Ukrainian review can express the same opinion with different words. A classifier that assigns a different rating after a faithful rewrite has made a distinction the reader had no reason to make. Mudryi and Ignatenko investigate how often Ukrainian text classifiers make this kind of distinction and how often the attempted rewrite itself is to blame. They compare an experiment that changes a single word with Ukrainian adaptations of TextFooler and BERT-Attack, which can make successive replacements. TextFooler draws on a synonym lexicon with 15,000 entries and inflects candidates to fit the original text. BERT-Attack proposes words from their surrounding context and filters the suggestions. The experiments cover consumer reviews, news headlines and Telegram posts labeled for manipulation. The common task across these settings is text classification.
The authors test Ukr-RoBERTa, XLM-RoBERTa and SBERT after training each architecture for each task. The largest single-word drop is 12.63 percentage points in Ukr-RoBERTa’s test accuracy on reviews. On the review test set, TextFooler takes the same classifier from 76.28% to 36.01% accuracy, a drop of 40.27 points, with an average of 112.9 classifier queries per input. BERT-Attack uses fewer classifier queries across the reported comparisons and produces the larger accuracy losses on the news headlines. The authors also present GPT-4o with original and edited versions of texts selected because their edits had already misled the original classifiers. With task instructions and labeled examples in the prompt, GPT-4o falls from 44.00% to 29.00% accuracy on the reviews selected through TextFooler. Its decline on the headlines selected through the same method is 0.83 points.
The human review qualifies what those losses measure. The authors assess 900 replacements for grammatical fit and preservation of meaning. The share judged acceptable ranges from 23–40% for the single-word comparison, 38–51% for TextFooler and 36–42% for BERT-Attack. BERT-Attack produces fewer grammatical errors in the reviewed samples, yet the judges still frequently find changes in meaning. A dictionary can supply a synonym for the wrong sense of a word, and a context-based suggestion can fit a sentence while changing what it describes. The study gives Ukrainian robustness research a benchmark and publicly releases its code. It also shows why accuracy under substitution needs to be read alongside judgments about the substitutions themselves.
Deep dive: Precision vs. Perturbation: Robustness Analysis of Synonym Attacks in Ukrainian NLP
This study tests how synonym substitutions change Ukrainian text classification and checks whether the edited texts preserve their meaning. · about 37 minutes to read
The problem and its context
Correct answers and stable answers
A held-out accuracy test asks whether a classifier assigns the recorded label to each input. The label might be a rating for a review, a topic for a headline or a judgment about manipulation in a social media post. The test measures agreement with those labels for the texts as they appear in the dataset. A separate question is whether the same judgments survive changes in how the texts are written. A classifier may get a headline right in its published form and switch topics when a close equivalent takes the place of a familiar keyword. Its original answer alone gives the evaluator no way to see that sensitivity.
The paper puts this question in the context of a shift from rules and simple statistical systems to neural systems trained on large text collections. The authors describe earlier error patterns as relatively accessible to inspection. They present modern systems as capable of learning more complex patterns while making it harder to trace the basis of a specific prediction. A single aggregate score compresses many decisions into a measure of overall performance. A controlled comparison between a text and a revised version gives the evaluator a narrower question to ask about one decision. The architecture that frames this part of the paper is the Transformer.
A useful revision for this purpose has a property that the two texts should share. A review should keep the evaluation it conveys. A headline should remain about the same topic. A post should continue to exhibit the same evidence relevant to a manipulation judgment. The evaluator can then ask whether the predicted category remains stable even though a word differs. This is close to the invariance test described in the paper’s discussion of CheckList, a framework that also includes tests of basic functionality and tests in which a specific change should move a prediction in an expected direction. Those are different ways to specify the behavior an evaluation is looking for. CheckList
The paper also connects this question to the study of lexical shortcuts. If words in a benchmark happen to correlate strongly with a label, a classifier can learn to exploit the correlation. A score on ordinary test data can reward that behavior wherever the same correlation appears. Replacing a word creates a chance to observe what happens when one cue is withdrawn and a related expression takes its place. A resulting prediction change is evidence of sensitivity to the input wording. Establishing where that sensitivity came from would require separate evidence about the training data or the classifier’s decision process. One precedent the paper cites is work on annotation artifacts in natural language inference.
Why change a word?
The paper traces the idea of adversarial testing to computer vision, where small changes to pixel values can affect a prediction while leaving the image recognizably the same to a person. A word in a sentence is a discrete choice. Replacing it can change grammar, the identity of a person or place, a factual assertion or the attitude a writer expresses. The linguistic difficulty is therefore part of the design of the test. The change needs to be small in a sense that matters to a reader as well as in the number of text positions affected. The authors cite Explaining and Harnessing Adversarial Examples for the computer vision background.
The earlier text studies discussed in the paper applied changes at several levels. Character-level methods explored the effects of small spelling changes. HotFlip used information from inside a classifier to evaluate such changes. DeepWordBug used behaviors observable from classifier outputs and applied edits such as insertions and deletions to salient parts of the input. The studies illustrate how different kinds of access to a classifier shape the questions an experiment can ask. A spelling-based comparison and a comparison between alternative word choices also convey different information about what a reader would experience. HotFlip, DeepWordBug
Work at the word level brought a further choice into the experiment. A researcher had to decide both which location to change and what expression could occupy it. The paper describes earlier approaches that ranked words by their importance and drew replacements from WordNet. TextBugger combined character and word changes and used distances in a learned representation to find related words. A learned representation can group words that tend to appear in similar settings. A group of related words can still contain items that a reader would understand differently in the particular sentence being tested. Probability Weighted Word Saliency, TextBugger
TextFooler and BERT-Attack give the authors two ways to examine this problem. In the original TextFooler, the list of possible replacements comes from a word representation adjusted to bring synonyms together and move antonyms apart. In BERT-Attack, a masked word is supplied by a predictor that sees the surrounding text. The first puts a lexical relationship at the center of candidate generation. The second puts contextual plausibility there. Ukrainian provides a test of how those different sources of evidence behave in a language where finding the right surface form poses a substantial problem of its own. TextFooler, BERT-Attack
The paper also describes work that changes the shape of a sentence. Syntactically Controlled Paraphrase Networks produce alternate formulations under different parse templates. Those comparisons ask whether a prediction survives a broader reorganization of the wording. Mudryi and Ignatenko restrict their own intervention to substitutions in existing word positions. This makes it possible to point to a particular lexical change or a sequence of changes when examining an example. It also gives the experiment a specific scope within the broader question of whether a prediction is stable under paraphrase. Syntactically Controlled Paraphrase Networks
What Ukrainian adds to the test
A dictionary normally lets a reader look up a word under a base entry. The word appearing in a headline or review can be an inflected version of that entry, with a form determined by its role in the sentence. A plausible substitute may need to match features such as case or number. This introduces an intermediate question between finding related meanings and writing a grammatical revision. The study has to identify the original word’s grammatical features and try to realize the replacement in the appropriate form. These are problems of morphology and word forms.
There is a separate ambiguity before the replacement is written. A single dictionary entry can cover different senses. A synonym that applies to an order or directive can be entirely unsuitable when the same Ukrainian word refers to a sports team. A dictionary can legitimately record that relationship even though its use in the sports headline is mistaken. The valuable evidence here is the meaning the word takes on in that occurrence. Identifying that meaning from the surrounding text is the problem of word sense disambiguation.
The authors describe Ukrainian as having limited lexical resources for this kind of evaluation and lacking large-scale robustness benchmarks. The exact resources used for an English procedure therefore matter to whether it can be transferred. An English pipeline may assume that a ready-made representation distinguishes synonyms from opposites or that the available sentence comparison tool supports the target language. For Ukrainian, the authors have to choose substitutes for those components and examine whether the resulting tests retain the intended linguistic control. They describe their study as the first systematic Ukrainian evaluation of this form, to their knowledge.
The related work gives precedents for extending this kind of testing beyond English. The paper mentions a contextual substitution study in Arabic and a Chinese study using characters that resemble or sound like one another. The authors also discuss PromptRobust, which examines how systems responding to instructions handle textual changes that include typos, synonym choices and reformulations. These precedents frame two questions for the Ukrainian study. A procedure needs resources suited to the language, and sensitivity may persist when the same input is read by a different kind of classifier. Arabic Synonym BERT-based Adversarial Examples, PromptRobust
The method, step by step
Setting up the comparison
The starting point is a text with a known task label and a classifier’s prediction for it. The study constructs an edited version of the text and obtains another prediction. The original supplies both the point of comparison for the classifier’s output and the meaning that the revision is supposed to preserve. Each procedure defines its own set of words it can propose and the checks a proposal must pass. The human review later asks how well those checks achieved their linguistic purpose.
The paper writes the original input as a sequence of words.
xₒᵣᵢ𝓰 = [w₁, w₂, …, wₙ]
Here xₒᵣᵢ𝓰 denotes the original input. The brackets enclose an ordered sequence. Each w denotes a word token, and its subscript identifies its position. The indices ₁ and ₂ mark the first and second positions, n is the number of words in the input, and the ellipsis stands for the intermediate positions. The equals sign defines the representation. A word token here is an occurrence of a word in the text. A classifier’s internal units can be smaller, a distinction that matters for how the authors adapt the contextual replacement method.
To illustrate the intervention, the paper shows a version where the word at the second position is replaced.
xₐ𝒹ᵥ = [w₁, w₂′, …, wₙ]
The sequence xₐ𝒹ᵥ denotes the modified input, and the equals sign assigns that sequence to it. The brackets show its ordered positions. The prime on w₂′ marks a proposed substitute for the original word w₂ at the second position. The first word w₁, the last word wₙ and the positions represented by the ellipsis remain as in the original sequence in this illustration. The index n again marks the sequence length. The experiment also allows several positions to differ when evaluating successive substitutions.
The definition separates the desired human judgment from the required change in the machine’s judgment.
fₕᵤₘₐₙ(xₐ𝒹ᵥ) ≈ fₕᵤₘₐₙ(xₒᵣᵢ𝓰)
The function fₕᵤₘₐₙ represents the meaning a person takes from a text. Parentheses give its input, either the edited text xₐ𝒹ᵥ or the original xₒᵣᵢ𝓰. The approximation sign expresses the requirement that the revised text convey sufficiently similar meaning. This is a condition on the example. The automated similarity checks used in the study are ways to screen candidates before human inspection, with a different evidential status from a reader’s judgment.
fₘₒ𝒹ₑₗ(xₐ𝒹ᵥ) ≠ fₘₒ𝒹ₑₗ(xₒᵣᵢ𝓰)
The function fₘₒ𝒹ₑₗ returns the target classifier’s prediction. The parentheses again enclose the text on which the function is evaluated. The edited input is xₐ𝒹ᵥ and the original is xₒᵣᵢ𝓰. The inequality sign requires their predicted labels to differ. A fall in confidence can help choose between candidates while the predicted category stays the same. By itself, that fall fails to satisfy this condition on the predicted label.
A further constraint controls how many words can be changed.
‖xₐ𝒹ᵥ − xₒᵣᵢ𝓰‖₀ ≤ k
Here xₐ𝒹ᵥ and xₒᵣᵢ𝓰 are the edited and original texts. The minus sign represents their position-by-position differences for the purposes of this notation. The double bars with subscript ₀ count the positions carrying substitutions. The symbol k is the allowed upper bound on the count, and ≤ means that the count may equal that bound or fall below it. The formula limits the extent of textual change. A change to a single important word can already violate the separate requirement about meaning.
From labeled Ukrainian texts to paired robustness measurements
The steps in order.
Preparing the classifiers and the data
The authors create training, validation and test portions using an 80/10/10 partition and describe the partitioning as random. The training portion supplies the labeled examples for fitting the classifiers. The experiment then evaluates predictions on held-out test inputs. There are language-specific preparation choices besides the split. The reviews are filtered to retain Ukrainian entries. For the manipulation corpus, the authors arrange for the final test set to contain Ukrainian posts because the wider collection also includes Russian. For the news task they use article titles as the texts to classify.
The classifiers come from three architectures that represent different starting points. Ukr-RoBERTa is pretrained on Ukrainian text and uses a SentencePiece tokenizer adapted to Ukrainian. A tokenizer determines how a text is broken into the units the system processes. The authors choose the Ukrainian system partly because they expect its pretraining and text segmentation to suit Ukrainian inflection. The underlying architecture is part of the RoBERTa family, and the language-specific tokenization is relevant to subword tokenization.
XLM-RoBERTa-base is pretrained on 100 languages, including Ukrainian. It provides a multilingual comparison for the Ukrainian-specific system. SBERT, the paraphrase-multilingual-mpnet-base-v2 checkpoint in this study, is a sentence transformer trained for multilingual similarity. Its inclusion lets the authors ask whether a starting representation designed around similarities between sentences corresponds to greater stability under word substitutions. The two comparators embody different reasons to expect that a system might generalize across wording. XLM-RoBERTa, Sentence-BERT
For each task, the authors add a classification head to each encoder. The encoder represents the input and the head supplies scores for the task’s labels. Fitting the system on the labeled task data specializes the pretrained representation and classification head for the task. The authors use a shared configuration so the architecture and task comparisons have a common training procedure. This is the role of fine-tuning.
All runs use AdamW, a learning rate of 2 × 10⁻⁶, a batch size of 32 and a maximum sequence length of 512. The schedule warms up over 10% of the training steps and follows a linear learning-rate schedule. The appendix lists training for up to 15 epochs, with an NVIDIA RTX 3090 (24 GB) as the hardware. The authors use Hugging Face’s Transformers library. They release dataset loading, training and evaluation code together and also make checkpoints and logs available. These resources accompany the comparison across tasks and architectures.
Checking the effect of a single replacement
The simplest experiment looks for the strongest response to one changed word within a bounded vocabulary. For each dataset the authors use the 1000 most frequent words in its training corpus to define which words to cover. The candidate list comes mainly from the Ukrainian synonym dictionary Synonimy.info, supplemented by selected entries from the Ukrainian synonym dictionary published by Naukova Dumka. A word outside the selected vocabulary, or one for which a suitable dictionary entry is unavailable, contributes no replacement to this comparison. The experiment therefore measures sensitivity within the area that the selected vocabulary and lexicon can reach.
The authors clean the dictionary-derived lists before using them. They remove duplicate and poorly formatted entries, exclude candidates that are merely changes of grammatical form, and cross-check an antonym dictionary to reject listed opposites. They manually review part of the resulting resource. These checks deal with distinct sources of noise. Cleaning helps ensure that two records represent distinct candidates. Checking antonyms removes a lexical relation unsuited to the study’s intended intervention. A contextual judgment is still needed to establish whether a particular candidate expresses the intended sense in a given sentence.
Because many entries are given in their base form, the procedure uses pymorphy2 to try to match the grammatical features of the original occurrence. A base form is the form under which a word is typically indexed in a lexicon. The relevant operation here is to move from that base form to a form suitable for the position being edited. The dictionary’s role is to propose a lexical alternative and the morphological tool’s role is to realize it in the sentence. This distinction between the base entry and the occurrence is the distinction between a lemma and a particular form of that word.
The single-word experiment starts from test inputs the specific classifier gets right. For each such input, a supported word and one of its eligible synonyms define a variant with exactly one substitution. A text can yield many variants because it can contain several supported words, each with several possible substitutes. All the variants for an input are grouped together. The reported comparison keeps the variant that lowers the original class’s predicted probability the most. A selected variant can reduce confidence in a correct answer, or it can leave another class with the largest probability and turn the answer into an error.
This selection rule is important to the meaning of the baseline. It asks what a deliberately selected replacement can do in the available candidate set. The result is an estimate under that selection procedure. A randomly chosen dictionary entry, a spontaneous rephrasing by a reviewer or a substitution selected solely by fluency would define different experiments. The paper calls this a baseline because it limits each revision to a single changed word. Within that restriction it searches for a strong challenge to the classifier.
Testing successive dictionary substitutions
The adaptation of TextFooler allows several words to change. As in the original method, the paper evaluates how much the classifier’s confidence changes when it sees the text with a word masked. A word whose masking produces a larger decline is ranked as more influential for the prediction. This ranking is an observation about the classifier’s output after a specific intervention. It orders the positions to be considered for revisions. The authors’ adaptation considers the full set of words in the input, dropping the original framework’s preliminary cutoff on importance.
In the original TextFooler, candidate discovery uses counter-fitted FastText vectors. A vector represents a word by a collection of numerical features. The counter-fitting adjustment reshapes the relative positions of words using lexical information about synonymy and opposition. The Ukrainian FastText vectors available to the authors give ordinary distributional relationships. Words may be neighbors because they occur in similar contexts, including in cases where they express opposite judgments. In the authors’ check, the neighbors of хороший included forms glossed as “not good” and “bad.” That result explains why the authors wanted a different candidate source for Ukrainian word embeddings.
The adapted TextFooler uses the curated synonym lexicon and applies pymorphy2 to candidate forms. The authors report a mean of 29 synonyms per dictionary word and a median of 16. These two descriptions of the candidate lists indicate why a typical entry can give a different impression of the search burden than the mean. Some words have unusually large lists. The authors impose a maximum of 200 synonyms per word, so it remains possible to compare many alternatives while bounding the candidate list at any position.
The procedure also checks the similarity of the input before and after a proposed revision. The authors replace the original framework’s Universal Sentence Encoder with paraphrase-xlm-r-multilingual-v1 to support Ukrainian. The substitute encoder represents the texts as vectors. The comparison uses cosine similarity, which expresses how closely the vectors point in the same direction. TextFooler retains proposals that reach at least 0.7 under that comparison between the original and revised text. This rule gives the procedure a consistent numerical check even when several dictionary candidates appear plausible. Universal Sentence Encoder, semantic similarity
The authors evaluate replacements in the ranking order and can apply them successively. An accepted version becomes part of the evolving text, while the original gives the experiment its reference prediction and its semantic reference. The process ends once the predicted class changes or a stopping condition is met. The final comparison records whether the classifier still assigns the original correct label and how much searching and editing the procedure used. The human inspection gives a separate reading of whether the revised words belong in that text with their intended meanings.
Testing successive contextual substitutions
BERT-Attack draws its candidates from xlm-roberta-large, which fills a masked position using the words around it. This checkpoint has a separate role from the classifiers whose labels are under examination. A classifier responds with a category for the entire text. The masked-word predictor supplies possible lexical replacements and confidence scores for them. A word can be a likely fill for the masked position even when its inclusion changes what the text says. The candidate list therefore has to be understood in light of what a masked language model is asked to predict.
The original BERT-Attack includes a search over sub-word units using byte-pair encoding. In such a representation, a written word can be split into several units for processing. The authors found that exploring these units individually rarely gave them useful and valid Ukrainian replacements in spite of tuning. They also identify the computational burden of exploring more sub-word combinations. The adaptation disables that search and obtains direct replacement suggestions through a fill-mask pipeline, including when the original target word spans more than one internal unit. That decision keeps the intervention focused on an entire proposed word.
Like TextFooler, the contextual procedure ranks positions by the change in original-class confidence when a word is masked. The fill-mask setup has a maximum length of 512 and uses truncation. The authors collect the top 128 suggestions and retain candidates with a fill-mask confidence score above 0.04. This confidence score describes the proposed word in its context. The confidence change used for ordering positions describes the target classifier’s decision about the whole input. Keeping the two scores distinct helps explain why a candidate can be probable as a word and still have little effect on the classification.
Further screening drops suggestions containing disallowed characters or symbols. The authors also use Ukrainian FastText vectors to compare the original and candidate word, requiring cosine similarity above 0.33. Finally they use pymorphy2 to compare normalized forms and remove suggestions that reduce to the same base word. This gives FastText a narrower role than it would have as a source of synonyms. The contextual predictor supplies the vocabulary of candidates, and the word-vector comparison is one check applied to that vocabulary. The multilingual sentence-level comparison used in TextFooler is a different check with a different unit of analysis.
BERT-Attack applies replacements in the order indicated by the observed confidence changes. The procedure ends when the prediction changes or a stopping condition is reached. Its method description says to halt when substitutions exceed 40% of the words in the original. The paper presents this restriction as a way to avoid excessive rewriting. Its limitations section also reports a query budget. The reported TextFooler query averages on the manipulation data complicate the interpretation of that budget, an issue taken up below.
Reading the edited texts a second way
The paper also asks whether sensitivity transfers across classifiers. For this part of the study, the authors reuse edited examples that had already been successful against a task-specific classifier. GPT-4o receives task instructions and demonstration examples. The instructions define the allowable rating, topic or binary judgment for the task, and the demonstrations show the requested form of the answer. The experiment gives GPT-4o both original texts and edited counterparts. It tests the effect of previously generated edits in a new classification setup using few-shot learning.
Finally the authors sample replacements for manual examination. The judgments ask whether the inserted word fits grammatically and preserves meaning. The paper tabulates acceptable, semantic-error and grammar-error judgments for each dataset and substitution procedure. This inspection addresses a question distinct from transfer. A shift in prediction on both classifiers can arise because both react to a genuine change in the content. Human evaluation provides evidence about how many sampled replacements can support the stronger interpretation that the content stayed sufficiently stable.
Experiments and results
What the test sets contain
The review task uses Cross_Domain_UA_Reviews, which contains user reviews from multiple online platforms. After filtering for Ukrainian, the authors describe a collection of approximately 15k reviews. The target is a rating on the dataset’s scale from 1 to 5. Very positive examples are common. Reviews rated 5 account for approximately 71% of the filtered collection and those rated 4 account for roughly 13%. Each other rating contributes no more than 7%. The dataset statistics give the input length as 25.1 ± 24.9, with the value after the ± sign describing the standard deviation.
This distribution matters because accuracy gives each review equal weight. The frequency of each rating therefore determines how heavily it contributes to the overall score. A switch between adjacent positive ratings counts as a mistake in the same accuracy calculation as a switch between distant ratings. The score measures whether the exact recorded rating survives the revision. Examining particular examples helps explain how changes in an expression of approval or in the strength of an evaluation could affect that measurement.
UA News Classification comes from a collection of articles drawn from more than 20 Ukrainian news portals. The dataset table lists 150k items, and the paper describes the source collection as containing over 150k articles. The labels cover business, general news, politics, sports and technology, and the classes are balanced. The experiment uses headlines rather than the full articles. The reported length statistic is 10.7 ± 2.9. These inputs are shorter and less variable in length than the reviews or posts in the other experiments. In a headline, a replacement can have a noticeable effect on the surviving evidence about the article’s subject.
The manipulation task comes from the UNLP 2025 shared task and uses Telegram posts curated by Texty.org.ua. The dataset table lists 3.8k posts, and the authors describe roughly 67% as containing manipulation. The original annotations deal with techniques and spans of text. The experiment collapses the task to one decision about the presence or absence of manipulation in the post. This makes it possible to compare unchanged and edited inputs using an overall accuracy measure similar to the other tasks. It also leaves open which technique the classifier responds to in a particular example. The paper reports a length statistic of 82.6 ± 77.7 for these inputs.
The three tasks differ in what evidence a faithful edit needs to preserve. Review ratings depend on evaluation. News labels depend on topic. Manipulation judgments can depend on rhetorical choices. In all three, the paper reuses the original annotated class when testing the edited text. The validity of that comparison consequently depends on whether the edit leaves intact the evidence that makes the original label appropriate.
Comparing clean and edited inputs
The unedited test results supply the clean reference. On reviews, the paper reports 76.28% accuracy for Ukr-RoBERTa, 77.91% for XLM-RoBERTa and 77.58% for SBERT. For news, the clean-results table and the BERT-Attack table give 98.83% for Ukr-RoBERTa, 93.52% for XLM-RoBERTa and 93.46% for SBERT. The TextFooler table instead lists 88.55% as the original accuracy for Ukr-RoBERTa on news. Its accompanying edited accuracy and reported drop should be read with that table’s own baseline. On the manipulation task, the clean and attack tables give 81.41% for Ukr-RoBERTa, 80.10% for XLM-RoBERTa in the attack tables, and 81.67% for SBERT.
Accuracy on edited inputs describes the share of predictions that agree with the recorded label under the substitution procedure. The attack tables give the change in accuracy in percentage points. They also report a change rate and an average query count. Change rate describes how much of the input’s wording was altered. A query, as described for these tables, is a forward pass of the classifier to obtain a prediction. These measurements answer different questions. An experiment can find a revision that changes few words after evaluating many candidates, and a short input can have a substantial change rate after just a few edited positions.
The strongest selected single replacement in each review input lowers test accuracy by 12.63 points for Ukr-RoBERTa, 9.08 points for XLM-RoBERTa and 10.56 points for SBERT. These are the largest single-word losses for each architecture across the datasets in the paper’s table. On news, the corresponding drops are 2.69, 5.74 and 5.22 points. On the manipulation task, they are 5.32, 2.83 and 7.11 points. Selection is performed relative to the classifier being evaluated, so classifiers can face different edited versions of the same starting text.
The values show why a one-word restriction is useful. It isolates a form of sensitivity that can appear before several small changes have had an opportunity to accumulate. It also demonstrates the importance of the dataset when interpreting that sensitivity. The review result for Ukr-RoBERTa and the headline result for that classifier come from the same general selection procedure. The difference could reflect what words are covered, what alternatives fit those words or where the decision boundaries fall for each task. The single-word table measures their combined effect.
How the successive procedures compare
TextFooler produces the largest loss in the paper’s tables on the Ukr-RoBERTa review test, where the reported change is −40.27 points. Its revisions modify an average of 15.80% of the words and require an average of 112.9 classifier queries per sample in that row. The same procedure takes review accuracy to 49.73% for XLM-RoBERTa and 49.70% for SBERT. Their reported losses are 28.18 and 27.88 points. TextFooler consequently produces a substantial loss on reviews across all the classifiers, with the largest loss arising for the classifier pretrained specifically on Ukrainian.
Ukr-RoBERTa clean and edited test accuracy on UA Reviews
TextFooler produces the lowest accuracy for this classifier on the review test set.
The numbers
| System or setting | accuracy % |
|---|---|
| Original reviews | 76.28 |
| Reviews edited with BERT-Attack | 63.31 |
| Reviews edited with TextFooler (this paper) | 36.01 |
In this comparison the lower score represents a stronger challenge to the classifier. BERT-Attack takes Ukr-RoBERTa review accuracy to 63.31%, with a loss of 12.97 points. It changes 3.69% of the words on average and uses 29.7 classifier queries per sample. For XLM-RoBERTa and SBERT, the BERT-Attack review losses are 10.64 and 12.79 points. The resulting test accuracies are 67.27% and 64.79%, respectively. The matched review rows allow the accuracy losses to be read alongside large differences in search effort and edit extent.
On news headlines, TextFooler records test accuracies of 73.17% for Ukr-RoBERTa, 82.95% for XLM-RoBERTa and 82.67% for SBERT. The listed losses relative to the originals in that table are 15.38, 10.57 and 10.79 points. Mean classifier query counts for those headline rows are 50.5, 52.0 and 51.8. The mean change rates are 18.87%, 19.87% and 19.11%. The procedures operate on the title alone, so these percentages describe edits within a small amount of text.
The headline comparison is especially revealing for BERT-Attack. The reported declines are 19.89 points for Ukr-RoBERTa, 24.42 for XLM-RoBERTa and 27.03 for SBERT. The resulting accuracies are 78.94%, 69.10% and 66.43%. The XLM-RoBERTa and SBERT rows have the same original accuracy in both attack tables, so the larger BERT-Attack declines are directly visible in the final scores as well. The Ukr-RoBERTa comparison uses the different clean values reported in the respective tables. Its two reported declines can be stated, with the baseline discrepancy left visible.
On the manipulation task, TextFooler brings the classifiers under 50% test accuracy in all of its rows. It reports 47.65% for Ukr-RoBERTa, 47.38% for XLM-RoBERTa and 45.03% for SBERT. Relative to the corresponding clean scores, the reported losses are 33.76, 32.72 and 36.64 points. The mean proportions of modified words are 11.62%, 10.57% and 9.95%, respectively. The longer and more varied inputs on this task offer a different setting from the headlines. A comparatively small percentage can still involve changes to multiple words in an individual post.
For BERT-Attack on the same task, the reported test accuracies are 58.38% for Ukr-RoBERTa, 61.52% for XLM-RoBERTa and 57.07% for SBERT. Their losses are 23.03, 18.58 and 24.60 points. The average word change rates are 5.73%, 8.08% and 4.90%. The relative position of the classifiers here differs from the headline comparison. XLM-RoBERTa has the smallest BERT-Attack loss on manipulation, while on headlines Ukr-RoBERTa has the smallest reported BERT-Attack loss in its table.
Classifier query counts are lower for BERT-Attack in every matched row. Its mean counts range from 16.6 for SBERT on headlines to 109.1 for XLM-RoBERTa on manipulation. On manipulation, TextFooler lists average counts of 343.4 for Ukr-RoBERTa, 330.5 for XLM-RoBERTa and 333.5 for SBERT. These numbers quantify the calls to the target classifier as reported. The candidate sources also have computation of their own, including inflection and similarity checks for dictionary proposals and masked-word prediction for contextual proposals. The table’s query metric leaves those sources of computation outside its comparison.
Transfer to GPT-4o
For the transfer test, the authors sample 200 successful edited inputs for each dataset, original classifier and multi-step substitution procedure. They report 3,600 examples overall, with 1,800 for each procedure and 600 underlying examples per dataset-and-procedure score. All the items come from successful changes against the original classifiers. GPT-4o sees a correspondingly selected collection of original inputs and a collection of their revised counterparts. Each accuracy comparison is conditional on this selection.
The prompt gives GPT-4o the classification task and demonstrates the expected answers. For reviews the prompt describes an ordinal scale from 0 to 4, while the dataset description uses the original scale from 1 to 5. For headlines the prompt requests a category name from the task’s topical categories. For manipulation it requests a label for the presence or absence of the property. In each case the prompt provides the same task framing for the original and edited versions. The comparison concerns how the answer changes with the text under that framing.
GPT-4o accuracy on the TextFooler-selected UA Reviews transfer set
The edited reviews receive fewer correct ratings than their original counterparts.
The numbers
| System or setting | accuracy % |
|---|---|
| Original reviews on the selected set | 44.00 |
| TextFooler-edited reviews (this paper) | 29.00 |
The TextFooler-selected review inputs yield a drop of 15.00 points for GPT-4o. With the same selection procedure on news, original accuracy is 61.83% and edited accuracy is 61.00%, a decline of 0.83 points. On manipulation, the reported values are 80.00% and 73.12%, a decline of 6.88 points. The very small headline decline is part of the transfer result. It shows that the strength of the effect depends on both the input collection and the type of editing under examination.
For BERT-Attack, GPT-4o’s original and edited accuracies are 28.83% and 21.00% on reviews, 62.83% and 52.00% on headlines, and 71.95% and 64.20% on manipulation. The paper reports losses of 7.83, 10.83 and 7.75 points respectively. BERT-Attack’s largest transfer loss is on headlines. The clean scores vary according to which procedure supplied the selected examples, as is especially apparent on reviews. This means that a comparison between procedures also changes the collection of originals being judged. Each pair of scores shows what happened on its own selected set.
The study therefore observes lower edited accuracy across the reported transfer comparisons, with the size of the loss varying substantially. The paired scores capture a net change in correctness. They can combine cases where an originally correct GPT-4o answer becomes wrong with cases where an originally wrong answer becomes correct. The table establishes that edits selected against other classifiers affect GPT-4o’s measured performance. A count of individual prediction changes, or a transfer rate restricted to substitutions verified as faithful by readers, would answer a more specific question.
What the ablations show
The paper has no component-by-component ablation of the Ukrainian pipelines. Its analyses compare a single substitution with successive ones, contrast the two multi-step procedures across architectures and tasks, and inspect examples and human judgments. Those comparisons show where sensitivity is detectable and where each procedure produces errors in the text. Individual design choices such as the dictionary cleaning or a similarity cutoff are bundled with the procedures in which the authors used them.
What can be learned from the extent of an edit
The one-word baseline establishes that a classifier can be sensitive even when the overwhelming majority of the input is identical. The review results make that point clearly because the one-word losses are the largest of the three datasets for every classifier. A revision of this kind is relatively easy for a reader to inspect. With only one changed position, the reader can concentrate on what happened to the local meaning and what that might imply for the original rating.
Allowing successive substitutions gives the procedures more ways to change the overall input. TextFooler’s review and manipulation results show large losses in that setting. A direct causal interpretation of the comparison would require a version of the same procedure with only its allowable edit count changed. In this paper the single-word baseline differs in candidate coverage and selection. It is restricted to frequent training words, tests variants independently and selects by the greatest decrease in confidence. The multi-step procedures use position rankings and their own candidate filters. The comparison therefore shows what happens when moving between complete evaluation setups.
The two multi-step procedures also use different amounts of editing and search. BERT-Attack’s reported change rates and target classifier query counts are lower in every matched row. On reviews and manipulation, TextFooler nonetheless produces the larger accuracy loss for each classifier. On headlines the reported drops favor BERT-Attack. XLM-RoBERTa and SBERT both finish the headline experiment with lower accuracy under BERT-Attack than under TextFooler, using the same clean scores for those classifiers. In those rows, a procedure with fewer calls and a lower mean fraction of changed words presents a stronger challenge by the accuracy measure.
The authors summarize TextFooler as stronger overall and associate that with the greater amount of search and editing it performs. The domain comparisons give that interpretation a boundary. Reviews and Telegram posts can offer many positions at which a dictionary-derived alternative could change the signals in the text. A headline supplies fewer positions, and a contextual suggestion can still alter a word that is central to the topical decision. The paper’s setup allows these patterns to be observed. It leaves the separate contributions of length, candidate quality and search effort unresolved.
What varies with the classifier
The authors highlight XLM-RoBERTa as comparatively resilient across the experiments. The individual rows show that the relative ordering depends on both task and procedure. XLM-RoBERTa has the smallest TextFooler loss on manipulation and one of the smaller TextFooler losses on reviews. It also has the smallest BERT-Attack loss on reviews and manipulation. The BERT-Attack headline results place Ukr-RoBERTa ahead of XLM-RoBERTa by the size of the reported loss. The clearest reading is a comparative tendency with task-specific exceptions.
The architecture choices give the authors plausible explanations to discuss. Multilingual pretraining and tokenization are suggested as contributors to XLM-RoBERTa’s resilience. The same comparison involves differences in pretraining objectives, language coverage and how text is segmented. Shared fine-tuning settings make the task training more comparable while leaving those underlying differences in place. The study can associate observed robustness with the resulting trained systems. Identifying a particular property as the cause would require a comparison designed to vary it independently.
SBERT provides a related check on a different expectation. Its starting point is a representation trained for similarity between sentences. A classification head trained on those representations can still rely on differences that are especially useful to the label. SBERT’s relatively large BERT-Attack losses on headlines and manipulation show how the observed result can differ from what might be expected from the representation’s original purpose. The experiment evaluates SBERT after classification training. It reflects the behavior of that complete classifier under the benchmark’s edits.
What readers found in the substitutions
The authors review 100 cases for each pairing of dataset and substitution procedure, for a total of 900. An acceptable substitution has to preserve the intended meaning and fit the grammatical position. The authors record semantic and grammatical problems separately in the tables. This adds an independent measurement to the experiment. A prediction can flip and count as a successful change according to the accuracy comparison, yet inspection may show that the text now communicates something different.
For the single-word baseline, 40% of reviewed substitutions are acceptable on UA Reviews, 28% on UA News and 23% on the manipulation data. Semantic errors account for 48%, 64% and 68%, respectively. The grammar error shares are 12%, 8% and 9%. In all three datasets, semantic errors form the largest recorded problem category. The results show that limiting the intervention to a single word makes it easier to locate the change while leaving a substantial question about the quality of that word choice.
For TextFooler, the corresponding acceptable shares are 51% on reviews and 38% on each of the other datasets. Semantic errors account for 40% on reviews, 56% on news and 57% on manipulation. The grammar figures are 9%, 6% and 5%. On every dataset, the acceptable share for TextFooler exceeds the single-word baseline’s. Its comparisons still include many substitutions for which the judgment of overall semantic similarity has missed a consequential difference at the edited position.
For BERT-Attack, acceptable replacements account for 40% on reviews, 36% on headlines and 42% on manipulation. The shares classified as semantic errors are 54%, 61% and 58%. Grammar errors account for 6%, 3% and 0% in the reviewed samples. This is the clearest evidence for the authors’ observation that the contextual procedure improves grammatical acceptability. The combined acceptable category has a different pattern. TextFooler has the larger share on reviews and headlines, and BERT-Attack leads on manipulation. The tables support a grammar advantage across datasets and a mixed comparison on acceptability overall.
The examples explain the distinction between those two measurements. In the headline about Formula 1 teams, TextFooler applies a synonym associated with the sense of an order. The resulting phrase can be formed with Ukrainian grammatical material, yet it makes a different claim about what the noun denotes. The problem arises because the relationship recorded in the lexicon belongs to another sense of the word. A sentence comparison can still see considerable overlap when most of the headline survives intact.
The contextual procedure has a parallel failure illustrated by the review that changes a reference to a cookie into a reference to milk. Words describing something as fresh or aromatic can fit both products. That shared context helps explain how a suggestion can sound fluent while introducing a different referent. For a test of synonymy, this is a meaning error even if a reader would give both sentences the same positive tone. For a test of classifier behavior, a changed prediction on such an example needs to be interpreted with that alteration in view.
Other examples make this issue visible without relying on a subtle sense difference. The appendix includes a headline in which the identity of a country changes and a review in which the item being evaluated changes from oil to water. The edited sentences retain enough surrounding material to be understandable. They also say something materially different. This matters for how the human judgments and the accuracy tables fit together. A strong accuracy effect supports a claim about sensitivity to the generated edits. A claim about sensitivity to faithful paraphrases requires evidence that those edits preserve the relevant content.
The examples judged plausible are also informative. In a manipulation example, TextFooler substitutes добре for файно in a remark about how well artillery is working, and the recorded prediction reverses. The local evaluation still expresses approval. This gives the reader a concrete case of the phenomenon the benchmark aims to detect. The paper puts such cases next to revisions that produce a changed prediction through obvious semantic drift. The contrast is visible in the examples themselves, and the aggregate human judgments show why both kinds of case matter to the reported score.
Limitations
Limits identified by the authors
The authors identify the finite synonym lexicon and its heuristic filters as sources of both incomplete coverage and semantic drift. A word used in everyday speech, a specialized domain term or a word with several senses may be poorly served by the available entries. A filter can reject a known opposite or a malformed record while letting through a candidate that expresses the wrong sense. The resulting edited inputs reflect both the behavior of the classifier and the properties of the language resource used to challenge it.
The authors also describe the inflection step as fallible. Pymorphy2 sometimes supplies an ungrammatical word form. Since the intended test is about word choice under stable grammar and meaning, an error at this step can introduce an additional reason for the classifier’s output to change. The human review gives concrete evidence of this problem. Those annotations can identify visible failures in the sampled edits even when the automated procedure treated the replacements as usable.
The main evaluation covers a restricted set of tasks and encoder-based classifiers. It measures decisions about review ratings, headline topics and manipulation in social media posts. The authors flag generative and sequence-to-sequence settings as outside that main scope. The GPT-4o extension still asks for a classification label under a specific prompting arrangement. It provides a different way of making the same kinds of decisions, with a limited basis for claims about other uses of generative systems.
The authors describe the human judgments as covering only 100 examples per dataset and procedure. Those judgments estimate the quality of the sampled replacements. The authors also identify the use of a single prompt template for each GPT-4o task as a limitation. A differently worded instruction, a different selection of demonstrations or a prompt designed with lexical variation in mind would define another evaluation. The paper’s conclusions about GPT-4o are tied to the prompts and selected cases it reports.
The limitations section also describes a budget allowing up to 200 queries or changes to 40% of the words and points out that costlier searches might uncover additional examples. Such a limit sets the practical question the benchmark asks. The result depends on the words and candidates examined before the procedure stops. A classifier that keeps the same label throughout that search has remained stable within the tested search space and budget.
Finally the authors point to the need for resources that distinguish senses, and to hybrid procedures combining dictionary candidates with contextual proposals. They also mention the possibility of using generative systems to check well-formedness and contextual fit and semisupervised methods to expand synonym resources. These are research directions motivated by errors the study observes. The reported tests establish the behavior of the implemented procedures, and the proposed changes remain open to evaluation.
Limits visible in the comparisons
The central validity question is whether the original label still applies after editing. A semantic change and a task label change are separable events. Changing the product mentioned in a positive review can leave its coarse sentiment plausible even though the sentence describes a different product. Changing the identity of a country in a headline alters its factual content and may leave the broad topic intact. Removing the wording that expresses a manipulative appeal could legitimately change the binary label. A meaning judgment is therefore valuable by itself, and verifying the task label of each edited item would answer an additional question.
The quality tables report the share of acceptable replacements in samples. The accuracy tables use task predictions over the experimental inputs. The paper does not cross-tabulate every changed prediction with a judgment that the responsible replacement was valid. In a multi-step revision, judging one replacement also leaves open whether the final text retains its original meaning after all the changes. The headline accuracy losses thus describe what the editing procedures do to performance. The full-test accuracy loss attributable solely to human-verified, label-preserving revisions remains undetermined.
The choice of targets also shapes the interpretation. The one-word baseline searches through alternatives for a variant with the greatest fall in the original class’s confidence. The multi-step methods consult the classifier’s output when prioritizing edits. The transfer study selects successful revisions against the original classifiers. Each choice concentrates the evaluation on challenging inputs. This is suited to detecting susceptibility under the specified stress test. Estimating the effect of naturally occurring rewrites would require observations from such rewrites under a sampling scheme suited to that question.
Text length, class balance, label granularity and the kind of language used vary together across the datasets. Any of these could contribute to the different results for reviews, headlines and Telegram posts. Short headlines have limited context, and the words deciding their topic may be concentrated in particular positions. The review corpus is skewed towards its highest rating. The manipulation dataset represents multiple techniques with a binary outcome. Since the paper compares these as complete tasks, attributing the results to length, class distribution or another property individually would exceed what the comparison establishes.
The clean accuracy discrepancy for Ukr-RoBERTa on news is consequential here. The clean-results and BERT-Attack tables use 98.83%, whereas the TextFooler table uses 88.55%. Both sets of edited accuracies and drops can be reported as printed. The discrepancy leaves the common starting point for a direct comparison on that row unresolved. The corresponding XLM-RoBERTa and SBERT rows provide cleaner comparisons between the two headline procedures because their reported original scores agree across the tables.
Query accounting presents a related ambiguity. The stated ceiling is ≤ 200 queries, while the three TextFooler averages on the manipulation dataset are above that ceiling. The table defines queries in terms of classifier forward passes, and the paper does not reconcile the manipulation averages with the stated budget. Different counting boundaries or a difference in the applied budget could affect an efficiency comparison. The available account supports reporting those averages and the stated constraint separately, with the effective cap unclear for those rows.
The selected transfer samples introduce another limit. A GPT-4o accuracy drop on a TextFooler or BERT-Attack sample is evidence about that collection of original and edited inputs. Across procedures, the differing baseline accuracies show that these collections gave GPT-4o different levels of difficulty even before editing. Aggregate accuracies give the net effect within each collection. They leave questions about which individual inputs transferred, the role of edits with confirmed semantic fidelity, and the frequency of transfer on a complete held-out test set.
The authors recognize that lexical resources and text systems can reflect historical biases and identify fairness assessment as a useful extension. The reported analysis has no breakdown of the substitutions or outcomes by such categories. Its measured results concern accuracy, changes to words, classifier calls and the sampled linguistic judgments. Effects on particular groups or language varieties remain open questions.
What came after
Mining Native Ukrainian Paraphrases: A Multi-Source Comparison is a later citing paper by Vladyslav Fesenko, Hanna Dydyk-Meush and Volodymyr Mudryi, listed for UNLP 2026. Its stated subject is mining native Ukrainian paraphrases and comparing several sources. That subject relates to a practical difficulty exposed by the robustness study. A procedure needs a supply of alternative Ukrainian formulations, and the source of those formulations affects what kinds of candidates are available for evaluation.
The robustness study examines particular sources of word replacements and finds grammatical and semantic problems in both. The later title places the collection and comparison of Ukrainian paraphrases at the center of the investigation. This provides a documented connection through citation and subject matter. The citation and title leave open which resources, procedures or findings from the earlier benchmark were used in the later experiments and what their use established.
Cite
Cite as Volodymyr Mudryi and Oleksii Ignatenko. 2025. Precision vs. Perturbation: Robustness Analysis of Synonym Attacks in Ukrainian NLP. Proceedings of the Fourth Ukrainian Natural Language Processing Workshop (UNLP 2025).
@inproceedings{mudryi2025precision,
title = {{Precision vs. Perturbation: Robustness Analysis of Synonym Attacks in Ukrainian NLP}},
author = {Volodymyr Mudryi and Oleksii Ignatenko},
booktitle = {Proceedings of the Fourth Ukrainian Natural Language Processing Workshop (UNLP 2025)},
year = {2025},
doi = {10.18653/v1/2025.unlp-1.15},
url = {https://doi.org/10.18653/v1/2025.unlp-1.15}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/mudryi-2025-precision-vs-perturbation-robustness-analysis/