Proceedings

Metamorphic Testing and Certified Mitigation of Fairness Violations in NLP Models

Video Download BibTeX Cite

Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence. Main track. Pages 458-465.

https://doi.org/10.24963/ijcai.2020/64

Abstract

Natural language processing (NLP) models have been increasingly used in sensitive application domains including credit scoring, insurance, and loan assessment. Hence, it is critical to know that the decisions made by NLP models are free of unfair bias toward certain subpopulation groups. In this paper, we propose a novel framework employing metamorphic testing, a well-established software testing scheme, to test NLP models and find discriminatory inputs that provoke fairness violations. Furthermore, inspired by recent breakthroughs in the certified robustness of machine learning, we formulate NLP model fairness in a practical setting as (ε, k)-fairness and accordingly smooth the model predictions to mitigate fairness violations. We demonstrate our technique using popular (commercial) NLP models, and successfully flag thousands of discriminatory inputs that can cause fairness violations. We further enhance the evaluated models by adding certified fairness guarantee at a modest cost.

  1. [Aggarwal et al., 2019] Aniya Aggarwal, Pranay Lohia, Seema Nagar, Kuntal Dey, and Diptikalyan Saha. Black box fairness testing of machine learning models. In ACM ESEC/FSE, pages 625-635. ACM, 2019.
  2. [Barocas et al., 2019] Solon Barocas, Moritz Hardt, and Arvind Narayanan. Fairness and Machine Learning. fairmlbook.org, 2019. http://www.fairmlbook.org. Link
  3. [Bolukbasi et al., 2016] Tolga Bolukbasi, Kai-Wei Chang, James Y Zou, Venkatesh Saligrama, and Adam T Kalai. Man is to computer programmer as woman is to home- maker? debiasing word embeddings. In NIPS, pages 4349-4357, 2016.
  4. [Bozic and Wotawa, 2019] Josip Bozic and Franz Wotawa. Testing chatbots using metamorphic relations. IFIP- ICTSS, pages 41-55, 2019.
  5. [Chen et al., 1998] Tsong Y Chen, Shing C Cheung, and Shiu Ming Yiu. Metamorphic testing: a new approach for generating next test cases. Technical report, Technical Report HKUST-CS98-01, 1998.
  6. [Cohen et al., 2019] Jeremy Cohen, Elan Rosenfeld, and Zico Kolter. Certified adversarial robustness via random- ized smoothing. In ICML, pages 1310-1320, 2019.
  7. [Dixon et al., 2018] Lucas Dixon, John Li, Jeffrey Sorensen, Nithum Thain, and Lucy Vasserman. Measuring and miti- gating unintended bias in text classification. 2018.
  8. [Dwarakanath et al., 2018] Anurag Dwarakanath, Manish Ahuja, Samarth Sikand, Raghotham M. Rao, R. P. Ja- gadeesh Chandra Bose, Neville Dubash, and Sanjay Pod- der. Identifying implementation bugs in machine learning based image classifiers using metamorphic testing. ISSTA 2018, pages 118-128, 2018.
  9. [Ethayarajh et al., 2019] Kawin Ethayarajh, David Duve- naud, and Graeme Hirst. Towards understanding linear word analogies. ACL, 2019.
  10. [Galhotra et al., 2017] Sainyam Galhotra, Yuriy Brun, and Alexandra Meliou. Fairness testing: testing software for discrimination. In ACM ESEC/FSE, pages 498-510. ACM, 2017.
  11. [Garg et al., 2019] Sahaj Garg, Vincent Perot, Nicole Limti- aco, Ankur Taly, Ed H Chi, and Alex Beutel. Counterfac- tual fairness in text classification through robustness. In AIES, pages 219-226. ACM, 2019.
  12. [Ge et al., 2018] Tao Ge, Furu Wei, and Ming Zhou. Fluency boost learning and inference for neural grammatical error correction. In ACL, pages 1055-1065, 2018.
  13. [He et al., 2020] Pinjia He, Clara Meister, and Zhendong Su. Structure-invariant testing for machine translation. ICSE '20, 2020.
  14. [Huang et al., 2019] Po-Sen Huang, Robert Stanforth, Jo- hannes Welbl, Chris Dyer, Dani Yogatama, Sven Gowal, Krishnamurthy Dvijotham, and Pushmeet Kohli. Achiev- ing verified robustness to symbol substitutions via inter- val bound propagation. arXiv preprint arXiv:1909.01492, 2019.
  15. [Jia et al., 2019] Robin Jia, Aditi Raghunathan, Kerem Göksel, and Percy Liang. Certified robustness to adversar- ial word substitutions. arXiv preprint arXiv:1909.00986, 2019.
  16. [Kairouz et al., 2016] Peter Kairouz, Sewoong Oh, and Pramod Viswanath. Extremal mechanisms for local dif- ferential privacy. JMLR, 17(1):492-542, 2016.
  17. [Kiritchenko and Mohammad, 2018] Svetlana Kiritchenko and Saif M. Mohammad. Examining gender and race bias in two hundred sentiment analysis systems. CoRR, abs/1805.04508, 2018.
  18. [Kusner et al., 2017] Matt J Kusner, Joshua Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fer- gus, S. Vishwanathan, and R. Garnett, editors, NIPS, pages 4066-4076.
  19. Curran Associates, Inc., 2017.
  20. [Lecuyer et al., 2019] Mathias Lecuyer, Vaggelis Atlidakis, Roxana Geambasu, Daniel Hsu, and Suman Jana. Cer- tified robustness to adversarial examples with differential privacy. In IEEE S&P, pages 656-672. IEEE, 2019.
  21. [Maas et al., 2011] Andrew L Maas, Raymond E Daly, Pe- ter T Pham, Dan Huang, Andrew Y Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In ACL, pages 142-150. Association for Computational Lin- guistics, 2011.
  22. [Manning et al., 2014] Christopher D. Manning, Mihai Sur- deanu, John Bauer, Jenny Finkel, Steven J. Bethard, and David McClosky. The Stanford CoreNLP natural language processing toolkit. In ACL System Demonstrations, pages 55-60, 2014.
  23. [Martinez, 2018] Janio Martinez. Kaggle Bank Marketing Dataset, 2018.
  24. [Mu et al., 2019] J. Mu, P. Liang, and N. Goodman. Shaping visual representations with language for few-shot classifi- cation. arXiv preprint arXiv:1911.02683, 2019.
  25. [Park et al., 2018] Ji Ho Park, Jamin Shin, and Pascale Fung. Reducing gender bias in abusive language detection. arXiv preprint arXiv:1808.07231, 2018.
  26. [Pei et al., 2017] Kexin Pei, Yinzhi Cao, Junfeng Yang, and Suman Jana. Deepxplore: Automated whitebox testing of deep learning systems. In SOSP, pages 1-18. ACM, 2017.
  27. [Rhue, 2018] Lauren Rhue. Racial influence on automated perceptions of emotions. Available at SSRN 3281765, 2018.
  28. [Sheng et al., 2019] Emily Sheng, Kai-Wei Chang, Premku- mar Natarajan, and Nanyun Peng. The woman worked as a babysitter: On biases in language generation. arXiv:1909.01326, 2019.
  29. [Speer et al., 2017] Robert Speer, Joshua Chin, and Cather- ine Havasi. Conceptnet 5.5: An open multilingual graph of general knowledge. In AAAI, 2017.
  30. [Sun and Zhou, 2018] Liqun Sun and Zhi Quan Zhou. Meta- morphic testing for machine translations: MT4MT. ASWEC' 18, pages 96-100, 2018.
  31. [Sun et al., 2019] Tony Sun, Andrew Gaut, Shirlyn Tang, Yuxin Huang, Mai ElSherief, Jieyu Zhao, Diba Mirza, Elizabeth Belding, Kai-Wei Chang, and William Yang Wang. Mitigating gender bias in natural language process- ing: Literature review. arXiv:1906.08976, 2019.
  32. [Tian et al., 2018] Yuchi Tian, Kexin Pei, Suman Jana, and Baishakhi Ray. DeepTest: Automated testing of deep- neural-network-driven autonomous cars. ICSE '18, 2018.
  33. [Udeshi et al., 2018] Sakshi Udeshi, Pryanshu Arora, and Sudipta Chattopadhyay. Automated directed fairness test- ing. In ACM/IEEE ASE, pages 98-108. ACM, 2018.
  34. [Wang et al., 2019] Jingyi Wang, Guoliang Dong, Jun Sun, Xinyu Wang, and Peixin Zhang. Adversarial sample de- tection for deep neural network through model mutation testing. ICSE '19, pages 1245-1256, 2019.
  35. [Warner, 1965] Stanley L Warner. Randomized response: A survey technique for eliminating evasive answer bias. Journal of the American Statistical Association, 60(309):63-69, 1965.
  36. [Xie et al., 2018] Xiaofei Xie, Lei Ma, Felix Juefei-Xu, Hongxu Chen, Minhui Xue, Bo Li, Yang Liu, Jian- jun Zhao, Jianxiong Yin, and Simon See. Coverage- guided fuzzing for deep neural networks. arXiv preprint arXiv:1809.01266, 2018.
  37. [Yan et al., 2019] Boyang Yan, Brian Yecies, and Zhi Quan Zhou. Metamorphic relations for data validation: a case study of translated text messages. In 2019 IEEE/ACM 4th International Workshop on Metamorphic Testing (MET), pages 70-75. IEEE, 2019.
  38. [Zhang et al., 2018] Mengshi Zhang, Yuqun Zhang, Ling- ming Zhang, Cong Liu, and Sarfraz Khurshid. Deep- Road: GAN-based Metamorphic Testing and Input Valida- tion Framework for Autonomous Driving Systems. ASE, 2018.
  39. [Zhao et al., 2018] Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. Gender bias in coreference resolution: Evaluation and debiasing methods. arXiv:1804.06876, 2018.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards