April 3, 2026
4m 3s

A mature firmware release has signed images, version numbers that map to a commit, a bootloader that checks the signature, and a way back if the new image misbehaves. The vision model that runs on the same board can have far less. It can be just a file, copied into a directory, picked up at startup, and replaced when someone retrains it.
That file now decides what the product does. It decides whether a part on a production line passes inspection, and whether an object in a robot's path counts as an obstacle. It deserves the same release discipline as the firmware around it.
This article covers what that looks like in practice: signing and verifying weights at load time, giving every release a single identity, defining rollback triggers for a model that boots fine but behaves badly, and fixing the memory and latency budgets the model has to live inside.
The first reason is that some model files can execute code. Files saved with Python's pickle format carry this risk, and the Python documentation is blunt about it: "It is possible to construct malicious pickle data which will execute arbitrary code during unpickling."
The safetensors format was built as a safer alternative. Hugging Face describes it as "a new simple format for storing tensors safely (as opposed to pickle)." If your device, or the build server that prepares its images, ever loads a pickled model from an untrusted path, that load is a code execution path.
The second reason is behavior. A firmware change and a model change can both alter what a device does in the field. A firmware change usually goes through review. A model change can arrive with nothing more than new accuracy numbers from a training run.
The third reason is regulation. Under the EU Cyber Resilience Act, manufacturers of products with digital elements have had to report actively exploited vulnerabilities and severe incidents since September 11, 2026. The Commission's guidance says manufacturers must "submit an early warning within 24 hours of becoming aware, and a full notification within 72 hours."
The Act's main obligations apply from December 11, 2027, and its recitals say manufacturers "should identify and document components contained in the products with digital elements, including by drawing up an SBOM." If a model is shipped as an untracked file, you can't answer the first question in an incident: which devices are running it.
NIST makes the same point for AI developers. Its SP 800-218A profile recommends that they "protect all model weights and configuration parameter data from unauthorized access and modification," and that they "generate and provide cryptographic hashes or digital signatures for an AI model and its components, artifacts, and documentation."
Start with the format. Export production models to a format that holds tensors and metadata only, and treat any loader that can run code as a build-time tool that never ships to the device.
Next, sign what you ship. A model is often several files: weights, sometimes in shards, plus configuration and a tokenizer or label map. Signing one file and forgetting the rest leaves a gap.
The open-source model-transparency project, which the Sigstore community develops building on work with the Open Source Security Foundation, handles this by hashing every file into a manifest, which it describes as "a listing of hashes for every object in the model," and then signing the manifest. Verification recomputes the file hashes and compares them with the signed values. The project supports Sigstore signing and also plain keys, certificates, and PKCS #11 devices, which matters for products that verify offline.
On the device, verification belongs in the load path, before the runtime maps the weights:
manifest = read_manifest(model_dir)
if (!verify_signature(manifest, release_public_key)) refuse_load();
for each file in manifest:
if (sha256(file) != manifest.digest(file)) refuse_load();
if (manifest.firmware_version != running_firmware_version) refuse_load();
load_model(model_dir);
Keep the public key where the application can't overwrite it, in the same protected storage your bootloader trusts. If you already use MCUboot for firmware, the parallels are direct. MCUboot checks that "an image was signed with a private key that corresponds to the embedded KEYHASH TLV," and its documentation warns that the development signing key "should never be used for production." Apply both rules to model signing keys.
A model file on its own is not a complete release. The same weights can give different results with a different runtime version, a changed preprocessing step, or a reordered label map. Bind all of them into one release manifest: the model's file hashes, the inference runtime version, the preprocessing configuration, the label map, and the firmware version they were tested with. The device checks the whole set at load, as in the last line of the code above, and refuses any combination that never shipped together.
The same manifest feeds your SBOM. SPDX 3.0.1 includes an AI profile, and its AIPackage class describes "an AI application or trained AI model," with fields such as typeOfModel, informationAboutTraining, hyperparameter, metric, and limitation.
CycloneDX covers similar ground with its ML-BOM, which represents "datasets, models, and configurations for AI and machine learning systems." Pick whichever your toolchain already produces. What matters is that the model appears in the SBOM as its own component, with a version and a hash.
Versioning also has a security side. The Uptane threat model for vehicle updates describes a rollback attack as one that "tricks an ECU into installing outdated software with known vulnerabilities." Models need the same protection. Give each model release a monotonically increasing version, and have the device refuse anything below a minimum allowed version. Raise that minimum when you retire a model because of a security or safety problem. Deliberate rollback to the previous approved release is still allowed. Rolling back to something you have withdrawn is not.
In MCUboot, rollback is triggered by a failed boot. Its test swap works this way: "If the device crashes immediately upon booting a new (bad) image, MCUboot will revert to the old (working) image at the next device reset." The new image has to "mark itself 'OK'" to make the swap permanent, and the documentation says this lets firmware "make test swaps permanent only after performing a self-test routine."
A bad model rarely crashes anything. It loads, runs, and returns plausible output that happens to be wrong more often. So the self-test needs model-specific checks, and the confirmation step should wait until they pass.
Four triggers cover most cases. The first is a load failure: a signature mismatch, a manifest mismatch, or a runtime that rejects the model. The second is a latency failure in which inference on the device exceeds its budget. The third is a golden-set failure. Ship a small set of stored inputs with known expected outputs inside the signed release, run them on the device after the update, and compare. The fourth is drift in output statistics during a probation period, measured against limits recorded in the release manifest. Examples include the rate of rejected parts or the distribution of confidence scores. The first three can run before the model goes live. The fourth needs time in service, so keep the previous model on the device until the probation period ends.
Write the thresholds into the release manifest, so the decision to roll back follows rules agreed before the update shipped.
Firmware teams already work to fixed RAM and timing budgets. Models need the same limits, enforced before release.
For memory, LiteRT for Microcontrollers, Google's runtime for running models on microcontrollers (developed in the tflite-micro repository), makes this explicit. It preallocates a single arena for "input, output, and intermediate arrays," and its documentation notes that the size required "may need to be determined by experimentation."
Its RecordingMicroInterpreter reports how much of the arena a model actually uses. Turn that into a release gate. Record each model's arena use in CI, compare it with the budget reserved in the firmware's memory map, and reject any model that exceeds it. On larger Linux-class devices the mechanism differs but the rule holds: measure peak memory for the model on the target, and reject anything over the budget.
For latency, measure worst-case inference time on the target hardware in its shipping configuration, and gate the release on that number. A development workstation tells you very little here. Repeat the measurement whenever the runtime, the compiler flags, or the model change. Any one of them can move the number.
Take your next model update and run it through the release checklist you already use for firmware, and note every step it can't pass. Signing, versioning, and the SBOM entry are the usual gaps. Fix those gaps first, then add the rollback triggers and budget gates. The goal is that a model update becomes something nobody has to treat as special.