Advancing Automated Ethical Profiling in SE: a Zero-Shot Evaluation of LLM Reasoning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Migliarini, Patrizio, Memon, Mashal Afzal, Autili, Marco, Inverardi, Paola
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911187787055104
author Migliarini, Patrizio
Memon, Mashal Afzal
Autili, Marco
Inverardi, Paola
author_facet Migliarini, Patrizio
Memon, Mashal Afzal
Autili, Marco
Inverardi, Paola
contents Large Language Models (LLMs) are increasingly integrated into software engineering (SE) tools for tasks that extend beyond code synthesis, including judgment under uncertainty and reasoning in ethically significant contexts. We present a fully automated framework for assessing ethical reasoning capabilities across 16 LLMs in a zero-shot setting, using 30 real-world ethically charged scenarios. Each model is prompted to identify the most applicable ethical theory to an action, assess its moral acceptability, and explain the reasoning behind their choice. Responses are compared against expert ethicists' choices using inter-model agreement metrics. Our results show that LLMs achieve an average Theory Consistency Rate (TCR) of 73.3% and Binary Agreement Rate (BAR) on moral acceptability of 86.7%, with interpretable divergences concentrated in ethically ambiguous cases. A qualitative analysis of free-text explanations reveals strong conceptual convergence across models despite surface-level lexical diversity. These findings support the potential viability of LLMs as ethical inference engines within SE pipelines, enabling scalable, auditable, and adaptive integration of user-aligned ethical reasoning. Our focus is the Ethical Interpreter component of a broader profiling pipeline: we evaluate whether current LLMs exhibit sufficient interpretive stability and theory-consistent reasoning to support automated profiling.
format Preprint
id arxiv_https___arxiv_org_abs_2510_00881
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Advancing Automated Ethical Profiling in SE: a Zero-Shot Evaluation of LLM Reasoning
Migliarini, Patrizio
Memon, Mashal Afzal
Autili, Marco
Inverardi, Paola
Software Engineering
Artificial Intelligence
Large Language Models (LLMs) are increasingly integrated into software engineering (SE) tools for tasks that extend beyond code synthesis, including judgment under uncertainty and reasoning in ethically significant contexts. We present a fully automated framework for assessing ethical reasoning capabilities across 16 LLMs in a zero-shot setting, using 30 real-world ethically charged scenarios. Each model is prompted to identify the most applicable ethical theory to an action, assess its moral acceptability, and explain the reasoning behind their choice. Responses are compared against expert ethicists' choices using inter-model agreement metrics. Our results show that LLMs achieve an average Theory Consistency Rate (TCR) of 73.3% and Binary Agreement Rate (BAR) on moral acceptability of 86.7%, with interpretable divergences concentrated in ethically ambiguous cases. A qualitative analysis of free-text explanations reveals strong conceptual convergence across models despite surface-level lexical diversity. These findings support the potential viability of LLMs as ethical inference engines within SE pipelines, enabling scalable, auditable, and adaptive integration of user-aligned ethical reasoning. Our focus is the Ethical Interpreter component of a broader profiling pipeline: we evaluate whether current LLMs exhibit sufficient interpretive stability and theory-consistent reasoning to support automated profiling.
title Advancing Automated Ethical Profiling in SE: a Zero-Shot Evaluation of LLM Reasoning
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2510.00881