每天早上一封邮件,把昨天的 AI 梳理好订阅邮件

METAL LAB

Looped Language Models Improve Compositional Tool Calling

arXiv:2608.181712026-08-20

会反复回想自己答案的AI模型,更擅长按顺序组合调用多个工具

研究者测试了循环语言模型——一种在给出答案前把同一个计算模块反复过几遍的模型结构——在API-Bank、BFCL、NESTful三个工具调用评测集上的表现。在使用相同数据和训练设置的对照实验中,循环模型在需要协调多个API调用、并把前一步结果传给下一步的复合任务上明显更强,而在只需调用单个工具的简单任务上优势较小且因模型而异。一种只在必要时增加计算量的自适应推理方法,用更少的计算量达到了和固定循环次数相当甚至更好的效果。

他们做了什么

  1. 测试了原生循环结构的Ouro-1.4B、Ouro-2.6B,以及由Llama-3.2-1B、OLMo-2-1B改造而成的循环模型
  2. 用相同的Hermes function-calling数据集和相同训练设置,对循环模型与非循环模型做了对照比较
  3. 在只需调用单个工具的任务上循环带来的提升较小且不稳定,但在需要并行调用多个工具或把前一步输出传给下一步的复合任务上提升明显更大
  4. 将推理时的循环次数从1次调到8次后发现,复合任务的准确率总体上随循环次数增加而提升,之后趋于饱和
  5. 让模型按每个词元自行决定何时退出循环的自适应推理方式,能用更少的平均循环次数达到接近甚至超过固定循环次数的最佳效果,案例显示随着循环加深,模型逐步纠正了遗漏的依赖调用和错误的函数选择
