arXiv:2611.05225cs.LGNov 2026

Manuscript Offprint

arXiv:2611.05225

Post-Inference Model Chaining: A Problem Statement and a Model-based Bootstrap for Training End-to-End Digital Twins

Lukas Madenach, Timo Bailer, Tobias Eilert

Abstract

End-to-end digital twins can be constructed by fitting separate stage models and connecting them after inference. We investigate the Frequentist prediction properties of a commonly used Monte Carlo simulation scheme that forwards complete predictive draws through such a chain when measured stage outputs contain independent normal errors, but the latent stage means are deterministic. Analytical two-stage examples show persistent asymptotic interval and coverage inflation and, with quadratic propagation, mean bias dependent on the parameters to be estimated. Simulations of four- and eight-stage linear-quadratic univariate chains with 7, 15 or 30 training runs demonstrate pronounced input-dependent distortions. A diagnostic using error-free latent training predictors shows that the effect is mainly not attributable to errors in variables, but to the MCSim approach even showing underestimation of coverage. We propose a model-based bootstrap: an initial chain forwards fitted means, bootstrap chains are refitted on fixed-center bootstrap data while forwarding their mean prediction, and a target-stage future error enters a studentized prediction root. Across the investigated scenarios, relative mean bias is substantially reduced, and coverage is closer to the nominal 90%. At sample size 30, the eight-stage bootstrap has mean width ratios of 1.16–1.42 relative to the known-parameter normal reference, compared with 4.11–4.97 for observed-to-observed MCSim. These results support improved endpoint prediction in the tested setting. Further investigations of the bootstrap scheme in the supplement for a bivariate 6-stage process show similar satisfactory results.

1 Introduction

As industry moves towards greater automation and digitalization, digital twins — virtual representations of physical processes — are becoming essential tools for monitoring, control, steering and optimization [1, 2, 3]. While digital twins are increasingly implemented at individual process stages, their true potential lies in predicting how changes at one stage affect later stages and ultimately the final product. However, constructing a single, comprehensive model that captures the entire process, i.e., an end-to-end digital twin (E2E-DT), is often infeasible due to the system’s complexity, data heterogeneity, data scarcity, computational constraints, and the need to model different stages with different model types. A pragmatic alternative is to model each stage separately using available input and output data and then reconnect these models sequentially also termed the modular approach [4, 5]. The statistical assessment distinguishes bias of the mean predictor, pointwise coverage for one new measured observation and prediction-interval width relative to a known-parameter reference [6]. Biopharmaceutical production motivates this work, but the results in this manuscript apply to all fields in which separately trained models of whichever type need to be chained post-inference to yield a complete model with approximate proper statistical properties for example in metrology [7, 8].

The main task in the modular approach is how to reconnect the proper single models so that the entire process is described by one model that satisfies the classical frequentist statistical properties. We do not discuss the Bayesian or the GUM approach via the law of propagation of uncertainty [9, 10]. We call this task holistic process modelling. In the literature there is one popular approach known for measurement error propagation, which uses Monte Carlo simulations abbreviated here as MCSim [11, 12, 13, 14, 15]. The idea is simple: given a future input for the first stage, the first stage model is utilized to sample from its predictive distribution, i.e., we obtain a collection of samples representing the uncertainty of the output. These samples are forwarded as inputs to the second model and for each input sample one output sample is drawn from the predictive distribution of the second model. This is now repeated until the last stage model. The lastly produced samples (or also for some stage in between) are then used to compute a mean prediction and quantiles that serve as prediction intervals. We examine the bias, coverage and width of this particular predictive-draw propagation scheme. The conclusions concern how fitted predictive distributions are connected after inference, not the numerical validity of Monte Carlo integration.

The following illustration distinguishes variability of a physical quantity from measurement error around a fixed underlying quantity. Both are represented by random variables, but their prediction targets differ. Composing the known physical variables gives the distribution of a transformed physical quantity; applying the same operation to a distribution around an estimate need not yield an unbiased estimate of the underlying transformed value. For example, let us assume we have a solution of spherical nanoparticles whose distribution of radii RR is known to be normal, i.e. R∼N(μ,σ)R \sim \mathcal{N}(\mu, \sigma) with known mean radius μ\mu and standard deviation σ\sigma (ignoring, for simplicity, the fact that radii cannot be negative). We emphasize again that there is no uncertainty here, only a stochastic process of random radii which is completely known since its type of probability distribution and its parameters are known. Let us assume that we are now interested in the distribution of the surface area of the nanoparticles giving rise to the random variable

S=4πR2=4π(μ+σz)2=4π(μ2+2μσz+σ2z2),S=4\pi R^{2}=4\pi(\mu+\sigma z)^{2}=4\pi(\mu^{2}+2\mu\sigma z+\sigma^{2}z^{2}),

where we used that R=μ+σzR=\mu+\sigma z with a standard normal random variable zz. The expected value is

