知道何时停止:文本生成中语义漂移的研究
Know When To Stop: A Study of Semantic Drift in Text Generation
AI总结:
本文研究 LLM 长文本生成中的语义漂移,提出漂移分数并结合提前停止与语义相似度重排序,在显著保持信息量的同时提升事实性。
摘要:
在这项工作中,我们明确表明,现代 LLM 倾向于先生成正确事实,随后“漂移离开”并在之后生成不正确事实:这一现象此前偶有观察,但从未得到恰当衡量。我们开发了一种语义漂移分数,用于衡量生成文本中正确事实与不正确事实之间的分离程度,并在生成 Wikipedia 风格传记时证实了我们的假设。这种先正确后不正确的生成模式表明,可以通过知道何时停止生成来提高事实准确性。因此,我们针对若干提前停止方法,探究了信息量与事实准确性之间的权衡,并成功大幅提升了事实性。我们进一步表明,与基线相比以及在与提前停止结合时,使用语义相似度进行重排序都能进一步改善这些结果。最后,我们尝试调用外部 API,使模型回到正确的生成路径,但没有获得积极结果。总体而言,我们的方法具有泛化性,可通过平衡事实准确性、信息量和计算成本之间的权衡,应用于任何长文本生成,以产生更可靠的信息。
英文摘要:
In this work, we explicitly show that modern LLMs tend to generate correct facts first, then "drift away" and generate incorrect facts later: this was occasionally observed but never properly measured. We develop a semantic drift score that measures the degree of separation between correct and incorrect facts in generated texts and confirm our hypothesis when generating Wikipedia-style biographies. This correct-then-incorrect generation pattern suggests that factual accuracy can be improved by knowing when to stop generation. Therefore, we explore the trade-off between information quantity and factual accuracy for several early stopping methods and manage to improve factuality by a large margin. We further show that reranking with semantic similarity can further improve these results, both compared to the baseline and when combined with early stopping. Finally, we try calling external API to bring the model back to the right generation path, but do not get positive results. Overall, our methods generalize and can be applied to any long-form text generation to produce more reliable information, by balancing trade-offs between factual accuracy, information quantity and computational cost.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。