For faster navigation, this Iframe is preloading the Wikiwand page for OpenAI Codex.

OpenAI Codex

OpenAI Codex(オープンエーアイ・コーデックス)は、OpenAIが開発した人工知能モデルである。自然言語を解析し、対応するコンピュータープログラム(コード)を生成することができる。これは、Visual Studio CodeNeovimなど、一部の統合開発環境(IDE)向けに開発されたプログラミング自動補完ツールGitHub Copilotの機能拡張に使用されている[1]。CodexはOpenAIのGPT-3モデルを継承し、アプリケーションソフトウェアのプログラミングで使用できるように微調整されている。

2021年8月10日、OpenAIは、非公開ベータ版のCodex用のアプリケーション・プログラミング・インタフェース(API)をリリースした[1]。CodexはGPT-3の系統であるが、2023年3月に非推奨(deprecated)となり、GPT-3.5以降が推奨となった[2]

特徴

[編集]

Codexは、テキストを用いて訓練したニューラルネットワークGPT-3に基づいており、GitHubの5,400万におよぶリポジトリから159ギガバイトPythonコードでさらに訓練されている[3][4]。Codexの典型的な使用例としては、『//compute the moving average of an array for a given window size』(訳: 指定されたウィンドウサイズで配列の移動平均を計算する)のようなコメント文をプロンプト(命令)として入力し、その要求を満たすコードブロックをAIが提案することである[5]。OpenAIは、Codexが要求の約37%を完了することができ、人間のプログラミングを置き換えるのではなく、その作業を速めることを目的としていると述べている。OpenAIのブログによると、Codexが最も優れているのは『単純な問題を既存のコードにマッピングする』ことであり、これを『おそらくプログラミングの中で最も楽しくない部分』と表現している[6][7]Fast.ai英語版の共同設立者であるJeremy Howardは、『(Codexは)それほど多くのコードを書かずにコードを作成できる方法』であり、『常に正しいとは限らないが、十分に近いものである』と述べている[8]。OpenAIの研究者が記述した論文によると、各テストケースを100回試行した結果、プロンプトの70.2%が実用的な回答を示したとのことである[9]

OpenAIは、CodexはGoJavaScriptPerlPHPRubyShellSwiftTypeScriptなどの10を超えるプログラミング言語で動作すると主張しているが、中でもPythonで最も効果的とされる[1]VentureBeat英語版によると、OpenAIが公開したデモンストレーションでは、印象深い共参照解決英語版の能力が示された。デモンストレーション説明者は、JavaScriptでブラウザゲームを作成し、matplotlibを使ってデータサイエンスチャートを生成することができた[7]

OpenAIは、CodexがMailchimpMicrosoft WordSpotifyGoogle Calendarなどのサービスやアプリと連携できることを示した[7][10]マイクロソフトが、Codexの能力を調査することに関心を持っていると伝えられている[10]

モデル一覧

[編集]

以下の4種類のモデルが作られた[11]

  • code-davinci-002
  • code-davinci-001
  • code-cushman-002
  • code-cushman-001

問題

[編集]

OpenAIのデモンストレーションでは、非効率なコードや、コードサンプルに由来する一度きりの癖のような欠陥が明らかになった[7]。OpenAIの最高技術責任者であるGreg Brockmanは、The Vergeとのインタビューで、『(Codexは)あなたが求めているのが何かを正確に理解していないことがあり、試行錯誤が必要になる場合もある。』と述べた[10]。OpenAIの研究者は、Codexが多段階またはより高度な要求に苦戦し、しばしば失敗したり直感に反する動作をすることを発見した。また、初心者プログラマーによる過度の依存、学習データに基づく偏り、脆弱なコードによるセキュリティへの影響など、安全性に関わるいくつかの問題も挙げられた[9]

VentureBeatは、Codexは公開データを使って訓練されるため、悪意のあるコードが意図的にアップロードされることによる「データ・ポイズニング」に対して脆弱である可能性があると述べている[7]ニューヨーク大学の研究者の調査では、リスクの高い共通脆弱性タイプ一覧英語版(CWE)に関連するシナリオで、GitHub Copilot(Codexを採用)が生成したコードの約40%に、不具合やその他の悪用できる設計の欠陥が含まれていた[12]

著作権

[編集]

