# Robustness Perturbation Eval

> Evaluates the robustness of neural language models to non-adversarial character- and word-level input perturbations (e.g., typos, deletions, synonyms) while preserving semantic meaning. Use when the user wants to benchmark on TC, SA, NER, SS, QA (unspecified downstream datasets), or asks about evaluating this task. Reports accuracy.

- Skill: `qhjqhj00/robustness-perturbation-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/robustness-perturbation-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/robustness-perturbation-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/robustness-perturbation-eval

---


# robustness-perturbation-eval

> Evaluating the Robustness of Neural Language Models to Input Perturbations — Moradi et al. (2021) (arXiv:2108.12237, 2021)

## What this evaluates

Evaluates the robustness of neural language models to non-adversarial character- and word-level input perturbations (e.g., typos, deletions, synonyms) while preserving semantic meaning.

## Datasets

- **TC, SA, NER, SS, QA (unspecified downstream datasets)** — total ?; splits: test (-1); repo https://github.com/mmoradi-iut/NLP-perturbation

## Metrics

- `accuracy` **(primary)** — range: percent
  - Percentage of correctly predicted labels on perturbed test samples compared to ground truth labels.
- `absolute performance decrease` — range: percent
  - Difference between baseline accuracy on unperturbed test sets and accuracy on perturbed samples.

## Input / output format

**Input**: Text samples from downstream NLP tasks with applied character-level or word-level perturbations.

**Output**: Predicted labels or scores for each perturbed input instance.

## Scoring recipe

```python
accuracy = sum(1 for pred, gold in zip(predictions, gold_labels) if pred == gold) / len(gold_labels) * 100
drop = baseline_accuracy - accuracy
return accuracy, drop
```

## Common pitfalls

- Three word-level perturbations (Deletion, Negation, Replacement with Synonyms) require manual curation to filter meaningless samples or adjust labels, as they may change text meaning.
- Performance is highly sensitive to the Perturbation Per Sample (PPS) hyperparameter, with results reported for PPS=1 in main tables but tested up to PPS=4.
- Models are evaluated in a black-box manner without fine-tuning on perturbed data; results reflect zero-shot robustness on test sets.

## Evidence (verbatim from paper)

> Table 4: Performance of the language models on the test sets and word-level perturbed samples of the downstream tasks. For every task and every perturbation method, the highest score is shown in bold face.

## Citation

```bibtex
@misc{moradi2021evaluating,
  title={Evaluating the Robustness of Neural Language Models to Input Perturbations},
  author={Moradi et al. (2021)},
  year={2021},
  note={arXiv:2108.12237}
}
```

- arXiv: 2108.12237

