ReadingResearchRadarInvestment framework
Sign in / Sign up
← Back to reading
NewsMaterial5 min readDisconfirmAI Editorial

How Airbnb De-identifies Text Before It Reaches ML Models

Airbnb's engineering team details their production system for removing personally identifiable information from text used in machine learning training, covering their choice of Presidio as an in-process library, custom recognizers built on GLiNER, faker-based anonymization with per-run consistency, and evaluation methodology weighted toward recall over precision.

2026-11-18 02:01 GMT+8

Airbnb trains machine learning models on transaction information, and before that data reaches a model, personally identifiable information is removed and replaced with simulated values that look realistic. The engineering team has published a detailed account of how they built this pipeline, starting from the open-source library Presidio and extending it to meet production requirements at scale.

The first major decision was architectural: Presidio ships as a Python package, and each consumer imports it in-process rather than calling a separate service. Raw personal data is de-identified inside the calling process, so no intermediate service holds it and the data flow stays simple. This also removes a central bottleneck, since jobs run independently wherever compute is available. The tradeoff is distribution — the library only protects data if every pipeline calls it, on the current version, with a compliant configuration. Airbnb addresses this by shipping the library as a reusable step in their shared ML workflow orchestrator. A team supplies only its data schema, marking which columns carry personal data; the privacy engineering team owns the recognizers, operators, language handling, and runtime environment. The resulting dataset is tagged as de-identified, and that tag follows the data into the model registry, where it is designed to gate deployment to production.

Within the system, two stages handle the work. The Analyzer finds spans that look like personal data and labels each with an entity type and confidence score. The Anonymizer decides what replaces each span. For detection, Airbnb uses three kinds of recognizers. Pattern-based recognizers rely on regex plus context words; NER-based recognizers depend on a model. Presidio's default NLP engine is spaCy, which Airbnb kept for most entity types but replaced for PERSON and LOCATION. The problem was specific: spaCy's generic NER tags any location it sees — cities, landmarks, neighborhoods — while the detail that identifies a person is a street address with a house number. On Airbnb's benchmark, those broad tags never resolved to the full address span. They replaced spaCy with GLiNER, a zero-shot NER model that takes an entity description at inference time, allowing them to ask specifically for a street address rather than any place name. Precision improved for both entity types. GLiNER2 is wired into the evaluation harness as a candidate, but adoption happens only when the benchmark shows a gain.

Sign in / Sign up
ReadingResearchRadarInvestment framework

A subtler problem involved pattern recognizers and context words. Presidio's stock context matching is single-token, so declaring "gift card" as context never fires, while "card" alone fires just as readily next to a credit card number. Airbnb extended the enhancer with a phrase pass — an ordered contiguous multi-word match in the tokens before a candidate, scored above a single-word hit — so the recognizer whose specific phrase appears wins the span.

On the anonymization side, Airbnb uses the faker library to generate realistic fake values rather than placeholder tokens. This matters for downstream utility: a model training on de-identified text should still see content that reads like the original. Placeholder tokens signal that something was removed, and that signal is itself a pattern a model might learn, resulting in mis-training. Two properties must hold simultaneously for the fakes. Across separate runs, de-identifying the same input must produce different fake values, so the fakes themselves are designed not to become a fingerprint tying two de-identified outputs back to each other. Within a single run, the same real value must always map to the same fake, or the dataset stops being internally coherent — the same person mentioned twice in one record needs the same fake name both times. A globally shared random state cannot satisfy both constraints, so each fake is seeded from the real value plus a secret unique to the run. They do not store a real-to-fake mapping.

For structured columns, the approach differs by data type. Identifiers are hashed with a caller-supplied salt, so the same value maps to the same hash within a run and the hash cannot be reproduced without the salt. Coordinates are truncated to a precision set by the Privacy team, keeping most of the geographic signal without pinpointing a location. Airbnb's 64-bit internal IDs go through format-preserving encryption, so the output is another valid ID of the same width and range, allowing a de-identified table to pass the same schema checks as the original.

Evaluation holds the design decisions to measurement along three dimensions: recall (how much real personal data the system finds), precision (how much of what it flags is actually personal data), and throughput. When recall and precision must be traded, they weigh recall, because a miss is a leak. Every metric is reported per entity type and per language, rather than as an aggregate score, because an aggregate is exactly where the failure that matters most goes to hide. The benchmark scores the overlap-resolved spans the library actually emits, not the Analyzer's raw candidates, keeping the numbers aligned with what downstream teams see. Before any release, the full framework runs against the deployed version and the candidate side by side; a version ships only when no language or entity type that has worked in the past has regressed.

The article is entirely self-reported. Airbnb references internal benchmark results but does not disclose specific precision or recall figures, and no external party has audited the system's actual leakage rate. The design decisions are well-explained and the reasoning is concrete, but the effectiveness claims remain the company's own.

Sources

  • airbnb.tech↗
Continue researching →