Continuity of Topic, Interaction, and Query: Learning to Quote in Online Conversations

Lingzhi Wang, Jing Li, Xingshan Zeng, Haisong Zhang, Kam-Fai Wong

Introduction

Quoting is a sophisticated rhetorical device used to enhance the wit, beauty, and persuasiveness of language. While humans often struggle to recall the perfect quote for a given moment, the task is significantly more complex for machines, particularly within the informal and noisy environment of multi-turn online conversations.

Traditional approaches have treated quotation as a recommendation task, essentially a ranking problem where quotes are discrete labels. However, this method overlooks the internal semantic structure of the quotes themselves. This paper proposes a shift toward word-by-word generation, introducing a neural framework that ensures consistency across latent topics, dialogue history, and the immediate query.

Proposed Framework

The authors introduce a neural encoder-decoder architecture designed to maintain three pillars of consistency: Topic, Interaction, and Query.

Interaction and Query Modeling

The model utilizes a History Encoder (Bi-GRU) to represent previous turns and a Query Encoder for the current turn. A query-aware attention mechanism identifies which historical turns are most relevant to the current query. A subsequent Structure Encoder captures the temporal dynamics of these interactions.

Topic Modeling

To provide broad contextual awareness, the framework integrates a Neural Topic Model (NTM) based on a Variational Auto-encoder (VAE). This component learns latent discussion topics (e.g., "finance," "gaming") from a bag-of-words representation of the context, allowing the model to disambiguate word meanings based on the overall theme.

Generative Decoder

The decoder is initialized with the query representation to ensure the generated quote follows the immediate conversational thread. It employs Turn-based Attention, combining the structured history with the latent topic distribution to predict the quote word-by-word. To prevent "hallucinations," a post-processing step uses minimum edit distance to map the generated output to the closest valid quote from a predefined library.

The encoder-decoder framework architecture, integrating history/query encoders with a neural topic model for generative quotation.

Experimental Setup

The model was evaluated on two large-scale datasets:

  • Weibo: A Chinese dataset focused on Chengyu (four-character idiomatic phrases).
  • Reddit: An English dataset featuring conversations matched against Wikiquote.

Data statistics indicate that Reddit conversations are generally longer (averaging 4.25 turns) than Weibo (2.51 turns), posing a greater challenge for interaction modeling.

Analysis and Insights

The Advantage of Generation

By treating quotation as a generation task rather than a ranking task, the model exploits the internal semantic structure of quotes. This leads to superior alignment between context keywords and the specific vocabulary within a quote.

The Recency Effect

Analysis of the model's attention weights reveals a strong preference for turns closer to the query. This "recency effect" mirrors human behavior, where quotes are typically chosen in response to the most immediate parts of a conversation. The proposed model captures this dynamic more effectively than previous baselines.

Attention weights across conversation turns, demonstrating the model's focus on recent context compared to the TAKG baseline.

Topic Awareness and Robustness

Explicit topic modeling allows the framework to distinguish between different senses of a word based on the latent discussion theme. Furthermore, the model demonstrates significant robustness to context length, maintaining high performance even as the number of historical turns increases beyond eight, where baseline models typically degrade.

Key Results

The full model (IE+QE+NTM) significantly outperformed state-of-the-art (SOTA) baselines:

  • Weibo: Achieved a Precision@1 of 27.2%, surpassing the previous SOTA (TAKG) at 24.0%.
  • Reddit: Achieved a Precision@1 of 17.5%, nearly doubling the performance of standard Seq2Seq models (7.2%).
  • Human Evaluation: In blind tests, 49% of the model's quotes were deemed coherent with the query, compared to only 36% for a variant without topic modeling.

Conclusion and Future Work

While the generative approach marks a significant advancement, challenges remain regarding "fake" quote generation and performance dips in extremely long conversations. Future research may explore more sophisticated memory networks or filtering techniques to ensure the rhetorical correctness of quotes within social media contexts.

Summary updated

BibTeX
@inproceedings{wang2020continuity,
  author = {Lingzhi Wang and Jing Li and Xingshan Zeng and Haisong Zhang and Kam-Fai Wong},
  title = {{Continuity of Topic, Interaction, and Query: Learning to Quote in Online Conversations}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.538},
}
Figure