Steering Large Language Models between Code Execution and Textual Reasoning

要約

最近の多くの研究は、マルチエージェントフレームワークや推論チェーンを最適化することで、大規模言語モデル(LLM)のテキスト推論能力を強化することに焦点を当てているが、いくつかのベンチマークタスクは、よりスケーラブルで、テキスト反復や検索に関連する計算オーバーヘッドを回避する直接コーディングによって100%の成功率で解くことができる。テキスト推論には、数学、論理学、最適化、検索などの課題を解決するための本質的な限界があり、モデルやデータサイズを単純にスケールアップするだけでは解決できそうにありません。最近リリースされたOpenAI GPT Code InterpreterやAutoGenのようなマルチエージェントフレームワークは、LLMを使用して複雑なタスクを解決するためにコード生成と実行を統合する顕著な能力を実証している。しかし、14のタスクと6種類のLLM(新しいO1-previewを含む)を用いて、シングルターンとマルチターンの両方でコード/テキスト生成のステアリングを行う既存の7つの一般的な手法に関する実験に基づくと、現在のところ、必要なときにコードを書くようにLLMを正しくステアリングする最適な手法は存在しない。我々は、タスクの複雑さとモデルサイズの進化に伴い、モデルがコード推論とテキスト推論を使い分ける際の興味深いパターンを発見した。また、タスクがコードで解決可能であったとしても、LLMで記述されたコードの結果が、テキスト推論を使用するよりも常に良いとは限らないことも発見した。上記の問題を軽減するために、我々はLLMコード/テキスト生成をより良く制御し、顕著な改善を達成するための3つの方法を提案する。トークンの長さと実行時間のコストについては、全ての方法について徹底的に議論する。我々は、LLMコード/テキスト生成のステアリング問題は今後の研究にとって重要であり、さらなる改善の余地があると考えている。プロジェクトページ、データセット、コードはhttps://yongchao98.github.io/CodeSteer/。

要約(オリジナル)

While a lot of recent research focuses on enhancing the textual reasoning capabilities of Large Language Models (LLMs) by optimizing the multi-agent framework or reasoning chains, several benchmark tasks can be solved with 100% success through direct coding, which is more scalable and avoids the computational overhead associated with textual iterating and searching. Textual reasoning has inherent limitations in solving tasks with challenges in math, logics, optimization, and searching, which is unlikely to be solved by simply scaling up the model and data size. The recently released OpenAI GPT Code Interpreter and multi-agent frameworks such as AutoGen have demonstrated remarkable proficiency of integrating code generation and execution to solve complex tasks using LLMs. However, based on our experiments on 7 existing popular methods for steering code/text generation in both single- and multi-turn settings with 14 tasks and 6 types of LLMs (including the new O1-preview), currently there is no optimal method to correctly steer LLMs to write code when needed. We discover some interesting patterns on when models use code vs. textual reasoning with the evolution to task complexity and model sizes, which even result in an astonishingly inverse scaling law. We also discover that results from LLM written code are not always better than using textual reasoning, even if the task could be solved through code. To mitigate the above issues, we propose three methods to better steer LLM code/text generation and achieve a notable improvement. The costs of token lengths and runtime are thoroughly discussed for all the methods. We believe the problem of steering LLM code/text generation is critical for future research and has much space for further improvement. Project Page, Datasets, and Codes are available at https://yongchao98.github.io/CodeSteer/.

arxiv情報

著者 Yongchao Chen,Harsh Jhamtani,Srinagesh Sharma,Chuchu Fan,Chi Wang
発行日 2024-10-04 15:44:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL パーマリンク