Data privacy refers to the right of individuals to control how their personal information is collected, used, and shared. In machine learning, privacy matters because models are trained on data collected from real people.
| Sensitive Data | Personal Data (PII) |
|---|---|
| Health and medical records | Full name |
| Financial account details | Email address |
| Government ID numbers | Phone number |
| Criminal records | Date of birth |
| Religious beliefs | Zip code + Gender + Age |
| Political opinions | National ID number |
Zip code, occupation, age range, gender, and nationality alone may not identify a person — but combining several of them can uniquely identify many individuals.
Responsible data collection starts with collecting only what is actually necessary.
May need — Study hours, grades, attendance
May NOT need — Home address, family income, medical history
Anonymization removes identifying information so individuals cannot be recognized in the dataset.
Before — Name: Alice Chen | Email: alice@example.com | Age: 28
After — Name: (removed) | Email: (removed) | Age: 28
Combining supposedly anonymous data points can sometimes reidentify individuals.
Example — Zip code + Gender + Date of birth can uniquely identify many individuals in a population.
Alice Chen → User_48291
The original mapping is stored separately and kept secure.
Unlike anonymization, pseudonymization is reversible by authorized parties.
Readable data — "Name: Alice, Age: 28, Diagnosis: Diabetes"
Encrypted data — "3f8a2c1b7e9d..."
Only someone with the correct decryption key can read the original data.
Doctors — Can view patient records
Researchers — Can access anonymized data only
Administrators — Can manage accounts but not view records
Each user or system should only have access to the minimum data required to do their job.
Model inversion — An attacker queries the model to reverse-engineer private training data
Membership inference — An attacker determines whether a specific person's data was used for training
Data memorization — Large models sometimes memorize and reproduce training examples
If a chatbot is trained on private conversations, it may reproduce personal details when prompted by future users.
Adds carefully calibrated random noise to data or model updates so individual records cannot be precisely identified.
Example — Instead of reporting exactly 47 people with a condition, report "47 ± 5" to protect individual records while preserving useful statistics.
Each device trains the model locally using its own data. Only model parameter updates are shared — not the raw data.
Example — Your phone trains a typing model using your messages. The model improvements are shared, but your actual messages never leave your device.
| Data Leakage | Privacy Leakage |
|---|---|
| Test data used during training | Private data exposed to unauthorized parties |
| Affects model validity | Affects individual rights and safety |
| Detected through model evaluation | May go undetected for long periods |
| Fixed by correcting the pipeline | May require legal and regulatory action |
These can reveal deeply personal information even if they seem routine.
Design — Identify the minimum data needed from the start
Collection — Collect only what is necessary with clear consent
Storage — Encrypt and control access from day one
Processing — Anonymize or pseudonymize where possible
Sharing — Share only with necessary parties and with protections in place
Deletion — Delete data as soon as it is no longer needed
Ask the AI if you need help understanding data privacy risks, consent, anonymization, encryption, differential privacy, federated learning, or responsible AI practices.