Three plants test positive in the same week. Which supplier sent the bad batch?

A food maker gets three positive tests in one week, at three different plants. Somewhere upstream, one supplier or one production step sent out a bad lot. Each extra day of searching means more product shipped and a bigger recall. Two questions matter: where should the few inspection points sit so a problem shows up early, and which stage started it once the first results come in?

This is post #4 in a series on award-winning operations research theses, applied outside the setting the authors studied. This thesis is about rumors on social networks; I use it to trace a bad batch. Below, the thesis first, then my experiment on a real supply chain, then what would change the conclusion.

The two-and-a-half-minute version, narrated by Renan with an AI voice clone of his own voice.
Read the video transcript

Three of your plants test positive in the same week. Which supplier sent the bad batch? Every day you spend searching, more product ships, and the recall gets bigger.

This is post four in my series: award-winning operations research theses, applied to small businesses. Tao Wen's thesis, from the University of Manchester, was a finalist for the 2026 EURO Doctoral Dissertation Award. I use a chapter he wrote with Yu-wang Chen, Jie Zhao, Changchun Pan, Tahir Abbas Syed, Kang Hao Cheong and Yong-Yeol Ahn.

It traces a rumor on social media back to whoever started it. First, it picks a few accounts to watch. Then it compares when each one heard the rumor, and from whom, to work out where it began.

A bad batch moves through a supply chain the way a rumor moves through a network. My own application: a real breakfast-cereal supply chain, eighty-eight steps from ingredients to distribution. I simulated four hundred bad batches, with nine inspection points.

First, where to inspect. With the nine points placed at random, about one bad batch in three never reached one. With the thesis's placement, none slipped through. But a simple rule, inspect the plants with the most suppliers, picked the same nine spots.

Then, naming the source from the first three positive tests. The thesis's method named the right step thirty-nine percent of the time. Reading the shipping record of the first positive, who sent us this lot, named it eighty-two percent of the time.

Across twenty-eight real supply chains, the shipping record won in twenty-seven, and never lost.

Why? Here, the first plant to test positive usually got the batch straight from the source. The thesis's method reasons from differences in timing, and those cancel out when two plants name the same supplier.

The catch: this chain is shallow, and goods only flow one way. In deeper chains, or when contamination can travel back upstream, the thesis's method could do better. The batches were simulated, and I adapted the method myself. This is my own application, not the author's.

To try it, put your few inspection points at the plants with the most suppliers. Keep lot codes that say who shipped each lot. And start the search from the sender of the first positive.

The full write-up and the code are on bisdecisions.com. Thanks to Tao Wen and his coauthors for the research behind it.

What the thesis did

Tao Wen's PhD thesis, Data-Driven Modeling and Analytics for Information Propagation and Decision-making in Social Networks (University of Manchester, 2025), was a finalist for the 2026 EURO Doctoral Dissertation Award.12 Yu-wang Chen and Tahir Abbas Syed supervised it. Its chapters cover belief formation, information flow in an organization, influential users, group belief dynamics and, in Chapter 6, finding where a spread started.

I sent this draft to Tao Wen a week before publication and invited his corrections. I had not heard back when it went live; any correction that arrives later will be added here with a note.

In plain words, the part I used does two things. Before anything happens, it picks a few places to watch, spread so that every point of the network has a watcher close by. Afterwards, it compares when each watcher noticed the problem, and from whom it came, to work out where it started.

The method, for readers who work with networks

Chapter 6 is the one I use. It is joint work with Yu-wang Chen, Jie Zhao, Changchun Pan, Tahir Abbas Syed, Kang Hao Cheong and Yong-Yeol Ahn. The thesis lists it as under review, so I describe it from the thesis only. The method, EAGLE, has two parts. First, it places a small number of observers before anything happens, using a moth-flame optimizer.4 The goal is that every user has at least one observer next to them, without piling observers on a few. Second, once a few observers report when they received the information and from whom, it scores every candidate source. It compares differences in report times with differences in network distance, pair by pair and in groups. Then it fuses those scores with evidential reasoning, the generalized Bayesian rule of Yang and Xu.3 On Twitter data with real spreading paths, in networks of 66,474 and 92,139 users and with 20 to 120 observers reporting, the thesis reports an F-score of 0.1 to 0.4. The other methods it compared scored 0 in almost every scenario. The food-recall application below is mine, not the author's.

