Abstract
With the advancement of sentiment analysis (SA) models and their incorporation into our daily lives, fairness testing on these models is crucial, since unfair decisions can cause discrimination to a large population. Nevertheless, some challenges in fairness testing include the unknown oracle, the difficulty in generating suitable test inputs, and the lack of a reliable way of fixing the issues. To fill in these gaps, BiasRV, a tool based on metamorphic testing (MT), was introduced and succeeded in uncovering fairness issues in a transformer-based model. However, the extent of unfairness in other SA models has not been thoroughly investigated. Our work conducts a more comprehensive empirical study to reveal the extent of fairness violations, specifically gender fairness, exhibited by other popular word embedding-based SA models. We define fairness violation as the behavior in which an SA model predicts variants created from a text, which merely differ in gender classes, to have different sentiments. Our inspection utilizing BiasRV uncovers at least 30 fairness violations (at BiasRV's default threshold) in all three SA models. Realizing the importance of addressing such significant violations, we introduce adversarial patches (AP) as a way of patch generation in an automated program repair (APR) system to fix them. We adopt adversarial fine-tuning in AP by retraining SA models using adversarial examples, which are bias-uncovering test cases dynamically generated by a tool named BiasFinder at runtime. Evaluation of the SA models shows that our proposed AP reduces fairness violations by at least 25%.
Original language | English |
---|---|
Title of host publication | Proceedings - 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2023 |
Editors | Tao Zhang, Xin Xia, Nicole Novielli |
Place of Publication | Piscataway NJ USA |
Publisher | IEEE, Institute of Electrical and Electronics Engineers |
Pages | 651-662 |
Number of pages | 12 |
ISBN (Electronic) | 9781665452786 |
ISBN (Print) | 9781665452793 |
DOIs | |
Publication status | Published - 2023 |
Event | IEEE International Conference on Software Analysis, Evolution, and Reengineering 2023 - Macao, China Duration: 21 Mar 2023 → 24 Mar 2023 Conference number: 30th https://ieeexplore.ieee.org/xpl/conhome/10123438/proceeding (Proceedings) https://saner2023.must.edu.mo/ (Website) |
Publication series
Name | Proceedings - 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering, SANER 2023 |
---|---|
Publisher | IEEE, Institute of Electrical and Electronics Engineers |
ISSN (Print) | 1534-5351 |
ISSN (Electronic) | 2640-7574 |
Conference
Conference | IEEE International Conference on Software Analysis, Evolution, and Reengineering 2023 |
---|---|
Abbreviated title | SANER 2023 |
Country/Territory | China |
City | Macao |
Period | 21/03/23 → 24/03/23 |
Internet address |
|
Keywords
- automated program repair
- fairness testing
- sentiment analysis