Dataset Lineage and Provenance › A Provenance Data Model

Michael BrenndoerferNovember 26, 20265 min read
Language AI HandbookAll chapters
Part 21 of 67Data Governance, Provenance, and Synthetic Ecosystems
Chapter 149Dataset Lineage and Provenance › A Provenance Data Model
Reading section 6 of 17 · A Provenance Data Model · 5 minSection 6 of 17 · 5 min

Section 6 of 17 · 5 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

The W3C PROV family gives a useful vocabulary. PROV-DM defines entities, activities, and agents. PROV-O expresses the model in OWL. The core relations are:

  • An entity is a thing, such as a document, shard, checkpoint, or evaluation report.
  • An activity is something that occurs over time, such as extraction, filtering, training, or evaluation.
  • An agent is something responsible, such as a person, team, crawler, or service.
  • used connects an activity to an entity it consumed.
  • wasGeneratedBy connects an entity to the activity that produced it.
  • wasDerivedFrom connects one entity to another.
  • wasAttributedTo connects an entity to the agent it is attributed to; activities are tied to agents by wasAssociatedWith.

A training run uses a packed dataset and configuration and produces a checkpoint. The packed dataset derives from the retained documents. A filtering activity can produce a new selection artifact that references the unchanged document entities. When filtering changes a document's bytes, record the new document version as an output.

You do not need to adopt PROV-O literally to benefit from the model. You need the same distinctions. If your schema only has "dataset" and "model" rows, you cannot express which filter version, which tokenizer, or which mixture produced a checkpoint. The result is a graph that looks complete but cannot answer the questions that matter, because the nodes are too coarse and the edges carry no parameters.

Events Versus Snapshots

A snapshot records the state of an artifact at a point in time. An event records a change. Both are useful, and the design question is which one is the source of truth.

  • A dataset manifest is a snapshot. A stored projection can answer state queries without replaying every event.
  • Events are auditable and explain how the snapshot came to be. An append-only log is a sequence of events.

A robust system keeps both. The event log is the source of truth for history. The manifest is a materialized view optimized for training and release. A manifest root commits to the fields its construction includes. A separate record of consumed inputs can show how a run followed the manifest. If the planned manifest and recorded inputs differ, keep both. Check whether the discrepancy comes from the plan, the delivered data, or missing events before relying on either record.

Hash Chains and Tamper Evidence

An application can call a log append-only even when a database role can update old rows. In the toy chain, each event payload includes a named prev_hash field for the preceding event's digest. The event's own digest is stored separately from the payload it covers:

hi=H(UTF8(canonical(pi)))h_i = H(\mathrm{UTF8}(\mathrm{canonical}(p_i)))

where:

  • pip_i: the event payload with the named prev_hash field set to hi−1h_{i-1}, excluding the event's own event_hash field
  • canonical\mathrm{canonical}: the fixture's compact, sorted-key JSON serialization, preserving Unicode characters
  • UTF8\mathrm{UTF8}: the encoding used to convert the resulting JSON text to bytes
  • h0h_0: the fixed genesis value of 64 zero characters
  • hih_i: the resulting hash of the current event

The verifier checks each predecessor field and recomputes each event digest. If an edit leaves the stored digest unchanged, recomputation fails at that event even if the next stored predecessor still matches. Someone who can rewrite and rehash the log can produce a locally consistent chain. Retain a trusted checkpoint with the event position and digest to verify the corresponding prefix. An earlier checkpoint does not authenticate the suffix after it.

A Merkle tree provides a compact commitment to the leaves encoded by the builder. Given a trusted root and an inclusion proof, an auditor can verify a leaf without downloading the rest of the manifest. A leaf that encodes both a configuration digest and its role can commit to the mixture settings as a configuration input. The fixture below sorts content digests and duplicates the final tree node when a level has odd length. Its root leaves source identity and row order open, and padding can make different multiplicities produce the same root. A production manifest can bind the record count and defined leaf encoding in a signed record. Some blockchains use the same tree structure for transaction commitments. For a training audit, the leaf encoding determines whether the proof identifies only content bytes or a specific source occurrence.

Negative Provenance

Record what reached training and why other candidates were excluded. For example, exclusions can help diagnose a drop in performance for one domain. For redaction, keep the detector version and replacement policy. For near-deduplication, keep the representative and any score used in the decision. The exact-dedup fixture instead compares keys from normalized, case-folded text and logs the key prefix and the retained representative on a drop.

Negative provenance is the record of rejected, filtered, redacted, or deduplicated candidates. It is essential for debugging filters, measuring over-filtering, and defending decisions to auditors. It also creates privacy risk, because rejected documents may be more sensitive than accepted ones. Start with a reason code and the minimum supporting fields needed for the audit. Restrict access to source identifiers and digests when they could reveal sensitive content. If the audit requires raw text, keep it under the applicable access and retention controls.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy