关于重用ChatGPT生成代码时破坏Copyleft许可证的可能性
On the Possibility of Breaking Copyleft Licenses When Reusing Code Generated by ChatGPT
AI总结:
本文通过大规模实验(生成超7万个方法实现)研究ChatGPT推荐代码时复现copyleft代码的风险,发现增大上下文会提高复现概率,而提高温度参数可缓解该问题。
摘要:
AI助手可以通过推荐代码来帮助开发者将其纳入实现中(例如,根据方法签名建议方法的实现)。尽管这些推荐很有用,但它们可能镜像了公共仓库中可用的copyleft代码,使开发者面临在仅允许在特定约束下(例如,衍生软件的特定许可证)重用代码的风险。本文对ChatGPT中这一现象的频率和规模进行了大规模研究。具体而言,我们使用一系列配置和提示生成了超过70,000个方法实现,结果表明更大的上下文会增加复现copyleft代码的可能性,但更高的温度设置可以缓解这一问题。
英文摘要:
AI assistants can help developers by recommending code to be included in their implementations (e.g., suggesting the implementation of a method from its signature). Although useful, these recommendations may mirror copyleft code available in public repositories, exposing developers to the risk of reusing code that they are allowed to reuse only under certain constraints (e.g., a specific license for the derivative software). This paper presents a large-scale study about the frequency and magnitude of this phenomenon in ChatGPT. In particular, we generate more than 70,000 method implementations using a range of configurations and prompts, revealing that a larger context increases the likelihood of reproducing copyleft code, but higher temperature settings can mitigate this issue.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。