Abstract
We present a method to automatically approximate moment-based invariants of probabilistic programs with non-polynomial updates of continuous state variables to accommodate more complex dynamics. Our approach leverages polynomial chaos expansion to approximate non-linear functional updates as sums of orthogonal polynomials. We exploit this result to automatically estimate state-variable moments of all orders in Prob-solvable loops with non-polynomial updates. We showcase the accuracy of our estimation approach in several examples, such as the turning vehicle model and the Taylor rule in monetary policy.
Supported by the Vienna Science and Technology Fund (WWTF ICT19-018), the TU Wien Doctoral College (SecInt), the FWF research projects LogiCS W1255-N23 and P 30690-N35, and the ERC Consolidator Grant ARTIST 101002685.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
\(\varOmega \) is dropped from the notation as the sample space is not important in our formulation.
- 2.
Conditions that ascertain this are given in Theorem 3.4 of [8].
- 3.
- 4.
- 5.
It was proposed by the American economist John B. Taylor as a technique to stabilize economic activity by setting an interest rate [29].
- 6.
References
Atkeson, A., Ohanian, L.E.: Are Phillips curves useful for forecasting inflation? Q. Rev. 25(Win), 2–11 (2001). https://ideas.repec.org/a/fip/fedmqr/y2001iwinp2-11nv.25no.1.html
Bartocci, E., Kovács, L., Stankovič, M.: Automatic generation of moment-based invariants for prob-solvable loops. In: Chen, Y.-F., Cheng, C.-H., Esparza, J. (eds.) ATVA 2019. LNCS, vol. 11781, pp. 255–276. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-31784-3_15
Bartocci, E., Kovács, L., Stankovič, M.: Mora - automatic generation of moment-based invariants. In: TACAS 2020. LNCS, vol. 12078, pp. 492–498. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45190-5_28
Bouissou, O., Goubault, E., Putot, S., Chakarov, A., Sankaranarayanan, S.: Uncertainty propagation using probabilistic affine forms and concentration of measure inequalities. In: Chechik, M., Raskin, J.-F. (eds.) TACAS 2016. LNCS, vol. 9636, pp. 225–243. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49674-9_13
Chen, X., Ábrahám, E., Sankaranarayanan, S.: Taylor model flowpipe construction for non-linear hybrid systems. In: Proceedings of RTSS 2012: the 33rd IEEE Real-Time Systems Symposium, pp. 183–192. IEEE Computer Society (2012). https://doi.org/10.1109/RTSS.2012.70
Chorin, A.J.: Gaussian fields and random flow. J. Fluid Mech. 63(1), 21–32 (1974). https://doi.org/10.1017/S0022112074000991
Denamiel, C., Huan, X., Šepić, J., Vilibić, I.: Uncertainty propagation using polynomial chaos expansions for extreme sea level hazard assessment: the case of the eastern adriatic meteotsunamis. J. Phys. Oceanogr. 50(4), 1005–1021 (2020). https://doi.org/10.1175/JPO-D-19-0147.1
Ernst, O.G., Mugler, A., Starkloff, H.J., Ullmann, E.: On the convergence of generalized polynomial chaos expansions. ESAIM: M2AN 46(2), 317–339 (2012). https://doi.org/10.1051/m2an/2011045
Foo, J., Yosibash, Z., Karniadakis, G.E.: Stochastic simulation of riser-sections with uncertain measured pressure loads and/or uncertain material properties. Comput. Methods Appl. Mech. Eng. 196, 4250–4271 (2007). https://doi.org/10.1016/j.cma.2007.04.005
Formaggia, L., et al.: Global sensitivity analysis through polynomial chaos expansion of a basin-scale geochemical compaction model. Comput. Geosci. 17, 25–42 (2013). https://doi.org/10.1007/s10596-012-9311-5
Ghanem, R., Dham, S.: Stochastic finite element analysis for multiphase flow in heterogeneous porous media. Transp. Porous Medias 32, 239–262 (1998). https://doi.org/10.1023/A:1006514109327
Ghanem, R.: Probabilistic characterization of transport in heterogeneous media. Comput. Methods Appl. Mech. Eng. 158, 199–220 (1998). https://doi.org/10.1016/s0045-7825(97)00250-8
Ghanem, R.G., Spanos, P.D.: Stochastic Finite Elements: A Spectral Approach. Springer, New York (1991). https://doi.org/10.1007/978-1-4612-3094-6
Giraldi, L., Le Maître, O.P., Mandli, K.T., Dawson, C.N., Hoteit, I., Knio, O.M.: Bayesian inference of earthquake parameters from buoy data using a polynomial chaos-based surrogate. Comput. Geosci. 21(4), 683–699 (2017). https://doi.org/10.1007/s10596-017-9646-z
Hien, T.D., Kleiber, M.: Stochastic finite element modelling in linear transient heat transfer. Comput. Methods Appl. Mech. Eng. 144(1), 111–124 (1997). https://doi.org/10.1016/S0045-7825(96)01168-1
Hou, T.Y., Luo, W., Rozovskii, B., Zhou, H.M.: Wiener chaos expansions and numerical solutions of randomly forced equations of fluid mechanics. J. Comput. Phys. 216, 687–706 (2006). https://doi.org/10.1016/j.jcp.2006.01.008
Jasour, A., Wang, A., Williams, B.C.: Moment-based exact uncertainty propagation through nonlinear stochastic autonomous systems. CoRR abs/2101.12490 (2021). https://arxiv.org/abs/2101.12490
Knio, O.M., Maître, O.P.L.: Uncertainty propagation in CFD using polynomial chaos decomposition. Fluid Dyn. Res. 38(9), 616–640 (2006). https://doi.org/10.1016/j.fluiddyn.2005.12.003
Makino, K., Berz, M.: Taylor models and other validated functional inclusion methods. Int. J. Pure Appl. Math. 6, 239–316 (2003)
Meecham, W.C., Jeng, D.T.: Use of the Wiener-Hermite expansion for nearly normal turbulence. J. Fluid Mech. 32(2), 225–249 (1968). https://doi.org/10.1017/S0022112068000698
Moosbrugger, M., Stankovič, M., Bartocci, E., Kovács, L.: This is the Moment for Probabilistic Loops. ar**v (2022). https://doi.org/10.48550/ar**v.2204.07185
Mühlpfordt, T., Findeisen, R., Hagenmeyer, V., Faulwasser, T.: Comments on truncation errors for polynomial chaos expansions. IEEE Control Syst. Lett. 2(1), 169–174 (2018). https://doi.org/10.1109/LCSYS.2017.2778138
Neher, M., Jackson, K.R., Nedialkov, N.S.: On taylor model based integration of ODEs. SIAM J. Numer. Anal. 45, 236–262 (2007). https://doi.org/10.1137/050638448
Sankaranarayanan, S.: Quantitative analysis of programs with probabilities and concentration of measure inequalities. Found. Probab. Program. 259 (2020). https://doi.org/10.1017/9781108770750.009
Sankaranarayanan, S., Chou, Y., Goubault, E., Putot, S.: Reasoning about uncertainties in discrete-time dynamical systems using polynomial forms. In: Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M.F., Lin, H. (eds.) Advances in Neural Information Processing Systems, vol. 33, pp. 17502–17513. Curran Associates, Inc. (2020). https://proceedings.neurips.cc/paper/2020/file/ca886eb9edb61a42256192745c72cd79-Paper.pdf
Son, J., Du, Y.: Probabilistic surrogate models for uncertainty analysis: dimension reduction-based polynomial chaos expansion. Int. J. Numer. Meth. Eng. 121(6), 1198–1217 (2020). https://doi.org/10.1002/nme.6262
Stanković, B.: Taylor expansion for generalized functions. J. Math. Anal. Appl. 203, 31–37 (1996). https://doi.org/10.1006/jmaa.1996.0365
Steinhardt, J., Tedrake, R.: Finite-time regional verification of stochastic non-linear systems. Int. J. Robot. Res. 31(7), 901–923 (2012). https://doi.org/10.1177/0278364912444146
Taylor, J.B.: Discretion versus policy rules in practice. In: Carnegie-Rochester Conference Series on Public Policy, vol. 39, no. 1, pp. 195–214 (1993). https://ideas.repec.org/a/eee/crcspp/v39y1993ip195-214.html
Triebel, H.: Taylor expansions of distributions. In: The Structure of Functions. Birkhäuser Basel (2001). https://doi.org/10.1007/978-3-0348-8257-6_8
Wan, X., Karniadakis, G.E.: An adaptive multi-element generalized polynomial chaos method for stochastic differential equations. J. Comput. Phys. 209, 617–642 (2005). https://doi.org/10.1016/j.jcp.2005.03.023
**u, D.: Numerical Methods for Stochastic Computations: A Spectral Method Approach. Princeton University Press, Princeton (2010). http://www.jstor.org/stable/j.ctv7h0skv
**u, D., Karniadakis, G.E.: The Wiener-Askey polynomial chaos for stochastic differential equations. SIAM J. Sci. Comput. 24(2), 619–644 (2002). https://doi.org/10.1137/S1064827501387826
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
Appendix 1. Proof of Theorem 1
Proof
(Theorem 1). Since \(f(z) = 0\) \(\forall z\notin \left[ a, b\right] \),
Since \( f(z) -\phi (z) \le \phi (z) + f(z)\), D satisfies
with \((1 + \varPhi (b) - \varPhi (a)) < 2.\) Now,
and hence
By (21) and (15), (20) satisfies
since \(\mathbb {V}\textrm{ar}_\phi (g(Z))=\sum _{i=1}^\infty c_i^2\). In consequence, the error (16) can be upper bounded by (18).
Appendix 2. Computation Algorithm in Detail
We let \({\textbf{D}}\in \mathbb {Z}^{L \times k}\) be the matrix with each row \(j=1, \ldots , L\) containing the degrees of \(Z_i\) (in column i) of the corresponding polynomial in (9). For example, the first row corresponds to the constant polynomial (1), and the last row to \(\bar{p}_{1}^{\bar{d}_1}(z_1) \ldots \bar{p}_{k}^{\bar{d}_k}(z_k)\). That is,
![figure a](http://media.springernature.com/lw685/springer-static/image/chp%3A10.1007%2F978-3-031-16336-4_1/MediaObjects/523713_1_En_1_Figa_HTML.png)
The computer implementation of the algorithm computes \(c_j\) in (10) for each j combination (row) of degrees of the corresponding polynomials.
We apply the above described computation to the following example. Suppose that X has a truncated normal distribution with parameters \(\mu = 2\), \(\sigma = 0.1\), and is supported over \(\left[ 1, 3\right] \), and that Y is uniformly distributed over \(\left[ 1, 2\right] \). We expand \(g(x, y) = \log (x + y)\) along X and Y, as follows. We choose the relevant highest degrees of expansion to be \(\bar{d}_{X} = 2\) and \(\bar{d}_{Y} = 2\). The pdf of Y is \(f_{Y}(y) \equiv 1\), and of X is \(f_{X}(x) = e^{-\frac{(x-2)^{2}}{0.02}}/0.1\alpha \sqrt{2\pi }\), where the truncation multiplier \(\alpha \) equals \(\int \limits _{1}^{3}e^{-\frac{(x-2)^{2}}{0.02}}dx/0.1\sqrt{2\pi }\).
The two sets of polynomials, \(\{p_{i}\} = \{1, x, x^{2}\}\) and \(\{q_{i}\} = \{1, y, y^{2}\}\), are linearly independent. Applying the Gram-Schmidt procedure to orthogonalize and normalize them, we obtain \(\bar{p}_{0}(x) = 1\), \(\bar{p}_{1}(x) = 10x - 20\), \(\bar{p}_{2}(x) = 70.71067x^{2} -282.84271x + 282.13561\), and \(\bar{q}_{0}(y) = 1\), \(\bar{q}_{1}(y) = 3.4641y - 5.19615\), \(\bar{q}_{2}(y) = 13.41641y^{2} - 40.24922y + 29.06888\). In this case, \(L = (1 + \bar{d}_{X}) * (1 + \bar{d}_{Y}) = 9\), and \({\textbf{D}}\) has 9 rows and 2 columns,
![figure b](http://media.springernature.com/lw685/springer-static/image/chp%3A10.1007%2F978-3-031-16336-4_1/MediaObjects/523713_1_En_1_Figb_HTML.png)
Iterating through the rows of matrix \({\textbf{D}}\) and choosing the relevant combination of degrees of polynomials for each variable, we calculate the Fourier coefficients
The final estimator can be derived by summing up the products of each coefficient and the relevant combination of polynomials:
The estimation error is
Appendix 3. PCEs of Exponential and Trigonometric Functions
Table 2 lists examples of functions of up to three random arguments approximated by PCE’s of different degrees and, correspondingly, number of coefficients. We use \(TruncNormal \left( \mu , \sigma ^{2}, \left[ a, b\right] \right) \) to denote the truncated normal distribution with expectation \(\mu \) and standard deviation \(\sigma \) on the (finite or infinite) interval \(\left[ a, b\right] \), and \(TruncGamma\left( \theta , k, \left[ a, b\right] \right) \) for the truncated gamma distribution on the (finite or infinite) interval \(\left[ a, b\right] \), \(a,b>0\), with shape parameter k and scale parameter \(\theta \). The approximation error in (13) is reported in the last column. The results confirm (8) in practice: the error decreases as the degree or, equivalently, the number of components in the approximation of the polynomial increases.
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Kofnov, A., Moosbrugger, M., Stankovič, M., Bartocci, E., Bura, E. (2022). Moment-Based Invariants for Probabilistic Loops with Non-polynomial Assignments. In: Ábrahám, E., Paolieri, M. (eds) Quantitative Evaluation of Systems. QEST 2022. Lecture Notes in Computer Science, vol 13479. Springer, Cham. https://doi.org/10.1007/978-3-031-16336-4_1
Download citation
DOI: https://doi.org/10.1007/978-3-031-16336-4_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-16335-7
Online ISBN: 978-3-031-16336-4
eBook Packages: Computer ScienceComputer Science (R0)