Repairing Decision-Making Programs Under Uncertainty

  • Aws Albarghouthi
  • Loris D’Antoni
  • Samuel DrewsEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10426)


The world is uncertain. Programs can be wrong. We address the problem of repairing a program under uncertainty, where program inputs are drawn from a probability distribution. The goal of the repair is to construct a new program that satisfies a probabilistic Boolean expression. Our work focuses on loop-free decision-making programs, e.g., classifiers, that return a Boolean- or finite-valued result. Specifically, we propose distribution-guided inductive synthesis, a novel program repair technique that iteratively (isamples a finite set of inputs from a probability distribution defining the precondition, (ii) synthesizes a minimal repair to the program over the sampled inputs using an smt-based encoding, and (iiiverifies that the resulting program is correct and is semantically close to the original program. We formalize our algorithm and prove its correctness by rooting it in computational learning theory. For evaluation, we focus on repairing machine learning classifiers with the goal of making them unbiased (fair). Our implementation and evaluation demonstrate our approach’s ability to repair a range of programs.



This material is based upon work supported by the National Science Foundation under Grant numbers 1566015 and 1652140.


  1. 1.
    UCI machine learning repository: Census income.
  2. 2.
  3. 3.
    Code of federal regulations, July 2014. Accessed 18 June 2016
  4. 4.
    Albarghouthi, A., D’Antoni, L., Drews, S., Nori, A.: Fairness as a program property. In: FATML, November 2016.
  5. 5.
    Angwin, J., Larson, J., Mattu, S., Kirchner, L.: Machine bias: there’s software used across the country to predict future criminals. And it’s biased against blacks, May 2016. Accessed 18 June 2016
  6. 6.
    Bartocci, E., Grosu, R., Katsaros, P., Ramakrishnan, C.R., Smolka, S.A.: Model repair for probabilistic systems. In: Abdulla, P.A., Leino, K.R.M. (eds.) TACAS 2011. LNCS, vol. 6605, pp. 326–340. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-19835-9_30 CrossRefGoogle Scholar
  7. 7.
    Blumer, A., Ehrenfeucht, A., Haussler, D., Warmuth, M.K.: Learnability and the vapnik-chervonenkis dimension. J. ACM (JACM) 36(4), 929–965 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Chaudhuri, S., Clochard, M., Solar-Lezama, A.: Bridging boolean and quantitative synthesis using smoothed proof search. In: POPL, vol. 49, pp. 207–220. ACM (2014)Google Scholar
  9. 9.
    Chen, T., Hahn, E.M., Han, T., Kwiatkowska, M., Qu, H., Zhang, L.: Model repair for markov decision processes. In: 2013 International Symposium on Theoretical Aspects of Software Engineering (TASE), pp. 85–92. IEEE (2013)Google Scholar
  10. 10.
    D’Antoni, L., Samanta, R., Singh, R.: Qlose: program repair with quantitative objectives. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9780, pp. 383–401. Springer, Cham (2016). doi: 10.1007/978-3-319-41540-6_21 Google Scholar
  11. 11.
    Datta, A., Sen, S., Zick, Y.: Algorithmic transparency via quantitative input influence. In: Proceedings of 37th IEEE Symposium on Security and Privacy (2016)Google Scholar
  12. 12.
    Dwork, C., Hardt, M., Pitassi, T., Reingold, O., Zemel, R.S.: Fairness through awareness. In: Innovations in Theoretical Computer Science 2012, Cambridge, MA, USA, 8–10 January 2012, pp. 214–226 (2012)Google Scholar
  13. 13.
    Feldman, M., Friedler, S.A., Moeller, J., Scheidegger, C., Venkatasubramanian, S.: Certifying and removing disparate impact. In: Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Sydney, NSW, Australia, 10–13 August 2015, pp. 259–268 (2015).
  14. 14.
    Friedler, S.A., Scheidegger, C., Venkatasubramanian, S.: On the (im)possibility of fairness. CoRR abs/1609.07236 (2016).
  15. 15.
    Gehr, T., Misailovic, S., Vechev, M.: PSI: exact symbolic inference for probabilistic programs. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9779, pp. 62–83. Springer, Cham (2016). doi: 10.1007/978-3-319-41528-4_4 Google Scholar
  16. 16.
    Hardt, M., Price, E., Srebro, N.: Equality of opportunity in supervised learning. CoRR abs/1610.02413 (2016).
  17. 17.
    Jobstmann, B., Griesmayer, A., Bloem, R.: Program repair as a game. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 226–238. Springer, Heidelberg (2005). doi: 10.1007/11513988_23 CrossRefGoogle Scholar
  18. 18.
    Kearns, M.J., Vazirani, U.V.: An Introduction to Computational Learning Theory. MIT press, Cambridge (1994)Google Scholar
  19. 19.
    Kobie, N.: Who do you blame when an algorithm gets you fired?, January 2016. Accessed 18 June 2016
  20. 20.
    Könighofer, R., Bloem, R.: Automated error localization and correction for imperative programs. In: Formal Methods in Computer-Aided Design (FMCAD 2011), pp. 91–100. IEEE (2011)Google Scholar
  21. 21.
    Littman, M.L., Goldsmith, J., Mundhenk, M.: The computational complexity of probabilistic planning. J. Artif. Intell. Res. 9(1), 1–36 (1998)MathSciNetzbMATHGoogle Scholar
  22. 22.
    Mechtaev, S., Yi, J., Roychoudhury, A.: Directfix: looking for simple program repairs. In: Proceedings of the 37th International Conference on Software Engineering, vol. 1, pp. 448–458. IEEE Press (2015)Google Scholar
  23. 23.
    Miller, C.C.: When algorithms discriminate, July 2015. Accessed 18 June 2016
  24. 24.
    Papadimitriou, C.H.: Games against nature. J. Comput. Syst. Sci. 31(2), 288–301 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  25. 25.
    Sharma, R., Nori, A.V., Aiken, A.: Bias-variance tradeoffs in program analysis. In: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2014, NY, USA, pp. 127–137 (2014).
  26. 26.
    Solar-Lezama, A.: Program synthesis by sketching. Ph.D. thesis, University of California, Berkeley (2008)Google Scholar
  27. 27.
    Von Essen, C., Jobstmann, B.: Program repair without regret. Formal Methods Syst. Des. 47(1), 26–50 (2015)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Aws Albarghouthi
    • 1
  • Loris D’Antoni
    • 1
  • Samuel Drews
    • 1
    Email author
  1. 1.University of Wisconsin-MadisonMadisonUSA

Personalised recommendations