《不完美的系統信息導致數字孿生的不確定性.pdf》由會員分享,可在線閱讀,更多相關《不完美的系統信息導致數字孿生的不確定性.pdf(23頁珍藏版)》請在三個皮匠報告上搜索。
1、Uncertainty in digital twins from imperfect system informationNathan Urban nurbanbnl.govApplied Mathematics,Computing&Data SciencesBrookhaven National LaboratorySeptember 17,2024BNLWhat is a digital twin?For the purposes of this talk:A predictive computational model of a specific,real-world systemCa
2、n be physical simulation,AI,anything elseIncorporates decision making(control,planning,design optimization,)Automatically“ingests data about the system and updates its representation of reality,following these decisionsLearn Predict Act Learn Beyond this,I am not going to open the terminology can of
3、 worms!What is a predictive digital twin,computationally?A mechanistic(“physical”)simulationConstructed to emulate a specific systemInitialized with data(state estimation),or“tuned”to data(parameter estimation)A data-driven model(usually statistical/machine learning)Data as inputs to a prediction(“s
4、tate estimation”),or trained to data(“parameter estimation”)Both of these A ML model that uses both simulated and real-world dataA ML model of data from a simulation that has been tuned to the real worldA mechanistic simulation that contains AI components or submodelsA mechanistic(“physical”)simulat
5、ionConstructed to emulate a specific systemInitialized with data(state estimation),or“tuned”to data(parameter estimation)A data-driven model(usually statistical/machine learning)Data as inputs to a prediction(“state estimation”),or trained to data(“parameter estimation”)Both of these A ML model that
6、 uses both simulated and real-world dataA ML model of data from a simulation that has been tuned to the real world A mechanistic simulation that contains AI components or submodelsWhat is a predictive digital twin,computationally?Uncertainty in digital twinsMuch uncertainty quantification(UQ)for DTs
7、 focuses on state estimation:the DT updates its state representation with data from the measured systemBut digital twins are not identical twins:they imperfectly model the true system“All models are wrong,but some are useful”G.BoxUncertainty in digital twinsMuch uncertainty quantification(UQ)for DTs
8、 focuses on state estimation:the DT updates its state representation with data from the measured systemBut digital twins are not identical twins:they imperfectly model the true system“All models are wrong,but some are useful”G.Box;“But theyre still wrong”meUncertainty in digital twinsMuch uncertaint
9、y quantification(UQ)for DTs focuses on state estimation:the DT updates its state representation with data from the measured systemBut digital twins are not identical twins:they imperfectly model the true system“All models are wrong,but some are useful”G.Box;“But theyre still wrong”me Learn and quant
10、ify errors in their representation of the system dynamicsThis could be parameter estimation,or system identification,or equation learningData driven-models:Pro:based on the observed,real worldCon:hard to make predictions outside the scope of the observed dataPhysical simulation:Pro:can make predicti
11、ons under new,unseen conditions(extrapolate)Con:some physics is unknown/intractable,simplified theory approximationsParameter uncertainty in simulationsExample:nanomaterial self-assemblyPhase separation dynamics in block copolymer systemsApplications to batteries,photovoltaics,etc.“Digital twin”is a
12、 simulation of the binary nonlocal Cahn-Hilliard equationPartial differential equation(PDE)system:Bayesian parameter estimation:probabilistically fit the PDE coefficients to dataK.YagerA.DeGennaroDataDigital twinDT parameter estimatesc/t=2(22c)+2(c3 c)(c c)A probabilistic hierarchy of digital twinsT
13、radeoffs between DT accuracy and speedMolecular dynamics(MD):gold standard but slow(thousands of hours)Cahn-Hilliard PDE(CH):captures coarse-scale dynamics(fraction of an hour)ML:fraction of a second,but little training dataBuild a multifidelity hierarchy of twinsReal world=MD+MD errorMD=CH(paramete
14、rs)+CH errorCH=ML(parameters)+ML errorUncertainty in parameters and errors at each levelUse in a DT decision loop:calibrate predict select next experiment calibrateMDCHML(a)Training points.(b)GP mean.(c)GP std dev.Figure 1:GP surrogate for qu().Figure 2:Two solutions with the lowest(left)and highest
15、(right)values of qu().learn a significant amount about the parameter l,but not as much about the other two parameters,since the map qu()is fairly flat along the other two dimensions.(a)Posterior samples.(b)Individual parameter posterior distributions.Figure 3:Posterior(histograms),prior(cyan),true v
16、alue(black)and training data ranges(red).3ExperimentData calibrationPredictionDecisionsDoerk et al.(2023)A.DeGennaroK.YagerLearning a simulation-based digital twinWe know the Cahn-Hilliard PDE describes structure formation in a simple set of casesWe dont know what effective PDE describes the coarse-
17、grained dynamics of harder casesWe may be able to derive it by hand,but this is laborious for each new systemCan we learn the PDE?()Treat right hand side(RHS)as unknown functioncell neighbor states next cell stateInsert neural net into PDE solverOnce equations have been learned,can run the twin at u
18、nseen initial or boundary conditions(unlike ML approaches that train on input/output pairs)c/t=?uit+1=N(uit,ui+1t,ui-1t)PDE stencil operatorCH solverNeural PDEJantre et al.Inconvenient truth of modeling:approximationsClimate example:models differ mostly due to their representations of cloud dynamics
19、Clouds are approximated(too small to simulate)Many choices involved in approximations:numerical time and space discretization schemesclosure modelsother unresolved sub-grid approximationschoice of processes to includeIn a climate model,10%of the code is the PDEs youre solving,and 90%is approximation
20、s to all the physics youre not solving from first principlesTrue for many complex systemsDOE E3SM global climate model(25 km resolution)NASA GEOS-5 global cloud resolving model(1.5 km resolution)Hybrid physics+ML digital twinsCan we build a“hybrid”digital twin that makes use of physics we know and t
21、rust,but learns physics we dont know from data?Example:partial differential equation systemf()embodies“known physics”equations(e.g.heat or wave equations)g()embodies“unknown physics”that can be learned from dataCan represent correction terms,closure schemes,missing processes,The uncertainties are no
22、w functional(what should go on the PDEs right hand side?),rather than parametric Formally an infinite-dimensional spaceCan parameterize it with neural net weights,but still high-dimensionalu/t=fPDE(u(x,t);p)+gML(u(x,t);w)“Offline learning”:have measurements of the unknown physics,and we fit a functi
23、on to it“Online learning”:dont know what the function should look like,but we can guess a functional form,run the hybrid model,and see what it predictsDifferentiable programming:backpropagate DT prediction errors through both ML component and the simulation solver(adjoint model)Hybrid physics+ML dig
24、ital twinsKochkov et al.(2024)Learning an artificial viscosity scheme in shock hydrodynamicsMelland et al.(2021)Learning unresolved cloud physics in a climate modelFitting a climate model by backpropagationHybrid physics+ML digital twinsExample:reaction-diffusion PDECan we recover the unknown functi
25、on g()from solution data,?And propagate its uncertainty to predictions?How do we handle the high-dimensional uncertainty space of functions?v1/t=D12v1+v1 v31 v2 0.005v2/t=D22v2+gML(v1,v2)(v1(t),v2(t)Jantre et al.Akhare et al.(2023)PDENeural PDEFunctional subspace reductionNeural network(NN)weight sp
26、ace is too high-dimensional to explore uncertaintiesEach function represented by a NN requires an expensive PDE solve to compute the loss Find a low-dimensional parameter subspace that captures most of the predictive uncertaintySGD-PCA subspace(Izmailov et al.,2019):Record weights visited during sto
27、chastic gradient descent;compute principal components in weight spaceActive subspace(Jantre et al.,2024):Compute principal components of the loss function gradient with respect to weights(sampled over a prior distribution)100-D parameter space captures most of the uncertainty in a neural networks pr
28、edictions 20,993-parameter NN weight space20-dimensional active subspaceJantre et al.(2024)Functional subspace reductionFunction recovery(slices through the 2D function)Jantre et al.Toy example:linear function Recover the correct function,assuming its linearNote that we never observe this function d
29、irectly,just the PDE solutionsgML(v1,v2)=10(v1 v2)Functional subspace reductionPredictive uncertainty(selected grid cells)Jantre et al.Toy example:linear function Recover the correct function,assuming its linearNote that we never observe this function directly,just the PDE solutionsPredictive uncert
30、ainties also well calibratedLike the Cahn-Hilliard neural PDE,we can run the learned hybrid model for new initial or boundary conditions without having trained on themgML(v1,v2)=10(v1 v2)Functional subspace reductionJantre et al.Toy example:linear function Now try full nonlinear NN function approxim
31、ationRecovers linear function for the states that are highly sampled by the hybrid modelReverts to constant prior outside those states but ok for prediction when solutions live in that region of state space Data augmentation and active learningForce model to sample where NN is uncertaingML(v1,v2)=10
32、(v1 v2)Functional subspace reductionJantre et al.Nonlinear function NN nonlinear function approximationRecovers sinusoidal-linear function for states sampled by the hybrid modelUnconstrained outside those states but ok for prediction when solutions live in that region of state space Data augmentatio
33、n and active learningForce model to sample where NN is uncertaingML(v1,v2)=v1 v31 v2 0.005v1/t=D12v1+gML(v1,v2)v2/t=D22v2+10(v1 v2)Model reduction to accelerate functional UQ Digital twins(e.g.,PDE solvers)can be very computationally expensiveEven if the space of uncertainties is reduced,it might st
34、ill be computationally infeasible to sample themIdea:Automatically construct a fast surrogate model for any functional term in the digital twinApproach:Principal orthogonal decomposition(POD)Galerkin projection reduced order model(ROM)Projects dynamics onto reduced state subspace by modal decomposit
35、ion of solution dataConverts the equations of the full order model into a smaller set of equations that are faster to solvedu/dt=N(u)d u/dt=PN(L u)N(u)u=Pu,u=L uoriginal systemreduced systemprojectionliftingOObserved stateInference over 2-parameter family of equationsDeGennaro et al.(2019)“Few-shot
36、learning”:Construct a ROM from a single training example,and predict the physics of a different,never-seen systemdu/dt=N(u)d u/dt=PN(L u)N(u)u=Pu,u=L uoriginal systemreduced systemprojectionliftingO2D rotating shallow water equations:observed stateUncertainty over a 2-D parameterized function space
37、of equationsThe ROM was trained with data from this equationBut the observations came from this equation and we recover the true equations in our posterior distributionDeGennaro et al.(2019)Future directionsFoundational mathematical research on how to construct surrogates of high-dimensional systems
38、 and functional uncertainty spaces from small training setsStreaming/online/realtime updating of uncertaintiesImproved sample design and active learning to generate optimal training data Not discussed here:Decisions!Closing the DT loop,automationExperimental design:explore(reduce uncertainty)vs.expl
39、oit(optimize system)Bayesian decision theory,mean objective cost of uncertainty,Bayesian optimization,dynamic programming/tree search,Other decision problemsControl(e.g.,accelerators),design(e.g.,of materials,molecules,facilities),planning(climate resilience,urban systems,Big Science campaigns)Concl
40、usionsThe measure-act-control loop of DTs has focused attention on ingesting state information about the system(e.g.realtime data assimilation)However,it is also important to improve the DTs representation of the systems governing dynamics(parameter estimation,system identification,etc.)This is an e
41、normous computational challenge(high-dimensional input spaces)Use reduced models and system identification to avoid need for large training setsApproaches:Multifidelity hierarchy of digital twinsSystem identification(learning unknown dynamics/missing processes)Function-space uncertainty quantification and subspace reductionHybrid physics-ML modelsData augmentation and active learningAutomated model reduction