Abstract
Current open-domain dialogue systems struggle to balance multiple conversational skills—such as empathy, knowledge grounding, and persona consistency—without suffering from negative transfer or inefficient skill reuse. We present a sparsely activated modular framework that treats dialogue generation as the execution of a structured program. By decomposing complex responses into atomic operators, our model achieves state-of-the-art performance across nine diverse datasets and demonstrates superior compositional generalization in low-resource and zero-shot settings.
Introduction
Building a versatile chatbot requires a model to master a wide array of tasks: showing empathy, utilizing external knowledge, maintaining a persona, and applying common sense. Traditionally, researchers employ Multi-Task Learning (MTL) to train a single neural network on multiple specialized datasets. However, MTL often encounters two significant obstacles. First, Negative Transfer (Interference) occurs when learning one skill (e.g., empathy) degrades another (e.g., informativeness) due to clashing data distributions within shared parameters. Second, Inefficient Reuse prevents models from effectively applying a skill learned in one context to a novel, unseen task.
To overcome these hurdles, we propose a modular approach inspired by human cognition. Instead of a monolithic "black box," our system uses specific "circuits" activated only when needed, allowing complex conversational behaviors to be composed from simpler, atomic operations.
The Neural Modular Framework
The core of our approach is a Neural Modular Framework that separates the logic of conversation from the mechanics of text generation. The architecture consists of two primary components: the Programmer and a library of specialized Modules.
1. The Programmer
The Programmer acts as a high-level conductor. Built on a MiniLM backbone with a GRU, it analyzes the conversation context to generate a sequence of instructions. These instructions are formatted in Reverse Polish Notation (RPN), a stack-based logic that allows the model to handle complex, nested operations without the need for parentheses.
2. Specialized Modules
The system utilizes a library of independent neural modules, each initialized from a T5-small backbone. These modules are categorized into three functional groups:
- Span Operators: Responsible for selecting specific text segments from the input context.
- Content Operators: Generate or transform content through functions like
COPY,PARAPHRASE, orINFER. - Linguistic Operators: Handle the structural assembly of the response using operations such as
COMPOUND,VERB_MODIFY, orNOUN_MODIFY.
Training Strategy
Training a system that bridges discrete program choices with continuous text generation presents a significant optimization challenge. We address this using a three-pronged strategy:
- Weak Supervision: We utilize linguistic parsing tools (e.g., spaCy) to generate "pseudo-labels," providing the model with initial guesses for the underlying program structure of existing dialogue data.
- Reinforcement Learning: Policy Gradients are employed to fine-tune the Programmer, optimizing for the quality of the final generated response relative to the ground truth.
- Differentiable Pipeline: The Gumbel-Softmax trick is used to pass "soft" representations between modules during training, ensuring the entire pipeline remains end-to-end differentiable.
Experimental Results
We evaluated the framework on a "blended" suite of nine open-domain dialogue datasets, including Cornell Movie, DailyDialog, Wizard of Wikipedia, and EmpatheticDialog.
Key Findings
- State-of-the-Art Performance: Our modular approach consistently outperformed strong baselines like BART and R2C2 across nearly all datasets and metrics.
- Compositional Generalization: The model demonstrated a remarkable ability to handle "out-of-distribution" scenarios. In "leave-one-out" experiments, the framework generalized to unseen datasets significantly better than standard transformers.
- Data Efficiency: The model is highly efficient; when trained on only 10% of the available data, it outperformed standard supervised models trained on 100% of the data in four separate benchmarks.
- Inference Efficiency: Despite the multi-stage execution process, the model maintains lower inference latency than BART. This is attributed to the sparsity of the framework: individual modules are small, and only a subset are activated for any given response.
Conclusion and Future Work
By introducing a structural inductive bias based on linguistic theory, our modular framework effectively eliminates the interference common in multi-task dialogue models. While the current set of operators is hand-defined, future research will explore the automatic discovery of these modules from raw data. Additionally, scaling these modular backbones to larger foundation models remains a promising avenue for further enhancing conversational versatility.
Summary updated