The Whole Truth and Nothing But the Truth: Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained Decoding

Hao Fang, Anusha Balakrishnan, Harsh Jhamtani, John Bufe, Jean Crawford, Jayant Krishnamurthy, Adam Pauls, Jason Eisner, Jacob Andreas, Dan Klein · OpenReview

Abstract

In a real-world dialogue system, generated responses must satisfy several interlocking constraints: being informative, truthful, and easy to control. The two predominant paradigms in language generation -- neural language modeling and rule-based generation -- both struggle to satisfy these constraints. Even the best neural models are prone to hallucination and omission of information, while existing formalisms for rule-based generation make it difficult to write grammars that are both flexible and fluent. We describe a hybrid architecture for dialogue response generation that combines the strengths of both approaches. This architecture has two components. First, a rule-based content selection model defined using a new formal framework called dataflow transduction, which uses declarative rules to transduce a dialogue agent's computations (represented as dataflow graphs) into context-free grammars representing the space of contextually acceptable responses. Second, a constrained decoding procedure that uses these grammars to constrain the output of a neural language model, which selects fluent utterances. The resulting system outperforms both rule-based and learned approaches in human evaluations of fluency, relevance, and truthfulness.

Introduction

Modern task-oriented dialogue systems face a difficult balancing act. End-to-end neural language models (LMs) are highly fluent but prone to "hallucinating"—stating facts that aren't true or ignoring database query results. Conversely, traditional rule-based systems are truthful but brittle, hard to maintain, and often sound robotic. The challenge lies in guaranteeing that an agent's response is 100% faithful to the underlying data (provenance) while maintaining the flexibility to sound natural.

Methods

The proposed hybrid architecture consists of two main stages:

  1. Dataflow Transduction: Agent actions (e.g., calendar checks) are represented as dataflow graphs. The system applies declarative rules to these graphs to produce a Quasi-synchronous Context-Free Grammar (QCFG). This grammar defines the entire space of truthful ways to describe the specific dataflow graph.
  2. Constrained Decoding: A neural language model (CodeT5) generates responses using the QCFG as a constraint. During beam search, the system prunes any word that would lead to an ungrammatical or untruthful sentence according to the QCFG.
Overview of the hybrid architecture combining dataflow transduction and constrained decoding.

This approach decouples content (the "what") from fluency (the "how"). Developers can update agent behavior by editing rules without retraining the neural network.

Datasets and Evaluation

The system was evaluated on two benchmarks:

  • SMCalFlow: A large-scale calendar dataset. The authors introduced SMCalFlow2Text, annotated with 187 transduction rules.
  • MultiWOZ: A multi-domain dialogue dataset, using 14 general rules.

Key Results

The hybrid approach, QCFG-Constrained Decoding, significantly outperformed unconstrained models across multiple metrics.

Comparison of automatic metrics and human evaluation for different decoding strategies.
  • Truthfulness: In human evaluations on SMCalFlow, the hybrid system achieved 91.6% truthfulness, compared to just 82.2% for the unconstrained LM.
  • Data Efficiency: One of the most striking findings was that the hybrid system trained on only 3% of the data performed on par with an unconstrained neural model trained on 100% of the data.
  • MultiWOZ Performance: The system achieved 100% truthfulness on MultiWOZ test cases, surpassing the state-of-the-art MTTOD system (89%).

Discussion and Limitations

By enforcing provenance, the system builds user trust by showing the agent's "work." However, rule authoring remains labor-intensive for complex domains. Additionally, the current implementation is English-centric and can occasionally produce "pragmatically unhelpful" responses (e.g., answering "Looks like it" to a complex query). Future work will explore semi-automatic rule derivation and extension to other languages.

Summary updated

BibTeX
@inproceedings{fang2023whole,
  author = {Hao Fang and Anusha Balakrishnan and Harsh Jhamtani and John Bufe and Jean Crawford and Jayant Krishnamurthy and Adam Pauls and Jason Eisner and Jacob Andreas and Dan Klein},
  title = {{The Whole Truth and Nothing But the Truth: Faithful and Controllable Dialogue Response Generation with Dataflow Transduction and Constrained Decoding}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  url = {https://openreview.net/forum?id=gXVQ8rrLQN},
}
Figure