in supply-chain planning has historically been handled as a time-series drawback.
- Every SKU is modeled independently.
- A rolling time window (say, final 14 days) is used to foretell tomorrow’s gross sales.
- Seasonality is captured, promotions are added, and forecasts are reconciled downstream.
And but, regardless of more and more refined fashions, the same old issues persist:
- Persistent over-and under-stocking
- Emergency manufacturing modifications
- Extra stock sitting within the unsuitable place
- Excessive forecast accuracy on paper, however poor planning outcomes in follow
The difficulty is that demand in a provide chain will not be unbiased. It’s networked. For instance, that is what simply 12 SKUs from a typical provide chain seem like whenever you map their shared crops, product teams, subgroups, and storage places.

So when demand shifts in a single nook of the community, the results are felt all through the community.
On this article, we step outdoors the model-first considering and have a look at the issue the way in which a provide chain really behaves — as a related operational system. Utilizing an actual FMCG dataset, we present why even a easy graph-based neural community(GNN) basically outperforms conventional approaches, and what which means for each enterprise leaders and information scientists.
An actual provide chain experiment
We examined this concept on an actual FMCG dataset (SupplyGraph) that mixes two views of the enterprise:
Static supply-chain relationships
The dataset has 40 lively SKUs, 9 crops, 21 product teams, 36 sub-groups and 13 storage places. On common, every SKU has ~41 edge connections, implying a densely related graph the place most SKUs are linked to many others via shared crops or product teams..
From a planning standpoint, this community encodes institutional information that always lives solely in planners’ heads:
“If this SKU spikes, these others will really feel it.”
Temporal operational indicators and gross sales outcomes
The dataset has temporal information for 221 days. For every SKU and every day, the dataset contains:
- Gross sales orders (the demand sign)
- Deliveries to distributors
- Manufacturing facility items points
- Manufacturing volumes
Right here is an outline of the 4 temporal indicators driving the provision chain mannequin:
| Function | Whole Quantity (Items) | Every day Avg | Sparsity (Zero-Exercise Days) | Max Single Day |
| Gross sales Order | 7,753,184 | 35,082 | 46.14% | 115,424 |
| Supply To Distributor | 7,653,465 | 34,631 | 35.79% | 66,470 |
| Manufacturing facility Challenge | 7,655,962 | 34,642 | 43.94% | 75,302 |
| Manufacturing | 7,660,572 | 34,663 | 61.96% | 74,082 |
As will be noticed, nearly half of the SKU-Day mixtures have zero gross sales. The implication being a small fraction of SKUs drives a lot of the quantity. It is a traditional “Intermittent Demand” drawback.
Additionally, manufacturing happens in rare, giant batches (lumpy manufacturing). Downstream supply is far smoother and extra frequent (low sparsity) implying the provision chain makes use of vital stock buffers.
To stabilize GNN studying and deal with excessive skew, all values are reworked utilizing log1p, a typical follow in intermittent demand forecasting.
Key Enterprise Metrics
What does a superb demand forecast seem like ? We consider the mannequin primarily based on two metrics; WAPE and Bias
WAPE — Weighted Absolute Share Error
WAPE measures how a lot of your complete demand quantity is being mis-allocated. As a substitute of asking “How unsuitable is the forecast on common throughout all SKUs?“, WAPE asks the query supply-chain planners really care about within the situation of intermittent demand: “Of all SKU items that have been moved via the provision chain to fulfill demand, what fraction was mis-forecast?“
This issues as a result of errors on high-volume SKUs price excess of errors on long-tail gadgets. A ten% miss on a prime vendor is costlier than a 50% miss on a sluggish mover. So WAPE weights the SKU-days by quantity bought, and aligns extra naturally with income impression, stock publicity, plant and logistics utilization (and will be additional weighted by worth/SKU if required).
That’s why WAPE is broadly most well-liked over MAPE for intermittent, high-skew demand.
[
text{WAPE} =
frac{sum_{s=1}^{S}sum_{t=1}^{T} left| text{Actual}_{s,t} – text{Forecast}_{s,t} right|}
{sum_{s=1}^{S}sum_{t=1}^{T} text{Actual}_{s,t}}
]
WAPE will be calculated at completely different ranges — product group, area or complete enterprise — and over completely different durations, comparable to weekly or month-to-month.
You will need to notice that right here, WAPE is computed on the hardest doable stage — per-SKU, per-day, on intermittent demand — not after aggregating volumes throughout merchandise or time. In FMCG planning follow, micro-level SKU-daily WAPE of 60–70% is commonly thought of acceptable for intermittent demand, whereas <60% is taken into account production-grade forecasting.
Forecast Bias — Directional Error
Bias measures whether or not your forecasts systematically push stock up or down. Whereas WAPE tells you how unsuitable the forecast is, Bias tells you how operationally costly it’s. It solutions a easy however crucial query: “Can we constantly over-forecast or under-forecast?”. As we are going to see within the subsequent part, it’s doable to have zero bias whereas being unsuitable more often than not. In follow, optimistic bias ends in extra stock, larger holding prices and write-offs whereas unfavorable bias results in stock-outs, misplaced gross sales and repair penalties. In follow, a bit of optimistic bias (2-5%) is taken into account production-safe.
[ text{Bias} = frac{1}{S} sum_{s=1}^{S} (text{Forecast}_s – text{Actual}_s) ]
Collectively, WAPE and Bias decide whether or not a mannequin isn’t just correct, its forecasts are operationally and financially usable.
The Baseline: Forecasting With out Construction
To determine a floor flooring, we begin with a naïve baseline, which is “tomorrow’s gross sales equal at this time’s gross sales”.
[ hat{y}_{t+1} = y_t ]
This method has:
- Zero bias
- No community consciousness
- No understanding of operational context
Regardless of its simplicity, it’s a robust benchmark, particularly over the brief time period. If a mannequin can not beat this baseline, it’s not studying something significant.
In our experiments, the naïve method produces a WAPE of 0.86, which means almost 86% of complete quantity is misallocated.
The bias of zero will not be a superb indicator on this case, since errors cancel out statistically whereas creating chaos operationally.
This results in:
- Firefighting
- Emergency manufacturing modifications
- Expediting prices
This aligns with what many practitioners expertise: Easy forecasts are steady — however unsuitable the place it issues.
Including the Community: Spatio-Temporal GraphSAGE
We use GraphSAGE, a graph neural community that permits every SKU to combination data from its neighbors.
Key traits:
- All relationships are handled uniformly.
- Data is shared throughout related SKUs.
- Temporal dynamics are captured utilizing a time sequence encoder.
This mannequin doesn’t but distinguish between crops, product teams, or storage places. It merely solutions the important thing query:
“What occurs when SKUs cease forecasting in isolation?”
Implementation
Whereas I’ll dive deeper into the info science behind the function engineering, coaching, and analysis of GraphSAGE in a subsequent article, listed here are a number of the key ideas to know:
- The graph with its nodes and edges varieties the static spatial options.
- The spatial encoder part of GraphSAGE, with its convolutional layers, generates spatial embeddings of the graph.
- The temporal encoder (LSTM) processes the sequence of spatial embeddings, capturing the evolution of the graph over the past 14 days (utilizing a sliding window method).
- Lastly, a regressor predicts the log1p-transformed gross sales for the following day.
An intuitive analogy
Think about you’re making an attempt to foretell the worth of your own home subsequent month. The value isn’t simply influenced by the historical past of your personal home — like its age, upkeep, or possession information. It’s additionally influenced by what’s occurring in your neighborhood.
For instance:
- The situation and costs of homes much like yours (comparable development high quality),
- How well-maintained different homes in your space are,
- The provision and high quality of shared providers like faculties, parks, or native legislation enforcement.
On this analogy:
- Your home’s historical past is just like the temporal options of a specific SKU (e.g., gross sales, manufacturing, supply historical past).
- Your neighborhood represents the graph construction (the perimeters connecting SKUs with shared attributes, like crops, product teams, and so forth.).
- The historical past of close by homes is just like the neighboring SKUs’ options — it’s how the habits of different comparable homes/SKUs influences yours.
The aim of coaching the GraphSAGE mannequin is for it to study the operate f that may be utilized to every SKU primarily based on its personal historic options (like gross sales, manufacturing, manufacturing facility points, and so forth.) and the historic habits of its related SKUs, as decided by the sting relationships (e.g., shared plant, product group, and so forth.). To depict it extra exactly:
embedding_i(t) =
f( own_features_i(t),
neighbors’ options(t),
relationships )
the place these options come from the SKU’s personal operational historical past and the historical past of its related neighbors.
The Outcome: A Structural Step-Change
The impression is kind of exceptional:
| Mannequin | WAPE |
| Naïve baseline | 0.86 |
| GraphSAGE | ~0.62 |
In sensible phrases:
- The naïve method misallocates almost 86% of complete demand quantity
- GraphSAGE reduces this error by ~27%
The next chart reveals the precise vs predicted gross sales on the log1p scale. The diagonal crimson line depicts good forecast, the place predicted = precise. As will be seen, a lot of the excessive quantity SKUs are clustered across the diagonal which depicts good accuracy.

