GDPR and Data Protection for ML
You'll learn how GDPR's core requirements—consent, data minimization, and individual rights—fundamentally shape how you can build and deploy machine learning systems in practice.
The GDPR Challenge for ML
The General Data Protection Regulation (GDPR) creates a tension with traditional ML workflows: machine learning often wants more data trained for longer periods, while GDPR mandates minimal data kept for limited time with explicit user control.
Three Pillars That Affect Your ML Pipeline
1. Consent and Lawful Basis
You cannot simply scrape or use personal data because it's available. For training ML models on EU citizens' data, you need a lawful basis—typically explicit consent or legitimate interest. Think of it like needing permission slips before using someone's information, not just a generic terms-of-service checkbox.
2. Data Minimization
GDPR requires collecting only data "adequate, relevant, and limited" to your purpose. This directly conflicts with the "more data is better" ML mantra. You must justify why each feature is necessary—you can't train on birthdate, location history, and browsing behavior if your model only needs age brackets.
3. Individual Rights (Erasure, Access, Portability)
Users have the "right to be forgotten." But how do you untrain a neural network after someone's data contributed to its weights? This isn't like deleting a database row. You may need model retraining, differential privacy techniques, or machine unlearning methods to comply.
Practical Implications
- Documentation burden: You must explain what data you collect, why, and how the model uses it
- Data retention limits: Can't keep training data indefinitely "just in case"
- Transparency requirements: Users can request explanations of automated decisions affecting them
Key Takeaway: GDPR forces ML practitioners to design privacy-first systems from the start—data minimization informs feature selection, consent shapes data collection, and individual rights may require technical solutions like differential privacy or model retraining capabilities.