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.
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.