LLMs are increasingly embedded in programming workflows, from code generation to automated code review. Yet, how gendered communication styles interact with LLM-assisted programming and code review remains underexplored. We present a mixed-methods pilot study examining whether gender-related linguistic differences in prompts influence code generation outcomes and code review decisions. Across three complementary studies, we analyze (i) collected real-world coding prompts, (ii) a controlled user study, in which developers solve identical programming tasks with LLM assistance, and (iii) an LLM-based simulated evaluation framework that systematically varies gender-coded prompt styles and reviewer personas. We find that gender-related differences in prompting style are subtle but measurable, with female-authored prompts exhibiting more indirect and involved language, which does not translate into consistent gaps in functional correctness or static code quality. For LLM code review, in contrast, we observe systematic biases: on average, models approve female-authored code more, despite comparable quality. Controlled experiments show that gender-coded prompt style affect code length and maintainability, while reviewer behavior varies across models. Our findings suggest that fairness risks in LLM-assisted programming arise less from generation accuracy than from LLM evaluation, as LLMs are increasingly deployed as automated code reviewers.


翻译:大型语言模型正日益融入编程工作流程,从代码生成到自动化代码审查。然而,性别化沟通风格如何与基于大型语言模型的编程及代码审查相互作用,仍有待深入探究。我们通过一项混合方法的试点研究,考察了提示中与性别相关的语言差异是否会影响代码生成结果和代码审查决策。在三个互补性研究中,我们分析了:(i) 收集的真实编程提示;(ii) 一项受控用户研究,其中开发者借助大型语言模型完成相同的编程任务;(iii) 一个基于大型语言模型的模拟评估框架,该系统性地变化了性别编码的提示风格和审查者角色。我们发现,提示风格中与性别相关的差异微妙但可测量:女性撰写的提示表现出更多间接性和投入性语言,但这并未转化为功能正确性或静态代码质量上的持续差距。相比之下,在大型语言模型的代码审查中,我们观察到系统性偏差:平均而言,模型更倾向于批准女性撰写的代码,尽管代码质量相当。受控实验表明,性别编码的提示风格会影响代码长度和可维护性,而审查者的行为因模型而异。我们的研究结果表明,基于大型语言模型的编程中的公平性风险更少源于生成准确性,而更多源于评估环节,因为大型语言模型正被越来越多地部署为自动化代码审查者。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
大规模语言模型的个性化:综述
专知会员服务
43+阅读 · 2024年11月4日
大语言模型评估技术研究进展
专知会员服务
49+阅读 · 2024年7月9日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
大型语言模型的高效提示方法综述
专知会员服务
75+阅读 · 2024年4月2日
【深度语义匹配模型】原理篇二:交互篇
AINLP
16+阅读 · 2020年5月18日
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
超全总结:神经网络加速之量化模型 | 附带代码
推荐|机器学习中的模型评价、模型选择和算法选择!
全球人工智能
10+阅读 · 2018年2月5日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
ICML 2026 | 自回归Boltzmann生成器重塑分子采样
专知会员服务
0+阅读 · 今天15:55
GNN跨域综述:从消息传递到图基础模型
专知会员服务
0+阅读 · 今天15:53
无人机自主控制与人工智能:系统性综述
专知会员服务
11+阅读 · 今天7:25
巡飞弹与反无人机系统——现代战场的两大支柱
专知会员服务
3+阅读 · 今天6:54
《打造“黄金舰队”》57页报告
专知会员服务
3+阅读 · 今天6:52
《北约数字教官网络发展路径》128页报告
专知会员服务
2+阅读 · 今天6:33
ECCV 2026 | MIMFlow:MIM与归一化流统一图像生成
专知会员服务
7+阅读 · 6月25日
网状网络及其在军事领域的运用
专知会员服务
8+阅读 · 6月25日
无美国参与的欧洲战争方式(万字长文)
专知会员服务
8+阅读 · 6月25日
《国防领域敏感性分析白皮书》
专知会员服务
9+阅读 · 6月25日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员