Figure 2: BFCL semantic AST accuracy by task category as fixed recurrent depth increases. Each curve reports accuracy on Simple, Multiple, Parallel, and Parallel-Multiple tasks.
Figure 2: BFCL semantic AST accuracy by task category as fixed recurrent depth increases. Each curve reports accuracy on Simple, Multiple, Parallel, and Parallel-Multiple tasks.
Figure 3: NESTful Win Rate as fixed recurrent depth increases. Native recurrent Ouro models benefit from additional recurrent computation, whereas the retrofitted recurrent Llama baseline remains substantially weaker.
Figure 3: NESTful Win Rate as fixed recurrent depth increases. Native recurrent Ouro models benefit from additional recurrent computation, whereas the retrofitted recurrent Llama baseline remains substantially weaker.
Table 1: BFCL semantic AST correctness (%; higher is better). Overall is the aggregate score across all task categories. The lower block compares looped and non-looped variants of each backbone, fine-tuned using identical data and optimization settings; looped variants use a fixed inference depth of 8 loop iterations. Base checkpoints omitted from the lower block score near zero throughout.
ModelTrainingSimpleMultipleParallelPar.-Mult.Overall
Ouro-1.4BBase65.367.035.044.555.4
SFT91.890.067.555.579.3
Ouro-2.6BBase80.575.52.01.047.9
SFT92.388.083.076.586.4
Qwen3-1.7BBase1.50.00.00.00.6
SFT67.057.03.09.540.7
Instruct91.891.583.581.087.9
Qwen3-4BBase72.057.51.00.540.6
SFT94.387.02.55.556.7
Instruct93.092.587.588.590.9
Qwen3-8BInstruct95.596.091.589.593.6
Llama-3.2-1BInstruct18.22.54.04.59.5
Llama-3.2-3BSFT88.286.069.060.578.4
Instruct33.837.00.00.020.9
Llama-3.1-8BInstruct46.541.00.00.026.8
OLMo-2-1BSFT59.250.014.512.539.1
Looped SFT55.058.026.514.541.8
Llama-3.2-1BSFT29.828.514.05.021.4
Looped SFT43.540.531.06.032.9
(b) Retrofitted recurrent Llama model.
(b) Retrofitted recurrent Llama model.
Figure 4: Adaptive recurrent computation on BFCL and NESTful. The x-axis reports the mean recurrent depth per generated token. Adaptive stopping improves the compute-performance frontier by allocating additional recurrent iterations only when beneficial. On BFCL, adaptive stopping matches or slightly exceeds the best fixed-depth operating point while executing fewer recurrent iterations on average. On NESTful, Ouro-2.6B reaches the same Win Rate as fixed depth 4 while using fewer recurrent iterations per generated token.
Figure 4: Adaptive recurrent computation on BFCL and NESTful. The x-axis reports the mean recurrent depth per generated token. Adaptive stopping improves the compute-performance frontier by allocating additional recurrent iterations only when beneficial. On BFCL, adaptive stopping matches or slightly exceeds the best fixed-depth operating point while executing fewer recurrent iterations on average. On NESTful, Ouro-2.6B reaches the same Win Rate as fixed depth 4 while using fewer recurrent iterations per generated token.
Table 2: NESTful official evaluation (higher is better). Win Rate is the primary metric.
ModelTrainingFunction F1Parameter F1PartialFullWin Rate
Ouro-1.4BBase0.9050.5390.1490.0910.110
SFT0.8990.5660.2190.1310.191
Ouro-2.6BBase0.9200.5950.2070.1280.190
SFT0.9220.6800.2950.2040.371
Qwen3-1.7BBase0.0000.0000.0000.0000.000
SFT0.0000.0000.0000.0000.000
Instruct0.9240.5550.2020.1090.134
Qwen3-4BBase0.0000.0000.0000.0000.000
SFT0.4580.3090.1560.0010.063
Instruct0.9710.7030.2850.1960.292
Qwen3-8BInstruct0.9790.7740.3290.2460.345
Llama-3.2-3BBase0.9110.5610.2080.1550.146
SFT0.9110.4950.1750.0930.095
Instruct0.9290.4190.1600.0330.060
Llama-3.1-8BInstruct0.6570.3420.1370.0300.073
(b) Ouro-2.6B.
(b) Ouro-2.6B.
Figure 5: Iterative refinement across recurrent depths. Ouro-1.4B on a two-step NESTful composition task. Calls are shown as function(argument=value) -> answer. At depth 1 the model emits a single call to a function absent from the tool catalogue and omits the dependent call; at depth 2 it recovers the two-call structure but the first function is again absent from the catalogue and the variable reference is invalid. Depths 3 and 4 match the gold sequence, including the output-to-input reference $var1.output_0$.
Figure 5: Iterative refinement across recurrent depths. Ouro-1.4B on a two-step NESTful composition task. Calls are shown as function(argument=value) -> answer. At depth 1 the model emits a single call to a function absent from the tool catalogue and omits the dependent call; at depth 2 it recovers the two-call structure but the first function is again absent from the catalogue and the variable reference is invalid. Depths 3 and 4 match the gold sequence, including the output-to-input reference $var1.output_0$.
Table 3: API-Bank evaluation (%; higher is better). (a) Controlled comparison between looped and non-looped models trained using identical supervised fine-tuning recipes. The lower block pairs each retrofitted backbone with its non-looped counterpart; looped variants are evaluated at a fixed inference depth of 8 loop iterations. (b) Comparison against publicly released instruction-tuned checkpoints. Call Correctness measures functional API-call correctness, Exact requires an exact API-name-and-argument match, and Parse reports valid call generation.
(a) Controlled models
Base SFT Model Call Exact Parse Call Exact Parse Ouro-1.4B 73.0 67.6 95.1 75.1 70.2 97.2 Ouro-2.6B 79.2 76.9 99.2 79.9 77.1 99.7 Qwen3-1.7B 5.1 5.1 13.9 61.4 57.8 93.6 Qwen3-4B 71.2 71.2 99.2 76.6 73.8 99.7 Llama-3.2-1B 1.7 1.3 10.8 16.3 14.1 55.3 Llama-3.2-3B 0.3 0.3 0.3 68.5 64.5 99.7 OLMo-2-1B 1.9 0.5 35.7 37.1 33.2 99.5 OLMo-2-1B (Loop) 0.1 0.0 1.5 34.0 30.3 90.7 Llama-3.2-1B 1.7 1.3 10.8 16.3 14.1 55.3 Llama-3.2-1B (Loop) 0.1 0.0 1.5 17.9 16.2 43.4
Figure 6: Ordering and spurious-call correction. At depth 1 the output is malformed, emitting tool specifications rather than call arguments (excerpt shown truncated). At depth 2 both gold functions appear but in reversed order, followed by a call to multiply, which is absent from the tool catalogue, and an invalid variable reference. Depths 3 and 4 match the gold sequence, differing from each other only in label naming.
Figure 6: Ordering and spurious-call correction. At depth 1 the output is malformed, emitting tool specifications rather than call arguments (excerpt shown truncated). At depth 2 both gold functions appear but in reversed order, followed by a call to multiply, which is absent from the tool catalogue, and an invalid variable reference. Depths 3 and 4 match the gold sequence, differing from each other only in label naming.
Figure 7: Argument correction. At depth 1 the model selects the correct first function but names its argument input_str, a parameter of a different tool in the same catalogue, duplicates it as input_str_2, and omits the dependent call. Depths 2 through 4 match the gold sequence and are identical to one another.
Figure 7: Argument correction. At depth 1 the model selects the correct first function but names its argument input_str, a parameter of a different tool in the same catalogue, duplicates it as input_str_2, and omits the dependent call. Depths 2 through 4 match the gold sequence and are identical to one another.
Table 4: Structural comparison of the evaluated tool-calling benchmarks under the solution representation Gx=(Cx,Ex). API-Bank emphasizes individual-call grounding, BFCL evaluates increasingly complex independent call sets, and NESTful introduces explicit output-to-input dependencies.
BenchmarkCandidate toolsCall structureDependenciesPrimary challenge
API-Bankone or moretypically |Cx|=1Ex=∅Tool and argument grounding
BFCL Simple|𝒯x|=1|Cx|=1Ex=∅Argument grounding
BFCL Multiple|𝒯x|>1|Cx|=1Ex=∅Function selection
BFCL Parallelone or more|Cx|>1Ex=∅Independent call generation
BFCL Parallel-Multiple|𝒯x|>1|Cx|>1Ex=∅Selection and call composition
NESTfulmultiple|Cx|>1typically |Ex|>0Dependency-aware execution
Figure 8: Two distinct incorrect attempts before recovery. Depths 1 and 2 each emit a single call to a function absent from the tool catalogue and omit the required dependent call. At depth 1, the model also uses an argument name belonging to a different tool in the catalogue. Depths 3 and 4 select both gold functions and correctly pass $var1.output_0$, differing only in argument-key order.
Figure 8: Two distinct incorrect attempts before recovery. Depths 1 and 2 each emit a single call to a function absent from the tool catalogue and omit the required dependent call. At depth 1, the model also uses an argument name belonging to a different tool in the catalogue. Depths 3 and 4 select both gold functions and correctly pass $var1.output_0$, differing only in argument-key order.
Figure 9: Isolated recovery of a missing dependent call. Depth 1 emits an object with no function name, returning a computed literal, so the parser yields no calls. Depth 2 emits a first call that matches the gold sequence exactly but stops there. Depths 3 and 4 leave that first call unchanged and add the dependent call with the reference $var1.output_0$, isolating the recovery of the dependency from any change in function selection.
Figure 9: Isolated recovery of a missing dependent call. Depth 1 emits an object with no function name, returning a computed literal, so the parser yields no calls. Depth 2 emits a first call that matches the gold sequence exactly but stops there. Depths 3 and 4 leave that first call unchanged and add the dependent call with the reference $var1.output_0$, isolating the recovery of the dependency from any change in function selection.

