arXiv:2412.19198cs.AI2024-12

让大模型精准控制多个外部属性,实现文本与蛋白质设计的精细调节

Multi-Attribute Constraint Satisfaction via Language Model Rewriting

  • 用语言模型作为编辑器,通过迭代优化满足多维约束
  • 在文本风格迁移和蛋白质设计任务中均达到最高约束满足率
  • 适用于任意黑箱评估器,适合需要多属性调控的NLP与生物信息学场景

在多个外部属性上精确满足约束是文本生成、蛋白质工程等领域的共性问题。现有语言模型可控生成方法常依赖专用架构或基于梯度的分类器,难以适配任意黑箱评估器和预训练模型。当前通用大模型虽具备一定能力,但无法实现对外部实值属性的细粒度控制。为此,我们提出多属性约束满足(MACS)方法,可对任意序列领域微调语言模型,以满足用户指定的多维外部属性约束。该方法通过从初始改写输出中采样多样化的多属性编辑对,训练语言模型作为编辑器;推理时,模型通过我们设计的约束满足奖励,迭代优化前一解以满足所有属性约束。此外,我们还探索了奖励加权行为克隆以进一步提升约束满足率。为评估该方法,我们构建了细粒度约束满足(FineCS)基准,包含两项挑战性任务:(1) 文本风格迁移,需同时调整评论的情感和复杂度;(2) 蛋白质设计,聚焦绿色荧光蛋白(GFP)的荧光强度与稳定性调控。实验结果表明,MACS在两项任务中均取得最高的阈值满足率,优于强域特定基线。本工作为通用且实值的多属性控制开辟新路径,对自然语言处理与生物信息学应用具有广泛意义。

原文摘要 · Abstract (English)

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.

多属性控制语言模型编辑蛋白质设计约束满足

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。