用多智能体压缩上下文,高效优化系统级代码性能。
ContextEvolve: Multi-Agent Context Compression for Systems Code Optimization
- 三智能体协同:摘要、导航、采样,分解优化上下文
- 在ADRS上性能提升33.3%,令牌消耗减少29.0%
- 无需参数更新,适合受限接口下的代码优化场景
大型语言模型正推动系统研究,自动化发现计算机系统中关键性能算法。尽管LLM可生成合理代码,但满足系统对正确性与性能的严苛要求仍需迭代优化。测试时强化学习虽具高搜索效率,但需参数更新,在仅限API访问下不可行;现有无训练进化方法则存在上下文利用低效、搜索方向盲目等问题。我们提出ContextEvolve,一种多智能体框架,在严格无参约束下实现类强化学习的搜索效率。该框架将优化上下文分解为三个正交维度:摘要代理通过代码到语言抽象压缩语义状态,导航代理从轨迹分析中提炼优化方向,采样代理通过优先示例检索构建经验分布。三者协同形成与强化学习对应的功能同构:状态表示、策略梯度、经验回放,实现在文本潜在空间中的有原则优化。在ADRS基准上,ContextEvolve相较最先进基线性能提升33.3%,令牌消耗降低29.0%。代码已公开于https://anonymous.4open.science/r/ContextEvolve-ACC。
原文摘要 · Abstract (English)
Large language models are transforming systems research by automating the discovery of performance-critical algorithms for computer systems. Despite plausible codes generated by LLMs, producing solutions that meet the stringent correctness and performance requirements of systems demands iterative optimization. Test-time reinforcement learning offers high search efficiency but requires parameter updates infeasible under API-only access, while existing training-free evolutionary methods suffer from inefficient context utilization and undirected search. We introduce ContextEvolve, a multi-agent framework that achieves RL-level search efficiency under strict parameter-blind constraints by decomposing optimization context into three orthogonal dimensions: a Summarizer Agent condenses semantic state via code-to-language abstraction, a Navigator Agent distills optimization direction from trajectory analysis, and a Sampler Agent curates experience distribution through prioritized exemplar retrieval. This orchestration forms a functional isomorphism with RL-mapping to state representation, policy gradient, and experience replay-enabling principled optimization in a textual latent space. On the ADRS benchmark, ContextEvolve outperforms state-of-the-art baselines by 33.3% while reducing token consumption by 29.0%. Codes for our work are released at https://anonymous.4open.science/r/ContextEvolve-ACC
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。