Context-Dependent Automatic Response Generation Using Statistical Machine Translation Techniques

Andrew Shin, Ryohei Sasano, Hiroya Takamura, Manabu Okumura

Introduction

Traditional data-driven chatbots often operate on a "stimulus-response" basis, focusing exclusively on the most recent user input. This approach suffers from two primary limitations: a lack of conversational context and alignment issues within Statistical Machine Translation (SMT) engines. When a stimulus is brief (e.g., "What?"), an SMT model—which typically expects source and target sequences of similar lengths—often produces generic or nonsensical output. This paper proposes a method to improve response relevance and diversity by injecting "contextual anchors" from previous conversation turns into the current prompt.

Methodology

The researchers frame response generation as a translation task using the Moses SMT toolkit. Their core innovation is the Context-Dependent Model, which identifies and appends semantically significant words from the conversation history to the current stimulus. Two distinct methods for word selection were evaluated:

  • Pair-Based Model: This model utilizes Fisher’s Exact Test to identify significant word associations between the current turn ($S_n$) and the immediately preceding turn ($S_{n-1}$). If the input remains too short, the model "crawls up" the conversation history, adding words until the input length approximates the expected response length.
  • Token-Based Model: This approach employs tf-idf (term frequency-inverse document frequency) to scan up to eight previous turns. It identifies words characteristic of the specific conversation relative to a general dataset and appends them to the stimulus.

While this process creates ungrammatical inputs (e.g., "(today birthday) What?!"), the resulting outputs remain grammatical because the SMT's language model is trained on natural, fluent target responses.

Experimental Setup

The models were trained on a massive dataset of Twitter conversations, comprising approximately 1.4 million utterance pairs derived from over 425,000 unique interactions. To ensure data quality, the authors restricted the corpus to two-speaker conversations with three to eight turns. Evaluation was conducted via human ranking on Amazon Mechanical Turk using 100 sets of conversations.

Results and Discussion

Quantitative Performance

Human evaluators ranked responses from four sources: the actual human response, a baseline SMT model (no context), the Pair-based model, and the Token-based model. Both context-dependent models significantly outperformed the baseline.

Human evaluation rankings and average ranks for the different models.

As shown in the results, the context-aware models achieved an average rank of 2.67, a notable improvement over the baseline's 2.99. While these models represent a step forward, they still trail human performance, which maintained an average rank of 1.66.

Qualitative Analysis

The inclusion of context words serves as a structural fix for SMT. By balancing the lengths of the source and target sequences, the alignment algorithms perform more effectively. Qualitatively, the context-aware models produced responses with richer, more topic-relevant vocabulary.

Example conversations comparing model responses and their human-assigned average ranks.

In the examples above, the models demonstrate an ability to maintain the "flow" of conversation by prioritizing recent history, resulting in more coherent multi-turn interactions compared to the stimulus-only baseline.

Limitations and Future Work

Despite the improvements, a significant gap remains between machine-generated and human responses, particularly in creative or divergent dialogue. The authors suggest that more sophisticated discourse modeling or neural approaches could better extract "core tokens" than the statistical tests used here. Additionally, future iterations could incorporate speaker identity to prevent the bot from redundantly repeating the user's own words. Finally, the study highlights the inadequacy of standard translation metrics like BLEU for dialogue, emphasizing the need for more robust automated evaluation frameworks.

Summary updated

BibTeX
@inproceedings{shin2015context,
  author = {Andrew Shin and Ryohei Sasano and Hiroya Takamura and Manabu Okumura},
  title = {{Context-Dependent Automatic Response Generation Using Statistical Machine Translation Techniques}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2015},
  doi = {10.3115/v1/n15-1150},
}
Figure