# From Ideas to Code: Tree-structured Policy Optimization for Automated Algorithm Design with LLMs

*Rui Zhang, Ping Guo, Liyong Lin, Zhichao Lu, Qingfu Zhang*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/154407) · [OpenReview](https://openreview.net/forum?id=Doxqy5ndUy) · [Open on the map](../papers.html#p154407)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [LLM-Driven Tool-Use and Planning](../pgroup/691.md) · Type: new method · Keywords: automated algorithm design, LLM policy optimization, tree-structured rollouts, group-relative advantage estimation, algorithm generalization

Areas: [AI Agents](../areas/agents.md) › Agentic Decision Making › Language Model Agents; [RL for LLMs & Agents](../areas/llm-rl.md) › Language Model Agents › Agentic Reinforcement Learning

## Summary
ATPO introduces tree-structured policy optimization to credit both high-level ideas and code implementations in LLM-based automated algorithm design, improving performance across multiple search frameworks.

## Explained to a 5-year-old
A computer program is taught to create plans for solving puzzles. It first imagines big ideas about how to solve a problem. Then it breaks those ideas into tiny pieces of code that actually do the work. By rewarding both the ideas and the code, the program learns to solve new puzzles better. This helps the program work on problems it has never seen before.

## Explained to a 5-year-old, longer
A computer program can be taught to design algorithms that solve problems. It looks at many examples of how people have solved similar puzzles before. The program first imagines a high-level plan, like “try this idea first, then that”. After the plan is imagined, the program writes small pieces of code to carry out each step. Usually, only the final result gets praised, but this makes the program forget the good ideas. The new method gives credit to both the high-level plan and the small code pieces. This way, the program learns which ideas are useful and which are not. It can also see many possible ways to explore a problem by branching out like a tree. By trying many branches, the program discovers better strategies for solving puzzles. The learned strategies can be used with other existing search tools like FunSearch or OpenEvolve. Even on problems the program has never seen, the learned strategies still help. This makes the program more flexible and able to solve a wider variety of challenges.

## For a technical reader
The paper presents a method that separates the high-level reasoning of algorithm design from the low-level code generation, using tree-structured rollouts. By applying group-relative advantage estimation, it distributes credit to both the conceptual ideas and the concrete implementations during reinforcement learning. This dual-credit scheme allows the learned policy to improve performance when integrated with existing automated search frameworks such as FunSearch, EoH, and OpenEvolve. The policy also transfers to unseen problem instances and alternative search methods, indicating strong generalization. Overall, the approach provides a more robust way to train LLM-based algorithm designers that can be deployed in real-world code-generation pipelines.

## Problem
Existing LLM-based automated algorithm design methods rely on outcome-level supervision, which fails to assign credit to intermediate ideas and plans that guide the design process, limiting the quality and generalization of generated algorithms.

## Method
The approach employs tree-structured rollouts to separate the generation of conceptual ideas from their concrete code implementations and uses group-relative advantage estimation to distribute credit across multiple abstraction levels.

## Results
The approach shows improved performance when combined with FunSearch, EoH, and OpenEvolve and transfers well to unseen problem instances, enhancing generalization of algorithm design policies.

## Contributions
It introduces a tree-structured rollout framework with group-relative advantage estimation to credit both strategic ideas and code implementations, and demonstrates effective transfer to new problems and search methods.

## Practical relevance
This work enables more robust and generalizable automated algorithm design, potentially accelerating development of efficient algorithms across many domains.

## Research questions this paper is counted under

- [How can automated design systems leverage LLMs to generate high-quality, reusable designs while minimizing manual engineering and improving multi-objective guidance?](../q/264.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/154407)
