arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.13183cs.CL
收藏

DSCD:基于自约束解码的大语言模型去毒化

DSCD: Large Language Model Detoxification with Self-Constrained Decoding

Hubei Provincial Key Laboratory of Artificial Intelligence and Smart Learning(湖北人工智能与智能学习省级重点实验室);National Language Resources Monitoring and Research Center for Network Media(网络媒体语言资源监测与研究国家中心);Central China Normal University(中央财经大学);Wuhan University of Technology(武汉理工大学)

Ming Dong, Jinkui Zhang, Bolong Zheng, Xinhui Tu, Po Hu, Tingting He

AI总结:

本文提出自约束解码去毒化方法DSCD,通过强化安全层并弱化有毒层分布,无需微调即可降低LLM输出毒性,在保持流畅性上达到SOTA性能。

摘要:

大语言模型(LLM)中的去毒化仍是一个重要的研究挑战。现有的解码去毒化方法均基于外部约束,这需要额外的资源开销并损失生成流畅性。本工作提出了自约束解码去毒化(DSCD),一种无需参数微调的LLM去毒化新方法。DSCD在输出生成过程中,强化安全层的内部下一词元分布,同时弱化幻觉层和有毒层的分布。这有效降低了毒性并增强了输出安全性。DSCD具有轻量级、高兼容性和即插即用的特点,可轻松与现有去毒化方法集成以进一步提升性能。在代表性开源LLM和公开数据集上的大量实验验证了DSCD的有效性,展示了其在去毒化和生成流畅性方面的最先进(SOTA)性能,且效率优于现有方法。这些结果凸显了DSCD作为更安全LLM部署的实用且可扩展解决方案的潜力。

英文摘要:

Detoxification in large language models (LLMs) remains a significant research challenge. Existing decoding detoxification methods are all based on external constraints, which require additional resource overhead and lose generation fluency. This work proposes Detoxification with Self-Constrained Decoding (DSCD), a novel method for LLM detoxification without parameter fine-tuning. DSCD strengthens the inner next-token distribution of the safety layer while weakening that of hallucination and toxic layers during output generation. This effectively diminishes toxicity and enhances output safety. DSCD offers lightweight, high compatibility, and plug-and-play capabilities, readily integrating with existing detoxification methods for further performance improvement. Extensive experiments on representative open-source LLMs and public datasets validate DSCD's effectiveness, demonstrating state-of-the-art (SOTA) performance in both detoxification and generation fluency, with superior efficiency compared to existing methods. These results highlight DSCD's potential as a practical and scalable solution for safer LLM deployments.

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

↑