2024-12-03 · 专家 · 机器学习 · 自然语言处理

A Simple and Provable Scaling Law for the Test-Time Compute of Large Language Models

该论文提出了一种具有可证明缩放定律的两阶段算法,用于提高大型语言模型在测试时的计算效率。

更新于 2024-12-03。作者:Yanxi Chen、Xuchen Pan、Yaliang Li、Bolin Ding、Jingren Zhou。

中文摘要

我们提出了一种通用的两阶段算法,该算法对于大型语言模型(LLMs)的测试时计算具有可证明的缩放规律。给定一个输入问题,该算法首先生成N个候选解决方案,然后通过多轮淘汰赛选择最佳方案,在淘汰赛中每对候选方案比较K次,只有获胜者晋级下一轮。在最小化实现中,两个阶段都可以仅使用黑盒LLM执行,无需其他任何东西(例如,没有外部验证器或奖励模型),解决一个输入问题总共需要N次(K + 1)高度可并行化的LLM调用。假设生成的候选解决方案以概率p_{gen} > 0是正确的,并且正确与错误解决方案之间的比较以概率p_{comp} > 0.5(即优于随机猜测)识别出正确的获胜者,我们从理论上证明,该算法的失败概率随着N和K的指数衰减至零:$P(final output is incorrect) \leq (1 - p_{gen})^N + \lceil \log_2 N \rceil e^{-2 K (p_{comp} - 0.5)^2}.$ 我们在具有挑战性的MMLU-Pro基准上的经验结果验证了技术假设,以及所提出算法的有效性和测试时计算扩展带来的收益。

英文摘要

We propose a general two-stage algorithm that enjoys a provable scaling law for the test-time compute of large language models (LLMs). Given an input problem, the proposed algorithm first generates N candidate solutions, and then chooses the best one via a multiple-round knockout tournament where each pair of candidates are compared for K times and only the winners move on to the next round. In a minimalistic implementation, both stages can be executed with a black-box LLM alone and nothing else (e.g., no external verifier or reward model), and a total of N times (K + 1) highly parallelizable LLM calls are needed for solving an input problem. Assuming that a generated candidate solution is correct with probability p_{gen} > 0 and a comparison between a pair of correct and incorrect solutions identifies the right winner with probability p_{comp} > 0.5 (i.e., better than a random guess), we prove theoretically that the failure probability of the proposed algorithm decays to zero exponentially with respect to N and K: $P(final output is incorrect) le (1 - p_{gen})^N + lceil log_2 N rceil e^{-2 K (p_{comp} - 0.5)^2}.$ Our empirical results with the challenging MMLU-Pro benchmark validate the technical assumptions, as well as the efficacy of the proposed algorithm and the gains from scaling up its test-time compute.

解读

一句话总结

该论文提出了一种具有可证明缩放定律的两阶段算法,用于提高大型语言模型在测试时的计算效率。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:大型语言模型在可靠性、稳定性方面存在挑战,限制了其在高风险场景中的应用。 • 现有方案不足:现有方法在提高LLM推理的可靠性方面存在局限性,如依赖外部验证器或奖励模型,计算效率低。 • 研究目标:设计一种新的算法,通过增加测试时计算量来提高LLM推理的可靠性,同时保持高效和可扩展。

问题2:论文的核心创新点是什么?

• 技术创新:提出了一种两阶段算法,包括候选解决方案的生成和淘汰赛,以选择最佳解决方案。 • 方法改进:算法仅需要黑盒LLM,无需外部验证器或奖励模型,且支持并行和分布式计算。 • 优势:理论证明算法的失败概率随测试时计算量呈指数衰减,提高了LLM推理的可靠性。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:在MMLU-Pro基准测试中验证了算法的有效性。 • 性能提升:实验结果表明,随着测试时计算量的增加,算法的准确性也随之提高。 • 对比结果:与基线方法相比,该算法在准确性方面有显著提升。

问题4:这个研究的实际应用价值是什么?

• 应用场景:适用于需要高可靠性解决方案的场景,如金融、医疗、法律等领域。 • 实施建议:在部署时,应根据具体任务和资源选择合适的参数N和K。 • 局限与展望:算法在某些问题上可能无法达到100%的准确性,未来研究可进一步优化算法,提高其泛化能力。

来源