Introduction
Open-domain dialogue systems face a persistent challenge in balancing response quality and flexibility. Traditional generation-based models, such as Sequence-to-Sequence (Seq2Seq) architectures, frequently produce "safe" but uninformative responses (e.g., "I don't know"). Conversely, retrieval-based models provide fluent, human-authored responses but lack the capacity to adapt to specific conversational nuances or remove irrelevant information from the retrieved text.
This paper proposes a prototype-then-edit framework. The system first retrieves a high-quality human response—a prototype—and subsequently employs a neural editor to modify it. The editing process is specifically guided by the lexical differences between the current conversation context and the prototype's original context.
Methodology
The proposed framework consists of two primary modules: the Prototype Selector and the Context-Aware Neural Editor.
Prototype Selector
The system utilizes a pre-defined index to retrieve a context-response pair $(C', R')$ where the prototype context $C'$ is most similar to the current context $C$. During the training phase, prototypes are selected based on their lexical similarity to the ground truth to effectively train the model on meaningful editing operations.
Context-Aware Neural Editor
The neural editor is designed to transform the prototype response $R'$ into a final response $R$ by analyzing the "lexical delta" between $C$ and $C'$.
- Edit Vector Generation: The model identifies "insertion words" (present in $C$ but not $C'$) and "deletion words" (present in $C'$ but not $C$).
- Weighted Attention: An attention mechanism distinguishes between significant content words and common function words, ensuring the editor focuses on meaningful changes.
- Decoder: A GRU-based decoder uses the prototype response as a source and is guided by the weighted edit vector to generate the revised response.
Experimental Evaluation
The model was evaluated using a large-scale Chinese conversation corpus from Douban Group, comprising approximately 19.6 million training pairs. The framework was benchmarked against standard Seq2Seq (S2SA), S2SA with Mutual Information (MMI), and Conditional Variational Autoencoders (CVAE).
Quantitative Results
The "Edit-N-Rerank" variant of the model demonstrated superior performance across multiple dimensions:
- Relevance: The model achieved higher scores in embedding-based metrics (Average, Extrema, and Greedy) compared to generative baselines.
- Diversity: It significantly outperformed S2SA and MMI in Distinct-1 and Distinct-2 scores, reflecting a richer vocabulary.
- Originality: Approximately 86% of the generated responses were not present in the training set, confirming that the model performs genuine editing rather than simple retrieval.
Human Evaluation
Side-by-side human annotations favored the edited responses over both pure retrieval and ensemble-based baselines. In a comparison with a strong ensemble baseline (Ens-Rerank), the Edit-N-Rerank model won in 33% of cases and lost in only 24.9%.
Conclusion
The prototype-then-edit paradigm successfully bridges the gap between retrieval and generation. By seeding the generation process with a human-written prototype and focusing on context differences, the model produces responses that are both informative and contextually appropriate. Future work includes extending the framework to multi-turn dialogues and exploring joint learning of the selector and editor components to further optimize performance.
Summary updated