Dataset Lineage and Provenance › What Lineage and Provenance Mean
Language AI HandbookAll chapters In this chapter, provenance means the recorded history of an artifact, and lineage means the paths that link it to other artifacts. The distinction helps us ask two questions: who produced this artifact and under what conditions, and which recorded inputs and outputs are connected to it? Provenance frameworks such as W3C PROV also describe derivation relationships. A document history without downstream links cannot identify which model consumed that document. A derivation graph records license evidence only if the underlying records include it.
Provenance is the recorded history of an entity: its origin, the activities that touched it, the agents responsible, and the parameters of those activities. A provenance record is evidence, not a summary.
Lineage is the directed graph of derivation among entities. If document was used to produce shard , and shard was used to train checkpoint , then there is a lineage path .
A dataset card is documentation. A model card is documentation. Neither is automatically provenance. Documentation tells a reader what the authors believe is important. Provenance gives an auditor recorded observations to check, at the granularity the system captured. A good release package needs both. The card explains the intent and the caveats to a human reader; the provenance record supplies the verifiable detail that backs up, or contradicts, the card's claims.
Three provenance planes matter for language models:
- Data provenance covers source acquisition, extraction, normalization, filtering, deduplication, PII handling, mixing, tokenization, and shard construction.
- Model provenance covers code, configuration, tokenizer, random seeds, training data manifest, optimizer state, checkpoints, and the training run that produced each artifact.
- Evaluation provenance covers benchmark version, split, prompt template, decoding configuration, scoring code, and contamination checks.
These planes are connected. A model artifact is not reproducible from its own hash. You need the manifest that identifies the training data, the code and configuration that consumed it, and the evaluation records that justify the claims made about it. If any of the three planes is missing, the release has a gap that shows up precisely when someone asks a hard question: which data trained this model, which code produced this checkpoint, or which benchmark version produced this score.
Provenance Is Not Just Metadata
In this example, the descriptive metadata fields can be updated in place. Provenance is historical and ideally append-only. Consider a document record with fields source, language, and quality_score. If an engineer edits quality_score in place, the metadata still looks complete, but the history is gone. If the document was filtered out because of the old score, the new score now contradicts the pipeline's actual decision. Anyone reading the record later would see a coherent-looking row that describes a decision the pipeline never made.
A provenance system records events. Each event says what happened, when, to which entity, with which inputs, and with which parameters. The current state of a document is then a projection over its events. This is event sourcing. Retaining one event per update requires more storage than retaining only the latest row. Capture the filter version and threshold in the event to preserve the decision's context. The extra cost buys you the ability to replay history: to ask not only what the corpus looks like now, but how it came to look that way, which threshold rejected a document, and which version of a filter was in force on the day it ran.
The Traceable Unit
Language pipelines contain several different units, and conflating them is a common source of broken lineage:
- Source record: the raw response from a crawler, API, or dataset release.
- Document: the text extracted from a source record after boilerplate removal and normalization.
- Example: a supervised training or evaluation item, often a prompt-response pair or a labeled sentence.
- Sequence: an ordered token input to a model. A packing policy can combine tokens from several documents in one sequence.
- Token: the model's atomic input unit, produced by a tokenizer whose version matters.
- Artifact: a dataset manifest, tokenizer, shard, checkpoint, evaluation report, or release bundle.
Each unit plays a different role in the audit trail. A source record can capture the observed origin and point to any consent record for that source. A document answers questions about content and filtering. An example answers questions about supervision and labels. A packed sequence identifies its input tokens. A consumption record ties that sequence to a run. A document-span map assigns an input position to its source document. An artifact is the bundle that ties a set of units into something you can ship or compare.
A document can generate many examples. A sequence can contain tokens from many documents. One document can appear in multiple epochs, multiple shards, and multiple checkpoints. The relationships are many-to-many, not a simple parent-child tree. This is why a flat table with one row per document is not enough once training begins: the same document fans out across sequences and runs, and each fan-out point needs its own record.
In this chapter, we will use a "document" as the main traceable unit and a "packed sequence" as the training unit. Add example-level or span-level identifiers when the audit question needs that resolution. The same principles apply. The important thing is to choose the unit deliberately and to be explicit about where it stops being the right unit for a given question.
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!