From a enterprise perspective, this interprets into:
- Fewer emergency manufacturing modifications
- Higher plant-level stability
- Much less guide firefighting
- Extra predictable stock positioning
Importantly, this enchancment comes with none further enterprise guidelines — solely by permitting data to stream throughout the community.
And the bias comparability is as follows:
| Mannequin | Imply Forecast | Bias (Items) | Bias % |
| GraphSAGE | ~733 | +31 | ~4.5% |
| Naïve | ~701 | 0 | 0% |
At underneath 5%, the delicate forecasting bias GraphSAGE introduces is properly inside production-grade limits. The next chart depicts the error within the predictions.

It may be noticed that:
- Error is negligible for a lot of the forecasts. Recall from the temporal evaluation that sparsity in gross sales is 46%. This reveals that the mannequin has realized this, and is accurately predicting “Zero” (or very near it) for these SKU-days, creating the height on the middle.
- The form of the bell curve is tall and slim, which signifies excessive precision. Most errors are tiny and clustered round zero.
- There may be little skew of the bell curve from the middle line, confirming the low bias of 4.5% we calculated.
In follow, many organizations already bias forecasts intentionally to guard service ranges, reasonably than threat stock-outs.
Let’s have a look at the impression on the SKU stage. The next chart reveals the forecasts for the highest 4 SKUs by quantity, denoted by crimson dotted strains, in opposition to the actuals.