フリーソフトウェア財団は、CopilotとCodexによって生成されたコードの一部が、意図せずに著作権を侵害する可能性があり、特に二次的著作物を同等の条件でライセンスすることを要求するGPLの要件に違反することに懸念を表明している[13]。彼らが提起する問題は、公開リポジトリを用いた訓練がフェアユース(公正利用)に該当するかどうか、開発者が生成されたコードから侵害個所を検出する方法、訓練済みの機械学習モデルが変更可能なソースコードまたは学習データの編集物と見なせるか、機械学習モデル自体が著作権を有するか、それは誰によるものか、などである[13][14]。GitHubの内部調査により、生成されたコードの約0.1%に学習データからの直接複製が含まれていることが判明した。具体的な例としては、高速逆平方根英語版アルゴリズムの原著作物のコードを、コメントや誤った著作権表示を含めてモデルから出力していたことが挙げられる[5]

これに対してOpenAIは、『AIシステムの訓練における著作権に関する法的不確実性は、AI開発者に多くの負担を強いるため、公的に解決されるべきである』と述べている[5]。Codexが持つ著作権の問題は、全米作家協会他対Google裁判と比較され、そこではGoogle Booksが数百万冊のスキャンされた書籍からのテキストの一部を使用することがフェアユースに該当するとの判決が下されている[5][15]

脚注

[編集]
  1. ^ a b c Zaremba, Wojciech (2021年8月10日). “OpenAI Codex”. OpenAI. 2021年9月3日閲覧。
  2. ^ Code completion (DEPRECATED) | OpenAI Help Center
  3. ^ Wiggers, Kyle (2021年7月8日). “OpenAI warns AI behind GitHub's Copilot may be susceptible to bias”. VentureBeat. https://venturebeat.com/2021/07/08/openai-warns-ai-behind-githubs-copilot-may-be-susceptible-to-bias/ 2021年9月3日閲覧。 
  4. ^ Alford, Anthony (2021年8月31日). “OpenAI Announces 12 Billion Parameter Code-Generation AI Codex”. InfoQ. https://www.infoq.com/news/2021/08/openai-codex/ 2021年9月3日閲覧。 
  5. ^ a b c d Anderson, Tim; Quach, Katyanna (2021年7月6日). “GitHub Copilot auto-coder snags emerge, from seemingly spilled secrets to bad code, but some love it”. The Register. https://www.theregister.com/2021/07/06/github_copilot_autocoder_caught_spilling/ 2021年9月4日閲覧。 
  6. ^ Dorrier, Jason (2021年8月15日). “OpenAI's Codex Translates Everyday Language Into Computer Code”. SingularityHub. https://singularityhub.com/2021/08/15/openais-codex-translates-everyday-language-into-computer-code/ 2021年9月3日閲覧。 
  7. ^ a b c d e Dickson, Ben (2021年8月16日). “What to expect from OpenAI's Codex API”. VentureBeat. https://venturebeat.com/2021/08/16/what-to-expect-from-openais-codex-api/ 2021年9月3日閲覧。 
  8. ^ Metz, Cade (2021年9月9日). “A.I. Can Now Write Its Own Computer Code. That's Good News for Humans.”. The New York Times. https://www.nytimes.com/2021/09/09/technology/codex-artificial-intelligence-coding.html 2021年9月16日閲覧。 
  9. ^ 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 (14 July 2021). "Evaluating Large Language Models Trained on Code". arXiv:2107.03374 [cs]。
  10. ^ a b c Vincent, James (2021年8月10日). “OpenAI can translate English into code with its new machine learning software Codex”. The Verge. https://www.theverge.com/2021/8/10/22618128/openai-codex-natural-language-into-code-api-beta-access 2021年9月3日閲覧。 
  11. ^ Models - OpenAI API
  12. ^ Pearce, Hammond; Ahmad, Baleegh; Tan, Benjamin; Dolan-Gavitt, Brendan; Karri, Ramesh (16 December 2021). "Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions". arXiv:2108.09293 [cs.CR]。
  13. ^ a b Krill, Paul (2021年8月2日). “GitHub Copilot is 'unacceptable and unjust,' says Free Software Foundation”. InfoWorld. https://www.infoworld.com/article/3627319/github-copilot-is-unacceptable-and-unjust-says-free-software-foundation.html 2021年9月3日閲覧。 
  14. ^ Robertson, Donald (2021年7月28日). “FSF-funded call for white papers on philosophical and legal questions around Copilot: Submit before Monday, August 23, 2021”. Free Software Foundation. https://www.fsf.org/blogs/licensing/fsf-funded-call-for-white-papers-on-philosophical-and-legal-questions-around-copilot 2021年9月4日閲覧。 
  15. ^ Barber, Gregory (July 12, 2021). “GitHub's Commercial AI Tool Was Built From Open Source Code”. WIRED. https://www.wired.com/story/github-commercial-ai-tool-built-open-source-code/ 2021年9月4日閲覧。. 


{{bottomLinkPreText}} {{bottomLinkText}}
OpenAI Codex
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?