Generating natural language under complex constraints is a principled formulation towards controllable text generation. We present a framework to allow specification of combinatorial constraints for sentence generation. We propose TSMH, an efficient method to generate high likelihood sentences with respect to a pre-trained language model while satisfying the constraints. Our approach is highly flexible, requires no task-specific training, and leverages efficient constraint satisfaction solving techniques. To better handle the combinatorial constraints, a tree search algorithm is embedded into the proposal process of the Markov chain Monte Carlo (MCMC) to explore candidates that satisfy more constraints. Compared to existing MCMC approaches, our sampling approach has a better mixing performance. Experiments show that TSMH achieves consistent and significant improvement on multiple language generation tasks.
翻译:在复杂的制约下产生自然语言是针对可控文本生成的一种原则性表述。我们提出了一个框架,以说明生成刑期的组合限制。我们提出TSMH,这是一个高效的方法,在满足这些制约的同时,在培训前语言模式方面产生高可能性的判刑。我们的方法非常灵活,不需要针对具体任务的培训,并且利用高效率的制约满意度解决技术。为了更好地处理组合限制,在Markov连锁蒙特卡洛(MCMC)的提案过程中引入了树搜索算法,以探索满足更多限制的人选。与现有的MCMC方法相比,我们的抽样方法具有更好的混合性。实验表明,TSMH在多语言生成任务上取得了一致和显著的改进。