为什么重要

这对需要让AI代理协调调用多个工具完成任务的开发者有参考价值,说明不扩大模型规模、只在推理阶段增加计算就能提升准确率。自适应推理的思路也为控制计算成本、同时处理复杂依赖关系的工作流提供了实用方向。

本文术语

  • 循环语言模型(Looped Language Model) · 在输出答案前反复通过同一个神经网络模块以增加计算量、而不增加参数量的模型结构
  • 循环深度(recurrent depth) · 推理时同一模块被重复执行的次数
  • 自适应推理(adaptive inference) · 让模型针对每个词元自行决定循环多少次,以平衡计算量和准确率
  • 改造模型(retrofitted model) · 把已训练好的普通模型部分层改成跨迭代共享参数的循环结构
  • 语义AST准确率(semantic AST accuracy) · 把生成的函数调用标准化成结构化形式,再判断是否与正确答案在语义上一致的评分方式

论文原文摘要(英文)

Looped language models have shown promising results on reasoning benchmarks, yet their potential for agentic tool use remains largely unexplored. We study this question in compositional tool-calling settings, where models must coordinate multiple API calls, maintain intermediate state, and preserve dependencies across tool interactions. We evaluate native and retrofitted looped language models on API-Bank, BFCL, and NESTful, comparing looped and no

作者 · Andrei Cristian Popescu, Haitz S\'aez de Oc\'ariz Borde, Pietro Li\`o

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Andrei Cristian Popescu et al., arXiv:2608.18171, CC BY 4.0