Controllable Text Generation via Probability Density Estimation in the Latent Space
About
Previous work on controllable text generation has explored the idea of control from the latent space, such as optimizing a representation with attribute-related classifiers or sampling a representation from relevant discrete samples. However, they are not effective enough in modeling both the latent space and the control, leaving controlled text with low quality and diversity. In this work, we propose a novel control framework using probability density estimation in the latent space. Our method utilizes an invertible transformation function, the Normalizing Flow, that maps the complex distributions in the latent space to simple Gaussian distributions in the prior space. Thus, we can perform sophisticated and flexible control in the prior space and feed the control effects back into the latent space owing to the one-one-mapping property of invertible transformations. Experiments on single-attribute controls and multi-attribute control reveal that our method outperforms several strong baselines on attribute relevance and text quality and achieves the SOTA. Further analysis of control strength adjustment demonstrates the flexibility of our control strategy.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Detoxification | Jigsaw (test) | Perplexity (PPL)54.3 | 29 | |
| Sentiment Control | IMDB (test) | Sentiment Accuracy (Avg)99.7 | 11 | |
| Topic Control | AGNews (test) | Avg Topic Accuracy97.8 | 11 | |
| Controllable Text Generation | Multi-Attribute Control | Average Score92.2 | 10 | |
| Multi-attribute Conditional Text Generation | CompMCTG In-distribution Few-shot 1.0 (test) | Accuracy85.19 | 10 | |
| Multi-Aspect Controllable Text Generation | CompMCTG 1.0 (ACD) | Aid Score78.24 | 10 | |
| Multi-attribute Conditional Text Generation | CompMCTG Compositional Few-Shot 1.0 (test) | Accuracy51.71 | 10 | |
| Multi-Aspect Controllable Text Generation | CompMCTG 1.0 (Original) | Aid Score73.85 | 10 | |
| Multi-Aspect Controllable Text Generation | CompMCTG 1.0 (Hold-Out) | Aid Score73.64 | 10 | |
| Multi-Aspect Controllable Text Generation | CompMCTG Overall Summary Average 1.0 | Aavg Score65.14 | 10 |