ChatPaper.aiChatPaper

TextGrad: テキストによる自動「微分」

TextGrad: Automatic "Differentiation" via Text

June 11, 2024
著者: Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Zhi Huang, Carlos Guestrin, James Zou
cs.AI

要旨

AIはパラダイムシフトを経験しており、複数の大規模言語モデル(LLMs)やその他の複雑なコンポーネントを統合するシステムによってブレークスルーが達成されています。その結果、複合AIシステムのための原理的かつ自動化された最適化手法の開発が、最も重要な新たな課題の一つとなっています。ニューラルネットワークもその初期段階で同様の課題に直面していましたが、バックプロパゲーションと自動微分が最適化を容易にすることでこの分野を変革しました。これにインスパイアされ、我々はテキストによる自動「微分」を実行する強力なフレームワークであるTextGradを紹介します。TextGradは、LLMsによって提供されるテキストフィードバックをバックプロパゲートし、複合AIシステムの個々のコンポーネントを改善します。このフレームワークでは、LLMsが計算グラフ内の変数を最適化するための豊かで汎用的な自然言語の提案を提供し、コードスニペットから分子構造まで幅広い範囲をカバーします。TextGradはPyTorchの構文と抽象化に従い、柔軟で使いやすい設計となっています。このフレームワークは、ユーザーが目的関数を提供するだけで、コンポーネントやプロンプトの調整を必要とせず、様々なタスクで即座に利用可能です。我々は、質問応答や分子最適化、放射線治療計画など、多岐にわたるアプリケーションにおいてTextGradの有効性と汎用性を実証します。フレームワークを変更することなく、TextGradはGPT-4oのGoogle-Proof質問応答におけるゼロショット精度を51%から55%に向上させ、LeetCode-Hardコーディング問題の解決において20%の相対的性能向上をもたらし、推論のためのプロンプトを改善し、望ましいin silico結合特性を持つ新規の薬物様小分子を設計し、高い特異性を持つ放射線腫瘍治療計画を設計します。TextGradは、次世代AIシステムの開発を加速するための基盤を築きます。
English
AI is undergoing a paradigm shift, with breakthroughs achieved by systems orchestrating multiple large language models (LLMs) and other complex components. As a result, developing principled and automated optimization methods for compound AI systems is one of the most important new challenges. Neural networks faced a similar challenge in its early days until backpropagation and automatic differentiation transformed the field by making optimization turn-key. Inspired by this, we introduce TextGrad, a powerful framework performing automatic ``differentiation'' via text. TextGrad backpropagates textual feedback provided by LLMs to improve individual components of a compound AI system. In our framework, LLMs provide rich, general, natural language suggestions to optimize variables in computation graphs, ranging from code snippets to molecular structures. TextGrad follows PyTorch's syntax and abstraction and is flexible and easy-to-use. It works out-of-the-box for a variety of tasks, where the users only provide the objective function without tuning components or prompts of the framework. We showcase TextGrad's effectiveness and generality across a diverse range of applications, from question answering and molecule optimization to radiotherapy treatment planning. Without modifying the framework, TextGrad improves the zero-shot accuracy of GPT-4o in Google-Proof Question Answering from 51% to 55%, yields 20% relative performance gain in optimizing LeetCode-Hard coding problem solutions, improves prompts for reasoning, designs new druglike small molecules with desirable in silico binding, and designs radiation oncology treatment plans with high specificity. TextGrad lays a foundation to accelerate the development of the next-generation of AI systems.

Summary

AI-Generated Summary

PDF320December 8, 2024