arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.20105cs.LGcs.AI
收藏

LLMs的Y-组合子:解决长上下文旋转问题的λ演算

The $\mathbf{Y}$-Combinator for LLMs: Solving Long-Context Rot with $λ$-Calculus

The School of Interdisciplinary Research(跨学科研究学院);Indian Institute of Technology (IIT) Delhi(印度理工学院德里分校);Robert Bosch GmbH, India(德国罗伯特·博世有限公司,印度);Huawei Noah’s Ark Lab(华为诺亚方舟实验室);Huawei Noah’s Ark UCL Centre for Artificial Intelligence(华为诺亚方舟大学伦敦人工智能中心)

Amartya Roy, Rasul Tutunov, Xiaotong Ji, Matthieu Zimmer, Haitham Bou-Ammar

AI总结:

本文提出λ-RLM框架,通过类型化的功能运行时替代自由递归代码生成,提升长上下文推理的可靠性与效率。

摘要:

LLMs正被越来越多地用作通用推理工具,但长输入仍受固定上下文窗口限制。递归语言模型(RLMs)通过外部化提示并递归求解子问题来解决这一问题。然而,现有RLMs依赖于开放式的读-求值-打印循环(REPL),其中模型生成任意控制代码,使得执行难以验证、预测和分析。本文引入λ-RLM,一种用于长上下文推理的框架,其通过基于λ演算的类型化功能运行时替代自由递归代码生成。它执行一个紧凑的预验证组合子库,并仅在受限制的叶子子问题上使用神经推断,将递归推理转化为具有显式控制流的结构化功能程序。我们证明,λ-RLM具备标准RLMs所缺乏的正式保证,包括终止性、闭式成本界、受递归深度控制的准确性扩展以及在简单成本模型下最优的分区规则。实证结果表明,在四个长上下文推理任务和九个基础模型上,λ-RLM在36次模型-任务比较中胜出29次,提高了模型层级的平均准确率最高达+21.9个百分点,并将延迟降低最高达4.1倍。这些结果表明,类型化的符号控制比开放式的递归代码生成更可靠且高效。λ-RLM的完整实现已开源,可在https://github.com/lambda-calculus-LLM/lambda-RLM上获取。

英文摘要:

LLMs are increasingly used as general-purpose reasoners, but long inputs remain bottlenecked by a fixed context window. Recursive Language Models (RLMs) address this by externalising the prompt and recursively solving subproblems. Yet existing RLMs depend on an open-ended read-eval-print loop (REPL) in which the model generates arbitrary control code, making execution difficult to verify, predict, and analyse. We introduce $λ$-RLM, a framework for long-context reasoning that replaces free-form recursive code generation with a typed functional runtime grounded in $λ$-calculus. It executes a compact library of pre-verified combinators and uses neural inference only on bounded leaf subproblems, turning recursive reasoning into a structured functional program with explicit control flow. We show that $λ$-RLM admits formal guarantees absent from standard RLMs, including termination, closed-form cost bounds, controlled accuracy scaling with recursion depth, and an optimal partition rule under a simple cost model. Empirically, across four long-context reasoning tasks and nine base models, $λ$-RLM outperforms standard RLM in 29 of 36 model-task comparisons, improves average accuracy by up to +21.9 points across model tiers, and reduces latency by up to 4.1x. These results show that typed symbolic control yields a more reliable and efficient foundation for long-context reasoning than open-ended recursive code generation. The complete implementation of $λ$-RLM, is open-sourced for the community at: https://github.com/lambda-calculus-LLM/lambda-RLM.

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

↑