Menu
Airbnb Engineering·November 17, 2026

Designing a PII De-identification System for AI/ML Training Data at Scale

This article details Airbnb's architecture for de-identifying personal data in text before it's used for machine learning model training. It outlines the decision to use the open-source Presidio library, adapt it for on-premises deployment, and enhance its capabilities for robust and consistent PII detection and realistic replacement across multiple languages and data types. The system is integrated into ML workflows to ensure data privacy and prevent PII leakage while maximizing data utility.

Read original on Airbnb Engineering

The Challenge of PII in ML Training Data

Training machine learning models often requires vast amounts of data, which frequently includes personally identifiable information (PII). Directly using raw data poses significant privacy risks and compliance challenges. Airbnb addresses this by implementing a robust de-identification system to remove PII and replace it with realistic, synthetic data before it ever reaches ML models.

Architectural Foundation: Leveraging Presidio

Airbnb chose Presidio, an open-source library, as the core of their de-identification system. Key requirements guiding this decision included on-premises hosting, modularity, multilingual support, and distinct but integrated PII detection and obfuscation capabilities. This choice allowed Airbnb to maintain control over data and customize functionality.

💡

Why On-Premises?

For sensitive data handling, maintaining an on-premises solution ensures strict data governance and minimizes the attack surface associated with transferring PII to third-party cloud services. It also provides greater control over the underlying infrastructure and security.

System Deployment and Integration

Presidio is deployed as a Python package imported in-process by ML pipelines. This distributed approach avoids a central bottleneck service, as de-identification occurs directly within the calling process. It's integrated as a reusable step in Airbnb's shared ML workflow orchestrator. This ensures consistency and enforces PII removal before data is tagged as de-identified and used for model training and deployment.

The De-identification Workflow: Analyzer and Anonymizer

The system operates in two main stages:

  • Analyzer: This component identifies spans of text that resemble personal data. It uses various recognizer types: pattern-based (regex + context words), NER-based (for names, addresses), and custom Airbnb-specific recognizers (e.g., LISTING_ID). Language detection is crucial, and configurations can be adjusted based on confidence.
  • Anonymizer: This stage resolves overlapping detected entities and applies transformations. Airbnb heavily customized this to replace PII with realistic fake values using the `faker` library and custom logic. This is critical for downstream ML model utility, as models shouldn't learn patterns from placeholder tokens like ``.
ℹ️

Consistent yet Unlinkable Fake Data

A key design challenge was generating fake values that are consistent within a single run (e.g., 'John Doe' always becomes 'Jane Smith' in the same dataset) but different across separate runs to prevent fingerprinting. This is achieved by seeding the faker from the real value combined with a run-specific secret, avoiding persistent mappings.

PII de-identificationdata privacymachine learning infrastructurePresidiodata anonymizationNLPdistributed processingsecurity by design

Comments

Loading comments...