AlgoViz

Training data lineage, privacy and deletion

hard 6 min

A dataset is a versioned transformation of sources.

Video lesson · Chapter 1 of 4

Withdraw one conversation

0:00 / 3:16

Theory

Read or listen first. About 2 min.

What it is

A dataset is a versioned transformation of sources. A scraped page, a licensed collection and a consented support conversation can arrive in the same file format while carrying different restrictions. Preserve source identifiers, permitted uses, collection time and transformation history. A dataset manifest should make it possible to reconstruct which records and policies produced an experiment.

Why it exists

Validate the data before training. Detect malformed records, near-duplicates, label disagreements and evaluation examples that reappear in training. Inspect small language and product cohorts separately. A deletion request must follow copies into retrieval stores, evaluation fixtures and training snapshots. Removing a row from future training data does not by itself erase information from previously trained weights.

Withdraw one conversation from a training pipeline

Consent ledger → Lineage index (changed permission). Lineage index → Dataset manifest (affected versions). Dataset manifest → Consent ledger (remediation receipt)
Consent ledger → Lineage index (changed permission). Lineage index → Dataset manifest (affected versions). Dataset manifest → Consent ledger (remediation receipt)

Inside this chapter

Chapter sources
Deduplication and leakage
Near-identical copies can straddle a random train/test split and inflate the score. Cluster related records before splitting when possible, preserve grouping keys and hold out time periods or organizations that approximate deployment.

Exact-match deduplication misses the copies that matter most: translations, paraphrases, templates with a changed name. Near-duplicate detection, using shingled hashes or embedding similarity, groups them into clusters, and splitting by cluster stops one case from leaking into test. Holding out whole organisations or later time periods goes further and approximates what deployment will see. A test score that drops sharply under a stricter split was partly measuring leakage.

Example. A ticket and its translated copy belong in the same partition. A held-out answer paraphrasing a training ticket is weak evidence of generalization.

Another example. A model trained on support tickets scores an illustrative 91% on a random split and 78% when two whole customers are held out. The second number is the one to plan around.

Cluster first, then split

Splitting by cluster or organisation keeps copies of one case on one side.
Dataset rights and lineage
Attach permission records to source IDs and propagate their constraints to derived records. Keep the dataset version and transformations on the release manifest. Separate the authority to train from authority to retain or display raw examples.

Rights attach to sources, but training uses derived records: chunks, translations, summaries, synthetic variants. Unless each derived record keeps its source ID, the permission is lost at the first transformation. Store permitted uses as explicit flags (train, evaluate, retain, display) because they differ, and make training jobs filter on them. The release manifest then shows which permissions a model depends on.

Example. A conversation allowed for support quality review is not automatically eligible to become a commercial training example.

Permissions follow the record downstream

Derived records carry the source ID, so a filter can apply the original permissions.
Deletion and model impact
Identify every derived asset and its owner. Filter future snapshots, purge eligible caches, record completion and evaluate whether an already-trained release needs a separate remediation decision. Communicate the actual guarantees of each operation.

Deletion is a lineage query followed by one action per asset type. Stores and indexes can drop a record; a trained model cannot simply forget one example, so the options are retraining from a clean snapshot, retiring the model, or accepting and documenting the residual effect. Record which actions finished and when, so a request can be shown as complete for what was promised and no more.

Example. Removing transcript T8 from an index stops future retrieval there. An adapter already trained on T8 retains its old weights.

Another example. A customer withdraws consent for 40 transcripts. The index purge finishes the same day; the next monthly adapter retrain excludes them; the current adapter's status is reviewed and noted in the deletion record.

What deleting T8 actually changes

AssetActionEffectGuarantee
Search indexdelete and reindexT8 no longer retrievedimmediate for new queries
Training shardfilter next snapshotfuture runs exclude T8from the next training run
Evaluation fixturereplace the casemetrics no longer use T8after re-baselining
Response cachespurge entriesstale answers removedafter purge completes
Trained adapternone automaticweights still reflect T8needs a separate decision
Communicate each row's guarantee precisely, especially the last one.
PII redaction before training
Personal data such as names, emails, phone numbers and account IDs is detected and removed or replaced before records enter a training set, then a sample is reviewed to measure what the detector missed.

Pattern rules catch formatted data like emails and card-like numbers; free-text names and addresses need a model, and both miss some cases. The audit sample gives an honest miss rate to report. Models can memorise rare strings seen during training, which is why redaction happens before training rather than as an output filter afterwards.

Example. Replace jane@example.com with <EMAIL> and a specific order number with <ORDER_ID>, keeping the structure the model needs to learn the task.

Redaction pipeline
  1. 1Detectpatterns plus a named-entity model
  2. 2Classifyemail, phone, name, account ID
  3. 3Replacetyped placeholders keep structure
  4. 4Sample auditpeople review a random slice
  5. 5Record in manifestdetector version and miss rate

Placeholders that keep the type (<EMAIL>) preserve the task better than blank deletions.

Dataset manifests
A manifest is a versioned record of exactly which sources, filters, splits and permissions produced a dataset snapshot, so any experiment or release can be traced and rebuilt.

Without a manifest, a question like which models saw transcript T8 becomes guesswork. With one, it is a lookup from model to run to snapshot to source IDs. Treat a manifest as immutable: a correction produces a new snapshot version rather than editing the old one.

Example. A model card points to manifest support-v7, which lists source IDs, the dedup method, the split key and the consent filter used.

JSON
{  "snapshot": "support-v7",  "sources": ["tickets-2024", "kb-articles"],  "filters": ["consent:train", "pii-redact:v3"],  "dedup": "near-duplicate clusters",  "split_key": "customer_id",  "excluded_ids": ["T8"],  "records": { "train": 41200, "test": 3900 }}
Illustrative fields. Store it immutably beside the data and reference it from every training run.

How it works

Step through the idea, or press Play.

Step 1 of 3

Consent ledger. T8 withdrawn from training

Understand it

Worked example

Withdraw one conversation from a training pipeline

  1. 1

    T8 withdrawn from training

    Record the source identity, effective date and permitted remaining uses.

  2. 2

    Locate two derived assets

    Resolve the training shard and evaluation fixture that reference T8, including transformed copies.

  3. 3

    Publish a corrected snapshot

    Revalidate splits and cohort coverage. Trace which model releases depend on the previous snapshot.

Follow the handoffs

Validate the data before training. Detect malformed records, near-duplicates, label disagreements and evaluation examples that reappear in training. Inspect small language and product cohorts separately. A deletion request must follow copies into retrieval stores, evaluation fixtures and training snapshots. Removing a row from future training data does not by itself erase information from previously trained weights.

T8 through the withdrawal process

The last state covers already-trained models, which the snapshot change does not alter.

Summary

The whole topic in one minute.

A dataset snapshot and learned weights are separate artifacts with different lifecycles.

Validate the data before training. Detect malformed records, near-duplicates, label disagreements and evaluation examples that reappear in training. Inspect small language and product cohorts separately. A deletion request must follow copies into retrieval stores, evaluation fixtures and training snapshots. Removing a row from future training data does not by itself erase information from previously trained weights.

Sources