Counterfactual Pursuit with Graph Analytics

article's image
In our previous adventures, we stepped into the curious world of supply chains and payment risks through the eyes of TimberFlow Inc and unraveled hidden communities, detected events and their impact on the supply chain (Navigating Payment Behavior Using Graph Data Science). Then, we brought in Sherlock Holmes. With his trusted friend Watson, he traced a confounding tariff hike that disrupted the finely tuned orchestration of payments in the network (Climbing the Ladder of Causation with Sherlock Holmes).
Now, Holmes has turned his attention to the art of counterfactual reasoning: asking not what is, but what could have been.
The Mystery Deepens: A Dilemma at TimberFlow
TimberFlow Inc, based in the United States, relied on its leather supplier, LeatherLux Ltd., located in Europe. But when a 15% tariff was imposed on leather imports in EU, Holmes observed a cascade of delays:
  • Payments from TimberFlow Inc’s client CraftFurn Designs began slowing down.
  • CraftFurn Designs, a furniture maker dependent on LeatherLux Ltd.'s deliveries, began reporting missed delivery deadlines.
  • Distributers even saw delays from clients in unrelated industries (bags, shoes, wallets) showed similar stress patterns. A classic sign of a confounding variable was discovered: the EU leather tariff hike.

It was time to explore other paths.

Switching to AmericanLeather Co
Holmes adjusted his magnifying glass, eyes glinting at the network graph projected on the wall. “Watson,” he began, “we’ve accepted that the EU Leather Tariff Hike was the villain in our last case. But what if we rewrote the scene? What if CraftFurn Designs had never depended on LeatherLux Ltd. in the first place?”
Watson frowned. “You mean… change history?”
“Precisely. A counterfactual, my dear Watson,” Holmes replied. “We ask: If LeatherLux were replaced by another supplier, how would the chain behave?
In a projected graph, Holmes removed the edge between CraftFurn Designs and LeatherLux Ltd., and added a new one to AmericanLeather Co. This U.S.-based company, located in the same region as CraftFurn Designs, seemed ideal at first glance:
  • No EU tariffs
  • Shorter shipping distance
Using the GDS library, Holmes employed Dijkstra shortest path to compare the cost of doing business with the 2 leather suppliers, LeatherLux Ltd. and AmericanLeather Co.
“Note,” Holmes pointed out, “the absence of any tariff along this path. Logistics distance plus tariff impact is minimal. On paper, a far better choice than LeatherLux Ltd.
Watson’s brow furrowed. “So that’s our solution?”
Holmes shook his head. “Not so fast. There is only much fewer significant leather suppliers in the United States as compared to Europe. Let us examine Degree Centrality
“Observe, Watson: This node’s degree score is the highest among leather suppliers. It serves a vast number of clients. Its node degree in the graph had spiked dramatically, showing high out-degree into too many new clients. Our replacement supplier would soon be as overburdened causing even more delays”
Watson sighed. “Then what’s our middle ground?”
Enter MexicoLeather Co
Holmes tapped a few keys, filtering the graph. “MexicoLeather Co. They source hides locally, tan them domestically, and comply with USMCA rules of origin. So, there is no tariff impact and shipping distance is also moderate. Let’s re-run the Dijkstra shortest path algorithm to include MexicoLeather Co in the comparison”
Holmes continued, “As you see, the cost of relationship here is manageable. Also, there are reasonable number of leather suppliers in Mexico, even though they are lesser than the ones in Europe. Now, let's look at the number of clients they serve.”
“Note,” Holmes pointed out, “It’s not perfect. Shifting suppliers will cause short-term delays as contracts and logistics are adjusted. But in the long run, it reduces both tariff risk and overload risk.”
Watson leaned back. “So, by simulating what might have happened under different supplier choices, we’ve found the least disruptive counterfactual.”
Holmes smiled. “Indeed. Sometimes, the best path is not the shortest, but the one least likely to crumble under pressure.”
Disclaimer:
"This story features entirely fictitious companies and scenarios created solely for educational purposes to demonstrate concepts of causal and counterfactual inference in supply chain analysis. Any resemblance to real companies, events, or trade situations is purely coincidental. The trade policies, tariff impacts, and supplier relationships described are simplified examples designed to illustrate analytical techniques and should not be considered actual market analysis or business advice."