Dataset Lineage and Provenance › Why Tracing Is Hard
Language AI HandbookAll chapters A CSV with a source column and a JSON config preserves the fields you write into those files. To distinguish retries, filter versions and consumed inputs, also record those observations and link them to the artifacts they affected.
First, represent the versioned artifacts and their producing activities as a directed acyclic graph. Give each retry a separate activity and output so branches and merges remain traceable. A document may fail language identification in one run, pass after a model update, and enter a later mixture. A deduplication cluster may split because a threshold changed. A single source may be crawled multiple times with different extraction versions. The provenance graph must represent versions, not just final state. A pipeline that only records the final artifact cannot explain why two runs of the same job produced different corpora.
Second, the operations can lose information. Boilerplate removal can delete text, and normalization can change Unicode and whitespace. The tokenizer determines token boundaries. After packing, recover document boundaries or ownership from adequate separators, masks, spans, or equivalent records. A hash can check a candidate copy of the surviving bytes against the recorded digest. The removal history belongs in separate event records.
Third, some stages can vary across runs. A fixed threshold is deterministic for fixed scores. Sampling, shuffling, and training operations such as dropout can introduce variation. A hash identifies an artifact, but it does not recreate the run. Reproducibility requires seeds, configurations, code versions, and enough environment information to explain divergence. Two runs with the same seed can still diverge under nondeterministic hardware or scheduler timing, so provenance must record not only the inputs but the conditions under which the run executed.
Fourth, provenance records can disclose private document membership, user identifiers, or source URLs. Store sensitive values under access controls. Where appropriate, a shared-key message authentication code (MAC) lets authorized parties check a candidate without publishing its bytes. Holders of the shared key can also create tags, so define who can access the candidates, verify tags, or issue them.
Fifth, check origin assertions. For example, suppose a vendor record and a scraped page label a text as human-written, while the generator log associates the same bytes with a generation request. Preserve the source records and investigate which claim the evidence supports. Checking a digest against a trusted reference can detect a change to the recorded bytes. A signature check links a claim to a signing key under the verifier's trust policy. Confirm facts about origin with independent records.
These constraints shape the design. We want immutable identifiers, append-only events, content-addressed artifacts, and explicit versioning of every transformation. We also want the system to be cheap enough that engineers do not bypass it. Measure capture overhead on each required stage and scan the run records for missing events after deployment.
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!