Abstract
Open-domain dialogue agents frequently generate safe but generic responses, a phenomenon known as the "boring chatbot" problem. While existing solutions like Conditional Variational Autoencoders (CVAEs) or architectural expansions address diversity, they often introduce training instability or excessive parameter overhead. This paper explores the PaRaFormer (Partially Randomized transFormer), a novel architecture that alternates between standard trainable layers and frozen, randomly initialized layers. By injecting stochasticity directly into the data transformation process and re-initializing frozen weights each epoch, the PaRaFormer achieves significant gains in response diversity. Experimental results on DailyDialog and EmpatheticDialogues show that PaRaFormer outperforms standard Transformers and matches the performance of more complex frameworks while utilizing 85% fewer trainable parameters in the attention mechanism.
1. Introduction
The primary challenge in open-domain dialogue generation is the lack of response diversity. Models optimized for likelihood often converge on "safe" responses—generic phrases such as "I don't know" or "That's interesting"—which lack engagement and fail to sustain human interest.
Current approaches to this problem generally fall into two categories. Variational frameworks, such as CVAEs, utilize latent variables to model the distribution of potential responses. However, these models are prone to "latent variable vanishing" and require complex training objectives. Alternatively, architectural extensions like the RL Transformer add randomized layers to the model, but at the cost of significantly increasing the total parameter count.
The PaRaFormer offers a "middle way": a method to inject diversity that is easy to train, does not increase model size, and maintains conversational coherence by leveraging the inherent properties of frozen random weights.
2. The PaRaFormer Architecture
The core innovation of the PaRaFormer is Partial Randomization. Unlike a standard Transformer which consists of a stack of fully trainable layers, the PaRaFormer employs an alternating structure.
2.1 Alternating Frozen Layers
The model alternates between standard trainable blocks and "PaRa" blocks. In a PaRa block, the weights for both the self-attention and feed-forward components are randomly initialized and then frozen. These weights are never updated during backpropagation. This forces the surrounding trainable layers to learn robust representations that can navigate the fixed, random transformations of the PaRa blocks.
2.2 Epoch-based Re-initialization
To ensure the model does not become biased toward a specific set of random weights, the frozen layers are re-initialized at the start of every training epoch. This dynamic randomization acts as a form of structural "jitter," preventing the model from collapsing into a deterministic mapping that favors generic outputs.
2.3 Scalable Kaiming Initialization
The authors found that standard initialization techniques did not provide sufficient control over the level of stochasticity. They introduced "Scalable Kaiming" initialization, which utilizes gain parameters ($\gamma$) to tune the variance of the random weights. This allows for fine-grained control over how much randomness is injected into the system.
3. Experimental Setup
The PaRaFormer was evaluated on two benchmark datasets:
- DailyDialog: A dataset of high-quality human-to-human conversations covering diverse daily life topics.
- EmpatheticDialogues: A dataset focused on emotional recognition and empathetic responding.
The model was compared against several baselines, including standard Transformers, CVAE-based models, and a fine-tuned GPT-2.
4. Results and Analysis
The experimental results demonstrate that the PaRaFormer effectively balances diversity and fluency.
4.1 Diversity Metrics
The PaRaFormer (specifically the $PaRaFormer_K$ variant using Kaiming initialization) achieved the highest scores for response diversity. On the DailyDialog dataset, it reached a Dist-1 score of 0.051, outperforming the standard Transformer (0.011) and the RL Transformer (0.045).
4.2 Parameter Efficiency
One of the most significant advantages of the PaRaFormer is its efficiency. Compared to the RL Transformer, the PaRaFormer's attention network utilizes approximately 85% fewer trainable parameters (153,600 vs. 1,030,144). By freezing weights rather than adding new ones, the model achieves state-of-the-art diversity without increasing the total parameter count.
4.3 Human Evaluation
In blind human evaluations, the PaRaFormer was preferred for its diversity over standard models. Crucially, it maintained a "Win/Tie" rate for fluency and logic that was competitive with variational models, which often struggle with coherence when randomness is high.
4.4 The Role of the Feed-Forward Network (FFN)
A key insight from the study was the sensitivity of the model to the FFN. The researchers observed that while randomness in self-attention layers was well-tolerated, excessive variance in the frozen feed-forward layers could lead to the generation of "gibberish." This suggests that the FFN plays a critical role in maintaining the structural integrity of the generated text.
5. Conclusion and Future Work
The PaRaFormer demonstrates that diversity in dialogue systems can be achieved through architectural stochasticity rather than complex latent variables or parameter expansion. By freezing and periodically re-initializing random weights, the model learns to generate more varied and engaging responses.
However, limitations remain. Currently, the PaRaFormer must be trained from scratch, making it difficult to integrate with large-scale pretrained models like BERT or GPT. Future research will focus on adapting this randomization technique for pretrained architectures and exploring its impact on controllable generation tasks, such as persona-based or knowledge-grounded dialogue.
Summary updated