1、2023 DataFunSummitCausal Analysis with Application to Inventory Control Erli Wang(王尔立)NEC Labs,ChinaApr 22,2023目录Inventory control description Background:time series,causalityCausality helps demand forecastCausality helps replenishment strategyC Contentsontents01 01 Inventory control description Inv
2、entory control description Causality helps inventory control Goal:a good balance between maximizing the amount of high-valued customer demands that can be fulfilled and minimizing storage,delivery,and waste costs.Historical tradingCalendarActivityCustomerInventory control processInventory:good 2T1In
3、ventory good 1ObservationDemand forecast Optimal orderT2Demand forecast Causality helps inventory control As-Is:According to our investigation,many giant companies still,The demand forecasting are based on past experience,rather than data-driven,making difficult to improve further.The inventory poli
4、cy are simply(s,S)strategy without considering realistic uncertainties,such as erroneously stocks.Causal analysis helps to understand why a business process happens in an explanatory manner.TimeBrowseExposurePriceOrder4/19/20234513241784/18/20231103191564/17/20237802882054/16/20235613052384/15/20233
5、70296199Historical observationsWhich one should be trusted?tt-1t-2OrderPriceExposureBrowset-3Auto-determine the relation=.=.+.=+.=.+.=.+.=+.().()Forecast relationVisualize key factorsApproach to the best decision Key to inventory control is to map each state to action(s),satisfying Roadmap:Approach-
6、1:improve demand forecast D;One of the biggest challenges is forecasting demand accurately.We deliver explainable forecast,and multi-target intervention as a web-based service.Approach-2:efficient manage inventory across different environments B;Relearn the policy for each environment are costly.We
7、combine causal discovery with recent advance in RL to deliver high-quality ordering strategies.Demand forecast DDomain adaption BEstimate the goodness of decision for each stateOur solution:preview Target forecastFactor analysisSimulationPlan for decisionSearch for the optimal decisionSimulate the s
8、ubsequent changesSupport multiple objective comparisonRoot cause findingDetermine the key factors Decompose a target observation into multiple channelsDetermine the cause factors in a data-driven manner.Forecast multiple target in the future2 2BackgroundBackground:time series,:time series,causalityc
9、ausality Fundamentals for temporal causal modelFundamentals for temporal causal model AssumAssumptions for timeptions for time-series data series data Time series introduction Serial data:When information in a data set is dependent on other information in the data set.Time series data is unique in t
10、hat it has a natural time information.Therefore,time series analysis requires dataWeak stationary:the expectation function and covariance function do not change with time.assumes that there exists a predictable patterns in the past Autocorrelation:is the similarity between two or more observations w
11、ith a time lag between them.helps us identify useful pattern in the history dataCausal model and theoretical tools SCM(Structural causal model)is powerful,as it approximates the mechanism of data generation.Reference:Peters,J.and Janzing,D.and Scholkopf,B.Elements of Causal Inference-Foundations and
12、 Learning Algorithms.The MIT Press,2017.2.Intervene a new value1.The SCM start with3.Some quantity of interestCommon techniques Temporal representations:full graph,unit graph,and summary graph Multivariate time-series structural learning Constraint-based:relies on independence test,and conditional i
13、ndependence test with increasing conditioning sets.Example:PCMCI uai20,SVAR-FCI kdd18,PC+transfer entropy(e.g.,PCGCE uai22)Score-based:distinguish different graphs in different scores(e.g.,BIC)Example:DYNOTEARS AISTATS20 A restricted model class:Determining the causal model by assuming a specific mo
14、del class.Example:VAR 80s,VAR-LiNGAM JMLR10,NBCB ECML-PKDD21 Granger causality:quantifies the extent to which the past of one time series aids in predicting the future.Example:NGC TPAMI223.Causality helps demand forecast3.Causality helps demand forecast Main Main technical challenges technical chall
15、enges Key Key algorithm description algorithm description Case Case study:demand forecasting study:demand forecasting Functions:Functions:structural learning,key drivers,and structural learning,key drivers,and forecastforecast Our Our causal analysis platformcausal analysis platformApproach to the b
16、est decision Key to inventory control is to map each state to action(s),satisfying Roadmap:Approach-1:improve demand forecast D;One of the biggest challenges is forecasting demand accurately.We deliver explainable forecast,and multi-target intervention as a web-based service.Approach-2:efficient man
17、age inventory across different environments B;Relearn the policy for each environment are costly.We combine causal discovery with recent advance in RL to deliver high-quality ordering strategies.Demand forecast DDomain adaption BEstimate the goodness of decision for each stateMath frameworks Bayesia
18、n network has rich theoretical functions:Markov property,d-separation,path analysis,We focus on the prediction task.General options:parent based,Markov blanket based,and O-set based.Causal discovery:pattern finding among factorsPCGESLiNGAMUnivariate time-series:autocorrelation for target onlyARIMAMu
19、ltivariate time-series:instantaneous and/or lagged relations GrangerVAR-SVAR,PCMCI+VAR-LiNGAM-0.53.31.7tt-1t-21.2-0.5tt-1t-2Bayesia S.A.S(since 02,update in 15)LiNGAM(update in 2022)Facebook(update 2022)Google(Since 2015)OSS(update in 2022)VAR-LiNGAM(update in 2022)HANA-ML(update 2022)Key algorithm
20、description Issue:Redundant or misleading edges to be understood Ground-truthPurify graphs with the least loss of information.VAR VAR-LiNGAMPCMCIReference:-VAR:H.Lutkepohl.New Introduction to Multiple Time Series Analysis.Springer,Berlin,Germany,2007.-VAR-LiNGAM:A.Hyvrinen,K.Zhang,S.Shimizu,and P.O.
21、Hoyer.Estimation of a structural vector autoregression model using non-Gaussianity.Journal of Machine Learning Research,11:1709-1731,2010.-PCMCI+:J.Runge(2020):Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets.Proceedings of the 36th Conference
22、on Uncertainty in Artificial Intelligence,UAI.2020Case 1:Structural recovery with ground-truth More variables,and more lags for Weighted Absolute Percentage Error Compare the accuracy of coefficient recovery in top 1%,5%,100%of sorted edges.(node=5,lag=3)(node=5,lag=5)(node=10,lag=3)(node=10,lag=5)C
23、ase 2:Consumption dataset Dynamic Stochastic General Equilibrium is a macroeconomic model to study the behavior of economy over time Shocks and frictions in US business cycles:a Bayesian DSGE approach(europa.eu)dc:consumption differencedinve:investment differencedy:GDP differencedw:wage differencela
24、bobs:labor supply pinfobs:inflationrobs:interest More tests of key functions Forecastcriteria:predict in the future;multivariate,time-index dataExplainabilitycriteria:ante-hoc or post-hoc,key factor,observation decompositionSimulationcriteria:policy space,simulate a multivariate multi-time policyBay
25、esiaLabHave to embed time lag into dataset.ante-hoc explainability,such as ranking,attribution.Support one-shot strategy simulation.Lin.regressionLinear relation with respect to time only,Without considering other system variables.No strategy available in the model.ARIMAUnivariate time-series techno
26、logy only for target process.Support time-lagged coefficients.No other available to manipulate.RNNA neural-based method,good at processing serial dataDue to the black-box predictor,one can only explore local explainability for a given sample.We can borrow the strategy from the most similar instance,
27、whereas the strategy space is limited.LSTMA special of RNN to alleviate issue of gradient.(Same to RNN)(Same to RNN)VARVAR-based is one of most successful and flexible in multivariate time-series.Too many redundant edges that could mislead decision-maker to get the key factors.The inaccurate coeffic
28、ient estimation hurt the performance of simulation.our(after)Purify graphs with the least loss of information,so as to improve the forecast capability Easy to analyze the key factors,and target decomposition to time-lagged factors.Support multivariate strategy plan in the futures multi-timestamp.Pla
29、tform:https:/inguo.info/Digital HRManufactoryRetailingEVGain insight of cause-and-effect*Quickly grasp the factors that strongly affect the objectivesPredictive Maintenance*predict equipment failuresSales Forecasting*help retailersoptimize inventoryVehicle performance optimization*An adjustments to
30、the vehicles powertrain or nottrying out the what if scenario*Simulate different policies before implementation Production Planning*forecast production levels and optimize schedulesCustomer Segmentation*help retailers tailor marketing messagesBattery performance monitoring*To indicate how much energ
31、y the vehicle will consume under different conditionsOptimizingintervention*implement policies to achieve a predefined objectivesEnergy Management*monitor energy consumption patterns for energysavingsStore Performance Analysis*Use sales per square foot to optimize store layoutsCharging infrastructur
32、e optimization*additional charging infrastructure in certain areasCausal Analysis-Causal Analysis Solutions:Products&Solutions|NEC制造业ICT解决方案:解决方案|NEC日配品需求预测解决方案_ol()汽车生产管理解决方案:汽车行业解决方案|NECcompetence4.Causality helps replenishment strategy4.Causality helps replenishment strategyMain technical challen
33、ges Main technical challenges Situation 1:counterfactualSituation 1:counterfactual-based data augmentation in new domains based data augmentation in new domains Situation 2:onSituation 2:on-line line replenishment strategy for large action space replenishment strategy for large action space Approach
34、 to the best decision Key to inventory control is to map each state to action(s),satisfying Roadmap:Approach-1:improve demand forecast D;One of the biggest challenges is forecasting demand accurately.We deliver explainable forecast,and multi-target intervention as a web-based service.Approach-2:effi
35、cient manage inventory across different environments B;Relearn the policy for each environment are costly.We combine causal discovery with recent advance in RL to deliver high-quality ordering strategies.Demand forecast DDomain adaption BEstimate the goodness of decision for each stateSituation 1:co
36、unterfactual-based data augmentation Problem:historical data often mix with different scenarios.On the same domain,model-based generators may achieve the comparable to the model-free method.However,when we transfer to new domain:-MLP-based generator deteriorates significantly;-Our causal-based gener
37、ator can achieve similar performance by only 1/10 samples to model-free method,where it will relearn the policy in new place.CART-POLE(umass.edu)Idea We combine causal recovery with counterfactual-based data augmentation to realize sequential decision making across heterogeneous environments Benefit
38、:non-expert dataset can be exploited to disentangle the causal mechanism,leading to tremendous costs saving in collecting high-quality data from multiple sourcesUse the generator to train controllerUse the generator and encoder to augment data at individual-level.Results Objective:best mapping(polic
39、y)from states to actions We assume the interaction skeleton remains the same,but the strengths of interaction are varied across domains.The reward is defined:Income:the actual order fulfilment according to the current stock;Cost:holding cost for extra stock and delivery fees.Training&adaptation:Rand
40、om ordering for 20 trails,where each trail contains multi-step as initial datasetsAssign the disentangle domain index when adapt to a new domain.current stateactiondemand=max,+,=min,max 0,0(+)incomeholding costcost of orderingSituation 2:on-line ordering strategy for large action space Problem:The d
41、ecision space is too large due to multi-commodityMany approach assume the stock state will be exactly counted.Studied for fully-observed systems since 1960s However,Costing billions of dollars lost from the Coca-Cola Retailing Research Council(Consulting,1996)Kang and Gershwin(2005)found 51%of inven
42、tory accuracy in a global retailerDeHoratius and Raman(2008)found that the accuracy of over 350K inventory recordings from over 37 retail stores from large retailers is only 35%Multiple approaches:Prevention,Correction and Integration Integration:robust decision framework to account for the presence
43、 of record inaccuracies Partially Observable Markov Decision Processes has start been being considered recently.But it focus on single-commodity problems .Our solution:fast re-plan the policy at each step.Idea Online planner:Only compute the best action for current belief Belief tree Steps:action se
44、lection,observation selection,expansion,rollout and backup Benefits:Fast for re-plan when the decision space is huge;Plan from scratch when demand forecast model changesResults Results Simple(s,S)policy can fail when demand noise is large.Our solution can find less conservative inventory control str
45、ategies that yield higher profits,compared to existing solutions.Inventory control description Background:time series,causalityCausality helps demand forecastCausality helps replenishment strategyInventory:good 2T1Inventory good 1ObservationDemand forecast Optimal orderT2Demand forecast 2023 DataFunSummit演讲人:王尔立NEC中国研究院研究员感谢您的观看 THANKS