跳转至

LZ 惩罚:自回归语言模型的一种信息论重复惩罚机制

文章背景与核心概要

自回归语言模型在生成长文本或进行复杂推理时,常常会陷入“退化重复”(degenerate repetitions)的困境,即模型不断输出相同的词句或模式。传统的解决方法(如行业标准的频率惩罚和重复惩罚)往往无法根除这一问题,甚至会在某些情况下导致高达 4% 的残余重复率。

为了从根本上解决这一痛点,本文作者引入了一种基于信息论的新型重复惩罚机制——LZ 惩罚(LZ Penalty)。该方法巧妙地利用了 LZ77 通用无损压缩算法中的码长(codelength),并通过“预测-压缩对偶性”的视角,在移除高度可压缩的信息后对残余分布进行采样。研究表明,LZ 惩罚能够使最先进的开源推理模型在贪婪解码(温度为零)下流畅运行,完全避免退化重复,且不会牺牲模型的固有能力。


摘要 (Summary)

The LZ Penalty is a novel, information-theoretic repetition penalty designed to eliminate degenerate repetitions in autoregressive language models without sacrificing model capability. Leveraging the codelengths from the LZ77 universal lossless compression algorithm, the LZ penalty acts through the lens of prediction-compression duality—sampling from the residual distribution once highly compressible information is removed.

The authors demonstrate that the LZ penalty allows state-of-the-art open-source reasoning models to run smoothly with greedy (temperature-zero) decoding, completely avoiding degenerate repetitions. In contrast, traditional methods like industry-standard frequency and repetition penalties fail, leaving residual degenerate repetition rates as high as 4%.

LZ 惩罚是一种新颖的信息论重复惩罚机制,旨在消除自回归语言模型中的退化重复,同时不牺牲模型能力。该惩罚机制利用了 LZ77 通用无损压缩算法中的码长。通过预测-压缩对偶性的视角,解码 LZ 惩罚可以被解释为在去除高度可压缩的信息后,从残余分布中进行采样。我们证明了 LZ 惩罚能够使最先进的开源推理模型在贪婪(零温度)解码下运行,且不会损失模型能力,也不会产生退化重复的实例。相比之下,行业标准的频率惩罚和重复惩罚均告失效,其残余退化重复率高达 4%。


论文元数据 (Paper Metadata)

  • arXiv 标识符: arXiv:2504.20131 [cs.LG]
  • 学科分类: 机器学习 (cs.LG), 人工智能 (cs.AI), 信息论 (cs.IT)
  • 作者:
  • Antonio A. Ginart
  • Naveen Kodali
  • Jason Lee
  • Caiming Xiong
  • Silvio Savarese
  • John R. Emmons
  • 提交时间线:
  • 提交时间: 2025年4月28日 (v1)
  • 修订时间: 2026年8月18日 (v4)

摘要原文 (Abstract)

We introduce the LZ penalty, a penalty specialized for reducing degenerate repetitions in autoregressive language models without loss of capability. The penalty is based on the codelengths in the LZ77 universal lossless compression algorithm. Through the lens of the prediction-compression duality, decoding the LZ penalty has the interpretation of sampling from the residual distribution after removing the information that is highly compressible. We demonstrate the LZ penalty enables state-of-the-art open-source reasoning models to operate with greedy (temperature zero) decoding without loss of capability and without instances of degenerate repetition. Both the industry-standard frequency penalty and repetition penalty are ineffective, incurring degenerate repetition rates of up to 4%.

我们引入了 LZ 惩罚,这是一种专门用于减少自回归语言模型中退化重复且不损失能力的惩罚机制。该惩罚基于 LZ77 通用无损压缩算法中的码长。通过预测-压缩对偶性的透镜,解码 LZ 惩罚可以解释为在去除高度可压缩的信息后从残余分布中进行采样。我们证明了 LZ 惩罚能够使最先进的开源推理模型在贪婪(零温度)解码下运行,而不会损失能力,也不会出现退化重复的情况。行业标准的频率惩罚和重复惩罚均无效,会导致高达 4% 的退化重复率。



外部参考与工具 (External References & Tools)