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

文本风格迁移中用于引导大语言模型的风格特异性神经元

Style-Specific Neurons for Steering LLMs in Text Style Transfer

School of Computation, Information and Technology, Technical University of Munich(慕尼黑工业大学计算、信息与技术学院);Munich Center for Machine Learning(慕尼黑机器学习中心);Center for Information and Language Processing, LMU Munich(慕尼黑大学信息与语言处理中心)

Wen Lai, Viktor Hangya, Alexander Fraser

AI总结:

针对零样本TST中LLM直接复制输入、风格改变不足的问题,提出sNeuron-TST,通过识别并停用源风格神经元并结合改进对比解码,在六个基准上提升风格多样性与流畅度。

摘要:

文本风格迁移(TST)旨在不改变文本原意的情况下修改其风格。大语言模型(LLM)在包括TST在内的多项任务中表现出优越性能。然而,在零样本设置下,它们往往会将输入文本的很大一部分直接复制到输出中,而无法有效改变其风格。为提升文本的风格多样性与流畅度,我们提出sNeuron-TST,这是一种在TST中利用风格特异性神经元引导LLM的新方法。具体而言,我们识别与源风格和目标风格相关的神经元,并停用仅属于源风格的神经元,使目标风格词汇获得更高概率,旨在增强生成文本的风格多样性。但我们发现,这种停用会对生成文本的流畅度产生负面影响;为此,我们提出一种改进的对比解码方法,该方法考虑了由被停用的源风格神经元导致的跨层token概率快速变化。实验证明,所提方法在涵盖正式度、毒性、政治、礼貌、作者身份和情感的六个基准测试上具有有效性。

英文摘要:

Text style transfer (TST) aims to modify the style of a text without altering its original meaning. Large language models (LLMs) demonstrate superior performance across multiple tasks, including TST. However, in zero-shot setups, they tend to directly copy a significant portion of the input text to the output without effectively changing its style. To enhance the stylistic variety and fluency of the text, we present sNeuron-TST, a novel approach for steering LLMs using style-specific neurons in TST. Specifically, we identify neurons associated with the source and target styles and deactivate source-style-only neurons to give target-style words a higher probability, aiming to enhance the stylistic diversity of the generated text. However, we find that this deactivation negatively impacts the fluency of the generated text, which we address by proposing an improved contrastive decoding method that accounts for rapid token probability shifts across layers caused by deactivated source-style neurons. Empirical experiments demonstrate the effectiveness of the proposed method on six benchmarks, encompassing formality, toxicity, politics, politeness, authorship, and sentiment.

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

↑