A couple of observations:
- The forecast is reactive in nature. As marked in inexperienced circles within the first chart, the forecast follows the precise on the way in which up, and likewise down with out anticipating the following peak properly. It is because GraphSAGE considers all relations to be homogeneous (equally essential), which isn’t true in actuality.
- The mannequin under-predicts excessive spikes and compresses the higher tail aggressively. GraphSAGE prefers stability and smoothing.
Here’s a chart displaying the efficiency throughout SKUs with non-zero volumes. Two threshold strains are marked at WAPE of 60% and 75%. 3 of the 4 highest quantity SKUs have a WAPE < 60% with the fourth one simply above. From a planning perspective, it is a sturdy and balanced forecast.

Takeaway
Graph neural networks do greater than enhance forecasts — they modify how demand is known. Whereas not good, GraphSAGE demonstrates that construction issues greater than mannequin complexity.
As a substitute of treating every SKU as an unbiased drawback, it permits planners to cause over the provision chain as a related system.
In manufacturing, that shift — from remoted accuracy to network-aware decision-making — is the place forecasting begins to create actual financial worth.
What’s subsequent? From Connections to Which means
GraphSAGE confirmed us one thing highly effective: SKUs don’t dwell in isolation — they dwell in networks.
However in our present mannequin, each relationship is handled as equal.
In actuality, that isn’t how provide chains work.
A shared plant creates very completely different dynamics than a shared product group. A shared warehouse issues in a different way from a shared model household. Some relationships propagate demand shocks. Others dampen them.
GraphSAGE can see that SKUs are related — nevertheless it can not study how or why they’re related.
That’s the place Heterogeneous Graph Transformers (HGT) are available in.
HGT permits the mannequin to study completely different behaviors for various kinds of relationships — letting it weigh, for instance, whether or not plant capability, product substitution, or logistics constraints ought to matter extra for a given forecast.
Within the subsequent article, I’ll present how shifting from “all edges are equal” to relationship-aware studying unlocks the following stage of forecasting accuracy — and improves the standard of forecast by including which means to the community.
That’s the place graph-based demand forecasting turns into actually operational.
Join with me and share your feedback at www.linkedin.com/in/partha-sarkar-lets-talk-AI
Reference
SupplyGraph: A Benchmark Dataset for Provide Chain Planning utilizing Graph Neural Networks : Authors: Azmine Toushik Wasi, MD Shafikul Islam, Adipto Raihan Akib
Pictures used on this article are synthetically generated. Charts and underlying code created by me.