EAGLE (thesis Ch. 6), as applied here · top: once, in advance · bottom: when positives arriveSupply-chain mapwho ships to whomPlace inspection pointsmoth-flame optimizerGoal: every stagewatched by ≥ 1 pointFirst k positiveswhere · when · from whomScore candidatestime gaps vs distance gapspairs and groupsEvidential reasoningfuse, weight by credibilityRankedsourcesthe points that reportSupply-chain changes (mine): flow is one-way, and a point watches the stages that ship to it
EAGLE in one picture, as I implemented it from Chapter 6. Placement happens once, in advance. Inference runs when the first positive inspections come in.

The supply chain

Sean Willems published 38 real supply chains that companies had modeled for inventory planning, with the data disguised.5 I used a public copy of the data, because the journal's own download sits behind a bot check. I checked the copy against the paper: all 38 chains match its Table 1 by company and industry code, and the sizes match its stated ranges (8 to 2,025 stages, 10 to 16,225 links). Chain 12 is a breakfast-cereal maker with 88 stages: 23 ingredient and packaging parts, 9 manufacturing steps, 5 transport legs and 51 distribution points.

I made three changes to fit the setting. A bad lot moves only downstream, so distances follow the arrows. An inspection point tests what it receives, so it watches the stages that ship to it. And it records when a lot tested positive and which stage shipped it, which is what lot codes give you. Each link passes a bad lot on with its own probability, between 10% and 90%, once per shipping cycle. Before looking at results I fixed the headline setting: 9 inspection points (10% of stages), with the source inferred from the first 3 positives, over 400 simulated incidents.

Willems (2008) chain 12 · breakfast cereal · 88 stages, 107 links · flow left to rightIngredients, partsPlants · transportTransportPlantsDistributioninspection point chosen by EAGLE (9 = 10% of stages) · red parts, blue plants, orange transport, grey DCs
The cereal chain (Willems 2008, chain 12), drawn by layer, with EAGLE's nine inspection points circled. They landed on the nine manufacturing steps, the same stages you get by picking the stages with the most suppliers.

What happened

The first number to watch is the share of bad lots that never reach an inspection point: lower is better. Placement worked. With nine inspection points at random, 31.5% of simulated bad lots never reached one. With EAGLE's placement, none slipped through, and the first positive came 1.52 shipping cycles after the problem started, on average. But EAGLE's optimizer picked exactly the stages that “inspect the plants with the most suppliers” picks, so on this chain the optimization added nothing over that rule. Across 35 chains the picture was mixed. EAGLE left fewer lots undetected than the most-suppliers rule in 19 chains and more in 5. A plain greedy rule, which adds one inspection point at a time where it watches the most new stages, did better than EAGLE in 18 chains and worse in 9.

Nine inspection points on the cereal chain · 400 simulated bad lotsNever detectedCycles to first positiveRandom31.5%2.92Most suppliers0.0%1.52Greedy coverage0.0%1.61EAGLE moth-flame0.0%1.52Delay axis 0 to 3 cycles. EAGLE chose the same nine stages as the most-suppliers rule.
Where to put nine inspection points on the cereal chain: share of 400 simulated bad lots never detected, and mean shipping cycles to the first positive test.

The second is how often a method names the right source, alone: higher is better. Inference did not work here. From the first three positives, EAGLE named the right stage, alone, in 38.7% of incidents. Reading the lot record of the earliest positive test (“who shipped this?”) named it in 82.4%. EAGLE's average miss was 1.32 links away, against 0.18. Across 28 chains with enough incidents, the trace-back beat EAGLE on exact hits in 27.

