Skip to content
Back to skills

Text Sanitization Reconstruction Eval

ASecurity

Evaluates the vulnerability of differential privacy-based text sanitization methods by measuring how accurately an attacker can reconstruct original sensitive or personally identifiable information (PII) tokens from their sanitized counterparts. It probes the effectiveness of Bayesian inference-based reconstruction attacks against state-of-the-art sanitization defenses. Use when the user wants to benchmark on SST-2, AGNEWS, QNLI, Yelp, or asks about evaluating this task. Reports ASR.

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

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill text-sanitization-reconstruction-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Text Sanitization Reconstruction Eval?

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

Security grade badge for Text Sanitization Reconstruction Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-text-sanitization-reconstruction-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-text-sanitization-reconstruction-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: text-sanitization-reconstruction-eval
description: Evaluates the vulnerability of differential privacy-based text sanitization methods by measuring how accurately an attacker can reconstruct original sensitive or personally identifiable information (PII) tokens from their sanitized counterparts. It probes the effectiveness of Bayesian inference-based reconstruction attacks against state-of-the-art sanitization defenses. Use when the user wants to benchmark on SST-2, AGNEWS, QNLI, Yelp, or asks about evaluating this task. Reports ASR.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2410.17052
  bibtex_key: [REDACTED]
  confidence: high
---

# text-sanitization-reconstruction-eval

> On the Vulnerability of Text Sanitization — Tong et al. (2024) (arXiv:2410.17052, 2024)

## What this evaluates

Evaluates the vulnerability of differential privacy-based text sanitization methods by measuring how accurately an attacker can reconstruct original sensitive or personally identifiable information (PII) tokens from their sanitized counterparts. It probes the effectiveness of Bayesian inference-based reconstruction attacks against state-of-the-art sanitization defenses.

## Datasets

- **SST-2** — total 20000; splits: private (20000), shadow (1000)
- **AGNEWS** — total 20000; splits: private (20000), shadow (1000)
- **QNLI** — total 20000; splits: private (20000), shadow (1000)
- **Yelp** — total 20000; splits: private (20000), shadow (1000)

## Metrics

- `ASR` **(primary)** — range: [0, 1]
  - Attack Success Rate is calculated as the ratio of correctly reconstructed sensitive tokens to the total number of sensitive tokens in the private dataset.

## Input / output format

**Input**: Sanitized text sequences (with DP-perturbed sensitive tokens) and a disjoint shadow dataset for estimating token distributions.

**Output**: Reconstructed sensitive tokens corresponding to the perturbed positions in the sanitized text.

## Scoring recipe

```python
def compute_asr(predictions, gold_tokens):
    correct = sum(1 for p, g in zip(predictions, gold_tokens) if p == g)
    return correct / len(gold_tokens)
```

## Common pitfalls

- Shadow dataset must be strictly disjoint from the private reconstruction dataset to avoid data leakage and inflated ASR.
- The parameter K (top-k candidates) significantly impacts contextual attack performance, plateauing around K=10.
- Privacy budget (epsilon) heavily influences ASR; lower epsilon drastically reduces reconstruction success and requires careful reporting.

## Evidence (verbatim from paper)

> The ASR of both the Context-free Bayesian Attack and the Contextual Bayesian Attack exceeded that of the baseline attacks in most cases.

## Citation

```bibtex
@misc{tong2024vulnerability,
  title={On the Vulnerability of Text Sanitization},
  author={Tong et al. (2024)},
  year={2024},
  note={arXiv:2410.17052}
}
```

- arXiv: 2410.17052

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.