arXiv:2409.07131cs.CLcs.LG2024-09NeurIPS被引 6

用通信理论指导大模型生成,提升答案可靠性。

Reranking Laws for Language Generation: A Communication-Theoretic Perspective

  • 将生成与重排序比作多通道传信,利用冗余降低错误率。
  • 证明即使重排序器不完美,也能几乎必然得到可接受答案。
  • 在代码生成和医学翻译任务中验证了方法有效性。

为确保大语言模型(LLMs)安全使用,需减少其幻觉或生成不当内容的倾向。一种常见策略是先让模型生成多个候选答案,再通过重排序器选择最优项。本文将此策略类比为在噪声通信信道中利用冗余降低误码率。将生成器视为发送方,通过并行的噪声信道传输消息的多个描述;接收方通过排名这些可能被破坏的描述,选出最可靠的。我们给出了该协议渐近无错的条件——即使重排序器受马洛斯或齐普夫-曼德尔布罗特模型控制且信道分布存在统计依赖性时,仍能几乎必然输出可接受答案。基于该框架,我们推导出重排序法则,并在两个真实任务中进行实证验证:使用 DeepSeek-Coder 7B 进行文本到代码生成,以及使用 TowerInstruct 13B 进行医学数据机器翻译。

原文摘要 · Abstract (English)

To ensure large language models (LLMs) are used safely, one must reduce their propensity to hallucinate or to generate unacceptable answers. A simple and often used strategy is to first let the LLM generate multiple hypotheses and then employ a reranker to choose the best one. In this paper, we draw a parallel between this strategy and the use of redundancy to decrease the error rate in noisy communication channels. We conceptualize the generator as a sender transmitting multiple descriptions of a message through parallel noisy channels. The receiver decodes the message by ranking the (potentially corrupted) descriptions and selecting the one found to be most reliable. We provide conditions under which this protocol is asymptotically error-free (i.e., yields an acceptable answer almost surely) even in scenarios where the reranker is imperfect (governed by Mallows or Zipf-Mandelbrot models) and the channel distributions are statistically dependent. We use our framework to obtain reranking laws which we validate empirically on two real-world tasks using LLMs: text-to-code generation with DeepSeek-Coder 7B and machine translation of medical data with TowerInstruct 13B.

大模型生成重排序通信理论可靠性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。