來源:techmonitor
Artificial intelligence-based coding assistants like GitHub’s Copilot leave developers “deluded” about the quality of their work, resulting in more insecure and buggy software, a new study from Stanford University has found. One AI expert told Tech Monitorit’s important to manage expectations when using AI assistants for such a task.
The study involved a group of 47 developers, 33 of whom had access to an AI assistant while writing code, while 14 were in a control group flying solo. They had to perform five security-related programming tasks including ones to encrypt or decrypt a string using a symmetric key. They all had access to a web browser to search for help but only 33 had the AI assistant.
(資料圖片)
AI assistant tools for coding and other tasks are becoming more popular, with Microsoft-owned GitHub launching Copilot as a technical preview in 2021 as a way to “improve developer productivity”.
In its own research published in September this year, GitHub found that it was making developers more productive. With 88% reporting themselves as being more productive and 59% less frustrated when coding. The main benefits were put down to becoming faster with repetitive tasks and faster completion of code lines.
Companies Intelligence
View All
Reports
View All
Data Insights
View All
The researchers from Stanford wanted to find out whether users "write more insecure code with AI assistants" and found this to be the case. They said that those using assistants are "delusional" about the quality of that code.
The team wrote in their paper: “We observed that participants who had access to the AI assistant were more likely to introduce security vulnerabilities for the majority of programming tasks, yet also more likely to rate their insecure answers as secure compared to those in our control group.”
There is a solution to the problem. “Additionally, we found that participants who invested more in the creation of their queries to the AI assistant, such as providing helper functions or adjusting the parameters, were more likely to eventually provide secure solutions.”
Only three programming languages were used in the project; Python, C and Verilog. It involved a relatively small number of participants with varying levels of experience including undergraduate students and industry professionals using a purpose-built app that was monitored by the administrators.
The first prompt involved writing in Python and those writing with help of the AI were more likely to write insecure or incorrect code. In total 79% of the control group without AI help gave a correct answer, whereas just 67% of those with the AI got it correct.
View all newsletters Sign up to our newsletters Data, insights and analysis delivered to you By The Tech Monitor team
It got worse in terms of the security of the code being created, as those in the AI group were "significantly more likely to provide an insecure solution" or use trivial ciphers to encrypt and decrypt strings. They were also less likely to conduct authenticity checks on the final value to ensure the process worked as expected.
Authors Neil Perry, Megha Srivastava, Deepak Kumar, and Dan Boneh, wrote that the results "provide caution that inexperienced developers may be inclined to readily trust an AI assistant’s output, at the risk of introducing new security vulnerabilities. Therefore, we hope our study will help improve and guide the design of future AI code assistants.”
Peter van der Putten,director of the AILab at software vendor Pegasystems said despite being on a small scale, the study was “very interesting” and produced results that can inspire further research into the use of AI assistants in code and other areas. “It also aligns with some of our broader research on reliance on AI assistants in general," he said.
He warned that users of AI assistants should approach trust in the tool in a gradual manner, by not overly relying on it and accepting its limitations. “The acceptance of a technology isn’t just determined by our expectation of quality and performance, but also by whether it can save us time and effort. We are inherently lazy creatures," he said. “In the grand scheme of things I am positive about the use of AI assistants, as long as user expectations are managed. This means defining best practices on how to use these tools, and potentially also additional capabilities to test for the quality of code."
Topics in this article : AI
你有真正了解過詩歌嗎?收集整理的關于詩歌賞析
關于詩歌賞析(精選9首)在現實生活或工作學習中,許多人對一些廣為流傳的詩歌都不陌生吧,詩歌是用高度凝練的語言,生動形象地表達作者豐富
什么是“入黨介紹人”?入黨介紹人發言簡短轉正
入黨介紹人發言簡短轉正一、什么是入黨介紹人中國共產黨入黨介紹人的職責是:(1)認真了解被介紹人對黨的態度,及個人情況,并如實向黨組織
方案應該怎么制定才合適呢?精心整理的展覽策劃方案
展覽策劃方案(通用12篇)為了確保事情或工作有序有效開展,常常需要預先制定方案,方案是書面計劃,具有內容條理清楚、步驟清晰的特點。那么
寫起作文來就毫無頭緒?幫大家整理的勇敢做自己作文
勇敢做自己作文(精選63篇)在日常學習、工作和生活中,大家都不可避免地會接觸到作文吧,作文要求篇章結構完整,一定要避免無結尾作文的出現
那么你有了解過教案嗎?幫大家整理的小學美術教學教案
小學美術教學教案(精選11篇)作為一名老師,常常要寫一份優秀的教案,教案是保證教學取得成功、提高教學質量的基本條件。那么你有了解過教案