ContextEvolve: Multi-Agent Context Compression for Systems Code Optimization
Hongyuan Su, Yu Zheng, Yong Li
TL;DR
ContextEvolve introduces a three-agent context compression pipeline for systems-code optimization under API-only access, achieving RL-like search efficiency in a textual latent space. The Summarizer, Navigator, and Sampler collaboratively condense long optimization histories into a semantic state, directional guidance, and curated exemplars, guiding a generator to produce better candidates without parameter updates. The approach establishes a functional isomorphism with reinforcement learning—state representation, policy gradient, and experience replay—yielding high sample efficiency in a training-free setting. On the ADRS benchmark, ContextEvolve outperforms baselines in aggregate scores and reduces token usage, with substantial gains in Load Balancing, demonstrating practical potential for performance-driven systems optimization under restricted access conditions.
Abstract
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
