[论文解读] Comparing Software Developers with ChatGPT: An Empirical Investigation
本研究实证比较在 LeetCode 上由 ChatGPT 生成的代码与经验丰富和初级程序员的代码,聚焦性能和内存效率,以评估编码任务中的人机协作。
The advent of automation in particular Software Engineering (SE) tasks has transitioned from theory to reality. Numerous scholarly articles have documented the successful application of Artificial Intelligence to address issues in areas such as project management, modeling, testing, and development. A recent innovation is the introduction of ChatGPT, an ML-infused chatbot, touted as a resource proficient in generating programming codes and formulating software testing strategies for developers and testers respectively. Although there is speculation that AI-based computation can increase productivity and even substitute software engineers in software development, there is currently a lack of empirical evidence to verify this. Moreover, despite the primary focus on enhancing the accuracy of AI systems, non-functional requirements including energy efficiency, vulnerability, fairness (i.e., human bias), and safety frequently receive insufficient attention. This paper posits that a comprehensive comparison of software engineers and AI-based solutions, considering various evaluation criteria, is pivotal in fostering human-machine collaboration, enhancing the reliability of AI-based methods, and understanding task suitability for humans or AI. Furthermore, it facilitates the effective implementation of cooperative work structures and human-in-the-loop processes. This paper conducts an empirical investigation, contrasting the performance of software engineers and AI systems, like ChatGPT, across different evaluation metrics. The empirical study includes a case of assessing ChatGPT-generated code versus code produced by developers and uploaded in Leetcode.
研究动机与目标
- 在非功能性标准方面评估 AI 基于编码工具与人类开发者的必要性。
- 研究 ChatGPT 是否能在不同难度的编码问题中超过人类程序员。
- 评估性能、内存效率以及人机协同软件工程任务中的潜在任务分配。
提出的方法
- 使用 ChatGPT-4 为最近的 LeetCode 竞赛中的简单、中等和困难问题生成 C++ 解决方案。
- 将 ChatGPT 的解决方案与 LeetCode 指标上的经验丰富和初学者竞赛程序员的解决方案进行比较。
- 应用统计检验(t 统计量,0.01 显著性水平)来评估性能和内存效率差异。
- 分析生成解决方案的时间复杂度和空间复杂度,并观察不同问题的变异性。
- 讨论有效性威胁,包括数据集来源和先前解决方案的潜在复用。
实验结果
研究问题
- RQ1RQ1:与经验丰富的竞赛程序员在简单/中等/困难问题上的比较,ChatGPT 是否在运行时提升性能?
- RQ2RQ2:与经验丰富的竞赛程序员在简单/中等/困难问题上的比较,ChatGPT 是否在内存效率方面提升?
- RQ3RQ3:与初学者竞赛程序员在简单/中等/困难问题上的比较,ChatGPT 是否在运行时提升?
- RQ4RQ4:与初学者竞赛程序员在简单/中等/困难问题上的比较,ChatGPT 是否在内存效率方面提升?
主要发现
- ChatGPT 解决方案在简单和中等问题上在性能方面胜过初学者程序员。
- 在中等问题上,ChatGPT 解决方案在内存效率方面优于初学者。
- 没有强有力的证据表明 ChatGPT 在性能方面超过经验丰富的竞赛程序员。
- 对于困难问题,ChatGPT 未能稳定超过经验程序员,且部分问题仍未被所有组解决。
- 在所有问题中,ChatGPT 在运行时和内存方面相对于先前解决方案取得了显著的相对优势,但由于问题特征和平台评估的差异,存在一定变异性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。