E(S)=4πμ2+4πσ2,E(S)=4\pi\mu^{2}+4\pi\sigma^{2},

because of its linearity as well as E(z)=0E(z)=0 and E(z2)=1E(z^{2})=1. We see that we have an offset of 4πσ24\pi\sigma^{2} to the result of 4πμ24\pi\mu^{2}. This is the impact of the randomness in our stochastic process of random radii on the average surface area, but not a “mistake”! Since the composition of random variables is effectively an integration, Monte Carlo simulations are the perfect tool here since they are a class of numerical methods to solve integrals.

We now change the target from a varying radius to a fixed but unknown radius measured with error. The issue is whether directly transforming a distribution around its estimate preserves the desired target, rather than whether Monte Carlo can evaluate the transformation numerically. As an introductory example, let us now assume a different situation: we still have nanoparticles in a solution, but they all have exactly the same radius μ\mu, which is unknown. However, the analytical method to measure the radius has a normally distributed error with (for simplicity here) known standard deviation σ\sigma. If we now measure once, i.e. the measured radius is given by the random variable R=μ+σzR = \mu + \sigma z, the uncertainty distribution estimator for the mean radius μ\mu is μ^=R−σz′\hat{\mu} = R - \sigma z', where zz and z′z' are independently standard normally distributed [16, 17]. Following the MCSim approach analytically, we plug the predictive uncertainty distribution estimator μ^\hat{\mu} into the surface area formula to get

S^=4πμ^2=4π(R−σz′)2=4π(μ+σz−σz′)2=4π(μ+2σzˉ)2=4π(μ2+22μσzˉ+2σ2zˉ2),\begin{aligned}\hat{S}=4\pi\hat{\mu}^{2}=4\pi(R-\sigma z')^{2}=4\pi(\mu+\sigma z-\sigma z')^{2}=4\pi\big(\mu+\sqrt{2}\sigma\bar{z}\big)^{2}\\=4\pi\big(\mu^{2}+2\sqrt{2}\mu\sigma\bar{z}+2\sigma^{2}\bar{z}^{2}\big),\end{aligned}

with zˉ\bar{z} standard normally distributed, and the expectation value becomes

E(S^)=4πμ2+8πσ2.E(\hat{S})=4\pi\mu^{2}+8\pi\sigma^{2}.

Here, the offset of 8πσ28\pi\sigma^{2} is not correct anymore, because it is obvious that the true surface area of any of the nanoparticles is S=4πμ2S=4\pi\mu^{2}. The ordinary squared plug-in estimator already has a nonlinearity-induced offset; adding and transforming an independent uncertainty draw doubles that offset. Thus, the additional distortion comes from the statistical construction, not from Monte Carlo integration itself. We will elaborate the effect of the MCSim approach on other statistical metrics in the context of holistic process modelling with more realistic examples in much more detail in Section 3.

For post-inference model chaining, the objective is therefore to quantify uncertainty for a clearly specified endpoint target rather than merely to compose fitted predictive distributions. Stage estimators may be dependent because they share measured training variables. Fitting the stages separately does not make these random estimators independent, but propagating independent future predictive errors through fixed fitted models does not reproduce their joint sampling distribution. A sequential bootstrap can instead repeat the fitted-chain estimator on surrogate datasets, making its sources of variation explicit. Whether that surrogate approximation is adequate remains a model-specific question.

However, even before the task of chaining, we are already faced with hurdles in the estimation of the single models. First, transformed predictors can become nearly collinear or yield numerically rank-deficient stage designs. Second, it is inherent to the problem that the input data for at least the second and the following stages are subject to random measurement errors. Near collinearity can make coefficient estimates unstable, but usually does not affect prediction performance drastically. The second point is known as the error-in-variables problem; it is more severe and needs to be dealt with [18]. Measurement error in the predictors can bias ordinary regression fits even when the latent stage model is correctly specified; subsequent nonlinear transformations can compound the resulting discrepancy. The latent-input diagnostic in this study isolates this issue from the separate consequences of the predictive propagation rule for the investigation of the MCSim approach.

The problem statement first specifies the deterministic latent chain and measured stage outputs. The investigation then develops analytical intercept-to-linear and intercept-to-quadratic examples, followed by simulations of four- and eight-stage chains alternating between linear and quadratic functions. The same simulation design includes observed-to-observed and latent-to-observed training for MCSim, so that predictor measurement error is not conflated with post-inference propagation.

The proposed alternative is a fixed-center studentized model-based bootstrap. Its initial estimator uses fitted preceding-stage means as predictors, and its pseudo-responses retain fixed initial stage centers while the bootstrap designs vary. A separate target-stage future error supplies the predictive component of the studentized root. We evaluate the resulting endpoint mean bias, prediction coverage and interval width on the same underlying four- and eight-stage processes as for the MCSim scheme. Additionally, we investigate its performance on a bivariate 3-stage chain in the supplement.