arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.18028cs.AIcs.CL
收藏

大语言模型中代码的组合硬度——一个概率视角

Compositional Hardness of Code in Large Language Models -- A Probabilistic Perspective

The Hebrew University(希伯来大学)

Yotam Wolf, Binyamin Rothberg, Dorin Shteyman, Amnon Shashua

AI总结:

本研究指出LLM在单一上下文内执行多子任务的组合硬度局限,提出用生成复杂度指标量化该问题,并通过理论证明与实验验证,将分解任务分配给多智能体系统可显著降低呈指数级增长的生成复杂度。

摘要:

在大型语言模型(LLM)用于代码生成等复杂分析任务的常见实践中,通常是在模型的上下文窗口内对整个任务进行采样求解。先前的工作表明,在模型上下文内进行子任务分解(思维链)有利于解决此类任务。在本研究中,我们指出了LLM在同一个上下文窗口内执行多个子任务的能力存在一种局限性——即上下文内的组合硬度,这表明将分解后的问题分配给由LLM组成的多智能体系统具有优势。这种组合硬度通过生成复杂度指标来量化,即为了采样到至少一个正确解所需的LLM生成次数。我们发现,在相同上下文内解决组合问题的生成复杂度与将其分配给多个智能体相比存在差距,且该差距随解的长度呈指数级增长。我们在理论上证明了这些结果,并通过实验进行了实证展示。

英文摘要:

A common practice in large language model (LLM) usage for complex analytical tasks such as code generation, is to sample a solution for the entire task within the model's context window. Previous works have shown that subtask decomposition within the model's context (chain of thought), is beneficial for solving such tasks. In this work, we point a limitation of LLMs' ability to perform several sub-tasks within the same context window - an in-context hardness of composition, pointing to an advantage for distributing a decomposed problem in a multi-agent system of LLMs. The hardness of composition is quantified by a generation complexity metric, i.e., the number of LLM generations required to sample at least one correct solution. We find a gap between the generation complexity of solving a compositional problem within the same context relative to distributing it among multiple agents, that increases exponentially with the solution's length. We prove our results theoretically and demonstrate them empirically.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