RAT-Bench: A Comprehensive Benchmark for Text Anonymization

Nataša Krčo, Zexi Yao, Matthieu Meeus, Yves-Alexandre de MontjoyearXiv 2026

TL;DR

Traditional text anonymization tools are evaluated on token-redaction recall rather than actual re-identification risk, leaving sensitive data vulnerable when shared with Large Language Models (LLMs). The authors introduce RAT-Bench, a demographically grounded benchmark that measures anonymization efficacy based on true re-identification risk within a population. Their findings reveal that even top-tier anonymizers fail significantly when faced with non-standard formatting or indirect identifiers.

What Problem Does This Paper Address?

Before text data is used to train, fine-tune, or query LLMs, it is typically scrubbed of Personally Identifiable Information (PII) using tools like Microsoft’s Presidio or Anthropic’s PII purifier. Traditionally, these tools are evaluated using recall—the percentage of sensitive tokens successfully redacted.

However, the authors argue that token recall is a poor proxy for actual privacy. This metric treats all tokens equally, ignoring the fact that missing a high-entropy attribute (like an exact birthdate or a rare occupation) poses a massive re-identification risk compared to missing a common first name. Furthermore, combinations of seemingly benign indirect identifiers (e.g., age, gender, and geographic region) can uniquely identify individuals.

To bridge this gap, the paper addresses the lack of risk-based, demographically realistic benchmarks capable of evaluating text anonymization against adversarial LLM-based attackers.

Methods

The authors developed an end-to-end evaluation pipeline that shifts the focus from token counting to population uniqueness:

  1. Text Generation: Using an LLM (GPT-4), they generated natural text across three scenarios (medical transcripts, chatbot interactions, and meeting notes). The identifiers were embedded at three difficulty levels: Easy (explicit, standard form), Hard (explicit but obfuscated/slang), and Implicit (only implied via context).
  2. Anonymization: They applied 12 distinct anonymization tools spanning Named Entity Recognition (NER), token perturbation, and LLM-based prompting.
  3. LLM-Based Attack: A state-of-the-art LLM attacker attempted to infer the original direct and indirect attributes from the anonymized text.
  4. Risk Estimation: If the attacker successfully extracted a direct identifier (like an SSN), the re-identification risk was set to 1. If only indirect identifiers were extracted, the authors applied a statistical framework to calculate the mathematical probability of that specific combination uniquely identifying an individual within the U.S. population, using a standard $k$-anonymity threshold ($k=5$).
Figure 1: Evaluating text anonymization through re-identification risk. (a) We compute re-identification risk R for two pieces of anonymized text as an attacker aims to sequentially infer any direct or indirect identifiers. When at least one direct identifier (e.g. address, illustrated in orange) is inferred, the risk is set to 1. If not, the risk is computed based on the set of indirect identifiers (e.g. gender, race and marital status, illustrated in blue) which, together, uniquely identify an individual. (b) Re-identification success rate Rsucc by anonymization tool, averaged across difficulty levels and scenarios (Table 1). Higher Rsucc means a larger fraction of individuals are correctly re-identified from the anonymized text (worse privacy); lower indicates better anonymization.

Datasets

The benchmark is grounded in real-world demographics using the 1% Public Use Microdata Sample (PUMS) from the 2010 U.S. Census. This provides the joint distributions of indirect identifiers (such as state, gender, race, marital status, education, and occupation) required to calculate true population uniqueness.

The resulting dataset, RAT-Bench, consists of English text samples generated from these profiles, alongside evaluation subsets translated and adapted into Spanish and Simplified Chinese to test cross-lingual generalization.

Key Insights and Ideas

  • Recall is a Poor Proxy for Privacy: An anonymizer can achieve a high token recall score by redacting common words, yet completely fail to protect privacy if it misses a single rare, high-entropy attribute combination.
  • The Over-Redaction Trap: Traditional NER tools (like Azure) reduce re-identification risk primarily by being overly aggressive. They frequently flag benign words (e.g., "patient," "today," or "two weeks"), which severely degrades the utility and semantic integrity of the text.
  • LLMs Balance the Scale: LLM-based anonymizers handle the privacy-utility trade-off much better than traditional NER models. By leveraging contextual reasoning, they precisely remove identifying information while leaving the surrounding text intact.
  • The "Hard" Formatting Wall: Current anonymizers are heavily overfitted to standard text formats. When direct identifiers are written non-standardly (e.g., phone numbers spelled out as words or names separated by slang), traditional NER tools fail dramatically.

Key Results

  • Baseline Risk: Without any anonymization, the re-identification success rate across the generated texts was 99%.
  • Privacy vs. Utility: Azure (NER-based) reduced the re-identification success rate the most (to 30%), but suffered from low text utility. Conversely, GPT-4.1 (using Anthropic's PII purifier prompt) achieved a better balance, keeping re-identification success at 47.5% while maintaining a high BLEU score.
Figure 2: Average re-identification success rate (from Tab.1) vs (a) BLEU score and (b) computation cost.
  • Performance Degradation: Anonymizer performance dropped sharply on obfuscated text. The average re-identification success rate across all tools spiked from 44% on "Easy" text to 69% on "Hard" text.
  • Cross-Lingual Transfer: LLM-based anonymizers generalized effectively to Spanish and Chinese. In contrast, rule- and NER-based tools like Presidio saw their re-identification risk nearly double on non-English text due to weaker underlying language models.

Limitations and Future Work

  • Geographic Bias: The underlying demographic risk model is currently tied exclusively to U.S. Census data (PUMS). The authors note that expanding the benchmark to include other geographies is a critical next step.
  • Implicit Identifiers Remain Unsolved: None of the tested tools performed well against implicit identifiers (where attributes are only hinted at through context), leaving a substantial vulnerability open for future research.
  • Computational Cost: While LLM-based iterative anonymizers proved highly effective when given an ideal attribute list, they are computationally heavy and expensive, highlighting the need for smaller, fine-tuned open-source alternatives.

Summary updated

BibTeX
@misc{krco2026rat,
  author = {Nataša Krčo and Zexi Yao and Matthieu Meeus and Yves-Alexandre de Montjoye},
  title = {{RAT-Bench: A Comprehensive Benchmark for Text Anonymization}},
  year = {2026},
  eprint = {2602.12806},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.12806},
}
Figure