Target-Guided Dialogue Response Generation Using Commonsense and Data Augmentation (2022)

Abstract: Target-guided response generation enables dialogue systems to smoothly transition a conversation from a dialogue context toward a target sentence. Such control is useful for designing dialogue systems that direct a conversation toward specific goals, such as creating non-obtrusive recommendations or introducing new topics in the conversation. In this paper, we introduce a new technique for target-guided response generation, which first finds a bridging path of commonsense knowledge concepts between the source and the target, and then uses the identified bridging path to generate transition responses. Additionally, we propose techniques to re-purpose existing dialogue datasets for target-guided generation. Experiments reveal that the proposed techniques outperform various baselines on this task. Finally, we observe that the existing automated metrics for this task correlate poorly with human judgement ratings. We propose a novel evaluation metric that we demonstrate is more reliable for target-guided response evaluation. Our work generally enables dialogue system designers to exercise more control over the conversations that their systems produce.

## introduction open-domain conversational systems have made significant progress in generating good quality responses driven by strong pre-trained language models @xcite and large-scale corpora available for training such models. however, instead of passively responding to a user, dialogue systems can take on a more proactive role to make recommendations, help users discover new services, or introduce interesting new topics to users to improve user experience. furthermore, a proactive or target-guided system can guide the conversation towards safer conversational topics in 1 code available at www.github.com/prakhargupt az/target-guided-dialogue-coda figure 1 : given a dialogue context and a target sentence, our goal is to generate a dialogue response that smoothly transitions the conversation from context towards the target. our proposed approach involves identifying a bridging path of entities to link the context and the target. case a conversation goes awry or a user becomes abusive towards the system, and direct the users towards topic areas that the system knows how to talk about. prior work has used mechanisms such as emotion labels @xcite , persona @xcite , and politeness @xcite to control conversations. however, such approaches require labeled training data for a set of pre-determined labels, making it harder to incorporate new goals into a system. in this work, we study the problem of proactive response generation based on a target sentence. for example in figure 1 , given the context 'i enjoy swimming', the system guides the conversation towards the target 'i like to travel to new places' by mentioning 'i like to swim at beaches when i go on vacation'. using target sentences for proactive control is an intuitive and flexible control mechanism for dialogue developers, free of domain-specific handcrafting and annotations. existing publicly available dialogue corpora generally consists of free-flow conversations where the speakers move the conversation forward based on the dialogue history alone, with no particular agenda. we build upon the recently released otters dataset @xcite with one-turn topic transitions for mixed-initiative in open-domain conversations. given a source sentence from a speaker, the task is to generate a topic transition sentence with "bridging" strategies to a target sentence from another speaker. the task is challenging on several fronts. first, the system needs to balance the trade-off between coherence with the context while smoothly transitioning towards the target. second, the otters training dataset is relatively small (less than 2000 training instances), making it a lowresource setting. finally, we show that standard word-overlap metrics are insufficient for this task. in this work, we propose methods to leverage commonsense knowledge from conceptnet @xcite to improve the quality of transition responses. our technique decomposes the response generation process into first generating explicit commonsense paths between the source and target concepts, followed by conditioning on the generated paths for the response generation. this is intended to mimic how humans might bridge concepts for creating transitions in conversations using commonsense knowledge. this technique offers two benefits: 1) leveraging external concept-net knowledge solves the data scarcity issue and improves the model's capability to generate logical transitions; 2) since the transition response is grounded on commonsense knowledge paths, the explicit paths used by the model can provide explanations for the concepts used by the model, as well as provide control over the generation process. furthermore, we propose a data augmentation mechanism to help with the data scarcity issue by re-purposing training data from dailydialog, an open-domain dialogue dataset. both these approaches are complementary and outperform existing baselines in response quality and transition smoothness. we demonstrate how the proposed approach of using explicit bridging paths enables improved quality of transitions through qualitative and human studies. automated evaluation is a challenging aspect of dialogue response generation tasks @xcite . we show that the existing word-overlap metrics such as bleu can be easily fooled to assign high scores to poor responses just based on high n-gram overlap with reference responses. we propose a metric target-coherence which is trained using hard adversarial negative instances and achieves a high correlation with human judge-ment ratings of system outputs. as part of this work, we collect and release a dataset of human ratings of various system outputs for this task. we discuss the broader impact and potential uses of the proposed system, its limitations and potential ethical issues related to this task in section 8. ## related work target guided dialogue response generation: @xcite is perhaps the closest to our work described in this paper. they work on the task of generating a new utterance which can achieve a smooth transition between the previous turn's topic and the given target topic. past work in controllable text generation has explored steering neural text generation model outputs to contain a specific keyword @xcite , a knowledge graph @xcite , or a topic @xcite . steering dialogue towards a given keyword has also been explored in past work @xcite @xcite , albeit as a retrieval task. in contrast, our goal is to generate a next utterance in a dialogue setup which can steer a conversation towards target sentence in a smooth fashion rather than generating a response for a given keyword or topic. our work is also related to prior work on text infilling @xcite , though compared to them we work in a dialogue setup and utilize commonsense knowledge to perform the infilling. commonsense for dialogue generation: commonsense knowledge resources @xcite have been used in dialogue response generation for tasks such as personagrounded dialogue @xcite and open-domain dialogue generation @xcite @xcite . @xcite created a dataset focusing on social commonsense inferences in dialogue and @xcite designed a theorem prover for if-then-because reasoning. a concurrent work @xcite proposed to train a model to explicitly generate implicit knowledge and use this knowledge to generate a response. compared to their work, we focus on target-guided response generation, suggest mechanism for knowledge alignment with the transition response during training, and focus on multi-hop knowledge paths. more broadly, commonsense knowledge has been used in text generation tasks such as story and essay generation @xcite . automated metrics for evaluating dialogue quality: automated metrics such as bleu @xcite , meteor @xcite , and bertscore @xcite are widely used to evaluate quality of machinegenerated text. however, such metrics often correlate poorly with human judgement ratings of generated text quality @xcite . past work has explored trained model-based metrics such as adem @xcite and ruber @xcite . however, training such model-based metrics often relies on tagged training data. @xcite propose ways to mitigate the need for such labelled data by automatically synthesizing negative examples. our proposed metric is along similar lines, though we utilize different techniques for synthetic negative example generation. ## task overview we first formalize the task of target-guided response generation. given a conversation context c between two speakers a and b, and a target utterance t for speaker b, the task is to generate a transition sentence s which serves as a smooth link between the context and the target. the target is a phrase or a sentence. otters dataset @xcite consists of a simplified setting of oneturn topic transitions, where the conversation history consists of a single utterance u a from speaker a, and a target utterance u b for speaker b, and the task is to generate a transition utterance s for speaker b to serve as a smooth link between u a and u b . the task is challenging since a system needs to devise a strategy that balances the competitive objectives of generating a response which is coherent to the context, while smoothly driving the conversation towards the target. in this work, we propose two approaches for the transition response generation task: 1) commonsense-guided response generation (section 4), and 2) data augmentation to tackle data sparsity (section 5). we refer to the proposed method as coda (commonsense path and data augmentation). we also propose a novel metric target-coherence to automatically evaluate the smoothness of response transitions (section 6). ## commonsense-guided response generation we frame the target-guided response generation task as follows. given a conversation context c and a target t, a conditional language model learns to predict the transition response s. target-guided generation can potentially benefit by incorporating commonsense reasoning by identifying rich connections between a pair of entities which enable us to generate logical transition responses connecting the two. pre-trained language models are known to suffer in cases where commonsense knowledge is required during generation @xcite , especially in tasks where there is not enough data available for learning commonsense patterns from the text, which is true for our case. in contrast, commonsense knowledge graphs like conceptnet @xcite provide structured knowledge about entities, which enables higherlevel reasoning about concepts. in this work we use commonsense knowledge from conceptnet for planning a transition response. conceptnet is a large-scale semantic graph that has concepts as nodes and has commonsense relationships between them, such as 'isa' and 'at-location'. however, conceptnet suffers from severe sparsity issues @xcite . therefore, it is not always possible to find the concepts and relationships between context and target concepts. to address the sparsity issue, we develop knowledge path generator (kpg), a language model trained on paths sampled from conceptnet. the model takes a pair of entities or concepts as input and generates a multi-hop path connecting the two. since the knowledge paths are sampled from a generative model rather than retrieved from a fixed knowledge base, we are no longer limited by the entities and paths present in the conceptnet knowledge base. to generate commonsense based responses, we train a commonsense response generator (crg) model to generate the transition response conditioned on the paths generated by the kpg model (figure 2 ). conditioning the response generation on commonsense paths improves the reasoning capabilities of the crg model and provides the added benefits of interpretability and control over the generation process. ## target-coherence metric evaluating target-guided responses is a challenging task as a good transition response needs to be both -coherent to the context and smoothly transition towards the target. furthermore, since the task is open-domain and open-ended, there are many possible correct responses which may not match with a reference response @xcite . to tackle these challenges, we propose an automatic metric for this task that does not use human references. the proposed metric target-coherence is based on a classification model trained to classify a transition response as either positive, that is, it is coherent to the context and smoothly transitions towards the target, or negative, that is, the response is either not coherent to the context or does not transition towards the target. positive gold c,r,t context c the restaurant looks authentic european. response r the chef trained in florence. target t the pasta tastes nice here. negative random t' with gold r,c target t' i love to drive my car. negative random c' with gold r,t context c' i enjoy computers and phones. negative random r' with gold c,t response r' there is no parking here. we use the gold transition response from the training dataset to create positive instances for training. for a positive instance with context c, target t and response r, we create negative instances using the following mechanisms: 1) we hold two out of (c,t,r) constant while randomly sample the third one. for example, sample a random context c ′ , which makes r incoherent to the c ′ . an example is shown in figure 4 . 2) we use a gpt-2 model trained on otters dataset to generate a response r ′ coherent to c but conditioned on a random target t ′ . 3) for a target t, we chose a response r ′ from the otters training set which has t as the target but context c ′ ̸ = c. we sample a maximum of 2 negative instance per mechanism and balance the count of positive and negative instances by repeating positive instances. we fine-tune a pre-trained bert-base @xcite model on these instances with binary cross entropy loss. ## conclusion in this work, we propose and evaluate models for target-guided response generation using explicit commonsense bridging paths. we also introduce an automated metric to evaluate smoothness of a transition response. we showed that our model generates more smooth and informative outputs through automatic and human evaluation. furthermore, it allows for more interpretable results. going forward, we envision a model which could combine target and non-target guided dialogue planning.