ChatPaper.aiChatPaper

TextGrad: Automatische "Differentiation" über Text

TextGrad: Automatic "Differentiation" via Text

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

Zusammenfassung

KI durchläuft einen Paradigmenwechsel, wobei Durchbrüche durch Systeme erzielt werden, die mehrere große Sprachmodelle (LLMs) und andere komplexe Komponenten orchestrieren. Daher ist die Entwicklung von methodischen und automatisierten Optimierungsmethoden für komplexe KI-Systeme eine der wichtigsten neuen Herausforderungen. Neuronale Netzwerke standen in ihren Anfängen vor einer ähnlichen Herausforderung, bis Rückpropagierung und automatische Differentiation das Feld durch die Bereitstellung von optimierten Lösungen revolutionierten. Inspiriert davon stellen wir TextGrad vor, ein leistungsstarkes Framework, das eine automatische "Differentiation" über Text durchführt. TextGrad propagiert textuelles Feedback, das von LLMs bereitgestellt wird, um einzelne Komponenten eines komplexen KI-Systems zu verbessern. In unserem Framework bieten LLMs reiche, allgemeine, natürlichsprachliche Vorschläge zur Optimierung von Variablen in Berechnungsgraphen, die von Code-Schnipseln bis hin zu Molekülstrukturen reichen. TextGrad folgt der Syntax und Abstraktion von PyTorch und ist flexibel und benutzerfreundlich. Es funktioniert "out-of-the-box" für eine Vielzahl von Aufgaben, bei denen die Benutzer nur die Ziel-Funktion bereitstellen, ohne Komponenten oder Eingaben des Frameworks abstimmen zu müssen. Wir präsentieren die Wirksamkeit und Allgemeingültigkeit von TextGrad in einer Vielzahl von Anwendungen, von der Beantwortung von Fragen und der Optimierung von Molekülen bis hin zur Strahlentherapieplanung. Ohne das Framework zu ändern, verbessert TextGrad die Null-Schuss-Genauigkeit von GPT-4o in der Google-Proof-Fragenbeantwortung von 51% auf 55%, erzielt einen relativen Leistungsanstieg von 20% bei der Optimierung von LeetCode-Hard-Codierungsproblem-Lösungen, verbessert Eingaben für das Argumentieren, entwirft neue medikamentenähnliche kleine Moleküle mit wünschenswerter in silico-Bindung und entwirft Strahlentherapiebehandlungspläne mit hoher Spezifität. TextGrad legt den Grundstein für die Beschleunigung der Entwicklung der nächsten Generation von KI-Systemen.
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.
PDF320December 8, 2024