Toward explaining value concerns in software artifacts: A human-in-the-loop method
See detailsHide details
Authors
Davoud Mougouei, Son Pham, Ahmad Azarnik, Mahdi Fahmideh, Arif Nurwidyantoro, Elahe Mougouei, Amanul Haque, Hoa Khanh Dam, Saima Rafi, Javed Ali Khan
Summary
Context: Violations of human values in software can lead to user dissatisfaction, economic harm, and loss of trust. Existing Software Engineering research has explored detecting value violations through manual or automated labeling (classification) that merely detects their presence or absence without explaining the underlying mechanisms of violations (the how). This makes it challenging to verify the reliability of such findings and limits their practicality. Objectives: This study introduces and evaluates a human-in-the-loop method that produces explanatory accounts of conditions that may lead to violations of human values in software, referred to as Value Concerns. Methods: The proposed human-in-the-loop method integrates the automated reasoning capabilities of a Large Language Model (LLM) – ChatGPT – with human assessment to explain value violations in software artifacts. A case study of 1200 Android and iOS APIs is used to examine the method’s ability to identify and articulate value concerns. Results: Our findings show that ChatGPT’s inferences about value concerns are reasonably accurate yet incomplete. Inaccuracies arise from unfounded explanations, extended reasoning, and persuasive linguistic effects. The human-in-the-loop cycles mitigate these issues by reviewing and refining the model’s outputs. The case study supports the use of LLMs for transparent reasoning about value violations. Conclusion: Large Language Models, when guided by human oversight, can function effectively as explanatory tools and reasoning partners for value violations in software artifacts. Rather than serving as classifiers, they can generate structured explanatory accounts of conditions that may lead to value violations in software.