Paper: 2610.37648
Authors: Andrew Szot, Samira Abnar, Omar Attia, Abbas Kazerouni, Michael Kirchhof, Cheng-Yu Hsieh, Raviteja Vemulapalli, Alexander Toshev
Categories: cs.AI, cs.CL, cs.LG
The Gap
Large Language Models (LLMs) increasingly act as autonomous agents capable of invoking external APIs, querying databases, and executing multi-turn tool calling across diverse software ecosystems (e.g., ToolBench, Gorilla, SWE-bench).
However, training performant tool-use agents has remained an empirical black art constrained by critical data scaling bottlenecks:
- Scarcity and Privacy of Real-World Tool Telemetry:
- Production API execution logs contain proprietary user data, private tokens, and confidential company databases, making them impossible to open-source or scale freely.
- The Naive Synthetic Data Trap:
- Modern post-training pipelines rely on synthetic environments generated by prompting LLMs.
- However, existing generation methods naively scale along arbitrary axes—typically generating hundreds of thousands of varied user query phrasings for a tiny, fixed set of 10 to 20 hardcoded API tools.
- Absence of Predictable Scaling Laws:
- While pretraining language models adheres to predictable Chinchilla compute and data scaling laws, the community has had zero mathematical scaling laws for agentic tool use.
- Teams have had no way to predict whether to invest compute in more tools, more tasks, or richer database states.
THE SYNTHETIC TOOL-USE SCALING DILEMMA
Traditional Approach:
Fixed Tools: [Weather, Calendar, Calculator (N=5)]
│
▼ Explode query diversity: 100,000 ways to ask "What's the weather in Seattle?"
[Trained Agent] ──> Fails catastrophically on any new API with nested schemas!
THE UNANSWERED SCALING QUESTIONS:
- Does 2x tools beat 2x tasks?
- Does database state entropy matter more than prompt variety?
- Can agent generalization be predicted mathematically before training?
The Increment
One sentence: By systematically generating 458,752 synthetic tasks and training 849 distinct models across four parameter scales with the SynthAPI pipeline, the authors derive the first mathematical scaling laws governing agentic tool-use generalization.
Core Mechanism
The authors developed SynthAPI, a fully controllable generative pipeline that decomposes synthetic tool-use environment generation along three orthogonal axes:
SYNTHAPI THREE-AXIS ENVIRONMENT SYNTHESIS & SCALING LAW
Tool Dimension (T) Database Dimension (D)
[Diverse Schemas / Argument Trees] [Relational Tables / State Entropy]
\ /
\ /
▼ ▼
┌──────────────────────────────────────┐
│ Controllable Environment Synthesis │
└──────────────────────────────────────┘
│
▼ Task Dimension (K)
[Multi-Turn Task Prompts]
│
▼
Massive Empirical Matrix: 458,752 Tasks × 849 Models (1B to 14B)
│
▼
POWER-LAW FORMULATION OF AGENT GENERALIZATION:
Error(T, D, K, N) = E_0 + α_T T^(-β_T) + α_D D^(-β_D) + α_K K^(-β_K) + α_N N^(-β_N)
- Three Orthogonal Generation Axes:
- Tools (): Parameterizes API diversity, argument complexity, return type heterogeneity, and schema depth.
- Databases (): Parameterizes the underlying relational database state space, row entity count, and stateful mutations.
- Tasks (): Parameterizes user intent composition, multi-step dependency depth, and language surface variation.
- Massive Systematic Training Grid:
- Spanning 849 distinct training runs across four model parameter sizes (1B, 3B, 7B, 14B), the authors systematically varied , , and under matched training token budgets.
- The Empirical Tool-Scaling Formula:
- Downstream out-of-distribution (OOD) generalization error follows a power law jointly determined by tool diversity , database complexity , task volume , and model parameter size :
- Crucially, the exponents reveal an empirical hierarchy: .
The Evidence
The discovered scaling laws revealed transformative practical principles for data engineering in agent training:
| Data Scaling Strategy | OOD Unseen Tools (ToolBench) | Multi-Turn API Generalization | Complex State Recovery |
|---|---|---|---|
| Baseline (Scale Task Prompts 10x) | 48.2% | 51.4% | 42.1% |
| Scale Model Size Only (3B 14B) | 54.1% | 56.8% | 49.3% |
| SynthAPI Pareto Scaling (Scale Tools + DB) | 69.8% (+21.6%) | 73.5% (+22.1%) | 68.2% (+26.1%) |
Key scaling law discoveries:
- Tools Over Tasks: Scaling tool diversity () yields dramatically higher marginal generalization gains than scaling the number of tasks (). Once an agent sees task variations per tool, adding more task rephrasings produces near-zero transfer. In contrast, doubling the number of distinct API schemas improves out-of-distribution generalization by +14.2%.
- Database Diversity Is Crucial: Scaling underlying database states () forces the model to learn error recovery, empty query handling, and state mutation tracking, boosting multi-turn tool success by +26.1%.
- Data Complexity Multiplier: Increasing argument nesting depth and return schema complexity yields a super-linear improvement in the model’s robustness against real-world malformed API calls.
Key Takeaways
- The First Chinchilla Law for Agents: Tool-use generalization is not random; it adheres to mathematically predictable power laws across tools, databases, tasks, and model size.
- Stop Generating More Prompts for the Same APIs: The most common industry mistake is generating 50,000 user prompts for 10 APIs. Compute is 5x more effective when invested in synthesizing novel tool definitions and complex databases.
- Blueprint for Generalist Tool Intelligence: By controlling synthetic environment diversity according to SynthAPI’s scaling exponents, developers can systematically train sub-10B models that outperform much larger models trained on ad-hoc synthetic corpora.
论文: 2610.37648
作者: Andrew Szot, Samira Abnar, Omar Attia, Abbas Kazerouni, Michael Kirchhof, Cheng-Yu Hsieh, Raviteja Vemulapalli, Alexander Toshev
分类: cs.AI, cs.CL, cs.LG
核心痛点
以大语言模型为核心驱动的大模型智能体(AI Agents)正广泛融入各类生产力场景,自主调用外部 REST API、执行 SQL 数据库查询并在复杂多轮工作流中完成工具编排(如 ToolBench、Gorilla、SWE-bench)。
然而,如何高质量构建工具调用智能体的训练数据,业内长期处于盲目经验主义与数据扩展瓶颈:
- 真实世界工具交互日志的极度匮乏与隐私红线:
- 企业级真实 API 调用记录充斥着高度敏感的个人隐私数据、鉴权秘钥与核心业务资产,无法在开源社区或公开训练中直接大规模流通。
- “伪合成数据”的严重同质化陷阱:
- 现阶段后训练普遍依赖大模型合成数据。但现有方案大多极其粗糙——针对十几个写死的简单 API(如天气、计算器、备忘录),通过 Prompt 生成成千上万条换汤不换药的用户提问句式。
- 这种数据只增加了语言表层的提示词多样性,智能体一旦面对从未见过的嵌套复杂参数 API 时瞬间瘫痪。
- 缺乏可预测的扩展法则(Scaling Law):
- 在语言模型预训练领域,Chinchilla 定律早已精确量化了计算量、参数量与 Token 数的幂律关系;但在 Agent 工具调用领域,业界此前没有任何经得起检验的数学扩展法则。
- 算力究竟该花在合成更多“工具(Tools)”、更多“任务(Tasks)”,还是更多“数据库状态(Databases)”上?业界此前完全盲人摸象。
传统合成工具数据的伪扩展误区
传统做法:
固定工具: [天气查询, 日程添加, 计算器 (仅 N=5 个 API)]
│
▼ 暴力扩展自然语言提示词: 生成 10 万种问法 ("西雅图明天冷吗", "查查西雅图天气"...)
[训练出的智能体] ──> 面对参数深度嵌套、具有状态变更的新 API 时全面崩溃!
核心追问:
- 工具数量翻倍 vs 任务指令翻倍,谁对泛化更重要?
- 底层数据库的状态熵对智能体规划有多大决定性?
- 我们能否在训练前就精准预测智能体的泛化准确率?
创新方案
一句话总结:通过设计可控环境合成流水线 SynthAPI,并在 458,752 项任务中系统化训练涵盖 4 种参数规模的 849 个模型,研究团队首次确立了预测大模型工具调用智能体泛化能力的幂律扩展法则(Scaling Law)。
核心机制
研究团队打造了完全解耦的环境合成流水线 SynthAPI,将工具交互环境的形式化空间拆解为三大正交维度:
SYNTHAPI 三维正交环境合成与扩展架构
工具维度 (Tools: T) 数据库维度 (Databases: D)
[API 接口丰富度 / 树状参数嵌套] [底层关系型数据表 / 状态转移熵]
\ /
\ /
▼ ▼
┌──────────────────────────────────────┐
│ SynthAPI 形式化可控环境合成流水线 │
└──────────────────────────────────────┘
│
▼ 任务维度 (Tasks: K)
[多轮复杂依赖任务指令]
│
▼
实证矩阵:458,752 项任务 × 849 个模型全量训练 (1B 到 14B)
│
▼
工具智能体泛化误差的数学幂律公式:
Error(T, D, K, N) = E_0 + α_T T^(-β_T) + α_D D^(-β_D) + α_K K^(-β_K) + α_N N^(-β_N)
- 环境构成的三大正交控制轴:
- 工具轴():控制 API 数量、参数深度、返回值格式异构性及模式树复杂度。
- 数据库轴():控制环境底层关系型数据库的实体表数量、行记录规模与数据持久化状态变更。
- 任务轴():控制多步骤用户目标规划的依赖链长度、语言表面多样性与错误容忍度。
- 史上最大规模的工具智能体训练实证网格:
- 覆盖 1B、3B、7B 和 14B 四种模型尺寸,总计完成了 849 次完整的独立端到端模型训练,在严格控制 Token 预算的前提下系统测试变量交织影响。
- 形式化扩展定律公式:
- 实证严谨拟合出分布外(OOD)未见工具的泛化误差满足联合幂律分布:
- 颠覆性数学发现:扩展指数呈现极其悬殊的层级差异:!
验证成效
该法则揭示了智能体数据合成中颠覆直觉的指导原则,并在各大知名工具调用评测基准(ToolBench 等)上进行了验证:
| 数据合成扩展路径 | 未见全新工具测试 (ToolBench) | 多轮复杂 API 编排泛化率 | 异常与错误状态自愈率 |
|---|---|---|---|
| 传统基线:暴力增加 10 倍任务提问句式 | 48.2% | 51.4% | 42.1% |
| 单纯堆砌模型尺寸 (从 3B 升级至 14B) | 54.1% | 56.8% | 49.3% |
| 依据 SynthAPI 扩展律:优先扩充工具与数据库 | 69.8% (+21.6%) | 73.5% (+22.1%) | 68.2% (+26.1%) |
核心科学结论:
- 工具多样性远重于任务数量(Tools Over Tasks):扩充工具种类()所带来的泛化边际收益呈数量级压倒任务数量()。当每个工具的提问句式超过 200 条后,继续扩充任务几乎带来零收益;而将 API 接口的多样性翻倍,能带来 +14.2% 的绝对泛化跃升。
- 数据库真实状态至关重要:底层数据库状态()的复杂度决定了智能体能否学会参数空值处理、状态回滚与多表级联查询,使多轮工具交互成功率激增 +26.1%。
- 数据结构复杂度的乘数效应:引入带有嵌套字典、列表参数的高复杂度合成工具,使模型对抗真实世界脏数据与畸形 API 的鲁棒性呈超线性爆发。
关键启示
- 智能体领域的“Chinchilla 定律”诞生:工具调用能力并非无迹可寻的玄学,而是严格遵循跨越工具、数据库、任务规模与模型参数的数学幂律。
- 立刻停止低效的提示词复读机式合成:工业界最常见的资源浪费就是为 10 个简单 API 合成 5 万条对话。将算力转向合成拥有复杂状态的异构 API 才是最优解。
- 为小模型逆袭大模型指明航向:遵循 SynthAPI 的帕累托最优数据配比,7B 级别的小模型在工具编排上完全能够正面击溃未经过科学配比的 70B 大模型。