Repository navigation
[DISCUSS] Add TrainingProvenanceRecord: which datasets a model was trained on - #10
Merged
Merged
Conversation
Twelve ProvenanceRecords for datasets that DFM Mímir v1 is trained on, authored from Table 10 (Appendix A) of its technical report, arXiv 2608.13517. Together they are about 43 percent of the sampled tokens and cover every form the report uses for the Danish data: curated, reformatted, translated, synthetic and agreement-supplied. They come from the stress-test work on the stress-tests branch, which is not merged. The only change is the @context, which is now the canonical context IRI that the schema requires. The next commit adds a record that refers to them. Apache-ai: Yes Generated-by: pi (claude-sonnet-5-5) Reviewed-by: anierbeck
A ProvenanceRecord describes a dataset and says nothing about the models trained on it. That is a claim by the model's producer, so it gets its own record type instead of a back-reference on the dataset record. A TrainingProvenanceRecord describes the model with the terms a dataset record already uses (identifier, name, version, creator) and lists the datasets in trainingData. Each entry refers to a dataset by IRI, normally the id of a ProvenanceRecord, and may carry a phase, a token count and a share. disclosure states whether the producer lists all, some or none of its training data; trainingData may be omitted only for undisclosed. Whether a referenced record exists, and in which state, is looked up when the model record is read. It is not stored in either record, and there is no approved flag, in line with the existing non-goals. - context: the new type and the terms trainingData, dataset, phase, tokens, share, disclosure and note. share is xsd:double because rdflib creates a decimal literal with a float value for a JSON number, which pyshacl then rejects as xsd:decimal. - schema: sourcelume-training.schema.json, separate from the ProvenanceRecord schema, whose type is fixed. ProvenanceRecord and its schema are unchanged. - shapes: TrainingProvenanceRecordShape and TrainingDataEntryShape in the existing shapes file. The shapes were checked with pyshacl and with Jena SHACL, which the registry uses: 16 valid documents conform and 9 invalid variants are rejected by both. - tools/validate.py picks the schema by the record's type and fails on an unknown type. render-docs.py still renders only the ProvenanceRecord schema. - tests: 14 tests that check the schema and the shapes against each other. - spec, changelog, README and SPDX crosswalk (trainedOn / testedOn). The spec's non-goal on usage metadata is replaced: training usage is now covered, audit results and weight-level lineage are still out of scope. Apache-ai: Yes Generated-by: pi (claude-sonnet-5-5) Reviewed-by: anierbeck
…d model dfm-mimir-v1-training.jsonld describes DFM Mímir v1 and refers to the twelve dataset records from the first commit, with the token counts and shares from Table 10 of the technical report. Its disclosure is partial: the report lists 161 datasets and only these 12 have a record, together about 43 percent of the sampled tokens. The record says so in its note. acme-undisclosed-model.jsonld shows the undisclosed case, which has no trainingData. It uses example.org and a made-up producer; no real model is stated to be undisclosed. Both are illustrative: they are authored from the public report, not attested by the model's producer. Apache-ai: Yes Generated-by: pi (claude-sonnet-5-5) Reviewed-by: anierbeck
ANierbeck
marked this pull request as ready for review
October 18, 2026 09:45
Contributor
Author
|
No further discussion on this, therefore ready for review |
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, for discussion on dev@. Not meant to be merged before the list has agreed to the scope.
What
A
ProvenanceRecorddescribes a dataset. This adds a second record type,TrainingProvenanceRecord, for the model side: this model was trained on these datasets. It is asserted by whoever produced the model, so dataset records stay untouched and never point back at models.{ "@context": "https://sourcelume.apache.org/context/0.0.1/sourcelume.jsonld", "id": "https://sourcelume.apache.org/records/dfm-mimir-v1/training", "type": "TrainingProvenanceRecord", "identifier": "https://huggingface.co/danish-foundation-models/DFM-Mimir", "name": "DFM Mímir v1", "creator": [{ "type": "schema:Organization", "name": "Danish Foundation Models", "role": "originator" }], "created": "2026-10-13T00:00:00Z", "disclosure": "partial", "trainingData": [ { "dataset": "https://sourcelume.apache.org/records/dfm-mimir-v1/laerebogen", "phase": "pretraining", "tokens": 8320000000, "share": 0.1181 } ] }identifier,name,version,creator).trainingData[].datasetis an IRI, normally theidof aProvenanceRecord.phase,tokensandshareare optional.disclosureiscomplete,partialorundisclosed.trainingDatamay only be left out forundisclosed.Why a separate record rather than a field on the dataset record: the claim is the model producer's, not the dataset producer's, and a back-reference would let third parties write into someone else's record.
Example
examples/dfm-mimir-v1-training.jsonldrefers to 12 DFM Mímir v1 dataset records (first commit, taken over from the unmergedstress-testsbranch with the canonical@context). It ispartial: the technical report lists 161 datasets and only these 12 have a record, about 43 percent of the sampled tokens. It is illustrative, authored from the public report, not attested by the producer.Commits
Each commit passes
tools/validate.py, the unit tests andmvn verify.Checks
tools/validate.py: 14 examples pass; it now picks the schema bytype.RDFParser+ShaclValidator.get().validate(shapes, graph); easy to re-run againstschema/0.0.1/sourcelume.shacl.ttlwith the context inlined.)shareisxsd:double: rdflib creates anxsd:decimalliteral with a float value for a JSON number, which pyshacl then rejects.Not in this PR
ProvenanceRecordand its schema are unchanged.ShaclRecordValidatoronly accepts graphs with asl:ProvenanceRecordnode and the JSON Schema plugin loads one schema, so ingesting the new type needs a follow-up there.Open questions
TrainingProvenanceRecord.disclosureworth having? It lets a producer state that the data is not disclosed.pretraining,fine-tuning,alignment,evaluation. Closed list or open?Apache-ai: Yes
Generated-by: pi (claude-sonnet-5-5)
Reviewed-by: anierbeck