本文探讨了大语言模型的自然语言生成能力,并应用于编程课程中常见的两种学习资源类型。使用OpenAI Codex作为大语言模型,我们创建编程练习(包括示例解决方案和测试用例)和代码说明,从定性和定量上评估这些练习。我们的结果表明,大多数自动生成的内容既新颖又明智,在某些情况下可以按原样使用。在创建练习时,我们发现仅通过提供关键字作为模型输入来影响编程概念和它们所包含的上下文主题非常容易。我们的分析表明,大规模生成机器学习模型是指导者的工具,尽管仍然需要进行一些监督以确保生成的内容的质量在传递给学生之前。我们进一步讨论了OpenAI Codex和类似工具对入门编程教育的含义,并强调了未来的研究流,这些研究流有可能提高教师和学生的教育体验质量。
translated by 谷歌翻译
The introductory programming sequence has been the focus of much research in computing education. The recent advent of several viable and freely-available AI-driven code generation tools present several immediate opportunities and challenges in this domain. In this position paper we argue that the community needs to act quickly in deciding what possible opportunities can and should be leveraged and how, while also working on how to overcome or otherwise mitigate the possible challenges. Assuming that the effectiveness and proliferation of these tools will continue to progress rapidly, without quick, deliberate, and concerted efforts, educators will lose advantage in helping shape what opportunities come to be, and what challenges will endure. With this paper we aim to seed this discussion within the computing education community.
translated by 谷歌翻译
自动程序合成是软件工程中的持久梦想。最近,Open AI和Microsoft提出了一种有希望的深度学习(DL)解决方案,称为Copilot,作为工业产品。尽管一些研究评估了副驾驶解决方案的正确性并报告其问题,但需要进行更多的经验评估,以了解开发人员如何有效地受益。在本文中,我们研究了两项不同的编程任务中副标士的功能:(1)为基本算法问题生成(和复制)正确,有效的解决方案,(2)将副副副总裁与人类程序员的建议解决方案与一组人的建议解决方案进行比较编程任务。对于前者,我们评估副铜在解决计算机科学中选定的基本问题(例如对基本数据结构的基本问题)中的性能和功能。在后者中,使用人提供的解决方案的编程问题数据集。结果表明,Copilot能够为几乎所有基本算法问题提供解决方案,但是,某些解决方案是越野车且不可复制的。此外,Copilot在组合多种方法来生成解决方案方面存在一些困难。将副驾驶员与人类进行比较,我们的结果表明,人类溶液的正确比率大于副本的正确比率,​​而副铜产生的越野车解决方案需要更少的努力来维修。尽管本研究和以前的研究中的强调,副柯洛特(Copilot)作为开发人员特别是在高级编程任务中的助手表现出局限性,但它可以为基本编程任务生成初步解决方案。
translated by 谷歌翻译
随着人工智能(AI)技术在社会中变得越来越强大和突出,他们的滥用就是日益关注的问题。在教育环境中,学生可以使用AI技术来欺骗作业和考试。在本文中,我们探讨了变形金刚是否可以用于求解介绍级的编程作业,同时绕过常用的AI工具来检测软件部分之间的相似性。我们发现使用GPT-J [Wang和Komatsuzaki,2021]的学生可以完成入门级的编程作业,而无需触发Moss的怀疑[Aiken,2000],这是一种广泛使用的软件相似性和窃探测工具。尽管事实上GPT-J没有接受有关问题的培训,也没有提供任何示例可供工作。我们进一步发现,GPT-J编写的代码在结构上是多种多样的,缺乏任何特定的告诉未来的pla窃检测技术可能会用来尝试识别算法生成的代码。最后,我们讨论了大语言模型的道德和教育含义以及未来研究的方向。
translated by 谷歌翻译
大型语言模型,例如OpenAI的法典和DeepMind的字母,可以生成代码来解决以自然语言表达的各种问题。这项技术已经在至少一项广泛使用的编程编辑器扩展程序中进行了商业化:Github Copilot。在本文中,我们探讨了具有大型语言模型(LLM辅助编程)的编程与程序员协助的先前概念化相似,并且与众不同。我们借鉴了公开可用的经验报告,有关LLM辅助编程以及先前的可用性和设计研究。我们发现,尽管LLM辅助编程通过搜索和重用分享了一些编译,配对编程和编程的属性,但技术可能性和实践经验都存在根本差异。因此,应该将LLM辅助编程视为具有自己独特的属性和挑战的新方法。最后,我们借鉴了用户研究的观察结果,在该观察中,非专家最终用户程序员使用LLM辅助工具来求解电子表格中的数据任务。我们讨论可能出现的问题,并在将大型语言模型应用于最终用户编程时,尤其是对于几乎没有编程专业知识的用户。
translated by 谷歌翻译
虽然编程是现代社会中最广泛适用的技能之一,但现代机器学习模型仍然无法对基本问题的解决方案。尽管重要的是,对评估代码生成令人惊讶的是,很少有效,并且难以准确地评估代码生成性能。为了满足这一挑战,我们介绍了一个用于代码生成的基准。与在更受限制的设置中的事先工作不同,我们的基准测试衡量模型采取任意自然语言规范的能力,并生成满意的Python代码。类似于公司如何评估候选软件开发人员,然后我们通过检查测试用例的生成代码来评估模型。我们的基准测试包括10,000个问题,从具有简单的单线解决方案来实现实质性算法挑战。我们在GitHub和我们的培训集上微调大型语言模型,我们发现语法错误的普遍性随着模型的提高而导致呈指数级递减。最近的模型如GPT-Neo可以通过大约20%的介绍性问题的测试用例,因此我们发现机器学习模型现在开始学习如何代码。随着自动代码生成的社会意义在未来几年增加,我们的基准可以提供跟踪进步的重要措施。
translated by 谷歌翻译
The Codex model has demonstrated extraordinary competence in synthesizing code from natural language problem descriptions. However, in order to reveal unknown failure modes and hidden biases, such large-scale models must be systematically subjected to multiple and diverse evaluation studies. In this work, we evaluate the code synthesis capabilities of the Codex model based on a set of 115 Python problem statements from a popular competitive programming portal: HackerRank. Our evaluation shows that Codex is indeed proficient in Python, solving 96% of the problems in a zero-shot setting, and 100% of the problems in a few-shot setting. However, Codex exhibits clear signs of generating memorized code based on our evaluation. This is alarming, especially since the adoption and use of such models could directly impact how code is written and produced in the foreseeable future. With this in mind, we further discuss and highlight some of the prominent risks associated with large-scale models of source code. Finally, we propose a framework for code-synthesis evaluation using variations of problem statements based on mutations.
translated by 谷歌翻译
大型语言模型已经证明了能够在自然语言和编程语言文本上进行条件和生成的能力。这样的模型打开了多语言代码生成的可能性:代码生成模型是否可以将知识从一种语言推广到另一种语言?尽管当代代码生成模型可以生成语义上正确的Python代码,但对它们使用其他语言的能力知之甚少。我们通过提出Multipl-E来促进该主题的探索,这是自然语言到代码生成的第一个多语言平行基准。 Multipl-E扩展了HumaneVal基准(Chen等,2021),以支持另外18种编程语言,涵盖了一系列编程范式和受欢迎程度。我们在Multipl-E:Codex和Incoder上评估了两个最先进的代码生成模型。我们发现,在几种语言上,法典匹配,甚至超过了其在Python上的性能。在多型E中表示的编程语言范围使我们能够探索语言频率和语言功能对模型性能的影响。最后,将代码生成基准分配给新编程语言的多重方法既可扩展又可扩展。我们描述了一种通用方法,可以轻松地增加对新基准和语言的支持。
translated by 谷歌翻译
This study evaluated the ability of ChatGPT, a recently developed artificial intelligence (AI) agent, to perform high-level cognitive tasks and produce text that is indistinguishable from human-generated text. This capacity raises concerns about the potential use of ChatGPT as a tool for academic misconduct in online exams. The study found that ChatGPT is capable of exhibiting critical thinking skills and generating highly realistic text with minimal input, making it a potential threat to the integrity of online exams, particularly in tertiary education settings where such exams are becoming more prevalent. Returning to invigilated and oral exams could form part of the solution, while using advanced proctoring techniques and AI-text output detectors may be effective in addressing this issue, they are not likely to be foolproof solutions. Further research is needed to fully understand the implications of large language models like ChatGPT and to devise strategies for combating the risk of cheating using these tools. It is crucial for educators and institutions to be aware of the possibility of ChatGPT being used for cheating and to investigate measures to address it in order to maintain the fairness and validity of online exams for all students.
translated by 谷歌翻译
人类开发人员可以使用网络安全缺陷生产代码。可以新兴'智能'代码完成工具有助于修复这些缺点吗?在这项工作中,我们研究了对零拍摄漏洞修复的代码(如Openai的Codex和AI21的侏罗纪J-1)使用大型语言模型(如Openai的Codex和AI21的J-1)。我们调查设计方面的挑战,提示将Coax LLMS进入生成不安全代码的修复版本。由于许多方法来短语和句法 - 具有自然语言,这很困难。通过对四个商业,黑盒子,“现成的”典型的模型进行大规模研究,以及局部训练的模型,在合成,手工制作和现实世界的安全错误场景的混合中,我们的实验表明,LLMS可以共同修复100%的综合生成和手工制作的情景,以及58%的脆弱性,在真实的开源项目中的历史错误中选择。
translated by 谷歌翻译
Computational notebooks, such as Jupyter notebooks, are interactive computing environments that are ubiquitous among data scientists to perform data wrangling and analytic tasks. To measure the performance of AI pair programmers that automatically synthesize programs for those tasks given natural language (NL) intents from users, we build ARCADE, a benchmark of 1082 code generation problems using the pandas data analysis framework in data science notebooks. ARCADE features multiple rounds of NL-to-code problems from the same notebook. It requires a model to understand rich multi-modal contexts, such as existing notebook cells and their execution states as well as previous turns of interaction. To establish a strong baseline on this challenging task, we develop PaChiNCo, a 62B code language model (LM) for Python computational notebooks, which significantly outperforms public code LMs. Finally, we explore few-shot prompting strategies to elicit better code with step-by-step decomposition and NL explanation, showing the potential to improve the diversity and explainability of model predictions.
translated by 谷歌翻译
大规模的,预训练的语言模型几乎没有学习的方法是回答有关代码问题的有力方法,例如,如何完成给定的代码示例,甚至从头开始生成代码段。这些模型的成功提出了一个问题,它们是否可以作为构建广泛代码生成工具的基础。传统上,此类工具是为每个任务手动和单独构建的。取而代之的是,只需提供一些示例或对预期工具行为的自然语言描述,就可以从单个预训练的语言模型中获取不同的工具。本文研究了代码的最先进的,预先训练的代码模型,Codex可能会达到此目的。我们考虑通过一系列传统工具针对的三个代码操纵和代码生成任务:(i)代码突变; (ii)从自然语言文档中测试甲骨文的生成; (iii)测试案例生成。对于每个任务,我们将几杆学习与手动构建的工具进行比较。我们的结果表明,基于模型的工具补充(代码突变),在PAR上(测试Oracle生成),甚至超越了其各自的传统构建的工具(测试案例生成),同时施加了开发它们的努力。通过比较基于模型的工具的不同变体的有效性,我们提供了有关如何将适当输入(“提示”)设计到模型以及模型大小的影响的见解。例如,我们发现,提供对代码生成任务的小型自然语言描述是改善预测的一种简单方法。总体而言,我们得出的结论是,很少有语言模型令人惊讶地有效,但是还有更多的工作要做,例如探索更多样化的方式来促使和解决更多有关任务。
translated by 谷歌翻译
Despite recent success in large language model (LLM) reasoning, LLMs still struggle with hierarchical multi-step reasoning like generating complex programs. In these cases, humans often start with a high-level algorithmic design and implement each part gradually. We introduce Parsel, a framework enabling automatic implementation and validation of complex algorithms with code LLMs, based on hierarchical function descriptions in natural language. Parsel can be used across domains requiring hierarchical reasoning, e.g. code synthesis, theorem proving, and robotic planning. We demonstrate Parsel's capabilities by using it to generate complex programs that cannot currently be automatically implemented from one description and backtranslating Python programs in the APPS dataset. Beyond modeling capabilities, Parsel allows problem-solving with high-level algorithmic designs, benefiting both students and professional programmers.
translated by 谷歌翻译
我们介绍了一种称为编程拼图的新型编程挑战,作为方案合成的客观和全面评估,并释放Python编程拼图的开源数据集(P3)。每个拼图由短Python程序$ F $定义,目标是找到一个使$ F $返回true的输入。谜题是目的,因为每个人都由其验证者$ F $的源代码完全指定,因此评估为测试候选解决方案所需的$ F $。它们不需要答案密钥或输入/输出示例,也不依赖于自然语言理解。该数据集是全面的,因为它跨越一系列困难和域的问题,从琐碎的字符串操纵问题,经典编程谜题(例如,河内塔),用于采访/竞争编程问题(例如,动态编程),在算法和数学中的长期开放问题(例如,因子)。我们开发基准枚举程序合成,GPT-3和能够解决难题的食盒求解器 - 即使没有访问任何参考解决方案 - 通过从他们自己的过去的解决方案中学习。 Codex表现最佳,解决高达18%的397个测试问题的测试问题,每次尝试和80%的问题占1,000个问题。在一个小的用户学习中,我们发现拼图解决性能和编码体验之间的正相关性,以及人类和AI求解器的难题难度之间。因此,P3的进一步改进可能对许多程序合成区域产生重大影响。
translated by 谷歌翻译
在设计基于AI的系统中,有蓬勃发展的兴趣,以帮助人类设计计算系统,包括自动生成计算机代码的工具。这些最值得注意的是,以第一个自我描述的“Ai对程序员”,GitHub Copilot,一种在开源GitHub代码上培训的语言模型。但是,代码通常包含错误 - 因此,鉴于Copilot处理的大量未曝避代码,肯定是语言模型将从可利用的错误代码中学到。这提出了对Copilot代码捐助的安全的担忧。在这项工作中,我们系统地调查了可能导致Github CopIlot推荐不安全代码的普遍存在和条件。为了执行此分析,我们提示CopIlot在与高风险CWE相关的方案中生成代码(例如,从吉利的“前25名”列表中的方案)。我们探索了三个不同代码生成轴上的Copilot的表现 - 检查它如何表现为特定的弱点多样性,提示的多样性以及域的多样性。总共生产89个不同的Copilot方案,以完成,生产1,689个计划。其中,我们发现大约40%的脆弱。
translated by 谷歌翻译
As language models (LMs) scale, they develop many novel behaviors, good and bad, exacerbating the need to evaluate how they behave. Prior work creates evaluations with crowdwork (which is time-consuming and expensive) or existing data sources (which are not always available). Here, we automatically generate evaluations with LMs. We explore approaches with varying amounts of human effort, from instructing LMs to write yes/no questions to making complex Winogender schemas with multiple stages of LM-based generation and filtering. Crowdworkers rate the examples as highly relevant and agree with 90-100% of labels, sometimes more so than corresponding human-written datasets. We generate 154 datasets and discover new cases of inverse scaling where LMs get worse with size. Larger LMs repeat back a dialog user's preferred answer ("sycophancy") and express greater desire to pursue concerning goals like resource acquisition and goal preservation. We also find some of the first examples of inverse scaling in RL from Human Feedback (RLHF), where more RLHF makes LMs worse. For example, RLHF makes LMs express stronger political views (on gun rights and immigration) and a greater desire to avoid shut down. Overall, LM-written evaluations are high-quality and let us quickly discover many novel LM behaviors.
translated by 谷歌翻译
这项工作表明了如何以编程难题的形式使用大规模语言模型(LMS)与经过验证的解决方案合成编程问题,然后可以将其用于微调相同的模型,从而提高其性能。这项工作以最近的两项发展为基础。首先,LMS在非平凡的推理和算法实施中取得了突破,生成可以解决某些中级竞争性编程问题的代码。但是,培训代码LMS涉及策划的一组自然语言问题描述以及源代码测试和解决方案,这些测试和解决方案的大小有限。其次,引入了一种新的编程挑战格式,称为编程难题,该格式不需要自然语言描述,并通过源代码测试直接指定。在这项工作中,我们展示了如何使用Python解释器验证的合成编程难题和解决方案,可用于改善从P3求解测试难题的性能,P3是一套Python公共基准的Python编程难题。此外,我们发布了由Codex模型生成的100万个难题和解决方案的数据集,我们证明可以通过微调改善较小的模型。
translated by 谷歌翻译
评论是源代码的重要组成部分,是文档的主要来源。这引起了人们对使用大量注释的兴趣训练或评估消耗或生产它们的工具,例如生成甲骨文,甚至是从注释中生成代码,或自动生成代码摘要。这项工作大部分对评论的结构和质量做出了强烈的假设,例如假设它们主要由适当的英语句子组成。但是,我们对这些用例的现有评论的实际质量知之甚少。评论通常包含在其他类型的文本中看不到的独特结构和元素,并且从中过滤或提取信息需要额外的谨慎。本文探讨了来自GitHub的840个最受欢迎的开源项目和Srilab数据集的8422个项目的Python评论的内容和质量,并且Na \“ Ive vs.深入过滤的影响都可以使用现有注释来用于使用现有注释。培训和评估产生评论的系统。
translated by 谷歌翻译
Students' ability to ask curious questions is a crucial skill that improves their learning processes. To train this skill, previous research has used a conversational agent that propose specific cues to prompt children's curiosity during learning. Despite showing pedagogical efficiency, this method is still limited since it relies on generating the said prompts by hand for each educational resource, which can be a very long and costly process. In this context, we leverage the advances in the natural language processing field and explore using a large language model (GPT-3) to automate the generation of this agent's curiosity-prompting cues to help children ask more and deeper questions. We then used this study to investigate a different curiosity-prompting behavior for the agent. The study was conducted with 75 students aged between 9 and 10. They either interacted with a hand-crafted conversational agent that proposes "closed" manually-extracted cues leading to predefined questions, a GPT-3-driven one that proposes the same type of cues, or a GPT-3-driven one that proposes "open" cues that can lead to several possible questions. Results showed a similar question-asking performance between children who had the two "closed" agents, but a significantly better one for participants with the "open" agent. Our first results suggest the validity of using GPT-3 to facilitate the implementation of curiosity-stimulating learning technologies. In a second step, we also show that GPT-3 can be efficient in proposing the relevant open cues that leave children with more autonomy to express their curiosity.
translated by 谷歌翻译
在这项工作中,我们审查并评估了一个具有公开可用和广泛使用的数据集的深度学习知识追踪(DLKT)模型,以及学习编程的新型学生数据集。评估的DLKT模型已重新实现,用于评估先前报告的结果的可重复性和可复制性。我们测试在与模型的主要架构上独立于模型的比较模型中找到的不同输入和输出层变化,以及在某些研究中隐含地和明确地使用的不同最大尝试计数选项。几个指标用于反映评估知识追踪模型的质量。评估的知识追踪模型包括Vanilla-DKT,两个长短期内存深度知识跟踪(LSTM-DKT)变体,两个动态键值存储器网络(DKVMN)变体,以及自我细致的知识跟踪(SAKT)。我们评估Logistic回归,贝叶斯知识跟踪(BKT)和简单的非学习模型作为基准。我们的结果表明,DLKT模型一般优于非DLKT模型,DLKT模型之间的相对差异是微妙的,并且在数据集之间经常变化。我们的研究结果还表明,通常的纯模型,例如平均预测,比更复杂的知识追踪模型更好地表现出更好的性能,尤其是在准确性方面。此外,我们的公制和封路数据分析显示,用于选择最佳模型的度量标准对模型的性能有明显的影响,并且该度量选择可以影响模型排名。我们还研究了输入和输出层变化的影响,过滤出长期尝试序列,以及随机性和硬件等非模型属性。最后,我们讨论模型性能可重量和相关问题。我们的模型实现,评估代码和数据作为本工作的一部分发布。
translated by 谷歌翻译