advanced24 min studyLesson 334 in Engineering

Pin immutable dataset contents and their interpretation

Distinguish mutable labels, snapshot references, byte identities, and reconstruction manifests for reproducible AI training.

On this page

What you’ll understand

  • Separate a dataset name from an immutable version or content manifest.
  • Specify what a byte digest identifies and what provenance it does not establish.
  • Pin schema, membership, order, and transformation dependencies needed for a training run.

A model is trained on the dataset called latest, and its owner later tries to reproduce the result. The name now points to a corrected export, its files use different compression, and the tokenizer was also replaced. A convenient label is not a reconstruction contract. Version identity must say exactly which artifacts and interpretation were used, while provenance explains how they were produced. Those are complementary records rather than interchangeable ways of declaring that two runs saw the same data.

Choose the identity boundary deliberately

A logical dataset name may refer to a changing table, a published release, or a collection of files. An immutable snapshot or object-version reference can pin one state only if its retention and lookup semantics preserve that state for the needed period. A content digest instead identifies a precisely defined byte representation under its hash assumptions. The same rows compressed differently can have different byte identities; identical file bytes can also be interpreted differently under another schema. State whether the identifier represents storage bytes, logical records after canonicalization, or a release manifest containing both content and interpretation references.

Do not assume that an identifier labeled version is globally unique or content-derived. Scope it by namespace and dataset identity, and verify how the storage system allocates and retains it. Likewise, a mutable tag such as production can be useful for discovery without becoming the immutable identity stored in training metadata. Resolve the tag once at the appropriate publication boundary and record the resulting version. Re-reading the mutable name midway through a distributed training job can mix shards from different releases, producing a cohort that no published snapshot ever contained.

hi=H(bytes⁡(fi))h_i=H(\operatorname{bytes}(f_i))
h_i is a digest of one exact file byte sequence under a named hash algorithm. Collision resistance is an assumption; this digest alone does not certify authorization, source truth, logical row identity, or absence of sensitive content.↔ Scroll wide equations horizontally.

A manifest gives the digest a reproducible meaning

For a multi-file dataset, use an unambiguous manifest that records required file identities, sizes, logical paths, schema identity, and any order relevant to consumption. Hash a defined canonical encoding or preserve the exact manifest bytes. Naively concatenating variable-length strings can create ambiguous inputs even before considering cryptographic collisions. Decide whether file ordering is semantic, normalize only what the contract says is irrelevant, and record dependencies such as tokenizer version, label mapping, filtering policy, and preprocessing code. A file inventory without these references may recover the bytes while failing to reproduce the examples supplied to the model.

Training reproducibility also involves random seeds, sampling configuration, split assignment, and software behavior outside the dataset identity itself. Keep those in execution metadata linked to the pinned data, rather than implying that one dataset digest determines every model bit. ML metadata systems distinguish artifacts from executions for this reason. An immutable table snapshot can reference manifests and files without making all those bytes immortal; snapshot expiration and file cleanup change future availability. Record retention expectations and test a reconstruction while the required dependencies still exist, not only after an incident discovers they were cleaned up.

D=H ⁣(encode⁡(schemaID,[(pathi,sizei,hi)]i=1m,dependencies))D=H\!\left(\operatorname{encode}(\mathrm{schemaID},[(\mathrm{path}_i,\mathrm{size}_i,h_i)]_{i=1}^{m},\mathrm{dependencies})\right)
D names the exact manifest encoding defined by this example; sizes are bytes and the other fields are identifiers. Whether list order matters must be specified. Changing a covered input normally changes D under the chosen collision-resistant hash assumption.↔ Scroll wide equations horizontally.

Integrity and provenance answer different questions

A digest check can detect a mismatch between expected and retrieved bytes, but a digest supplied by the same mistaken producer does not prove those bytes are correct. Establish trusted publication, schema checks, and lineage separately. Hashing identifiers also does not automatically anonymize the underlying data or remove linkage risk. When a version is corrected or access is withdrawn, retain a minimal record that explains which runs used it while controlling the data and metadata according to their policies. Immutability is a useful identity property, not an instruction to retain every artifact forever.

The modular lab demonstrates why a reused human label is not a unique version identity. Reset, set both modulus m=4 and step a=1, predict when label zero appears again, then Play or Step through four additions. A fresh comparison requires another Reset and re-setting both controls. The repeated residue has no way to distinguish the earlier and later releases. This is not a hash function or a model of collision resistance; it isolates label reuse. Use immutable scoped references or a defined content manifest when the consumer must distinguish releases that a rotating label would merge.

Reuse verified immutable file identities carefully

A release contains 100 immutable files of 64 MB each, using decimal MB. The next release replaces five files with new 64 MB files and reuses 95 verified immutable files. Assume the manifest covers all file identities and sizes; ignore metadata size.

  1. The original payload is 100×64=6400 MB, or 6.4 GB. The five replacement files contain 320 MB of new payload.

  2. If the 95 reused file identities remain trusted and immutable, their existing verified digests can be referenced while the new 320 MB is hashed and published. This is 5% of the full payload, not a claim that an unverified mutable source can skip checking.

  3. Publish a new manifest covering the changed file identities and the correct interpretation dependencies. Keep the training run pinned to that manifest; a reused latest label cannot identify which five replacements it saw.

The result

The new payload is 320 MB under the stated immutable-reference assumptions. Reproducibility comes from the complete pinned manifest and execution context, not from the mutable release label.

Explore the model

Interactive lab

Interactive lab · modular

Rotating labels repeat while releases change

Reset, set both m=4 and additive step a=1, predict the fourth addition, then Play or Step. The label returns to residue 0. This modular orbit illustrates label reuse only; it is not a hash, snapshot allocator, or cryptographic collision model.

Rotating labels repeat while releases changeAddition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Current readings: Residue r0: 0; Orbit period · m/gcd(m,a): 12; Distinct residues visited: 1 of 12. All parameters are adjustable with the labeled controls below.Repeated addition modulo 12: the current residue is 0, and the orbit period is 12.01234567891011+ 5mod 12An additive orbitn = 0rₙ = 0Period = 12Cycle starts at 0:0 → 5 → 10 → 3 →8 → 1 → 6 → 11 →4 → 9 → 2 → 7 → 0Exact residues · two additions per second
Additive orbitCurrent residue / next edge
Residue r0
0
Orbit period · m/gcd(m,a)
12
Distinct residues visited
1 of 12
t = 0 s

Addition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA repeated discovery label cannot distinguish two releases. Pin the immutable scoped version or defined manifest identity required by the execution.

Check your understanding

Two exports contain the same logical rows but use different compression and file ordering. What can be concluded about their identifiers?

Try it yourself

A manifest references 80 immutable files of 25 MB each. Eight are replaced by new files of the same size. Under trusted immutable digest reuse, how much new payload needs hashing, and what still must be published?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Count the replacements, but keep the complete manifest as the release boundary.

Compare with the solution

The new payload is 8×25=200 MB, compared with 2000 MB total. Publish a new complete manifest with the replacement identities and relevant schema/dependency references; hashing only the changed files does not make a partial file list a complete release identity.

Take it with you

  • Names, scoped versions, byte digests, and logical identities have different contracts.
  • A manifest must unambiguously cover membership and interpretation dependencies.
  • Integrity, provenance, reproducibility, and retention remain separate responsibilities.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.