Clear Sky Science · en

Modelling global trade with optimal transport

· Back to index

Why this matters for everyday life

When you buy bread, vegetables, or a bottle of wine, you are seeing the end of a long and fragile journey across the globe. Wars, trade deals, and political tensions can quietly reshape these journeys, often in ways that prices on supermarket shelves only partly reveal. This paper introduces a new way to "see" the hidden ease or difficulty of trading food between countries, uncovering patterns of advantage and vulnerability that traditional economic tools tend to miss.

A fresh way to picture world trade

Economists have long relied on so‑called gravity models to explain trade: big economies trade more, nearby partners trade more, and barriers such as tariffs push trade down. These models depend on a list of chosen factors, like distance or trade agreements, and assume a specific mathematical form. That makes them clear to interpret, but it also means they can miss subtle forces such as shifting political relations, sudden distrust of a supplier, or unrecorded obstacles at borders. In contrast, the authors build on a mathematical idea called optimal transport, which simply asks: given who produces what and who wants what, what pattern of trade would minimise the overall “cost” of moving goods, broadly defined? Instead of deciding upfront what drives these costs, they let the data speak.

Figure 1
Figure 1.

Learning hidden trade barriers from data

To make this idea practical, the team trains a deep neural network to reverse‑engineer the hidden cost of shipping food between every pair of countries, year by year from 2000 to 2022. They use detailed data from the UN Food and Agriculture Organization on hundreds of food and farm products. For each year, the model is fed the observed trade flows and asked to infer a cost matrix so that, when plugged back into the optimal transport equations, it reproduces those flows as closely as possible. By repeating this process many times and allowing for the fact that importers and exporters report different numbers, the method not only estimates the most likely pattern of trade costs but also provides a natural measure of uncertainty around those estimates.

Revealing the impact of shocks and deals

Armed with these hidden cost maps, the authors revisit several recent upheavals in world food trade. After Russia invaded Ukraine and disrupted Black Sea shipping, global exports of Ukrainian wheat fell almost everywhere. But the inferred trade costs did not rise evenly: low‑income countries, especially in Africa, saw much larger increases in the difficulty of importing wheat than richer European nations, even when their drop in volume looked similar. The method likewise shows how tariffs on Australian barley and wine pushed China to reorganise its suppliers, and how American soya bean tariffs led China to lean more heavily on Brazil. In Southeast Asia and the Pacific, the model tracks how a web of trade agreements and China’s economic rise gradually lowered barriers for many suppliers, while leaving others largely unchanged.

Tracing the fallout from Brexit

The United Kingdom’s exit from the European Union provides another natural test. By comparing the UK with the neighbouring Republic of Ireland, which stayed in the EU, the authors find diverging paths. For vegetables such as lettuce and tomatoes, Irish import costs from major European suppliers tended to fall or stay stable, while the UK’s often rose as volumes shrank. At the same time, the UK turned more toward Morocco for fresh produce, with sharply lower inferred trade costs pointing to newly eased links. In wine, the pattern is even clearer: for all the main supplying countries the study considers, British import costs rise more than Ireland’s, even when both reduce the volume they buy.

Figure 2
Figure 2.

How this new lens compares with old ones

To check whether this freedom from pre‑chosen factors actually helps, the authors pit their approach against a standard gravity model built from distance, shared language, tariffs, and similar variables, estimated using modern statistical techniques. Across a range of food products, the optimal‑transport‑based method reproduces observed trade flows much more closely, especially for the largest and most economically important shipments, and does so with less variability. When they upgrade the gravity model with more complex fixed effects that soak up many unmeasured influences, its performance edges closer to that of the new approach—but at the cost of far more parameters and with less direct access to the underlying structure of trade costs.

What the study means in plain terms

In essence, this work offers a powerful new lens on the hidden frictions that shape who feeds whom in the global food system. Instead of guessing which political or economic forces matter most, the method infers an overall pattern of ease and difficulty directly from how trade actually flows, and tracks how that pattern shifts during wars, trade disputes, and major policy changes. The results show that shocks such as the war in Ukraine or new tariffs can hit poorer countries hardest, even when prices or volumes do not fully reveal the strain. Beyond food, the same toolkit could help map invisible barriers in other networks—from finance to migration—giving policymakers a clearer view of where the world is resilient and where it is dangerously exposed.

Citation: Gaskin, T., Demirel, G., Wolfram, MT. et al. Modelling global trade with optimal transport. Nat Commun 17, 2947 (2026). https://doi.org/10.1038/s41467-026-69694-5

Keywords: global trade, food security, optimal transport, trade costs, trade policy