LeTI: Learning to Generate from Textual Interactions

要約

事前トレーニング済み言語モデル (LM) を微調整することは、その機能を強化するために不可欠です。
既存の技術は一般に、入出力のペア (命令調整など) または出力品質を評価する数値的報酬 (RLHF など) を使用して微調整します。
私たちは、バイナリラベルを使用して正確さをチェックするだけでなく、テキストフィードバックを通じて出力内のエラーを特定して説明するテキストインタラクション(LETI)から学習するLMの可能性を探ります。
私たちが焦点を当てているのは、モデルが自然言語命令に基づいてコードを生成するコード生成タスクです。
この設定により、テキスト フィードバック (Python インタープリターを使用したコード実行からのエラー メッセージとスタック トレース) を取得する自然かつスケーラブルな方法が実現します。
LETI は、自然言語命令、LM で生成されたプログラム、およびテキスト フィードバックを連結した LM 目標を使用して、モデルを繰り返し微調整します。
この微調整テキストの前にバイナリ報酬トークンが追加され、正しいソリューションとバグのあるソリューションを区別するために使用されます。
LETI はトレーニングにグラウンドトゥルース出力を必要とせず、必要な微調整されたベースラインよりも優れたパフォーマンスを発揮します。
LETI は、コード生成データセット MBPP 上の LM のパフォーマンスを向上させるだけでなく、他のデータセットにも一般化します。
MBPP でトレーニングされているため、HumanEval の目に見えない問題に関して、ベース LM と同等以上のパフォーマンスを達成します。
さらに、バイナリ フィードバックと比較して、テキスト フィードバックは生成品質とサンプル効率の向上につながり、半分未満のグラジエント ステップで同じパフォーマンスを達成できることがわかりました。
LETI は、自然言語タスクがコード生成として定式化できる場合には、自然言語タスクにも同様に適用できます。これは、イベント引数の抽出で経験的に検証されました。

要約(オリジナル)

Fine-tuning pre-trained language models (LMs) is essential for enhancing their capabilities. Existing techniques commonly fine-tune on input-output pairs (e.g., instruction tuning) or with numerical rewards that gauge the output quality (e.g., RLHF). We explore LMs’ potential to learn from textual interactions (LETI) that not only check their correctness with binary labels but also pinpoint and explain errors in their outputs through textual feedback. Our focus is the code generation task, where the model produces code based on natural language instructions. This setting invites a natural and scalable way to acquire textual feedback: the error messages and stack traces from code execution using a Python interpreter. LETI iteratively fine-tunes the model, using the LM objective, on a concatenation of natural language instructions, LM-generated programs, and textual feedback. Prepended to this fine-tuning text, a binary reward token is used to differentiate correct and buggy solutions. LETI requires no ground-truth outputs for training and even outperforms a fine-tuned baseline that does. LETI not only improves the performance of LMs on a code generation dataset MBPP, but also generalizes to other datasets. Trained on MBPP, it achieves comparable or better performance than the base LMs on unseen problems in HumanEval. Furthermore, compared to binary feedback, we observe that textual feedback leads to improved generation quality and sample efficiency, achieving the same performance with fewer than half of the gradient steps. LETI is equally applicable in natural language tasks when they can be formulated as code generation, which we empirically verified on event argument extraction.

arxiv情報

著者 Xingyao Wang,Hao Peng,Reyhaneh Jabbarvand,Heng Ji
発行日 2024-03-19 11:53:15+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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