Skip to content
GenAI Learn/AI Ethics, Safety & Responsible AI
Browsing as a guest. Sign in to save your progress and earn XP as you complete chapters.

Privacy & Data Protection Basics

6 min read

You'll learn to

  • -Explain how a trained model can memorize and reveal personal data, and why deleting the dataset does not undo that
  • -Define personally identifiable information, data minimization, anonymization and pseudonymization
  • -Show with a small table why removing names alone does not make data anonymous
  • -Summarize what GDPR and CCPA ask of engineers, and list practical controls

Training data often contains information about real people: emails, support chats, medical notes, purchase histories. That raises obligations beyond ordinary data storage, because of a surprising fact: the model itself, not just the original dataset, can end up carrying information about specific individuals. This chapter explains how that happens and what an engineer can do about it.

An Analogy: The Student Who Memorized the Diary

A student preparing for an exam memorizes past papers word for word. Ask for page 3 and they recite it. Now suppose one of the papers was actually someone's private diary. The student can recite that too, even after you shred the diary, because the words now live in their head.

  • -The diary is a personal record inside the training data.
  • -Shredding the diary is deleting the original dataset.
  • -The student's memory is the model's weights, the numbers it has learned.
  • -Reciting a page is the model reproducing the text when it is given the right opening words.

Models Can Memorize Individual Examples

Very large models trained on enormous datasets can memorize rare, unusual or heavily repeated pieces of text, such as a phone number that appears many times or a distinctive passage. Someone who knows how a record begins can sometimes prompt the model into completing it. This means that "we deleted the original data" is not automatically the same as "no personal information can come out of our system" once a model has trained on it.

Four Terms Worth Knowing

  • -Personally identifiable information (PII) is any data that identifies a person or can be tied to one: a name, email address, phone number, home address, ID number or health detail.
  • -Data minimization means collecting and keeping only the personal data a task really needs, instead of everything available just in case.
  • -Anonymization removes identifying information so a person cannot be recognized. Pseudonymization only replaces it, for example swapping a name for a random ID, so the person can still be found by anyone who can link the ID back.
  • -Purpose limitation means using personal data only for what people agreed to, and not silently repurposing it.

Why Removing Names Is Not Anonymization

It feels as though deleting the name column should make a table anonymous. It does not, because combinations of ordinary-looking details can single people out. The famous research on this found that a large majority of people in the United States can be identified from just their ZIP code, birth date and gender. A small version is below: six health records with names removed. Count how many rows are the only ones with their combination of ZIP code, birth year and gender.

A table with the names removed: how many people are still unique?

Four of the six rows are unique. Anyone who knows a neighbor's ZIP code, birth year and gender can read off their health condition. The standard defense is to make sure every combination appears at least k times, by coarsening the details: an age band instead of a birth year, or the first three digits of a ZIP code. That idea is called k-anonymity.

GDPR and CCPA in Plain Words

  • -GDPR, the General Data Protection Regulation, is the European Union's data protection law, in force since 2018. It requires a lawful reason to use personal data, limits use to the stated purpose, and gives people the right to see, correct and erase their data. Fines can reach 4 percent of a company's worldwide annual turnover, or 20 million euros, whichever is higher.
  • -CCPA, the California Consumer Privacy Act, gives California residents the right to know what personal data a business collects, to ask for it to be deleted, and to opt out of its sale or sharing.

These are real legal obligations, not an ethical nicety, so engineering teams have to design for them from the start instead of retrofitting later. The hard part for machine learning is the right to deletion. Deleting a person's row from a database is easy. Removing their influence from a model that has already trained on it is an open research problem, often called machine unlearning.

Practical Controls

  • -Collect less: keep personal data out of the training set unless the task needs it.
  • -Scrub before training: remove or mask names, emails, phone numbers and IDs, knowing that automatic scrubbing misses things.
  • -Deduplicate: text that appears many times is memorized far more readily than text that appears once.
  • -Keep records of where each piece of data came from and what consent covers, so a deletion request can be traced to the data and to the models trained on it.
  • -Plan for deletion: schedule periodic retraining so deleted data eventually leaves the model, and test models by prompting for known sensitive strings.

Interview Signal is part of Pro

See a real weak answer next to a real strong one for this exact topic.

Quiz is part of Pro

Test what you just read with a short quiz, and bank the XP.

Discussion0

Join the Discussion

Sign in to leave comments, reply to others, or like insights.

Sign In to ScaleDojo

No comments yet. Be the first to start the thread!