ML Model Extension Specification
June 26, 2025 ยท View on GitHub
Warning
This is legacy documentation reference of ML-Model preceding the current Machine Learning Model (MLM) extension.
Notable Differences
-
The MLM extension covers more details at both the Item and Asset levels, making it easier to describe and use model metadata.
-
The MLM extension covers runtime requirements using distinct Asset Roles (Model, Container and Source Code) which allows for more flexibility in describing how and which operations are performed by a given model. This is in contrast to the ML-Model extension that records similar information in
ml-model:inference-runtimeorml-model:training-runtimeall at once, which leads to runtime ambiguities and limited reusability. -
The MLM extension provides additional fields to better describe the model properties, such as the Model Inputs to describe the input features, bands, data transforms, or any other relevant data sources and preparation steps required by the model, the Model Outputs to describe the output predictions, regression values, classes or other relevant information about what the model produces, and the Model Hyperparameters to better describe training configuration that lead to the model definition. All of these fields are undefined in the ML-Model extension.
-
The MLM extension has a corresponding Python library
stac-model, which can be used to create and validate MLM metadata using pydantic. An example of the library in action is provided in examples. The extension also provides pystac MLM for easier integration with the STAC ecosystem. The MLM Form Filler is also available to help users create valid MLM metadata in a no-code fashion. In contrast, ML-Model extension does not provide any support for Python integration and requires the JSON to be written manually.
Migration Tables
Following are the corresponding fields between the legacy ML-Model and the current MLM extension, which can be used to completely migrate to the newer Machine Leaning Model extension providing enhanced features and interconnectivity with other STAC extensions (see also Best Practices).
Important
Only the limited set of ml-model fields are listed below for migration guidelines.
See the full MLM Specification for all additional fields provided to further describe models.
Item Properties
| ML-Model Field | MLM Field | Migration Details |
|---|---|---|
ml-model:type ( "ml-model" constant) | n/a | Including the MLM URI in stac_extensions is sufficient to indicate that the Item is a model. |
ml-model:learning_approach | n/a | No direct mapping. Machine Learning training approaches can be very convoluted to describe. Instead, it is recommended to employ derived_from collection and other STAC Extension references to describe explicitly how the model was obtained. See Best Practices for more details. |
ml-model:prediction_type ( string) | mlm:tasks ( [string]) | ML-Model limited to a single task. MLM allows multiple. Use ["<original-mlm-task>"] to migrate directly. |
ml-model:architecture | mlm:architecture | Direct mapping. |
ml-model:training-processor-type ml-model:training-os | mlm:framework mlm:framework_version mlm:accelerator mlm:accelerator_constrained mlm:accelerator_summary mlm:accelerator_count | More fields are provided to describe the subtleties of compute hardware and ML frameworks that can be intricated between them. If compute hardware imposes OS dependencies, they are typically reflected through the framework version and/or the specific accelerator. Further subtleties are permitted with complex accelerator values. |
Asset Objects
Roles
All ML-Model Asset Roles are available with a prefix change with the same sematic meaning.
Further roles are also proposed in MLM Asset Roles.
| ML-Model Field | MLM Field | Migration Details |
|---|---|---|
ml-model:inference-runtime | mlm:inference-runtime | Prefix change. |
ml-model:training-runtime | mlm:training-runtime | Prefix change. |
ml-model:checkpoint | mlm:checkpoint | Prefix change. Recommended addition of further mlm properties for Model Asset to describe the artifact. |
Tip
In the context of ML-Model, Assets providing Inference/Training Runtimes are strictly provided as Docker Compose definitions. While this is still permitted, the MLM extension offers alternatives using any relevant definition for the model, as long as it is properly identified by its applicable media-type. Additional recommendations and Asset property fields are provided under MLM Assets Objects for specific cases.
Relation Types
| ML-Model Field | MLM Field | Migration Details |
|---|---|---|
ml-model:inferencing-image | n/a | Deemed redundant with mlm:inference-runtime Asset Role. |
ml-model:training-image | n/a | Deemed redundant with mlm:training-runtime Asset Role. |
ml-model:train-data ml-model:test-data | derived_from | Use one or more derived_from links (as many as needed with regard to data involved during the model creation. Linked data should employ ml-aoi as appropriate (see ML-AOI Best Practices). |