Hugging Face PII Detection Experiment with Presidio
Hugging Face is experimenting with integrating Microsoft Presidio, an open-source PII detection tool, into the Dataset Hub to provide automatic reports on the presence of Personally Identifying Information (PII) in hosted datasets. This initiative aims to increase transparency and help machine learning practitioners avoid training models on undocumented sensitive data.
The Prevalence and Types of PII in ML Datasets
Undocumented private information is a recurring issue in machine learning datasets. Hugging Face identifies two primary categories of datasets where PII is commonly found:
- Annotated PII Datasets: These are datasets specifically created to train PII detection and masking models, which are essential for tasks like online content moderation and the creation of anonymized databases.
- Pre-training Datasets: These are typically massive, terabyte-scale datasets derived from web crawls. Despite filtering efforts, the sheer volume of data often allows small amounts of sensitive information to bypass detection models.
Privacy and Performance Risks of PII
The presence of PII in training data introduces both ethical and technical risks. Privacy concerns are paramount, as PII can be used to infer sensitive information about individuals. From a technical perspective, PII can degrade model performance or introduce bias; for instance, a model might learn to associate specific PII with certain outcomes or inadvertently generate PII from its training set during inference.
Implementing Presidio Reports on the Dataset Hub
To mitigate these risks, Hugging Face is testing a feature that leverages Presidio, a tool that combines machine learning models and detection patterns to identify PII.
Utility for Practitioners and Dataset Owners
Presidio reports provide an estimation of PII presence within a dataset, enabling two primary use cases:
- For ML Practitioners: Users can make informed decisions about whether to use a dataset for training or if further filtering is required using tools like Presidio before proceeding.
- For Dataset Owners: Creators can use these reports to validate the effectiveness of their PII filtering processes before officially releasing a dataset to the public.
Example Detection
In a test case using the C4 pre-training dataset, Presidio reports were able to detect small amounts of emails and other sensitive PII, demonstrating the tool's ability to flag risks in large-scale data.
Compliance and Ethical Frameworks
This effort is part of a broader commitment to transparency and ethical AI development. Hugging Face acknowledges the guidance of the CNIL (Commission Nationale de l'Informatique et des Libertés) regarding GDPR compliance and the navigation of personal data issues in the context of AI.