Skip to content
Back to skills

Bert Noise Robustness Eval

ASecurity

Evaluates BERT's robustness to synthetic character-level noise across sentiment classification and textual similarity tasks. It probes how spelling mistakes and typos disrupt subword tokenization and degrade contextual embeddings under varying noise intensities. Use when the user wants to benchmark on IMDB, SST-2, STS-B, or asks about evaluating this task. Reports F1 score.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
researchpythongoperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill bert-noise-robustness-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bert Noise Robustness Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bert Noise Robustness Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-bert-noise-robustness-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-bert-noise-robustness-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bert-noise-robustness-eval
description: Evaluates BERT's robustness to synthetic character-level noise across sentiment classification and textual similarity tasks. It probes how spelling mistakes and typos disrupt subword tokenization and degrade contextual embeddings under varying noise intensities. Use when the user wants to benchmark on IMDB, SST-2, STS-B, or asks about evaluating this task. Reports F1 score.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2003.12932
  bibtex_key: [REDACTED]
  confidence: high
---

# bert-noise-robustness-eval

> Noisy Text Data: Achilles' Heel of BERT — Ankit Kumar et al. (2020) (arXiv:2003.12932, 2020)

## What this evaluates

Evaluates BERT's robustness to synthetic character-level noise across sentiment classification and textual similarity tasks. It probes how spelling mistakes and typos disrupt subword tokenization and degrade contextual embeddings under varying noise intensities.

## Datasets

- **IMDB** — total 50000; splits: train (25000), test (25000)
- **SST-2** — total 68221; splits: train (67349), test (872)
- **STS-B** — total 7249; splits: train (5749), test (1500)

## Metrics

- `F1 score` **(primary)** — range: [0, 1]
  - Harmonic mean of precision and recall: 2 * (precision * recall) / (precision + recall).
- `Pearson-Spearman correlation` — range: [-1, 1]
  - Measures the monotonic relationship between predicted similarity scores and ground truth scores (0–5).

## Input / output format

**Input**: Text inputs (single sentences or sentence pairs) with synthetic character-level noise injected at specified percentages (2.5%–22.5%).

**Output**: Binary sentiment label (positive/negative) or continuous similarity score (0–5).

## Scoring recipe

```python
def compute_metrics(preds, gold, task):
    if task == 'sentiment':
        tp = sum(1 for p, g in zip(preds, gold) if p == g == 1)
        fp = sum(1 for p, g in zip(preds, gold) if p == 1 and g == 0)
        fn = sum(1 for p, g in zip(preds, gold) if p == 0 and g == 1)
        prec = tp / (tp + fp) if (tp + fp) > 0 else 0
        rec = tp / (tp + fn) if (tp + fn) > 0 else 0
        return 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0
    elif task == 'similarity':
        return pearsonr(preds, gold)[0]
```

## Common pitfalls

- Noise is injected at the character level (random QWERTY neighbor replacement), not word-level, which heavily impacts BERT's subword tokenizer.
- The noise percentage refers to the proportion of characters replaced per instance, not words or sentences.
- Performance drops are reported as accuracy/error in figures but F1/correlation in text; readers must distinguish between the two reporting formats.

## Evidence (verbatim from paper)

> To measure the performance of the model for sentiment analysis task we use F1 score. ... Here, we use Pearson-Spearman correlation to measure model's performance.

## Citation

```bibtex
@misc{kumar2020noisytext,
  title={Noisy Text Data: Achilles' Heel of BERT},
  author={Ankit Kumar et al. (2020)},
  year={2020},
  note={arXiv:2003.12932}
}
```

- arXiv: 2003.12932

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.