Abstract
Users interact with text, image, code, or other editors on a daily basis. However, machine learning models are rarely trained in settings that reflect the interactivity between users and their editor. This is understandable as training AI models with real users is not only slow and costly, but what these models learn may be specific to user interface design choices. Unfortunately, this means most of the research on text, code, and image generation has focused on non-interactive settings, whereby the model is expected to get everything right without accounting for any input from a user who may be willing to help.
We introduce a new Interactive Text Generation task that allows training generation models interactively without the costs of involving real users, by using user simulators that provide edits that guide the model towards a given target text. We train our interactive models using Imitation Learning, and our experiments against competitive non-interactive generation models show that models trained interactively are superior to their non-interactive counterparts, even when all models are given the same budget of user inputs or edits.
Introduction: Beyond One-Shot Generation
Most contemporary Large Language Models (LLMs) are designed for a "one-shot" paradigm: a user provides a prompt, and the model generates a complete, final response. While powerful, this approach often fails to capture the nuance of complex tasks. When a prompt is underspecified, models are prone to "hallucinations" or generating content that deviates from the user's actual intent.
In the real world, human-computer interaction is rarely one-shot. Users typically refine their work iteratively within an editor—deleting words, substituting phrases, and adding new information. However, machine learning models are seldom trained to leverage this back-and-forth. This research introduces Interactive Text Generation (ITG), a framework that treats text generation as a collaborative, multi-round process between an agent and a user.
The ITG Framework and Methodology
The ITG task is framed as a game played over $H$ rounds. In each round, the user provides a small set of edits, and the agent responds by updating the draft. To bypass the prohibitive cost of training with human subjects, the authors developed user simulators.
User Simulators and the Oracle Model
These simulators have access to a "goal text" (the ground truth). They use an Oracle Model to align the current draft with the goal and identify the most helpful edits to provide to the agent. By providing a fixed budget of edits (insertions, deletions, or substitutions) in each round, the simulator nudges the agent toward the desired output.
Model Architectures
The study evaluates two primary agent architectures:
- Seq2Seq Transformer: A standard autoregressive model that regenerates the entire document from scratch in every round, conditioned on the previous draft and user edits.
- Token Editing Model: A non-autoregressive model designed specifically for editing. Instead of rewriting, it predicts specific operations (e.g., "substitute word X at position Y") directly on the existing draft.
Training via Imitation Learning
To train these agents, the researchers employed DAgger (Dataset Aggregation), an imitation learning algorithm. The agent learns to mimic the expert policy of the Oracle. Additionally, "denoising" techniques were used during training to ensure the models could gracefully recover from their own previous generation errors.
Key Insights: The Information Budget
A central finding of this research is that the timing and distribution of information are as critical as the information itself. The authors describe this as an "Information Budget Game."
Experimental results demonstrate that splitting a fixed budget of user input across multiple rounds is significantly more effective than providing all the information at once. For example, providing two words of feedback over three rounds (totaling 6 words) leads to higher quality text than a single prompt containing all 6 words. This suggests that interactivity allows the model to focus its computational resources on the most difficult-to-predict segments of the text, while the user provides stable anchors for the rest.
Experimental Results and Evaluation
The framework was tested using the CNN/DailyMail dataset, focusing on single-sentence summaries.
- Quantitative Performance: In automated metrics (BLEU, BLEURT, and BARTScore), interactive models achieved absolute gains of 4% to 7% over non-interactive baselines, even when the total number of user-provided words was held constant.
- Human Evaluation: Human judges preferred the interactive model's outputs for semantic accuracy ("Meaning"). While there was a slight trade-off in "Fluency" due to potential inconsistencies introduced during iterative editing, the overall utility of the interactive approach was clear.
- Editing vs. Rewriting: The Token Editing Model generally outperformed the Seq2Seq rewriter, indicating that treating text as a modifiable object is a superior strategy for interactive tasks.
Limitations and Future Directions
While ITG represents a significant step forward, several challenges remain:
- Scaling: Current experiments are limited to single sentences (up to 64 tokens). Future work must address multi-paragraph document generation.
- Dynamic Goals: The current simulator assumes a static goal text. In creative applications, user goals often evolve during the interaction.
- Optimization: The authors suggest that Reinforcement Learning (RL) could be used to train agents to minimize the number of edits a user needs to provide, further increasing the efficiency of the collaboration.
Summary updated