Model lineage

Also known as: ML lineage

On this page 7

Model lineage is the recorded chain of origins behind a machine learning model: the exact datasets, feature definitions, code commits, hyperparameters, environments and training runs that produced it, plus every evaluation, promotion and deployment that followed. In MLOps & deployment, lineage answers the question that auditors, engineers and incident responders all ask sooner or later: where did this model come from, and what depends on it?

Lineage is sometimes called ML lineage. It differs from simple version numbering because it stores relationships between artifacts, not just labels, so a team can walk the graph backward from a live prediction service to the raw data snapshot, or forward from a corrupted dataset to every model that consumed it.

How model lineage is captured

Model lineage is captured by recording metadata events at each pipeline step and linking them into a directed acyclic graph. Each node is an artifact or an execution, such as a dataset version, a feature pipeline run, a training job or a model artifact, and each edge records that one node was an input to or an output of another.

Most platforms store this graph in an ML metadata store. Orchestrators such as Kubeflow Pipelines, TFX and Vertex AI emit lineage events automatically when steps declare their inputs and outputs, while tools such as DVC derive lineage from content hashes of data files tied to Git commits. The quality of lineage depends almost entirely on whether capture is automatic; manually written notes drift out of date within weeks.

The following table lists the artifacts that a complete lineage record links together and why each one matters.

ElementWhat is recordedWhy it matters
Training dataDataset version, hash, query or snapshot timeReproduces the exact examples seen
Feature definitionsFeature pipeline version and transformation codeDetects training-serving skew
Source codeGit commit, branch, dependency lockfileRebuilds the training logic
EnvironmentContainer image digest, library and driver versionsExplains numeric differences
HyperparametersConfiguration values and random seedsSeparates tuning from data effects
Evaluation resultsMetrics, test sets, fairness checksJustifies promotion decisions
Deployment eventsRegistry stage, endpoint, approver, timestampLinks predictions to a model
Core elements of a model lineage record

Lineage granularity and directions

Lineage can be recorded at different levels of granularity, and the right level depends on regulatory exposure and debugging needs. Coarse lineage links a model to a dataset name, while fine lineage links it to an immutable snapshot identifier and even to individual feature columns.

LevelTypical recordSuitable for
Run levelModel linked to one training run and its inputsMost internal teams
Artifact levelHashes of every input and output fileReproducible research and audits
Column levelEach feature traced to source table columnsPrivacy and data deletion requests
Record levelIndividual training examples identifiedData attribution and strict regulation
Levels of lineage granularity

Teams query lineage in two directions. Backward lineage traces a model to its causes and is used for debugging and audits. Forward lineage, also called impact analysis, finds every downstream model, endpoint and report affected when an upstream dataset proves faulty.

Model lineage overlaps with several neighboring practices, and confusing them leads to gaps in traceability. The table below separates the concepts by the question each one answers.

PracticeMain question answeredRelationship to lineage
Model versioningWhich version is this model?Provides node identifiers for the graph
Data versioningWhich snapshot of data existed then?Supplies immutable data references
Model registryWhich model is approved for which stage?Records promotion edges
ML reproducibilityCan the same model be rebuilt?Depends on complete lineage
Data lineageWhere did this table come from?Upstream part of the same graph
Lineage and neighboring MLOps practices

In practice, lineage is the connective layer that turns isolated version numbers into a navigable history. A registry without lineage shows that version 14 is in production but cannot say which data produced it.

Why organizations invest in lineage

Organizations invest in model lineage mainly for governance, debugging and safe change. Regulations and frameworks such as the EU AI Act, the NIST AI Risk Management Framework and banking model risk guidance such as SR 11-7 expect documented data provenance and change control for high-impact models.

  • Incident response: when prediction drift appears, lineage shows whether the data, code or environment changed.
  • Model rollback: the registry can restore a prior version together with its matching feature pipeline.
  • Data deletion: column-level lineage identifies models trained on records that must be removed.
  • Audit readiness: reviewers receive a generated trail instead of reconstructed spreadsheets.

The return grows with scale. A team with two models can remember their history, but an organization running hundreds of models with continuous training cannot operate safely without machine-readable lineage.

Limitations and common mistakes

Lineage is only as trustworthy as its weakest capture point. The most frequent failures come from mutable references and steps that run outside the instrumented pipeline.

MistakeConsequenceFix
Pointing to mutable tablesData changes after trainingRecord snapshot IDs or hashes
Notebook-only trainingNo runs recorded at allPromote only pipeline-built models
Missing environment dataResults differ on rebuildStore container image digests
Manual registry uploadsBroken edges in the graphBlock uploads without run IDs
Unbounded metadata growthSlow queries and high storage costApply retention by stage
Common lineage failures and fixes

Lineage also does not guarantee bit-for-bit reproducibility. Nondeterministic GPU kernels and parallel data loading can still yield slightly different weights, so lineage should be paired with fixed seeds and deterministic settings where exact rebuilds are required.

In simple terms

Model lineage is a family tree for an AI model. It shows what data the model learned from. It shows which code trained it and who approved it.

Think of a food label that lists every ingredient and the factory it came from. If one ingredient is spoiled, you can find every product that used it. Lineage does the same for models. When something goes wrong, it shows where to look.

A practical example

A mid-sized insurer runs about 40 pricing and fraud models that retrain weekly. One Monday, the fraud model starts flagging twice as many claims as usual. The on-call engineer opens the lineage graph for the live endpoint and walks backward: the model version, its training run, the feature pipeline run and the claims dataset snapshot.

The graph shows that the feature pipeline version changed on Friday, when a developer altered how claim amounts were converted between currencies. Forward lineage from that pipeline run reveals that three other models consumed the same faulty features. The team rolls all four models back to their previous registry versions within an hour, fixes the conversion, and retrains. The audit trail generated from lineage later satisfies the internal model risk review without any manual reconstruction.