arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.05559cs.CL
收藏

面向大语言模型的属性控制微调:以去毒化为案例研究

Attribute Controlled Fine-tuning for Large Language Models: A Case Study on Detoxification

University of California, Los Angeles(加利福尼亚大学洛杉矶分校);Amazon.com, Inc.(亚马逊公司)

Tao Meng, Ninareh Mehrabi, Palash Goyal, Anil Ramakrishna, Aram Galstyan, Richard Zemel, Kai-Wei Chang, Rahul Gupta, Charith Peris

AI总结:

本研究提出一种大语言模型属性控制微调的约束学习范式,通过辅助模型近似KL散度正则项并采用并行更新方案,在去毒化任务中实现低毒性输出且保持基准性能竞争力。

摘要:

我们提出一种用于大语言模型(LLMs)属性控制微调的约束学习范式。给定训练语料库以及表述为模型输出序列级约束的控制准则,我们的方法在训练语料库上微调LLM,同时在对其效用和生成质量影响最小的前提下提升约束满足度。具体而言,我们的方法通过惩罚满足约束的期望输出分布与LLM后验分布之间的KL散度来正则化LLM训练。该正则化项可通过一个经训练的辅助模型近似,该模型将序列级约束分解为词元级引导,使得该项可通过闭式公式计算。为进一步提升效率,我们设计了一种并行方案以同时更新LLM和辅助模型。我们通过在训练LLM时控制毒性来评估本方法的实证性能。结果表明,我们的方法能让LLM生成更少不当回复,同时在基准测试和毒性检测任务上取得具有竞争力的性能。

英文摘要:

We propose a constraint learning schema for fine-tuning Large Language Models (LLMs) with attribute control. Given a training corpus and control criteria formulated as a sequence-level constraint on model outputs, our method fine-tunes the LLM on the training corpus while enhancing constraint satisfaction with minimal impact on its utility and generation quality. Specifically, our approach regularizes the LLM training by penalizing the KL divergence between the desired output distribution, which satisfies the constraints, and the LLM's posterior. This regularization term can be approximated by an auxiliary model trained to decompose the sequence-level constraints into token-level guidance, allowing the term to be measured by a closed-form formulation. To further improve efficiency, we design a parallel scheme for concurrently updating both the LLM and the auxiliary model. We evaluate the empirical performance of our approach by controlling the toxicity when training an LLM. We show that our approach leads to an LLM that produces fewer inappropriate responses while achieving competitive performance on benchmarks and a toxicity detection task.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