Jump to content

OpenAI Codex: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Arthomnix (talk | contribs)
m use cite tweet template
No edit summary
Line 31: Line 31:
[[Category:Deep learning software applications]]
[[Category:Deep learning software applications]]
[[Category:Copyright infringement of software]]
[[Category:Copyright infringement of software]]
[[Category:Generative pretrained transformer]]
[[Category:OpenAI]]
[[Category:OpenAI]]

Revision as of 15:50, 15 May 2023

OpenAI Codex is an artificial intelligence model developed by OpenAI. It parses natural language and generates code in response. It powers GitHub Copilot, a programming autocompletion tool for select IDEs, like Visual Studio Code and Neovim.[1] Codex is a descendant of OpenAI's GPT-3 model, fine-tuned for use in programming applications.

OpenAI released an API for Codex in closed beta.[1] In March 2023, OpenAI shut down access to Codex.[2] Due to public appeals from researchers OpenAI reversed course.[3] The Codex model can still be used by researchers of the OpenAI Research Access Program.[4]

Capabilities

Based on GPT-3, a neural network trained on text, Codex was additionally trained on 159 gigabytes of Python code from 54 million GitHub repositories.[5][6] A typical use case of Codex is for a user to type a comment, such as "//compute the moving average of an array for a given window size", then use the AI to suggest a block of code that satisfies that comment prompt.[7] OpenAI stated that Codex can complete approximately 37% of requests and is meant to make human programming faster rather than to replace it. According to OpenAI's blog, Codex excels most at "mapping... simple problems to existing code", which they describe as "probably the least fun part of programming".[8][9] Jeremy Howard, co-founder of Fast.ai, stated that "Codex is a way of getting code written without having to write as much code" and that "it is not always correct, but it is just close enough".[10] According to a paper written by OpenAI researchers, when Codex attempted each test case 100 times, it generated working solutions for 70.2% of prompts.[11]

OpenAI claims that Codex can create code in over a dozen programming languages, including Go, JavaScript, Perl, PHP, Ruby, Shell, Swift, and TypeScript, though it is most effective in Python.[1] According to VentureBeat, demonstrations uploaded by OpenAI showed impressive coreference resolution capabilities. The demonstrators were able to create a browser game in JavaScript and generate data science charts using matplotlib.[9]

OpenAI showed that Codex can interface with services and apps such as Mailchimp, Microsoft Word, Spotify, and Google Calendar.[9][12] Microsoft is reportedly interested in exploring[vague] Codex's capabilities.[12]

Issues

OpenAI demonstrations showcased flaws such as inefficient code and one-off quirks in code samples.[9] In an interview with The Verge, OpenAI chief technology officer Greg Brockman said that "sometimes [Codex] doesn't quite know exactly what you're asking" and that it can require some trial and error.[12] OpenAI researchers found that Codex struggles with multi-step and higher-level[clarification needed] prompts, often failing or yielding counter-intuitive behavior. Additionally, they brought up several safety issues, such as over-reliance by novice programmers, biases based on the training data, and security impacts due to vulnerable code.[11]

VentureBeat stated that because Codex is trained on public data, it could be vulnerable to "data poisoning" via intentional uploads of malicious code.[9] According to a study by researchers from New York University, approximately 40% of code generated by GitHub Copilot (which uses Codex) in scenarios relevant to high-risk CWEs included glitches or other exploitable design flaws.[13]

The Free Software Foundation expressed concerns that code snippets generated by Copilot and Codex could violate copyright, in particular the condition of the GPL that requires derivative works to be licensed under equivalent terms.[14] Issues they raised include whether training on public repositories falls into fair use or not, how developers could discover infringing generated code, whether trained machine learning models could be considered modifiable source code or a compilation of the training data, and if machine learning models could themselves be copyrighted and by whom.[14][15] An internal GitHub study found that approximately 0.1% of generated code contained direct copies from the training data. In one example the model outputted the training data code implementing the fast inverse square root algorithm, including comments and an incorrect copyright notice.[7]

In response, OpenAI stated that "legal uncertainty on the copyright implications of training AI systems imposes substantial costs on AI developers and so should be authoritatively resolved."[7]

The copyright issues with Codex have been compared to the Authors Guild, Inc. v. Google, Inc. court case, in which judges ruled that Google Books's use of text snippets from millions of scanned books constituted fair use.[7][16]

References

  1. ^ a b c Zaremba, Wojciech (August 10, 2021). "OpenAI Codex". OpenAI. Retrieved 2021-09-03.{{cite web}}: CS1 maint: url-status (link)
  2. ^ Kemper, Jonathan (2023-03-22). "OpenAI kills its Codex code model, recommends GPT3.5 instead". THE DECODER. Retrieved 2023-03-29.
  3. ^ Logan Kilpatrick [@OfficialLoganK] (March 22, 2023). "Hey Carolyn, we will continue to support Codex access via our Researcher Access Program. Sorry for any confusion and hopefully the research is going well!" (Tweet). Retrieved 2023-04-08 – via Twitter.
  4. ^ "Researcher Access Program application". openai.com. Retrieved 2023-04-08.
  5. ^ Wiggers, Kyle (July 8, 2021). "OpenAI warns AI behind GitHub's Copilot may be susceptible to bias". VentureBeat. Retrieved 2021-09-03.
  6. ^ Alford, Anthony (August 31, 2021). "OpenAI Announces 12 Billion Parameter Code-Generation AI Codex". InfoQ. Retrieved 2021-09-03.
  7. ^ a b c d Anderson, Tim; Quach, Katyanna (July 6, 2021). "GitHub Copilot auto-coder snags emerge, from seemingly spilled secrets to bad code, but some love it". The Register. Retrieved 2021-09-04.
  8. ^ Dorrier, Jason (August 15, 2021). "OpenAI's Codex Translates Everyday Language Into Computer Code". SingularityHub. Retrieved 2021-09-03.
  9. ^ a b c d e Dickson, Ben (August 16, 2021). "What to expect from OpenAI's Codex API". VentureBeat. Retrieved 2021-09-03.
  10. ^ Metz, Cade (September 9, 2021). "A.I. Can Now Write Its Own Computer Code. That's Good News for Humans". The New York Times. Retrieved 2021-09-16.
  11. ^ a b Chen, Mark; Tworek, Jerry; Jun, Heewoo; Yuan, Qiming; Pinto, Henrique Ponde de Oliveira; Kaplan, Jared; Edwards, Harri; Burda, Yuri; Joseph, Nicholas; Brockman, Greg; Ray, Alex (2021-07-14). "Evaluating Large Language Models Trained on Code". arXiv:2107.03374 [cs].
  12. ^ a b c Vincent, James (August 10, 2021). "OpenAI can translate English into code with its new machine learning software Codex". The Verge. Retrieved 2021-09-03.
  13. ^ Pearce, Hammond; Ahmad, Baleegh; Tan, Benjamin; Dolan-Gavitt, Brendan; Karri, Ramesh (2021-12-16). "Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions". arXiv:2108.09293 [cs.CR].
  14. ^ a b Krill, Paul (August 2, 2021). "GitHub Copilot is 'unacceptable and unjust,' says Free Software Foundation". InfoWorld. Retrieved 2021-09-03.
  15. ^ Robertson, Donald (2021-07-28). "FSF-funded call for white papers on philosophical and legal questions around Copilot: Submit before Monday, August 23, 2021". Free Software Foundation. Retrieved 2021-09-04.
  16. ^ Barber, Gregory (July 12, 2021). "GitHub's Commercial AI Tool Was Built From Open Source Code". WIRED. Retrieved 2021-09-04.