PSense: Automatic Sensitivity Analysis for Probabilistic Programs

  • Zixin HuangEmail author
  • Zhenbang Wang
  • Sasa Misailovic
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11138)


PSense is a novel system for sensitivity analysis of probabilistic programs. It computes the impact that a noise in the values of the parameters of the prior distributions and the data have on the program’s result. PSense relates the program executions with and without noise using a developer-provided sensitivity metric. PSense calculates the impact as a set of symbolic functions of each noise variable and supports various non-linear sensitivity metrics. Our evaluation on 66 programs from the literature and five common sensitivity metrics demonstrates the effectiveness of PSense.



We thank the anonymous reviewers for the useful comments on the previous versions of this work. This research was supported in part by NSF Grants No. CCF 17-03637 and CCF 16-29431.


  1. 1.
  2. 2.
  3. 3.
    Albarghouthi, A., D’Antoni, L., Drews, S., Nori, A.: Fairsquare: probabilistic verification of program fairness. In: OOPSLA (2017)Google Scholar
  4. 4.
    Barthe, G., Espitau, T., Grégoire, B., Hsu, J., Strub, P.: Proving expected sensitivity of probabilistic programs. In: POPL (2018)Google Scholar
  5. 5.
    Borgonovo, E., Plischke, E.: Sensitivity analysis: a review of recent advances. Eur. J. Oper. Res. 248(3), 869–887 (2016)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Chan, H., Darwiche, A.: When do numbers really matter? J. Artif. Intell. Res. 17, 265–287 (2002)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Chan, H., Darwiche, A.: Sensitivity analysis in Bayesian networks: from single to multiple parameters. In: UAI (2004)Google Scholar
  8. 8.
    Chaudhuri, S., Gulwani, S., Lublinerman, R., Navidpour, S.: Proving programs robust. In: FSE (2011)Google Scholar
  9. 9.
    Filieri, A., Păsăreanu, C., Visser, W.: Reliability analysis in symbolic pathfinder. In: ICSE (2013)Google Scholar
  10. 10.
    Gehr, T., Misailovic, S., Vechev, M.: PSI: exact symbolic inference for probabilistic programs. In: CAV (2016)Google Scholar
  11. 11.
    Gelman, A., Lee, D., Guo, J.: Stan: a probabilistic programming language for Bayesian inference and optimization. J. Educ. Behav. Stats. 40, 530–543 (2015)CrossRefGoogle Scholar
  12. 12.
    Goodman, N., Mansinghka, V., Roy, D., Bonawitz, K., Tenenbaum, J.: Church: a language for generative models. In: UAI (2008)Google Scholar
  13. 13.
    Goodman, N., Stuhlmüller, A.: The design and implementation of probabilistic programming languages (2014)Google Scholar
  14. 14.
    Goodman, N., Tenenbaum, J.: Probabilistic Models of Cognition.
  15. 15.
    Gustafson, P., Srinivasan, C., Wasserman, L.: Local sensitivity analysis. Bayesian Stat. 5, 197–210 (1996)MathSciNetGoogle Scholar
  16. 16.
    Holtzen, S., Millstein, T., Broeck, G.: Probabilistic program abstractions. In: UAI (2017)Google Scholar
  17. 17.
    Iooss, B., Saltelli, A.: Introduction to sensitivity analysis. Handbook of Uncertainty Quantification, pp. 1–20. Springer, Cham (2016)Google Scholar
  18. 18.
    Llerena, Y., Su, G., Rosenblum, D.: Probabilistic model checking of perturbed mdps with applications to cloud computing. In: FSE (2017)Google Scholar
  19. 19.
    Mansinghka, V., Selsam, D., Perov, Y.: Venture: a higher-order probabilistic programming platform with programmable inference. ArXivarXiv:1404.0099 (2014)
  20. 20.
    Narayanan, P., Carette, J., Romano, W., Shan, C., Zinkov, R.: Probabilistic inference by program transformation in hakaru. In: FLOPS (2016)Google Scholar
  21. 21.
    Olmedo, F., Kaminski, B., Katoen, J., Matheja, C.: Reasoning about recursive probabilistic programs. In: LICS (2016)Google Scholar
  22. 22.
    Saltelli, A., et al.: Global sensitivity analysis: the primer (2008)Google Scholar
  23. 23.
    Sankaranarayanan, S., Chakarov, A., Gulwani, S.: Static analysis for probabilistic programs: inferring whole program properties from finitel many paths. In: PLDI 2013Google Scholar
  24. 24.
    Tran, D., Kucukelbir, A., Dieng, A., Rudolph, M., Liang, D., Blei, D.: Edward: a library for probabilistic modeling, inference, and criticism. arXiv:1610.09787 (2016)
  25. 25.
    van der Gaag, L., Renooij, S., Coupé, V.: Sensitivity analysis of probabilistic networks. Advances in Probabilistic Graphical Models, pp. 103–124. Springer, Berlin (2007)CrossRefGoogle Scholar
  26. 26.
    Wang, D., Hoffmann, J., Reps, T.: PMAF: an algebraic framework for static analysis of probabilistic programs. In: PLDI (2018)Google Scholar
  27. 27.
    Wood, F., van de Meent, J., Mansinghka, V.: A new approach to probabilistic programming inference. In: AISTATS (2014)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.University of Illinois at Urbana-ChampaignUrbanaUSA

Personalised recommendations