論文の概要: Chain of Code: Reasoning with a Language Model-Augmented Code Emulator
- arxiv url: http://arxiv.org/abs/2312.04474v1
- Date: Thu, 7 Dec 2023 17:51:43 GMT
- ステータス: 処理完了
- システム内更新日: 2023-12-08 14:00:05.859475
- Title: Chain of Code: Reasoning with a Language Model-Augmented Code Emulator
- Title(参考訳): コードの連鎖:言語モデル拡張コードエミュレータによる推論
- Authors: Chengshu Li, Jacky Liang, Andy Zeng, Xinyun Chen, Karol Hausman, Dorsa
Sadigh, Sergey Levine, Li Fei-Fei, Fei Xia, Brian Ichter
- Abstract要約: 言語モデル(LM)はコード記述を活用して思考の連鎖推論を改善する。
我々は、LMコード駆動推論を改善するシンプルな、そして驚くほど効果的な拡張であるChain of Code (CoT)を提案する。
- 参考スコア(独自算出の注目度): 119.0018170558366
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Code provides a general syntactic structure to build complex programs and
perform precise computations when paired with a code interpreter -- we
hypothesize that language models (LMs) can leverage code-writing to improve
Chain of Thought reasoning not only for logic and arithmetic tasks, but also
for linguistic ones (and in particular, those that are a mix of both). For
example, consider prompting an LM to write code that counts the number of times
it detects sarcasm in an essay: the LM may struggle to write an implementation
for "detect_sarcasm(string)" that can be executed by the interpreter (handling
the edge cases would be insurmountable). However, LMs may still produce a valid
solution if they are used not only to write the code, but also to selectively
"emulate" the interpreter by generating the expected output of
"detect_sarcasm(string)" and other lines of code (e.g., that the interpreter
could not compile). In this work, we propose Chain of Code (CoT), a simple yet
surprisingly effective extension that improves LM code-driven reasoning. The
key idea is to encourage LMs to format linguistic sub-tasks in a program as
flexible pseudocode that the compiler can explicitly catch undefined behaviors
and hand off to simulate with an LM (as an "LMulator"). Experiments demonstrate
that Chain of Code outperforms Chain of Thought and other baselines across a
variety of benchmarks; on BIG-Bench Hard, Chain of Code achieves 84%, a gain of
12% over Chain of Thought. CoT scales well with large and small models alike,
and broadens the scope of reasoning questions that LMs can correctly answer by
"thinking in code". Project webpage: https://chain-of-code.github.io/.
- Abstract(参考訳): Codeは、複雑なプログラムを構築し、コードインタプリタとペアになったときに正確な計算を行うための一般的な構文構造を提供します。
LMはインタプリタで実行できる"detect_sarcasm(string)"の実装を書くのに苦労するかもしれません(エッジケースの処理は不要でしょう)。
しかし、LMはコードの記述だけでなく、"detect_sarcasm(string)"や他のコード行(例えば、インタプリタがコンパイルできない)の出力を生成することで、インタプリタを選択的に"エミュレート"するためにも有効なソリューションを生成することができる。
本研究では,LMコード駆動推論を改善するシンプルな,驚くほど効果的な拡張であるChain of Code (CoT)を提案する。
キーとなる考え方は、LMがプログラム内の言語サブタスクをフレキシブルな擬似コードとしてフォーマットすることを奨励し、コンパイラが明示的に定義されていない振る舞いをキャッチし、LMでシミュレートする("LMulator")ことである。
さまざまなベンチマークにおいて、Chain of CodeがChain of Thoughtやその他のベースラインよりも優れており、BIG-Bench Hardでは、Chain of Codeが84%、Chain of Thoughtよりも12%向上している。
CoTは、大小のモデルと同様の規模でスケールし、LMが「コードを考える」ことで正しく答えられるような推論可能な質問の範囲を広げます。
プロジェクトWebページ: https://chain-of-code.github.io/.com
関連論文リスト
- CodeMind: A Framework to Challenge Large Language Models for Code
Reasoning [1.644043499620662]
大規模言語モデル(LLM)のコード推論能力を評価するために設計されたフレームワークであるCodeMindを紹介する。
CodeMindは、Independent Execution Reasoning (IER)、Dependent Execution Reasoning (DER)、Specification Reasoning (SR)の3つのコード推論タスクをサポートしている。
論文 参考訳(メタデータ) (2024-02-15T02:24:46Z) - Code Prompting Elicits Conditional Reasoning Abilities in Text+Code LLMs [69.99031792995348]
自然言語の問題をコードに変換する一連のプロンプトであるコードプロンプトを導入します。
コードプロンプトは複数のLLMに対して高速に向上することがわかった。
GPT 3.5を解析した結果,入力問題のコードフォーマッティングが性能向上に不可欠であることが判明した。
論文 参考訳(メタデータ) (2024-01-18T15:32:24Z) - Bridging Code Semantic and LLMs: Semantic Chain-of-Thought Prompting for
Code Generation [22.219645213202178]
本稿では,SeCoT というコードの意味情報を抽出する "Semantic Chain-of-Thought" 手法を提案する。
本研究では,SeCoTが最先端の性能を実現し,大規模モデルやコード生成の可能性を大幅に向上させることを示す。
論文 参考訳(メタデータ) (2023-10-16T05:09:58Z) - Guess & Sketch: Language Model Guided Transpilation [61.24102712913847]
学習されたトランスパイレーションは、手作業による書き直しやエンジニアリングの取り組みに代わるものだ。
確率的ニューラルネットワークモデル(LM)は、入力毎に可塑性出力を生成するが、正確性を保証するコストがかかる。
Guess & Sketch は LM の特徴からアライメントと信頼性情報を抽出し、意味的等価性を解決するためにシンボリック・ソルバに渡す。
論文 参考訳(メタデータ) (2023-09-25T15:42:18Z) - COMEX: A Tool for Generating Customized Source Code Representations [7.151800146054561]
COMEXは、研究者と開発者が複数のコードビューを作成し、組み合わせることを可能にするフレームワークである。
プロシージャ内スニペットとプロシージャ間スニペットの両方を使用して、メソッドレベルのスニペットとプログラムレベルのスニペットの両方を分析することができる。
これは40以上の言語をサポートする、広く使われているインクリメンタル分析ツールであるtree-sitter上に構築されている。
論文 参考訳(メタデータ) (2023-07-10T16:46:34Z) - Code Prompting: a Neural Symbolic Method for Complex Reasoning in Large
Language Models [74.95486528482327]
コードプロンプト(code prompting)は、ゼロショットバージョンと少数ショットバージョンの両方を持ち、中間ステップとしてコードをトリガーするニューラルシンボルプロンプトである。
我々は,記号的推論と算術的推論を含む7つの広く使用されているベンチマーク実験を行った。
論文 参考訳(メタデータ) (2023-05-29T15:14:09Z) - PAL: Program-aided Language Models [112.94785609781503]
自然言語問題を理解するために,プログラム支援言語モデル(PaL)を提案する。
PaLはソリューションステップをPythonインタプリタのようなプログラムランタイムにオフロードする。
私たちは12のベンチマークで新しい最先端の結果を設定しました。
論文 参考訳(メタデータ) (2022-11-18T18:56:13Z) - Interactive Code Generation via Test-Driven User-Intent Formalization [60.90035204567797]
大きな言語モデル(LLM)は、非公式な自然言語(NL)の意図からコードを生成する。
自然言語は曖昧であり、形式的な意味論が欠けているため、正確性の概念を定義するのは難しい。
言語に依存しない抽象アルゴリズムと具体的な実装TiCoderについて述べる。
論文 参考訳(メタデータ) (2022-08-11T17:41:08Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。