Seen to Unseen: Exploring Compositional Generalization of Multi-Attribute Controllable Dialogue Generation (2023)

Abstract: Existing controllable dialogue generation work focuses on the single-attribute control and lacks generalization capability to out-of-distribution multiple attribute combinations. In this paper, we explore the compositional generalization for multi-attribute controllable dialogue generation where a model can learn from seen attribute values and generalize to unseen combinations. We propose a prompt-based disentangled controllable dialogue generation model, DCG. It learns attribute concept composition by generating attribute-oriented prompt vectors and uses a disentanglement loss to disentangle different attributes for better generalization. Besides, we design a unified reference-free evaluation framework for multiple attributes with different levels of granularities. Experiment results on two benchmarks prove the effectiveness of our method and the evaluation metric.

## introduction recently, large pre-trained language models (plms) like dialogpt @xcite , blenderbot @xcite and meena @xcite can produce fluent and relevant responses for dialogue contexts. however, the generated responses are often uninformative and factual inconsistent. hence, controllable dialogue generation (cdg) is proposed to guide dialogue generation towards the desired attributes such as emotions @xcite , acts @xcite , and personas @xcite . previous work focused on directly fine-tuning the large-scale plms @xcite or using an extra attribute discriminator @xcite to guide generation. the former is expensive and requires extensive annotated attribute labels. the decoding of the latter is computationally intensive, reducing the response fluency and generation speed. although these methods have made some progress in cdg, most of them focus on singleattribute generation where there is only one attribute label like happiness in emotion and pay less attention to the multi-attribute generation, which is a more practical setting. therefore, we are committed to filling this gap in cdg. noted that different from single-attribute, the control signal of the multiattribute generation is a combination of multiple values from different attributes, which faces the challenge of lacking sufficient annotated attributespecific data. we also find state-of-the-art methods for multi-attribute controllable text generation @xcite , which combine controllers learned from single-attribute, only suitable for discrete attributes with specific labels @xcite but not for continuous attributes @xcite . more importantly, we further show directly applying all existing models achieves superior attribute accuracy on seen attribute combinations but drops significantly on unseen combinations, as shown in figure 1 . it proves that previous work lacks compositional generalization capability from seen attribute values to unseen combinations. besides, the evaluation of controllability in cdg is severely limited by attribute types and annotated attribute data @xcite , which is not ap-my favorite food is pizza. ## problem formulation given a predefined set of attributes @xmath0, b, c, ...}, each attribute contains various values @xmath1, ..., a k } and k is the number of values of attribute a. multi-attribute controlled dialogue response generation aims to generate responses r that satisfy multiple desirable attributes @xmath2, b 2 , ...) conditioned on the dialogue history d, where a 1 and b 2 are one value of the attribute a and b, and @xmath3. it can be symbolized as p(r|d, a 1 , b 2 , ...), @xcite dialogue context randomly initialized tokens (a 1 ∈ a, b 2 ∈ b, ...). in this paper, we further focus on the multiattribute compositional generalization, where the combinations of multiple attribute values for the training set and the test set are disjoint, i.e., c v,train ∩ c v,@xmath4. ## methodology as shown in figure 3 , our model is on the basis of the framework of dialogpt @xcite with the compositional prompt module. ## method of mae to fill the gap in metrics for multi-attribute controllable dialogue generation, we propose a unified and efficient evaluation framework without additional large-scale labeled data, as shown in figure 4 , which converts the evaluation of each attribute to a unified text-to-text generation task, just like @xcite . t5 @xcite is used as the base model for our work. a template is designed as discrete prompts, i.e., "the emotion/act/persona controls the response [mask]". to alleviate the potential bias of different handcrafted patterns @xcite , we further add a trainable continuous task-oriented prompt to improve stability and robustness. specifically, the continuous prompt sequence is prepended to the response as a prefix, which makes up the input of the encoder. another continuous prompt sequence, the attribute values, and the template are concatenated and fed to the decoder. we take the probability of generating "yes" corresponding to @xcite token as the controllability score. in training process, only embeddings of continuous prompts are updated and the parameters of t5 are fixed. note that our model-based evaluation approach gets rid of the reliance on golden response when tested and can be uniformly applied to various granularities of attributes. ## case study figure 9 (see in appendix) shows two examples from dailydialog-cg and convai2-cg, respectively. for example one in the dailydialog-cg, the ctrl generates the word "great", showing that the generated response is emotionally controllable. however, both sentences in the response are declarative sentences, which does not control the act question. as observed, the response generated by our dcg contains the word "wow", which strongly expresses the emotion of happiness. besides, a question sentence is also generated. example two in convai2-cg needs to control 5 attributes, of which the golden response contains 2 attributes. the ctrl only controls "like to skate", while our dcg controls "like to write poetry and skate", which is highly consistent with the golden response. compared with previous models, our model addresses many difficult issues in compositional generalization for multi-attribute controllable dialogue generation. with an attribute-oriented prompt and a task-oriented prompt, our method learns attribute concepts from seen attribute values to unseen attribute combinations. through a disentanglement learning, some artificial-constructed unseen pseudo combinations are injected into the training process, which greatly improves the generalization ability of our model. ## conclusion in this paper, we study the compositional generalization for multi-attribute controllable dialogue generation. we propose a prompt-based disentangled controllable dialogue generation model which generates attribute-specific prompt vectors from control codes and uses a disentanglement loss to disentangle different attributes. further, we develop a unified reference-free evaluation framework, mae, for multi-attribute generation with different levels of granularities. experiments and analysis show our method achieves better text quality and controllability scores. moreover, our proposed mae has a higher correlation with human judgments for evaluation on cdg.