Skip to main content

Automatic Fairness Testing of Machine Learning Models

  • Conference paper
  • First Online:
Testing Software and Systems (ICTSS 2020)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12543))

Included in the following conference series:

Abstract

In recent years, there has been an increased application of machine learning (ML) to decision making systems. This has prompted an urgent need for validating requirements on ML models. Fairness is one such requirement to be ensured in numerous application domains. It specifies a software as “learned” by an ML algorithm to not be biased in the sense of discriminating against some attributes (like gender or age), giving different decisions upon flipping the values of these attributes.

In this work, we apply verification-based testing (VBT) to the fairness checking of ML models. Verification-based testing employs verification technology to generate test cases potentially violating the property under interest. For fairness testing, we additionally provide a specification language for the formalization of different fairness requirements. From the ML model under test and fairness specification VBT automatically generates test inputs specific to the specified fairness requirement. The empirical evaluation on several benchmark ML models shows verification-based testing to perform better than existing fairness testing techniques with respect to effectiveness.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Note that the definition given here differs from that of  [21] as we again do not consider probability distributions of outcomes here.

  2. 2.

    https://archive.ics.uci.edu/ml.

  3. 3.

    https://github.com/sakshiudeshi/Aequitas.

References

  1. Aggarwal, A., Lohia, P., Nagar, S., Dey, K., Saha, D.: Black box fairness testing of machine learning models. In: Proceedings of the ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, ESEC/SIGSOFT FSE, pp. 625–635 (2019). https://doi.org/10.1145/3338906.3338937

  2. Briand, L.C., Labiche, Y., Bawar, Z., Spido, N.T.: Using machine learning to refine category-partition test specifications and test suites. Inf. Softw. Technol. 51(11), 1551–1564 (2009). https://doi.org/10.1016/j.infsof.2009.06.006

    Article  Google Scholar 

  3. Calders, T., Kamiran, F., Pechenizkiy, M.: Building classifiers with independency constraints. In: ICDM Workshops 2009, IEEE International Conference on Data Mining Workshops, Miami, Florida, USA, 6 December 2009, pp. 13–18 (2009). https://doi.org/10.1109/ICDMW.2009.83

  4. Carlini, N., Wagner, D.A.: Towards evaluating the robustness of neural networks. In: 2017 IEEE Symposium on Security and Privacy, SP, pp. 39–57 (2017). https://doi.org/10.1109/SP.2017.49

  5. Chouldechova, A.: Fair prediction with disparate impact: a study of bias in recidivism prediction instruments. Big Data 5(2), 153–163 (2017). https://doi.org/10.1089/big.2016.0047

    Article  Google Scholar 

  6. Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell programs. In: ICFP 2000, pp. 268–279 (2000). https://doi.org/10.1145/351240.351266

  7. Dwork, C., Hardt, M., Pitassi, T., Reingold, O., Zemel, R.S.: Fairness through awareness. In: Goldwasser, S. (ed.) Innovations in Theoretical Computer Science 2012, Cambridge, MA, USA, 8–10 January 2012, pp. 214–226. ACM (2012). https://doi.org/10.1145/2090236.2090255

  8. Galhotra, S., Brun, Y., Meliou, A.: Fairness testing: testing software for discrimination. In: Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, pp. 498–510. ACM (2017)

    Google Scholar 

  9. Guidotti, R., Monreale, A., Ruggieri, S., Turini, F., Giannotti, F., Pedreschi, D.: A survey of methods for explaining black box models. ACM Comput. Surv. 51(5), 93:1–93:42 (2019). https://doi.org/10.1145/3236009

    Article  Google Scholar 

  10. Huang, X., Kwiatkowska, M., Wang, S., Wu, M.: Safety verification of deep neural networks. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10426, pp. 3–29. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63387-9_1

    Chapter  Google Scholar 

  11. Lee, S., Cha, S., Lee, D., Oh, H.: Effective white-box testing of deep neural networks with adaptive neuron-selection strategy. In: ISSTA 2020: 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, Virtual Event, USA, 18–22 July 2020, pp. 165–176. ACM (2020). https://doi.org/10.1145/3395363.3397346

  12. Liptak, A.: Sent to prison by a software program’s secret algorithms. https://nyti.ms/2qoe8FC. Accessed 01 May 2017

  13. de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24

    Chapter  Google Scholar 

  14. Papadopoulos, P., Walkinshaw, N.: Black-box test generation from inferred models. In: RAISE, pp. 19–24 (2015). https://doi.org/10.1109/RAISE.2015.11

  15. Pei, K., Cao, Y., Yang, J., Jana, S.: DeepXplore: automated whitebox testing of deep learning systems. In: Proceedings of the 26th Symposium on Operating Systems Principles, pp. 1–18 (2017). https://doi.org/10.1145/3132747.3132785

  16. Segura, S., Fraser, G., Sánchez, A.B., Cortés, A.R.: A survey on metamorphic testing. IEEE Trans. Softw. Eng. 42(9), 805–824 (2016). https://doi.org/10.1109/TSE.2016.2532875

    Article  Google Scholar 

  17. Sharma, A., Wehrheim, H.: Higher income, larger loan? Monotonicity testing of machine learning models. In: ISSTA 2020: 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, Virtual Event, USA, pp. 200–210. ACM (2020). https://doi.org/10.1145/3395363.3397352

  18. Sharma, A., Wehrheim, H.: Testing machine learning algorithms for balanced data usage. In: 12th IEEE Conference on Software Testing, Validation and Verification, ICST, pp. 125–135 (2019). https://doi.org/10.1109/ICST.2019.00022

  19. Sun, Y., Wu, M., Ruan, W., Huang, X., Kwiatkowska, M., Kroening, D.: Concolic testing for deep neural networks. In: Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, ASE, pp. 109–119 (2018). https://doi.org/10.1145/3238147.3238172

  20. Udeshi, S., Arora, P., Chattopadhyay, S.: Automated directed fairness testing. In: Huchard, M., Kästner, C., Fraser, G. (eds.) Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, ASE 2018, Montpellier, France, 3–7 September 2018, pp. 98–108. ACM (2018). https://doi.org/10.1145/3238147.3238165

  21. Verma, S., Rubin, J.: Fairness definitions explained. In: International Workshop on Software Fairness, FairWare@ICSE, pp. 1–7 (2018). https://doi.org/10.1145/3194770.3194776

  22. Zafar, M.B., Valera, I., Gomez Rodriguez, M., Gummadi, K.P.: Fairness constraints: mechanisms for fair classification. arXiv preprint arXiv:1507.05259 (2017)

  23. Zhang, J.M., Harman, M., Ma, L., Liu, Y.: Machine learning testing: survey, landscapes and horizons. IEEE Trans. Softw. Eng. 1 (2020)

    Google Scholar 

  24. Zhang, P., et al.: White-box fairness testing through adversarial sampling. In: ICSE 2020: 42nd ACM SIGSOFT International Conference on Software Engineering, Virtual Event, South Korea. ACM (2020)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Arnab Sharma or Heike Wehrheim .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sharma, A., Wehrheim, H. (2020). Automatic Fairness Testing of Machine Learning Models. In: Casola, V., De Benedictis, A., Rak, M. (eds) Testing Software and Systems. ICTSS 2020. Lecture Notes in Computer Science(), vol 12543. Springer, Cham. https://doi.org/10.1007/978-3-030-64881-7_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-64881-7_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-64880-0

  • Online ISBN: 978-3-030-64881-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics