MaxCode: A Max-Reward Reinforcement Learning Framework for Automated Code Optimization
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) demonstrate strong capabilities in general coding tasks but encounter two key challenges when optimizing code: (i) the complexity of writing optimized code (such as performant CUDA kernels and competition-level CPU code) requires expertise in systems, algorithms and specific languages and (ii) requires interpretation of performance metrics like timing and device utilization beyond binary correctness. In this work, we explore inference-time search algorithms that guide the LLM to discover better solutions through iterative refinement based on execution feedback. Our approach, called MaxCode unifies existing search methods under a max-reward reinforcement learning framework, making the observation and action-value functions modular for modification. To enhance the observation space, we integrate a natural language critique model that converts raw execution feedback into diagnostic insights about errors and performance bottlenecks, and the best-discounted reward seen so far. Together, these provide richer input to the code proposal function. To improve exploration during search, we train a generative reward-to-go model using action values from rollouts to rerank potential solutions. Testing on the KernelBench (CUDA) and PIE (C++) optimization benchmarks shows that MaxCode improves optimized code performance compared to baselines, achieving 20.3% and 10.1% relative improvements in absolute speedup value and relative speedup ranking, respectively.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 15 of its 19 references that are in the map. First posted on arXiv 9 Jan 2026.
Builds on
15 of 19 references.
References · 15
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 507
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 206
- 2024Generative Reward Modelscited by 148
- 2023Learning Performance-Improving Code Editscited by 103
- 2025Kevin: Multi-Turn RL for Generating CUDA Kernelscited by 73
- 2025CUDA-L1: Improving CUDA Optimization via Contrastive Reinforcement Learningcited by 59
- 2025Teaching Language Models to Critique via Reinforcement Learningcited by 38
- 2025CUDA-LLM: LLMs Can Write Efficient CUDA Kernelscited by 33
- 2024EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimizationcited by 28
- 2024FlashMask: Efficient and Rich Mask Extension of FlashAttentioncited by 18
- 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimizationcited by 14
3 more
Built on by
Citing papers per year: 2026: 3.
3 papers.