Definition
A fitness app knows when you sleep, where you run and how fast your heart beats. A shopping app knows what you buy and when. Combined, such data can reveal illness, pregnancy or debt before you tell anyone. AI makes data more powerful, so protecting it matters more than ever.
Data privacy is people's right to control how information about them is collected, used, shared and kept. Consent means a person's free, specific, informed and unambiguous agreement to a particular use of their data, which they can withdraw. Core principles include purpose limitation (use data only for the stated purpose), data minimisation (collect only what is needed), storage limitation (delete it when no longer needed), security and accountability. Technical protections include anonymisation, pseudonymisation, aggregation, encryption, access controls and differential privacy. India's DPDP Act sets out a framework for digital personal data, with a phased commencement schedule.
In simple words
Your data is like your house key. You can lend it to a plumber for one job, but they should not copy it, use it for other things or keep it forever. Consent is lending the key knowingly; privacy rules make sure it comes back.
Overview
- Data privacy is people's right to control how information about them is collected and used.
- Consent should be free, specific, informed, unambiguous and easy to withdraw.
- India's Digital Personal Data Protection (DPDP) Act was passed in August 2023.
- The EU's GDPR, in force since May 2018, is a major global model for privacy law.
- AI raises special privacy risks: models can memorise training data and infer sensitive facts.
- Privacy-enhancing technologies let teams learn from data while exposing less of it.
Why it matters
AI systems are trained on and make decisions with personal data. Misuse can lead to discrimination, fraud, surveillance and loss of trust, and organisations face legal penalties. Building privacy in from the start is both ethical and practical.
Key terms
- Personal data
- Any information about an identifiable individual.
- Data principal and fiduciary
- Under the DPDP Act, the person the data is about, and the organisation that decides how it is processed.
- Data minimisation
- Collecting and keeping only the data a purpose needs.
- Pseudonymisation
- Replacing identifiers with codes; the data can still be linked back with a separate key.
- Re-identification
- Working out who anonymised records belong to by combining them with other data.
- Differential privacy
- Adding carefully calibrated noise to statistics so no individual's presence can be detected.
Types
Privacy protection has several types of principle and technique. These are the main ones.
1. Consent and notice
Telling people clearly what data is collected and why, and getting their agreement.
- How it works: Plain-language notices, separate opt-ins for each purpose and an easy way to withdraw consent.
- Example: An app asking separately for permission to use voice recordings to improve its speech model.
- When to use it: Use it whenever you collect personal data; for children, verifiable parental consent is required under the DPDP Act.
2. Data minimisation and purpose limitation
Collecting only the data needed and using it only for the stated purpose.
- How it works: Review each field and drop those not needed; delete data when the purpose is complete.
- Example: A food-delivery app that does not ask for date of birth because it is not needed to deliver food.
- When to use it: Apply it at the design stage of every project.
3. Anonymisation and pseudonymisation
Removing or replacing identifying details in data.
- How it works: Pseudonymisation replaces names with codes that can be reversed with a key; anonymisation makes re-identification practically impossible, which is hard to achieve.
- Example: Researchers showed that ZIP code, birth date and gender alone identify most Americans (Sweeney, 2000).
- When to use it: Use them before sharing or analysing data, and test whether combinations of fields still identify people.
4. Differential privacy
A mathematical guarantee that results reveal almost nothing about any single person.
- How it works: Carefully calibrated random noise is added to statistics or training gradients; a privacy budget ε controls the trade-off with accuracy.
- Example: The US Census Bureau used differential privacy for the 2020 census results.
- When to use it: Use it when publishing statistics or training models on sensitive data at scale.
5. Federated learning and secure computation
Training on data that stays on users' devices or inside organisations.
- How it works: Devices train locally and send only model updates, which are combined centrally; encryption methods can hide even the updates.
- Example: Phone keyboards learning next-word suggestions without uploading what people type.
- When to use it: Use them when raw data cannot leave its source, such as hospitals or personal devices.
Explained in detail
Could someone still recognise a record?
Consider a reading survey with names removed. If only one respondent shares a particular age band and neighbourhood, a neighbour might recognise that row. Group sizes should count combinations that actually appear in the data. Even a group of three offers little protection for a sensitive answer if every person in it gave the same answer. For a classroom report, publish the smallest summary that answers the question and consider suppressing small cells.
India's DPDP Act, 2023
India enacted the Digital Personal Data Protection Act in 2023. Its November 2025 commencement notification brings different sections into effect on different dates. As of November 2026, the core processing duties, children's provisions and individual rights are scheduled for May 2027. The Act sets out consent and certain legitimate uses as grounds for processing. It provides for withdrawal of consent and, subject to conditions, access, correction and erasure. Its safeguards for children generally include verifiable parental consent, with specified exemptions. A project team can practise these safeguards now. Check the notification and applicable rules when judging a real case.
Why anonymisation is harder than it looks
Removing names is not enough. Researcher Latanya Sweeney showed in 2000 that ZIP code, date of birth and gender alone uniquely identify about 87 per cent of the US population. In 2006 Netflix released "anonymised" movie ratings, and researchers re-identified some users by matching them with public reviews. In India, a combination of PIN code, age, gender and occupation can single out many people in a small town. Techniques such as k-anonymity (each record looks like at least k others on identifying fields), aggregation into counts, and differential privacy, developed by Cynthia Dwork and colleagues from 2006 and used by the US Census Bureau for the 2020 census, give stronger protection.
| Practice | Example in an AI project |
|---|---|
| Clear notice and consent | "We will use your voice recordings to improve Marathi speech recognition. You can withdraw any time." |
| Minimisation | Store age bands, not dates of birth; district, not full address |
| Security | Encrypt data, limit access to named staff, log access |
| Retention and deletion | Delete raw recordings after training; honour erasure requests |
| Privacy-preserving techniques | Differential privacy for published statistics; federated learning on phones |
Privacy-preserving machine learning goes further: federated learning trains a shared model across many phones without collecting their raw data centrally, as some keyboard prediction systems do.
How it works
- List what personal data you need and why; drop everything else.
- Write a clear notice and obtain specific, informed consent that can be withdrawn.
- Pseudonymise or aggregate data and check for re-identification risk.
- Secure, log and limit access; set and follow deletion schedules.
- Provide ways to access, correct and erase data, and respond to grievances.
In code
import numpy as np
import pandas as pd
df = pd.DataFrame({
"pin": ["411001", "411001", "411001", "411002", "411002", "411002", "411003", "411003"],
"age": [34, 36, 35, 52, 55, 51, 29, 71],
"gender": ["F", "F", "F", "M", "M", "M", "F", "M"],
"diagnosis": ["asthma", "diabetes", "asthma", "diabetes", "asthma", "diabetes", "asthma", "diabetes"],
})
def k_anonymity(data, quasi):
return int(data.groupby(quasi, observed=True).size().min())
print("k with exact age:", k_anonymity(df, ["pin", "age", "gender"]))
df["age_band"] = pd.cut(df["age"], bins=[0, 40, 60, 100], labels=["<40", "40-60", "60+"])
print("k with age bands:", k_anonymity(df, ["pin", "age_band", "gender"]))
print("Groups smaller than 2 still identify someone:")
sizes = df.groupby(["pin", "age_band", "gender"], observed=True).size()
print(sizes[sizes < 2].to_string())
df["pin_area"] = df["pin"].str[:5] + "x" # generalise PIN code to a wider area
quasi = ["pin_area", "age_band", "gender"]
print("k with PIN area + age bands:", k_anonymity(df, quasi))
group_size = df.groupby(quasi, observed=True)["age"].transform("size")
released = df[group_size >= 2] # suppress records still unique
print(f"After suppressing {len(df) - len(released)} unique record(s), k =", k_anonymity(released, quasi))
# Differential privacy: publish a noisy count instead of the exact one
rng = np.random.default_rng(0)
true_count = int((df["diagnosis"] == "diabetes").sum())
epsilon = 1.0
noisy = [true_count + rng.laplace(0, 1 / epsilon) for _ in range(5)]
print(f"True diabetes count: {true_count}; published noisy counts:", [round(x, 1) for x in noisy])Output
k with exact age: 1
k with age bands: 1
Groups smaller than 2 still identify someone:
pin age_band gender
411003 <40 F 1
60+ M 1
k with PIN area + age bands: 1
After suppressing 1 unique record(s), k = 3
True diabetes count: 4; published noisy counts: [4.3, 3.4, 1.5, 0.6, 5.0]Try it yourself
A health survey done right
A state health mission plans an AI model to predict anaemia risk using survey data from women.
Good or poor privacy practice?
Classify each practice.
Letting users withdraw consent in one click
Using data collected for loans to target unrelated ads
Collecting full date of birth when only age group is needed
Keeping raw voice recordings forever "just in case"
Publishing statistics with differential privacy
Common mistakes
- Assuming that removing names makes data anonymous.
- Using pre-ticked boxes or vague notices as "consent".
- Reusing data for new purposes without fresh consent or a lawful basis.
Check yourself
Summary
- Privacy gives people control over their data; consent must be free, specific, informed and withdrawable.
- Practise purpose limitation, data minimisation, retention limits and security. Check which provisions apply on the date of use.
- Removing names is not enough; use aggregation, k-anonymity checks and differential privacy.
Finished reading?
Sources: Government of India, DPDP commencement notification · Digital Personal Data Protection Act, 2023 (MeitY) · Dwork and Roth, The Algorithmic Foundations of Differential Privacy