跳到主要导航 跳到搜索 跳到主要内容

The Invisible Hand: Unveiling Provider Bias in Large Language Models for Code Generation

  • Xiaoyu Zhang
  • , Juan Zhai
  • , Shiqing Ma
  • , Qingshuang Bao
  • , Weipeng Jiang
  • , Qian Wang
  • , Chao Shen
  • , Yang Liu
  • Xi'an Jiaotong University
  • University of Massachusetts
  • Wuhan University
  • Nanyang Technological University

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Large Language Models (LLMs) have emerged as the new recommendation engines, surpassing traditional methods in both capability and scope, particularly in code generation. In this paper, we reveal a novel provider bias in LLMs: without explicit directives, these models show systematic preferences for services from specific providers in their recommendations (e.g., favoring Google Cloud over Microsoft Azure). To systematically investigate this bias, we develop an automated pipeline to construct the dataset, incorporating 6 distinct coding task categories and 30 real-world application scenarios. Leveraging this dataset, we conduct the first comprehensive empirical study of provider bias in LLM code generation across seven state-of-the-art LLMs, utilizing approximately 500 million tokens (equivalent to $5,000+ in computational costs). Our findings reveal that LLMs exhibit significant provider preferences, predominantly favoring services from Google and Amazon, and can autonomously modify input code to incorporate their preferred providers without users' requests. Such a bias holds far-reaching implications for market dynamics and societal equilibrium, potentially contributing to digital monopolies. It may also deceive users and violate their expectations, leading to various consequences. We call on the academic community to recognize this emerging issue and develop effective evaluation and mitigation methods to uphold AI security and fairness.

源语言英语
主期刊名Long Papers
编辑Wanxiang Che, Joyce Nabende, Ekaterina Shutova, Mohammad Taher Pilehvar
出版商Association for Computational Linguistics (ACL)
21376-21403
页数28
ISBN(电子版)9798891762510
出版状态已出版 - 2025
活动63rd Annual Meeting of the Association for Computational Linguistics, ACL 2025 - Vienna, 奥地利
期限: 27 7月 20251 8月 2025

出版系列

姓名Proceedings of the Annual Meeting of the Association for Computational Linguistics
1
ISSN(印刷版)0736-587X

会议

会议63rd Annual Meeting of the Association for Computational Linguistics, ACL 2025
国家/地区奥地利
Vienna
时期27/07/251/08/25

学术指纹

探究 'The Invisible Hand: Unveiling Provider Bias in Large Language Models for Code Generation' 的科研主题。它们共同构成独一无二的指纹。

引用此