LETI: Learning to Generate from Textual Interactions
Xingyao Wang, Hao Peng, Reyhaneh Jabbarvand, Heng Ji
OpenReview ground truth
Abstract
Finetuning pre-trained language models (LMs) enhances the models' capabilities. Prior techniques fine-tune a pre-trained LM on input-output pairs (e.g., instruction fine-tuning) or with numerical rewards that gauge the quality of its outputs (e.g., reinforcement learning from human feedback). 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 investigation focuses on the code generation task, where the model produces code in response to 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, which is only provided when the generated program fails to solve the task. 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 two base LMs of different scales 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.
Author context
Most prolific author: 13 submissions (credibility 0.57).
Delta if applied: -0.2 percentile
Aggregate statistics only — no individual author rankings.
Ranking trajectory
Percentile by tournament round — convergence indicates rating stability.
Battle history — 38 comparisons
Ranked above opponent in 58% of matchups.
- ▲ beat Acoustic Prompt Tuning: Empowering Large L… ×4
- ▲ beat FireAct: Toward Language Agent Finetuning ×4
- ▼ lost to Tool-Augmented Reward Modeling ×4
- ▲ beat Learning to Solve Bilevel Programs with Bi… ×4
- ▼ lost to Listen to Motion: Robustly Learning Correl… ×4
Judge assessments
Mean overall score 0.0 ± 0.0 (n = 38)