One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

Looped Language Models Improve Compositional Tool Calling

arXiv:2608.181712026-08-20

AI models that rethink their own answers multiple times get better at chaining tools together

Researchers tested looped language models, which pass their internal computation through the same block repeatedly before answering, on three tool-calling benchmarks: API-Bank, BFCL, and NESTful. Comparing looped and non-looped models trained with identical data and settings, looped models showed clear gains on tasks requiring coordinating multiple API calls and passing outputs between them, while gains on single, isolated calls were smaller and inconsistent. An adaptive inference method that only adds extra computation when needed matched or beat fixed-depth looping while using less compute.

What they did

  1. Tested both natively looped models (Ouro-1.4B, Ouro-2.6B) and models retrofitted into looped architectures from Llama-3.2-1B and OLMo-2-1B
  2. Compared looped vs. non-looped models trained on the same Hermes function-calling dataset with matched settings
  3. On single-call tasks the benefit of looping was small and model-dependent, but on tasks requiring multiple parallel calls or dependent calls (where one call's output feeds another), the gains were much larger
  4. Varying recurrent depth from 1 to 8 iterations showed accuracy on compositional tasks generally rising with more iterations before plateauing
  5. Adaptive inference, which lets the model exit the loop per-token once confident, achieved similar or better results than fixed-depth looping while using fewer iterations on average; examples showed models correcting missing dependent calls and wrong function choices as depth increased
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.

Why it matters

This matters for anyone building AI agents that must orchestrate multiple tools in sequence, since it suggests accuracy can be improved by spending more compute at inference time rather than scaling up model size. The adaptive approach also points to a practical way to control compute cost while still handling complex, dependency-heavy workflows.

Terms in this paper

  • Looped Language Model · a model that repeatedly applies the same neural network block before producing an answer, increasing computation without adding parameters
  • Recurrent Depth · the number of times the shared block is applied during inference
  • Adaptive Inference · a method where the model decides per-token how many loop iterations to run, balancing compute and accuracy
  • Retrofitted Model · a pretrained standard model converted into a looped architecture by sharing some of its layers across iterations
  • Semantic AST Accuracy · a scoring method that standardizes generated function calls into a structured form and checks if they semantically match the correct answer

Original abstract (English)

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

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

Read on arXiv

Latest papers

All papers →

Latest from METAL LAB

Figures: Andrei Cristian Popescu et al., arXiv:2608.18171, CC BY 4.0