{
  "id": 779,
  "kind": "paper",
  "title": "Reinforcement Learning for Code Optimization",
  "summary": "Makes execution time learnable for RL on code optimization via three stages: (1) DMC-Optim benchmark with large optimization tests and a calibrated timing sandbox; (2) composing correctness and speed into the reward using an offline simulator to pick configurations; (3) adapting GRPO and evaluation to the sparser, noisier timed-execution setting. Strongest configurations improve strict top-50% pass@1 from 18.0% to 31.3% on Qwen 2.5 7B and 30.7% to 50.4% on CWM 32B, with further gains at stricter percentiles (125% relative improvement for CWM 32B at top-30%) while preserving pure-correctness scores.",
  "body": "",
  "notes": "Discovery: shared by Pierre Chambon (@PierreChambon6, FAIR/Meta AI & INRIA) in an X thread on 2026-09-29 presenting 3 papers on code optimization: https://x.com/PierreChambon6/status/2104966972043657560 | Method: DMC-Optim benchmark + calibrated sandbox; correctness-speed reward composition via offline simulator; GRPO adapted to sparse noisy timed rewards. | Submitted 2026-07-28.",
  "url": "https://arxiv.org/abs/2607.25970",
  "links": [],
  "authors": [
    "Pierre Chambon",
    "Kunhao Zheng",
    "Juliette Decugis",
    "Benoit Sagot",
    "Gabriel Synnaeve"
  ],
  "tags": [
    "rl",
    "code-optimization",
    "grpo",
    "dmc-optim",
    "execution-time-reward"
  ],
  "topics": "reinforcement learning, code optimization",
  "venue": "arXiv",
  "publisher": "",
  "source": "arxiv",
  "language": "en",
  "access": "public",
  "license": "",
  "published_year": 2026,
  "added_at": "2026-09-29T00:00:00.000Z",
  "verified_at": "2026-09-29T00:00:00.000Z",
  "attrs": {},
  "enrichment": {
    "s2": {
      "venue": "arXiv.org",
      "paper_id": "b9a049d748dea1f6e8a8b62ad5ce879c17a60893",
      "published": "2026-07-28",
      "fetched_at": "2026-10-03T14:57:49.468Z",
      "citation_count": 0,
      "reference_count": 0,
      "influential_citation_count": 0
    },
    "arxiv": {
      "id": "2607.25970",
      "title": "Reinforcement Learning for Code Optimization",
      "authors": [
        "Pierre Chambon",
        "Kunhao Zheng",
        "Juliette Decugis",
        "Benoit Sagot",
        "Gabriel Synnaeve"
      ],
      "comment": "125 pages",
      "updated": "2026-07-28",
      "abstract": "RL for code correctness is now established: have the model generate a program, run it against hidden test cases, and reward solutions that pass. Extending this to code optimization seems straightforward: just add execution time to the reward. But in practice, once timing drives the reward, small problems in measurement noise, reward sparsity, or GRPO instability overwhelm the signal and make RL fail: generated solutions are barely faster, and more of them can fail. We make execution time learnable through three stages: (1) how code is tested, by building DMC-Optim with large optimization tests and a calibrated sandbox; (2) how speed is turned into reward, by composing correctness and speed in the RL environment and using an offline simulator to predict the most promising configurations; and (3) how the model learns from that reward, by adapting GRPO and evaluation to the sparser, noisier timed-execution setting. On DMC-Optim, the strongest optimization-aware configurations improve strict top-50% pass@1 from 18.0% to 31.3% on Qwen 2.5 7B and from 30.7% to 50.4% on CWM 32B. These gains further increase at stricter percentiles such as top-30%, with 125% relative improvement for CWM 32B, while preserving pure-correctness scores. When the timing sandbox is degraded, robust optimization RL reaches 100% to 200% improvement over standard RLVR, depending on the evaluation criterion. On LCB, CWM 32B wins up to 83% of median-sample speed comparisons against standard RLVR. Relative to the fastest correct human submissions per problem, it reaches about half the human rate of complexity-class improvements (14% vs. 28%).",
      "published": "2026-07-28",
      "categories": [
        "cs.LG",
        "cs.AI"
      ],
      "fetched_at": "2026-10-03T14:57:49.468Z"
    }
  },
  "enriched_at": "2026-10-03T14:57:49.514Z",
  "license_class": "unknown",
  "langs": [
    "en"
  ],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "channel": "random-papers",
    "legacy_paper_id": "860",
    "pipeline_status": "done",
    "research_status": "done"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-10-03T12:29:06.561Z",
  "updated_at": "2026-10-03T12:29:06.561Z",
  "page": "https://papers.projxon.ai/entries/779",
  "markdown": "https://papers.projxon.ai/entries/779.md",
  "api": "https://papers.projxon.ai/api/entries/779",
  "relations": [
    {
      "relation": "about",
      "direction": "in",
      "note": "",
      "via": "manual",
      "entry": {
        "id": 1207,
        "kind": "note",
        "title": "RL for language models after GRPO: fixes, costs, rewards, agents (overview)",
        "summary": "An overview of the 36 entries on GRPO-style reinforcement learning: known weaknesses and their fixes, rollout cost, reward design, agent training, and the dissenting approaches. Written by Claude Opus 5.5.",
        "url": "",
        "authors": [
          "Claude Opus 5.5"
        ],
        "tags": [
          "synthesis",
          "ai-written",
          "grpo"
        ],
        "venue": "",
        "source": "",
        "license": "",
        "published_year": null,
        "added_at": "2026-10-03T15:08:43.002Z",
        "has_dataset_profile": false,
        "license_class": "unknown",
        "langs": [],
        "modalities": [],
        "size_class": null,
        "citation_count": null,
        "downloads": null,
        "stars": null,
        "page": "https://papers.projxon.ai/entries/1207",
        "markdown": "https://papers.projxon.ai/entries/1207.md",
        "api": "https://papers.projxon.ai/api/entries/1207"
      }
    }
  ],
  "duplicates": [],
  "similar": [
    {
      "id": 837,
      "kind": "paper",
      "title": "Marathoner: Ultra-Long-Horizon Autonomous Intelligence",
      "summary": "Marathoner: Ultra-Long-Horizon Autonomous Intelligence (arXiv 2609.34378; CC BY 4.0). Marathoner-9B, built on Qwen3.5-9B, trained for ultra-long-horizon autonomous coding with a three-stage post-training pipeline: (1) Ultra-Long-Horizon Task Synthesis -- mining major-release PRs (1000+ new lines of code each) from 10,000 GitHub repositories into task-level data in the Harbor framework format, plus 'Multi-Task Chaining' that chains multiple synthesized tasks into one harder task; (2) Rejection Sampling Finetuning -- using Kimi K3 as teacher with diverse harnesses (Claude Code, Codex, etc.), then SFT on rejection-sampled trajectories; (3) Reinforcement Learning -- GRPO in the AReaL framework with real execution in independent sandboxes, plus a novel 'Later Stage Bonus Reward' (+0.5) that explicitly rewards exceptionally valuable operations late in a run (e.g., finding a hidden bug, delivering a major optimization). Endurance: average on FrontierSWE 3.56h / 426.2 steps / 648.3 tool calls; on Terminal-Bench 2.0 0.58h / 104.8 steps / 239.4 tool calls; a case study shows an 11.8-hour trajectory (872 steps) implementing native Rust control-flow operations in Qiskit. Results with Claude Code harness: SWE-bench Verified 43.8% (Qwen3.5-9B) -> 58.4% (after RFT) -> 77.5% (final Marathoner-9B); Terminal-Bench 2.0 27.3% -> 49.7% -> 57.2%; FrontierSWE 10.2 -> 18.2 -> 26.4; NL2Repo 17.9 -> 23.8 -> 34.7; SWE-Marathon 0 -> 2.9 -> 8.2. Compares against proprietary models (Kimi K3, Claude Fable 5.1, GPT-6-Astra, GLM-5.2). Listed under cs.CV; 30 pages, 4 figures. No code, model, or dataset release visible in the paper or arXiv 'Code, Data, Media' section at research time.",
      "url": "https://arxiv.org/abs/2609.34378",
      "authors": [
        "Ruiyang Zhang",
        "Jinpeng Ou",
        "Yifan Xie",
        "Jingang Zhou",
        "Lirui Pan",
        "Qingpei Guo",
        "Zheng Zhedong (Ant Group",
        "Peking University",
        "University of Macau)"
      ],
      "tags": [
        "long-horizon-agents",
        "autonomous-coding",
        "post-training",
        "rejection-sampling",
        "rl",
        "grpo",
        "qwen3.5",
        "swe-bench-verified",
        "terminal-bench-2.0",
        "frontierswe",
        "nl2repo",
        "tool-use"
      ],
      "venue": "arXiv 2609.34378, 2026-09-28",
      "source": "paper",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-01T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/837",
      "markdown": "https://papers.projxon.ai/entries/837.md",
      "api": "https://papers.projxon.ai/api/entries/837"
    },
    {
      "id": 923,
      "kind": "paper",
      "title": "RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learning",
      "summary": "Meta RLEF fine-tunes Llama 3 with PPO using public-test execution feedback; Llama 3.1 70B CodeContests improve from ~27.5% to ~40.1% (1@3). Cited by Philipp Schmid LinkedIn re Anthropic coding quality.",
      "url": "https://arxiv.org/abs/2410.02089",
      "authors": [
        "Jonas Gehring",
        "Kunhao Zheng",
        "Jade Copet",
        "Vegard Mella",
        "Quentin Carbonneaux",
        "Taco Cohen",
        "Gabriel Synnaeve"
      ],
      "tags": [
        "rlef",
        "code",
        "rl",
        "execution-feedback",
        "llama3",
        "arxiv:2410.02089"
      ],
      "venue": "arXiv 2410.02089",
      "source": "arxiv",
      "license": "arXiv non-exclusive",
      "published_year": 2024,
      "added_at": "2026-10-02T23:40:42.683Z",
      "has_dataset_profile": false,
      "license_class": "other",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 181,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/923",
      "markdown": "https://papers.projxon.ai/entries/923.md",
      "api": "https://papers.projxon.ai/api/entries/923"
    },
    {
      "id": 778,
      "kind": "paper",
      "title": "Extrapolative Weight Averaging Reveals Correctness-Efficiency Frontiers in Code RL",
      "summary": "Studies RL for competitive programming where hidden unit tests enforce both correctness and efficiency. Training checkpoints under nested unit-test coverage reveals a correctness-efficiency frontier: higher-coverage rewards reduce optimization failures but increase correctness failures. Interpolation between low- and high-coverage checkpoints recovers the frontier; extrapolation extends it beyond trained endpoints, across pure reasoning, tool-use, and agentic coding settings and 32B/7B scales. Ensembles with extrapolative weight averaging broaden coverage and improve pass@250 on LCB/hard by 3.3% over the best single checkpoint.",
      "url": "https://arxiv.org/abs/2605.28751",
      "authors": [
        "Kunhao Zheng",
        "Pierre Chambon",
        "Juliette Decugis",
        "Jonas Gehring",
        "Taco Cohen",
        "Benjamin Negrevergne",
        "Gabriel Synnaeve"
      ],
      "tags": [
        "weight-averaging",
        "rl",
        "code",
        "correctness-efficiency-frontier",
        "extrapolation",
        "inference-scaling"
      ],
      "venue": "arXiv",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-09-29T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 1,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/778",
      "markdown": "https://papers.projxon.ai/entries/778.md",
      "api": "https://papers.projxon.ai/api/entries/778"
    },
    {
      "id": 812,
      "kind": "paper",
      "title": "RLTL;DR: Self-improvement by Internalizing Self-generated Feedback",
      "summary": "In RLVR the agent makes multiple attempts and optimizes toward the successful ones -- which breaks down in self-improvement,where tasks are so hard the agent has low or no chance of success and no teacher or example solutions exist. RLTL;DR: after each failed attempt,the policy is shown the verifier outputs and writes its own feedback as a single TL;DR insight; the next rollout is conditioned on all previous insights,sequentially sampling rollouts until a solution is found. Crucially,the in-context insights are backpropagated to internalize a direct task-to-insight mapping. On challenging tool-calling and coding datasets filtered to Pass@128=0,standard GRPO on a Qwen 3.5 9B Thinking policy stays flat at Pass@1 0-1%; RLTL;DR breaks the learning barrier to Pass@1 14-31% with insights in context during training,and 12-13% with no insight in context at eval time. A reduced variant,SFTL;DR,trains only on 4k (task,insight) tuples with no rollouts shown or backpropagated and recovers almost the full performance of RLTL;DR and classical SFT on full rollouts -- a compacted training paradigm of the form \"on this sort of task,keep this sort of thing in mind\". Sequential rather than parallel attempts per task; backpropagating the insight tokens semantically smooths and generalizes knowledge to similar tasks.",
      "url": "https://arxiv.org/abs/2609.37633",
      "authors": [
        "Michael Kirchhof",
        "Eleonora Gualdoni",
        "Andrew Szot",
        "Khashayar Gatmiry",
        "Aryo Lotfi",
        "Abbas Kazerouni",
        "Omar Attia",
        "Sanjoy Chowdhury",
        "Alexander Toshev"
      ],
      "tags": [
        "self-improvement",
        "agents",
        "rlvr",
        "rl",
        "grpo",
        "tool-calling",
        "coding"
      ],
      "venue": "arXiv:2609.37633 (cs.LG), submitted 29 Sep 2026",
      "source": "arxiv",
      "license": "agents",
      "published_year": 2026,
      "added_at": "2026-10-01T16:45:12.762Z",
      "has_dataset_profile": false,
      "license_class": "other",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/812",
      "markdown": "https://papers.projxon.ai/entries/812.md",
      "api": "https://papers.projxon.ai/api/entries/812"
    },
    {
      "id": 1211,
      "kind": "paper",
      "title": "AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents",
      "summary": "Trains long-horizon coding agents to proactively decide when to compact their own context — a form of model-harness co-design: the harness provides the compaction mechanism, the model learns when to invoke it, what working state to preserve, and how to continue afterward. Data collection: run the base agent on coding tasks, use a judge to review its compaction decisions, summaries, and post-compaction actions; flawed outputs are replaced with corrected ones before environment execution so trajectories continue from corrected decisions. These trajectories feed supervised fine-tuning, then joint RL optimizes coding and compaction with task-success rewards. Absolute gains: +9.2 points on SWE-bench Verified, +5.0 on SWE-PolyBench Verified. Improvements hold across all inference budgets — including with a 256K context window that never overflows (so learned compaction helps even when context space isn't the limit) and with a 16K window whose overflow triggers fallback compaction. Latest in the AutoHarness → AutoContext → AutoCompact trend of moving harness responsibilities into the model itself; related to Meta's Context Language Models paper. Open questions: scaling, robustness across harnesses, combining rule-based compaction packaged in harnesses with model-invoked proactive compaction.",
      "url": "https://arxiv.org/abs/2610.02163",
      "authors": [
        "Xuan Zhang",
        "Longtao Zheng",
        "Cunxiao Du",
        "Bo An",
        "Xin Dong"
      ],
      "tags": [
        "autocompact",
        "context-compaction",
        "coding-agents",
        "swe-bench",
        "harness-co-design",
        "long-horizon",
        "rl"
      ],
      "venue": "arXiv:2610.02163 (cs.CL), submitted 1 Oct 2026",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-03T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1211",
      "markdown": "https://papers.projxon.ai/entries/1211.md",
      "api": "https://papers.projxon.ai/api/entries/1211"
    },
    {
      "id": 648,
      "kind": "paper",
      "title": "GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning",
      "summary": "GEPA (Genetic-Pareto; ICLR 2026 Oral). For a compound LLM system, sample traces, reflect with an LM on textual feedback (compiler errors, missed gold docs, constraint fails), mutate one module’s prompt, keep the candidate if the minibatch improves, and parent-sample from the instance-wise Pareto front instead of always mutating the global best. On Qwen3 8B across HotpotQA/IFBench/HoVer/PUPA/AIME-2025/LiveBench-Math: +9.62 pp vs baseline vs GRPO +3.68 pp at 24k rollouts, using ~4–35× fewer rollouts (aggregate ~3936). Also beats MIPROv2; GPT-4.1 Mini aggregate +12.19 pp. Code MIT gepa-ai/gepa; first-class dspy.GEPA. Discord post is Akshay Pachaar’s April 2026 X article “How to Beat GRPO Without Touching Model Weights” (DSPy cookbook; claims Berkeley beat GRPO by 10 points with 35× fewer rollouts).",
      "url": "https://arxiv.org/abs/2507.19457",
      "authors": [
        "Lakshya A Agrawal",
        "Shangyin Tan",
        "Dilara Soylu",
        "Noah Ziems",
        "Rishi Khare",
        "Krista Opsahl-Ong",
        "Arnav Singhvi",
        "Herumb Shandilya",
        "Michael J Ryan",
        "Meng Jiang",
        "Christopher Potts",
        "Koushik Sen",
        "Alexandros G. Dimakis",
        "Ion Stoica",
        "Dan Klein",
        "Matei Zaharia",
        "Omar Khattab"
      ],
      "tags": [
        "gepa",
        "dspy",
        "prompt-optimization",
        "grpo",
        "pareto",
        "iclr-2026",
        "berkeley",
        "x"
      ],
      "venue": "arXiv / ICLR 2026",
      "source": "arxiv",
      "license": "MIT (github.com/gepa-ai/gepa); arXiv preprint",
      "published_year": 2025,
      "added_at": "2026-08-14T19:15:00.000Z",
      "has_dataset_profile": false,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 466,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/648",
      "markdown": "https://papers.projxon.ai/entries/648.md",
      "api": "https://papers.projxon.ai/api/entries/648"
    }
  ]
}
