通过语言模型重写实现多属性约束满足
Multi-Attribute Constraint Satisfaction via Language Model Rewriting
AI总结:
本文提出MACS方法,通过将语言模型训练为编辑器并利用约束满足奖励迭代改进输出,实现多外部实值属性的细粒度控制,在文本风格迁移和蛋白质设计任务上取得最优效果。
摘要:
在多个外部属性之上遵守精确约束是一个常见的计算问题,它潜藏于看似不同的领域,从受控文本生成到蛋白质工程。现有的用于多属性约束满足的语言模型(LM)可控性方法通常依赖专用架构或基于梯度的分类器,这限制了它们与任意黑盒评估器和预训练模型配合使用的灵活性。当前通用的大语言模型虽然能力强大,但无法实现对外部属性的细粒度多属性控制。因此,我们提出了多属性约束满足(MACS)方法,这是一种通用方法,能够在任意序列领域上微调语言模型,以满足用户对多个外部实值属性指定的约束。我们的方法通过从一组初始改写输出中采样多样化的多属性编辑对,将语言模型训练为编辑器。在推理过程中,语言模型利用我们设计的约束满足奖励,迭代改进其先前的解,以满足所有属性的约束。我们还尝试了奖励加权行为克隆,以进一步提高语言模型的约束满足率。为评估我们的方法,我们提出了一个新的细粒度约束满足(FineCS)基准,包含两个具有挑战性的任务:(1)文本风格迁移,其目标是同时修改评论的情感和复杂度;(2)蛋白质设计,重点调节绿色荧光蛋白(GFP)的荧光和稳定性。我们的实证结果表明,MACS在两个FineCS任务中都达到了最高的阈值满足率,优于强大的领域特定基线。我们的工作为通用化和实值多属性控制开辟了新途径,对涵盖自然语言处理和生物信息学的多种应用具有重要意义。
英文摘要:
Obeying precise constraints on top of multiple external attributes is a common computational problem underlying seemingly different domains, from controlled text generation to protein engineering. Existing language model (LM) controllability methods for multi-attribute constraint satisfaction often rely on specialized architectures or gradient-based classifiers, limiting their flexibility to work with arbitrary black-box evaluators and pretrained models. Current general-purpose large language models, while capable, cannot achieve fine-grained multi-attribute control over external attributes. Thus, we create Multi-Attribute Constraint Satisfaction (MACS), a generalized method capable of finetuning language models on any sequential domain to satisfy user-specified constraints on multiple external real-value attributes. Our method trains LMs as editors by sampling diverse multi-attribute edit pairs from an initial set of paraphrased outputs. During inference, LM iteratively improves upon its previous solution to satisfy constraints for all attributes by leveraging our designed constraint satisfaction reward. We additionally experiment with reward-weighted behavior cloning to further improve the constraint satisfaction rate of LMs. To evaluate our approach, we present a new Fine-grained Constraint Satisfaction (FineCS) benchmark, featuring two challenging tasks: (1) Text Style Transfer, where the goal is to simultaneously modify the sentiment and complexity of reviews, and (2) Protein Design, focusing on modulating fluorescence and stability of Green Fluorescent Proteins (GFP). Our empirical results show that MACS achieves the highest threshold satisfaction in both FineCS tasks, outperforming strong domain-specific baselines. Our work opens new avenues for generalized and real-value multi-attribute control, with implications for diverse applications spanning NLP and bioinformatics.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。