文章背景与核心概要
长期以来,自主AI智能体在规划和生成行动时,往往忽略了底层物理约束(如内存限制、执行时间、运行时环境以及计算预算)对其成败的决定性作用。这种在智能体规划状态中缺失运行环境约束的现象被称为“底层盲视”(Substrate Blindness)。本文作者Manu Agrawal通过对三大前沿大模型(Anthropic Claude Opus 5、OpenAI GPT-5.6-Sol和Google Gemini 3.7 Flash)在数值代码生成任务中的测试,深入研究了这一现象。
研究发现,向智能体明确提供严格的运行契约(如128 MB内存和10.0秒运行时间)能够显著改变代码生成的行为。契约的披露不仅在绝大多数对比测试中降低了峰值进程内存、缩短了平均运行时间(最高加速达3.1倍),还促使生成的程序做出了积极的结构性调整(如有限阻塞、保留float32、上三角遍历以及就地或内存映射缓冲区)。在严苛的96 MB预算压力测试中,具备上下文感知的模型成功率大幅提升(最高达5/5),而未提供契约的对照组则表现惨淡。这些结果确立了一个基础概念证明:将执行上下文作为一等输入,能够使AI智能体主动调整其执行计划,将计算从无约束的分配中转移开,并在执行前大幅优化资源与时间消耗曲线。
Substrate-Aware AI Agents: Execution Context as a First-Class Input
Authors: Manu Agrawal
Submitted: September 4, 2026
Primary Subject: Artificial Intelligence (cs.AI)
arXiv ID: arXiv:2609.05232
DOI: 10.48550/arXiv.2609.05232
Artifacts & Code: GitHub Repository
Abstract Summary
Autonomous AI agents frequently select actions in operational environments where physical constraints—such as memory limits, execution time, runtime environments, and compute budgets—dictate whether a generated plan will succeed. The omission of this operational environment from an agent's planning state is defined as substrate blindness.
自主AI智能体经常在各种运行环境中选择行动,在这些环境中,物理约束(如内存限制、执行时间、运行时环境和计算预算)决定了生成的计划是否能够成功。将这种运行环境从智能体的规划状态中忽略的现象,被定义为底层盲视(Substrate Blindness)。
To evaluate this phenomenon, the author examines numerical code generation through tests on three frontier model configurations: * Anthropic Claude Opus 5 * OpenAI GPT-5.6-Sol * Google Gemini 3.7 Flash
为了评估这一现象,作者通过对三种前沿模型配置的测试,考察了数值代码生成的表现: * Anthropic Claude Opus 5 * OpenAI GPT-5.6-Sol * Google Gemini 3.7 Flash
Key Findings
- Performance Impact: Providing a strict operational contract (128 MB RAM and 10.0s wall-time) significantly altered code generation. Contract disclosure reduced measured peak process memory in 13 out of 14 executable index-aligned comparisons and lowered mean wall time across all cohorts, accelerating execution by up to 3.1x.
- Structural Adaptations: Disclosing the execution environment induced proactive structural changes in the generated programs, including bounded blocking, float32 retention, upper-triangle traversal, and in-place or memory-mapped buffers.
- Tight Budget Stress-Test: At a restricted 96 MB contract:
- GPT-5.6-Sol achieved a 5/5 success rate (correct-and-within-budget), compared to 1/5 without the contract.
- Claude Opus 5 achieved 4/5 (compared to 0/5).
- Gemini 3.7 Flash achieved 3/5 (compared to 0/5).
- Cohort mean MaxRSS and wall time were 49–74% and 35–64% lower, respectively, than their task-only reference groups.
关键发现
- 性能影响: 提供严格的运行契约(128 MB内存和10.0秒挂钟时间)显著改变了代码生成。在14组可执行的索引对齐比较中,披露契约有13组减少了测得的峰值进程内存,并降低了所有同类群组的平均挂钟时间,执行速度最高提升了 3.1倍。
- 结构自适应: 披露执行环境促使生成的程序发生了积极的结构性变化,包括有限阻塞(bounded blocking)、保留float32、上三角遍历(upper-triangle traversal)以及就地(in-place)或内存映射缓冲区。
- 紧缩预算压力测试: 在受限的96 MB契约下:
- GPT-5.6-Sol 取得了 5/5 的成功率(正确且在预算范围内),而无契约时仅为 1/5。
- Claude Opus 5 取得了 4/5(无契约时为 0/5)。
- Gemini 3.7 Flash 取得了 3/5(无契约时为 0/5)。
- 各群组的平均最大驻留集大小(MaxRSS)和挂钟时间分别比仅任务(task-only)参考组低 49–74% 和 35–64%。
These results establish a foundational proof of concept: treating execution context as a first-class input allows AI agents to proactively adapt their plans, shifting computation away from unconstrained allocations and drastically improving resource-time profiles prior to execution.
这些结果确立了一个基础的概念证明:将执行上下文作为一等输入,可以使AI智能体主动调整其计划,将计算从无约束的内存分配中转移开,并在执行前大幅改善资源-时间消耗曲线。