SPMoE: Generate Multiple Pattern-Aware Outputs with Sparse Pattern Mixture of Experts

Shaobo Cui, Xintong Bao, Xuming Lin, Zhongzhou Zhao, Ji Zhang, Wei Zhou, Haiqing ChenarXiv 2021

Introduction

Natural language generation (NLG) tasks such as paraphrasing, machine translation, and dialogue systems frequently encounter the one-to-many mapping problem. A single input sequence can often be correctly mapped to multiple valid output sequences with varying structures and vocabularies. Traditional approaches generally fall into two categories: variational methods (e.g., CVAE), which use high-dimensional latent variables that often act as "black boxes," and decoding strategies (e.g., Diverse Beam Search), which often produce outputs lacking significant stylistic distinction.

SPMoE (Sparse Pattern Mixture of Experts) addresses these limitations by explicitly decomposing the generation process into distinct linguistic patterns. By treating the problem as a collection of specialized experts, the model generates multiple, high-quality, and controllable outputs that are more explainable than traditional latent-variable approaches.

Architecture and Methodology

The SPMoE framework is built upon a Transformer-based architecture (specifically BART). The core innovation lies in its use of a Sparse Pattern Mixture of Experts mechanism to handle diverse linguistic transformations.

The SPMoE architecture featuring a sparse-trans selector and multiple pattern heads to generate diverse outputs.

Key Components:

  • Pattern Heads: Instead of a single output head, the model employs $K$ separate pattern heads, or "experts," each specializing in a specific linguistic style, such as synonym replacement or grammatical restructuring.
  • Sparse Mechanism (Sparsegen-lin): To prevent experts from converging on the same patterns, a sparse transformation forces the model to assign specific input-output pairs to a limited subset of experts. This exclusivity ensures that each expert develops a distinct "personality."
  • Load Balance Loss: To avoid the "rich-get-richer" phenomenon common in MoE models—where one expert is over-trained while others are ignored—SPMoE utilizes a batch-level load balance loss to ensure all $K$ experts are effectively utilized.
  • Pattern Diversity (PD) Metric: The authors introduced the PD metric to evaluate diversity more effectively than standard BLEU scores. PD measures n-gram diversity while incorporating a brevity penalty to prevent the model from generating overly simplistic sentences to artificially inflate diversity scores.

Experimental Results

The model was evaluated on the Quora Question Paraphrase dataset, comparing SPMoE against baselines including VAE, CVAE, and Diverse Beam Search (DBS).

Quantitative comparison of SPMoE against baseline models across similarity and diversity metrics.

Key Insights:

  • Balanced Performance: As shown in the results table, SPMoE achieves a superior balance between similarity to ground truth and diversity. While standard VAEs may achieve higher BLEU-1 scores (0.536 vs. SPMoE's 0.517), they suffer from significantly lower corpus-level diversity (0.013 vs. SPMoE's 0.024).
  • Diversity Gains: SPMoE nearly doubles the corpus-level diversity of traditional variational models while maintaining high output quality. On the new Pattern Diversity (PD) metrics, SPMoE significantly outperforms standard decoding strategies like Sampling and DBS, confirming that its experts generate truly distinct content types.
  • Explainability: By decomposing the latent space into discrete experts, the model becomes more interpretable. Specific experts can be identified as responsible for specific linguistic transformations, such as changing sentence voice or replacing key terms with synonyms.

Conclusion and Future Work

SPMoE demonstrates that enforcing sparsity in a mixture-of-experts framework allows for the generation of diverse, high-quality, and controllable text. By moving away from "black box" latent variables toward explainable pattern heads, the model provides a robust solution to the one-to-many mapping problem in paraphrasing. Future research aims to explore the effectiveness of SPMoE in other domains, such as dialogue and machine translation, and potentially extending the "pattern mixture" concept to multi-modal tasks like image generation.

Summary updated

BibTeX
@misc{cui2021spmoe,
  author = {Shaobo Cui and Xintong Bao and Xuming Lin and Zhongzhou Zhao and Ji Zhang and Wei Zhou and Haiqing Chen},
  title = {{SPMoE: Generate Multiple Pattern-Aware Outputs with Sparse Pattern Mixture of Experts}},
  year = {2021},
  eprint = {2108.07535},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.07535},
}
Figure