Learning to control the structure of sentences is a challenging problem in text generation. Existing work either relies on simple deterministic approaches or RL-based hard structures. We explore the use of structured variational autoencoders to infer latent templates for sentence generation using a soft, continuous relaxation in order to utilize reparameterization for training. Specifically, we propose a Gumbel-CRF, a continuous relaxation of the CRF sampling algorithm using a relaxed Forward-Filtering Backward-Sampling (FFBS) approach. As a reparameterized gradient estimator, the Gumbel-CRF gives more stable gradients than score-function based estimators. As a structured inference network, we show that it learns interpretable templates during training, which allows us to control the decoder during testing. We demonstrate the effectiveness of our methods with experiments on data-to-text generation and unsupervised paraphrase generation.
翻译:学习如何控制句号结构是生成文本的一个棘手问题。 现有的工作要么依靠简单的确定性方法,要么依靠基于RL的硬结构。 我们探索使用结构化的变异自动算法来利用软的、持续的放松来推断生成句子的潜在模板,以便利用再校准来进行培训。 具体地说,我们提议使用一个 Gumbel-CRF 方法,即使用宽松的前向- 前向- 向向- 抽样(FFBS) 方法,持续放松通用报告格式的抽样算法。 作为再校准梯度估计器, Gumbel- CRF 提供比基于分函数的测算器更稳定的梯度。 作为结构化的推论网络,我们展示了它在培训期间学习可解释的模板,从而使我们能够在测试中控制解码器。 我们展示了我们的方法的有效性,实验了数据到文字的生成和未加保护的参数生成。