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.
| Element | What is recorded | Why it matters |
|---|---|---|
| Training data | Dataset version, hash, query or snapshot time | Reproduces the exact examples seen |
| Feature definitions | Feature pipeline version and transformation code | Detects training-serving skew |
| Source code | Git commit, branch, dependency lockfile | Rebuilds the training logic |
| Environment | Container image digest, library and driver versions | Explains numeric differences |
| Hyperparameters | Configuration values and random seeds | Separates tuning from data effects |
| Evaluation results | Metrics, test sets, fairness checks | Justifies promotion decisions |
| Deployment events | Registry stage, endpoint, approver, timestamp | Links predictions to a model |
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.
| Level | Typical record | Suitable for |
|---|---|---|
| Run level | Model linked to one training run and its inputs | Most internal teams |
| Artifact level | Hashes of every input and output file | Reproducible research and audits |
| Column level | Each feature traced to source table columns | Privacy and data deletion requests |
| Record level | Individual training examples identified | Data attribution and strict regulation |
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 compared with related practices
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.
| Practice | Main question answered | Relationship to lineage |
|---|---|---|
| Model versioning | Which version is this model? | Provides node identifiers for the graph |
| Data versioning | Which snapshot of data existed then? | Supplies immutable data references |
| Model registry | Which model is approved for which stage? | Records promotion edges |
| ML reproducibility | Can the same model be rebuilt? | Depends on complete lineage |
| Data lineage | Where did this table come from? | Upstream part of the same graph |
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.
| Mistake | Consequence | Fix |
|---|---|---|
| Pointing to mutable tables | Data changes after training | Record snapshot IDs or hashes |
| Notebook-only training | No runs recorded at all | Promote only pipeline-built models |
| Missing environment data | Results differ on rebuild | Store container image digests |
| Manual registry uploads | Broken edges in the graph | Block uploads without run IDs |
| Unbounded metadata growth | Slow queries and high storage cost | Apply retention by stage |
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.