We present LingGen, a controlled text generation model that allows fine-grained control over a large number of real-valued linguistic attributes. It encodes target attribute values with a dedicated linguistic attribute encoder and conditions the language model by injecting the resulting representation into the language model using the beginning-of-sequence (BOS) embeddings. To improve robustness when controlling different attribute subsets, we introduce P-MASKING, which samples per-example attribute masking rates from a truncated Pareto distribution during training. Across 1-40 control attributes, LingGen achieves the lowest average control error among evaluated methods, while remaining efficient at inference and receiving the highest fluency scores in human evaluation. Ablations show that Pareto-sampled masking and BOS-based injection are effective choices compared to alternative masking and integration variants.
翻译:我们提出LingGen,一种可控文本生成模型,能够对大量实值语言属性进行细粒度控制。该模型通过专用的语言属性编码器对目标属性值进行编码,并利用序列起始(BOS)嵌入将生成的表示注入语言模型以实现条件控制。为提升控制不同属性子集时的鲁棒性,我们引入P-MASKING技术,在训练过程中从截断帕累托分布中采样每个样本的属性掩码率。在1-40个控制属性的实验范围内,LingGen在评估方法中实现了最低的平均控制误差,同时在推理阶段保持高效,并在人工评估中获得最高的流畅度评分。消融实验表明,与替代掩码方案和集成变体相比,帕累托采样掩码与基于BOS的注入是有效的技术选择。