Supply chains are inherently complex systems, where simple ‘optimisations’ may have significant downstream consequences, requiring a high level of assurance. A planner might reroute a shipment, switch supplier, adjust a production schedule, or release inventory—but each action can create knock-on effects several tiers away that may be hard for a human to accurately predict, or even reasonably be aware of. In biopharmaceutical supply chains, these consequences extend beyond cost and service levels to regulatory compliance, product quality, and product safety – ultimately resulting in an impact on patient health as well as that of the business.

Imagine a pandemic-scale surge in vaccine demand which coincides with labour shortages at a factory and constrained cold-chain capacity. Planners must decide which sites produce which medicines, how scarce inventory and freight are allocated, and which shipments are rerouted—without leaving one region short or displacing another critical product. A locally sensible choice can create failures several tiers downstream. Even in routine operations, the recent HASH/ARIA Safeguarded AI report on biopharmaceutical supply chains cites an estimated €4 billion in annual vaccine cold-chain waste in Europe and more than $35 billion in annual losses from temperature excursions across the global pharmaceutical industry.

That combination of interrelated decisions and high-consequence outcomes makes many supply chain applications ideal use cases for Safeguarded AI (SgAI). The report explains that safe AI decision-making requires three things: a world model capable of predicting an action’s consequences, an explicit specification of acceptable outcomes, and a verifier that can establish whether the resulting system satisfies that specification.

Why supply chains need Safeguarded AI

Supply chains are complex but structurally modelable.

Facilities, suppliers, transport lanes, inventories, production processes, inspections, and orders form a network of concurrent events and constrained resources. Uncertainty enters through demand, lead times, equipment failures, quality events, and disruptions. The system is difficult to reason about informally, yet its important entities and interactions can still be represented declaratively.

Many safety requirements are concrete.

Consider a temperature-sensitive vaccine shipment that is delayed while its container temperature trends towards its validated limit. The world model might track the batch’s location, temperature history, remaining shelf life, predicted weather, route-time distributions, destination demand, and available replacement stock.

The optimisation variables are the actions available to the controller: continue the journey, pause it in cold storage, select another route or transport mode, or reallocate replacement inventory. The objective might be to minimise expected waste, delay, cost, and stock-out risk. The safety specification is more categorical: never deliver a batch that has failed or still requires quality assessment; never choose an intervention that increases excursion risk; never divert stock from a higher-priority destination to a lower-priority one; and never violate approved handling or transport constraints.

This separation between what should be optimised and what must never happen (certified up to probability ε\varepsilon) is central to SgAI.

Rare, long-tail edge cases matter enormously.

Those specifications become most valuable when failures compound. A distribution plan that is safe under ordinary demand may become unsafe when a supplier failure, port closure, equipment outage, and demand spike occur together—as they might during the next pandemic-scale emergency. Historical testing can show that a policy usually performs well, but it cannot contain every consequential combination of events. SgAI instead asks whether a controller remains within its safety specification across the behaviours represented by the world model—including unlikely ones.

Modeling supply chains with Petri Nets

Petri nets are a natural candidate for building such models. Places can represent states or resources, transitions represent events or decisions, and tokens represent batches, orders, vehicles, or capacity. Coloured, timed, and stochastic extensions add product data, process durations, and uncertainty. The result is both executable and analysable: candidate policies can be simulated, while reachability, invariants, and related verification techniques identify forbidden states, deadlocks, or resource violations.

Stochastically and Dynamically Coloured Petri Nets (SDCPNs) go further by allowing token attributes to evolve as continuous stochastic processes. Semantically speaking, SDCPNs are equivalent to General Stochastic Hybrid Systems, which are expressive enough to enable the modeling of almost all cyber-physical systems (Everdij & Blom, 2010). For example, in a pharmaceutical supply chain context, SDCPNs enable us to model the moving of a cold-chain batch discretely between supplier, vehicle, warehouse, and quarantine states – while its temperature exposure, remaining shelf life, or degradation risk evolves continuously – providing a compositional model of both operational logic and physical uncertainty.

But supply chains are more than a convenient demonstration domain. They offer consequential decisions, explicit safety boundaries, rich uncertainty, and measurable outcomes—all within systems that can be formally modelled. This is a sweet spot for SgAI to demonstrate its value: enabling AI to search for better decisions while mathematical assurance determines which decisions are safe enough to act on.

As part of the SgAI programme, the open-source Petrinaut library for working with SDCPNs has been developed, and now powers this real-world supply chain modeling and optimisation capability in the HASH platform.


This post was written by Dei Vilkinsons from HASH, who lead TA1.3 of the Safeguarded AI programme. HASH’s work on the programme seeks to enable the accurate and complete modeling and specification of cyber-physical environments, and as part of TA2 they are leading efforts to apply the programme’s technology in a variety of real-world production contexts.