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

Weihao Zeng, Lulu Zhao, Keqing He, Ruotong Geng, Jingang Wang, Wei Wu, Weiran Xu

Abstract

Controllable Dialogue Generation (CDG) aims to produce responses that satisfy specific constraints, such as emotion or dialogue acts. However, existing models struggle with compositional generalization—the ability to generate responses for attribute combinations never encountered during training. We present Disentangled Controllable Generation (DCG), which leverages shared prompt mapping and a disentanglement loss to bridge this gap. Furthermore, we introduce Multiple Attribute Evaluation (MAE), a reference-free metric for assessing multi-attribute control. Our experiments on DailyDialog-CG and ConvAI2-CG demonstrate DCG's superior performance in handling unseen attribute combinations while maintaining high text quality.

Introduction

Controllable Dialogue Generation (CDG) is a critical task in building sophisticated conversational agents. While current models are proficient at single-attribute control (e.g., generating a "happy" response), they often fail when asked to satisfy multiple constraints simultaneously, especially if that specific combination was absent from the training data. This failure highlights a lack of compositional generalization. For instance, a model might know how to be "sad" and how to "ask a question" separately, but fail to produce a "sad question" if it has never seen one. This paper addresses this "seen to unseen" challenge by proposing a novel framework and evaluation metric.

The Compositional Generalization Task

To study this phenomenon, we define the task of compositional generalization in CDG. We utilize two types of attributes: discrete (coarse-grained labels like emotion and dialogue acts) and continuous (fine-grained persona descriptions).

Illustration of seen vs. unseen attribute combinations for discrete (DailyDialog) and continuous (ConvAI2) attributes.

As shown in the figure above, the goal is to take attributes from different "seen" pairs and combine them into a new, "unseen" instruction for the model. Traditional models often overfit to the specific combinations present in their training sets, leading to a significant performance drop when faced with these novel compositions.

Methodology: Disentangled Controllable Generation (DCG)

The DCG framework is built upon DialoGPT and introduces two primary components to facilitate compositional generalization:

  1. Shared Prompt Mapping: Instead of learning independent embeddings for every attribute, DCG uses a shared Multi-Layer Perceptron (MLP). This MLP maps attribute descriptions—whether they are discrete labels or natural language sentences—into a continuous prompt space. This shared architecture allows the model to transfer conceptual knowledge across different attributes, making it easier to generalize to new combinations.
  2. Disentanglement Loss ($L_D$): To ensure the model can handle multiple signals without interference, we implement a contrastive-style disentanglement loss. This forces the model to distinguish between the correct ("golden") attribute combination and various "pseudo" (incorrect) combinations, effectively disentangling the control signals within the latent space.
The DCG architecture featuring shared prompt mapping via MLP and the disentanglement loss mechanism.

Evaluation Metric: Multiple Attribute Evaluation (MAE)

Evaluating multi-attribute control is notoriously difficult. Traditional metrics like BLEU measure similarity to a reference but ignore whether the AI followed specific instructions. To solve this, we propose MAE, a reference-free metric. MAE utilizes a T5 model to "interrogate" the generated response. By prompting the T5 model with the generated text and an attribute description, the probability of the model returning a "yes" (indicating the attribute is present) serves as the controllability score.

Experimental Results

We evaluated DCG on two benchmarks: DailyDialog-CG (discrete) and ConvAI2-CG (continuous).

  • Controllability: On DailyDialog-CG, DCG achieved an Emotion Accuracy (E-ACC) of 70.66% and an Act Accuracy (A-ACC) of 38.98% on unseen combinations, outperforming the state-of-the-art CTRL model.
  • Text Quality: DCG showed improvements in BLEU and METEOR scores, suggesting that precise attribute control helps maintain conversational coherence.
  • Efficiency: Unlike discriminator-based models (e.g., PPLM), DCG’s prompt-based approach is computationally efficient, with generation speeds comparable to standard GPT-2.

Conclusion

DCG effectively bridges the gap between seen and unseen attribute combinations in dialogue generation. By focusing on disentangled representations and shared prompt mapping, the model achieves robust compositional generalization. Future work will explore hybrid control systems that unify discrete and continuous attributes into a single framework.

Summary updated

BibTeX
@inproceedings{zeng2023seen,
  author = {Weihao Zeng and Lulu Zhao and Keqing He and Ruotong Geng and Jingang Wang and Wei Wu and Weiran Xu},
  title = {{Seen to Unseen: Exploring Compositional Generalization of Multi-Attribute Controllable Dialogue Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.793},
}
Figure