Naming the source from the first 3 positives · lot records available · 142 incidentsExact (single answer, correct)F-score · miss (links)Earliest sender82.4%F 0.82 · 0.18Common upstream82.4%F 0.82 · 0.18EAGLE38.7%F 0.48 · 1.32Random candidate9.9%F 0.10 · 2.37Earliest sender: the stage that shipped the first positive lot. Common upstream: closest stage feeding all flagged senders.
Naming the source from the first three positive inspections, cereal chain, 142 incidents. Exact means a single answer, and it is right. F-score and error distance are the thesis's own metrics.

I think I can see why. EAGLE reads differences: how much later one observer heard than another, compared with how much farther each one's sender is from a candidate. In this chain the first positive inspection usually received the lot straight from the source. When two plants both report “from Part_0006”, the distance differences are zero for every candidate, and the evidence cancels. The lot record already says the answer. The thesis's setting is different: observers sit several hops from a source, in a network where information travels both ways.

Illustration · one bad lot, two positive plantsPart_0006the sourcePlant 1 · positive at cycle 1lot record: shipped by Part_0006Plant 2 · positive at cycle 2lot record: shipped by Part_0006EAGLE: distance(candidate, Part_0006) − distance(candidate, Part_0006) = 0 for every candidateso the time gap carries no ranking signal. Trace-back: the record names Part_0006 directly.
Why the timing evidence cancels here. Both positive plants name the same sender, so every candidate is the same distance from both senders. The trace-back simply reads the name.

Where it held its own

I also ran a case the thesis's design points to: inspections that know when a lot tested positive but not who shipped it. That is a business without lot-level records. On the cereal chain, EAGLE's F-score was 0.44, against 0.39 for a common-supplier search and 0.20 for flagging every supplier of the first positive plant. Across chains it beat the supplier-list approach in 25 of 28, but beat the common-supplier search in only 3.

Median F-score across 28 real supply chains · first 3 positives · 10% inspection pointsWith lot records (who shipped it)Without lot records (only when)Common upstream0.99Earliest sender0.96EAGLE0.50Random candidate0.02Common upstream0.27EAGLE0.24All suppliers of first site0.15F-score 1 = a single correct answer every time; 0 = never correct.
Median F-score across 28 real supply chains, first three positives, 10% inspection points. With lot records, simple trace-backs win. Without them, all methods struggle and EAGLE sits mid-pack.

If you want to try it

  • In this experiment, the inspection placement mattered more than the inference. Random placement missed almost a third of bad lots on the cereal chain. The other three placement rules, which put all or nearly all of the points at the plants, caught them all.
  • If your lots carry codes that say who shipped them, start the search from the sender of the earliest positive. On these chains that beat the thesis's inference by a wide margin.
  • If you have no lot records, the first positives alone narrow things only loosely. Here even the best method named the source exactly in under 5% of cases on the cereal chain. I would invest in lot codes before an inference model.

What would change this conclusion

  • Deeper chains. The cereal chain is four links deep. If the first positive is many hops below the source, the sender's name points only to the middle of the path. Timing differences across several observers, which is EAGLE's strength, could then matter more.
  • Contamination that moves both ways. Shared equipment, returns or cleaning crews can carry a problem back upstream. That looks more like the undirected networks the thesis studied.
  • Unreliable lot records. If senders are wrong a fraction of the time, the trace-back degrades. EAGLE weighs evidence from many observers, which may make it more robust to a few faulty reports. I did not test noisy records.
  • Different spreading behavior. I used one model with random pass-on rates. Real lots split, merge and get held, and the thesis also tested a second model I did not run.

Caveats

The chains are real but disguised. My data is a public copy that matches the paper's Table 1 and size ranges but is not the journal's own file. Contamination is simulated. I implemented EAGLE from the thesis text, adapting it to one-way flow. The repository lists every place I filled a detail the thesis leaves open: the optimizer's population and iterations, the clustering threshold φ, the propagation rates and how I normalize belief masses. A different reading could change the numbers. The thesis tests far larger networks than these chains, so this is a narrow test of a broad method. The code and results are public.7

Drafted with AI assistance (Claude). The experiment ran on my machine, and every number above is in the repository.