Skip to main content
QUICK REVIEW

[论文解读] Are More LLM Calls All You Need? Towards Scaling Laws of Compound Inference Systems

Lingjiao Chen, Jared Quincy Davis|arXiv (Cornell University)|Mar 4, 2024
Artificial Intelligence in LawSocial Sciences被引用 5
一句话总结

本论文研究在一层投票推断系统中,LLM 调用次数对性能的影响,因简易问题与困难问题的非单调性扩展,并给出一个缩放定律以预测最佳调用次数。

ABSTRACT

Many recent state-of-the-art results in language tasks were achieved using compound systems that perform multiple Language Model (LM) calls and aggregate their responses. However, there is little understanding of how the number of LM calls - e.g., when asking the LM to answer each question multiple times and taking a majority vote - affects such a compound system's performance. In this paper, we initiate the study of scaling properties of compound inference systems. We analyze, theoretically and empirically, how the number of LM calls affects the performance of Vote and Filter-Vote, two of the simplest compound system designs, which aggregate LM responses via majority voting, optionally applying LM filters. We find, surprisingly, that across multiple language tasks, the performance of both Vote and Filter-Vote can first increase but then decrease as a function of the number of LM calls. Our theoretical results suggest that this non-monotonicity is due to the diversity of query difficulties within a task: more LM calls lead to higher performance on "easy" queries, but lower performance on "hard" queries, and non-monotone behavior can emerge when a task contains both types of queries. This insight then allows us to compute, from a small number of samples, the number of LM calls that maximizes system performance, and define an analytical scaling model for both systems. Experiments show that our scaling model can accurately predict the performance of Vote and Filter-Vote systems and thus find the optimal number of LM calls to make.

研究动机与目标

  • 了解增加 LLM 调用次数对简单复合系统(单层投票推断系统)性能的影响。
  • 表征项目难度(简单 vs 困难查询)在缩放行为中的作用。
  • 推导缩放律及从有限样本中估计其参数的算法。
  • 在不同任务组成下识别最大化准确性的最佳 LLM 调用次数。

提出的方法

  • 将一个通过多数投票聚合 K 次 LLM 调用的一层投票推断系统形式化(Algorithm 1)。
  • 用两层分布来建模项目难度:简单查询的正确概率为 p1,困难查询的正确概率为 p2,其中简单项的分数为 alpha。
  • 推导性能 F(K;D),并在某些难度设置下展示非单调缩放(Theorem 1)。
  • 给出缩放律 G(K;D),通过指数形式的 g_p(K; c) 将简单项与困难项的贡献结合起来(Section 4.3)。
  • 提出 Algorithm 2,从少量性能数据样本中估计缩放律参数。
  • 在合成数据和真实数据集上使用 GPT-3.5-turbo-0125 验证预测(Section 5)。

实验结果

研究问题

  • RQ1在具有不同难度分布的任务中,LLM 调用次数 K 如何影响单层投票推断系统的准确性?
  • RQ2在什么条件下增加 K 会导致非单调的性能(上升后下降,或相反)?
  • RQ3如何利用缩放律从少量样本中预测最佳 K?
  • RQ4所提出的缩放律是否能从合成数据推广到真实世界数据并识别真正的最优调用次数?

主要发现

  • 性能可能呈现非单调性:随着 LLM 调用次数的增加,初期提升,随后由于简单/困难查询混合而可能降低准确性。
  • 非单调行为可通过项目难度解释;简单查询在更多调用下受益,而困难查询在更多调用下会恶化(Theorem 1)。
  • 在某些条件下存在显式的最佳 LLM 调用次数 K*,并且可从难度参数计算得到(Theorem 2)。
  • 缩放律 G(K;D) 能准确预测性能,并且可以从少量样本拟合得到(图 5–6,表 2)。
  • 在真实数据集(大学数学、商业伦理、大学化学)使用 GPT-3.5 时,缩放律能够正确识别最优 K,并可预测易/难子集的性能(图 7)。
  • 零-shot 难度预测器(GPT-4)对将查询难度分类以实现自适应 K 表现出良好前景(表 3)。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。