Metraipolis › archive › dc_d7d48de411d3
A Framework for Identifying, Categorizing, and Explaining Bias in AI-Generated Code — arXiv:2609.30642
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2609.30642
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-08T01:39:24.264Z
- SHA-256 of the archived text
6bfa55efe3b45d8760a4b17a0cd9778fe730616cfb5255badfd9fce2e65bb110- Stable URL of this page
https://metraipolis.com/documento/dc_d7d48de411d3
How to cite
A Framework for Identifying, Categorizing, and Explaining Bias in AI-Generated Code — arXiv:2609.30642 — arXiv (en), https://arxiv.org/abs/2609.30642 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_d7d48de411d3 (Metraipolis archive dc_d7d48de411d3, sha256 6bfa55efe3b45d8760a4b17a0cd9778fe730616cfb5255badfd9fce2e65bb110)
BibTeX
@misc{dcd7d48de411d3,
title = {A Framework for Identifying, Categorizing, and Explaining Bias in AI-Generated Code — arXiv:2609.30642},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2609.30642},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_d7d48de411d3; sha256 6bfa55efe3b45d8760a4b17a0cd9778fe730616cfb5255badfd9fce2e65bb110},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.30642. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
As Large Language Models (LLMs) become integrated into software development workflows, concerns regarding unintentional biases in AI-generated code. Although evidence suggests these biases exist, limited research has systematically identified, categorized, and explained them. This study investigates bias in AI-generated code and evaluates whether LLMs can reliably identify and explain it through a taxonomy-driven framework. We extended an existing dataset of biased AI-generated Python code and manually annotated snippets with bias categories and human-authored justifications to establish a ground-truth dataset. Using this dataset, we evaluated proprietary and open-source LLMs as automated bias detection and justification systems through ICL. Finally, we analyzed similarity between LLM-generated explanations and human-authored justifications using structured justification and code identification metrics. Our findings demonstrate that LLMs can effectively support code bias identification and explanation. Gemini achieved 80.14% classification accuracy, with 84.0% precision and 95.7% recall, while the best open-source alternative, Qwen3-coder, achieved 82.45% accuracy, 68.64% precision, and 80.22% recall. Additionally, the models achieved justification similarity scores of 80.4% and 80.14%, respectively, relative to human-authored reasoning, and code identification similarity scores of 86.0% and 87.82%. These results suggest that LLMs can detect biased logic in generated Python code and produce explanations that substantially align with expert interpretations. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-28 in cs.AI). Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI). Pagina del lavoro: https://arxiv.org/abs/2609.30642 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-08T01:12:14.457Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-28?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).