Agentic ESOpt: Fine-Tuning Long-Horizon LLM Agents with Minimal GPU Requirements
Organizations: National University of Singapore · Southern University of Science and Technology · Oxford
Abstract
Reinforcement Learning (RL) has been promising in single-turn LLM fine-tuning. However, long-horizon agentic reasoning introduces increasingly branching interactions and sparse rewards, exposing several limitations of RL: its heavyweight backpropagation-based training stack makes it impractical to fine-tune larger LLMs, and longer-horizon trajectories make credit assignment in RL substantially harder. This paper argues that evolution strategies (ES) can be a better choice for fine-tuning long-horizon LLM agents. Compared with agentic RL, ES offers three key advantages: 1) Model Scalability: ES enables full-parameter optimization with only minimal, inference-level GPU memory, making it possible to fine-tune large LLMs. 2) Flexibility: its lightweight, black-box feedback interface makes ES fine-tuning easy to compose with prompt-space evolution (e.g., skill optimization & test-time compute); and 3) Long-Horizon Scalability: ES performs trajectory-level parameter attribution without decomposing rewards across horizons, yielding better scalability than Agentic RL as the horizon length grows. Based on this insight, we propose Agentic ESOpt, a full-parameter agentic fine-tuning framework tailored to flexible parameter--context co-evolution. At each step, Agentic ESOpt samples perturbations around the current LLM parameters, evaluates the resulting agents with rewards, and applies an online reward-weighted update. To improve the exploration--adaptation trade-off, Agentic ESOpt further introduces a cosine decay schedule of the perturbation scale . On WebArena-Lite, full-parameter optimization of Qwen-3.5-27B improves the No Skill baseline by 6.69%. In test-time automatic heuristic design, Agentic ESOpt performs online prompt--parameter co-evolution, improving its matched baseline in 28 of 36 settings.
Figures & tables
| Method | GPU Mem Req. | |||
| Qwen3.5-27B | 51.75GB | |||
| Qwen3.5-4B | 8.41GB | |||
| + Agentic PPO | 89.40GB | |||
| + Agentic GRPO | 58.88GB | |||
| + Agentic GRPO | 58.88GB | |||
| + Agentic ESOpt (G=32) | 8.41GB |
| Method | FLOPs | Time | FLOPs | Time | FLOPs | Time |
| Qwen3.5-4B + Agentic GRPO | 3.2 EFLOPs | 5.4 h | 7.6 EFLOPs | 13.1 h | 10.9 EFLOPs | 19.0 h |
| Qwen3.5-4B + Agentic ESOpt ( =32) | 3.1 EFLOPs | 3.1 h | 6.3 EFLOPs | 5.8 h | 9.4 EFLOPs | 9.4 h |
| Math reasoning | DocVQA | ||||||||
| DAPO | AIME 2026 | ANLS | Accuracy | ||||||
| Model | Method | Mean@4 | Pass@4 | Mean@4 | Pass@4 | Mean@4 | Max@4 | Mean@4 | Pass@4 |
| Qwen3.5-27B | No Skill | 65.8 | 87.0 | 76.7 | 93.3 | 0.5036 | 0.7843 | 51.8 | 69.0 |
| Qwen3.5-4B | No Skill | 63.0 | 86.0 | 55.8 | 86.7 | 0.3875 | 0.5981 | 40.3 | 53.0 |
| Qwen3.5-4B | Agentic GRPO + No Skill | 68.8 | 83.0 | 58.3 | 76.7 | 0.4627 | 0.5398 | 48.0 | 56.0 |
| Qwen3.5-4B | Agentic ESOpt + No Skill | 76.8 | 86.0 | 70.8 | 96.7 | 0.5043 | 0.6507 | 52.5 | 61.0 |
| Model | Method | Reddit (21) | GitLab (32) | CMS (35) | Map (28) | OSS (46) | Dataset Avg. |
| Strong frozen baseline (evaluation only) | |||||||
| GPT-5.4 | No Skill | 47.62 | 46.88 | 46.67 | 19.05 | 21.01 | 34.14 0.76 |
| GPT-5.4-mini | No Skill | 39.68 | 29.17 | 30.48 | 13.10 | 13.77 | 23.23 1.14 |
| GPT-5.4-nano | No Skill | 39.68 | 27.08 | 19.05 | 11.90 | 8.70 | 18.79 0.99 |
| Qwen3.5-27B | No Skill | 50.79 | 35.42 | 41.90 | 8.33 | 21.01 | 29.47 1.14 |
| Qwen3.5-27B | Agentic ESOpt + No Skill | 49.21 | 43.75 | 49.52 | 14.29 | 30.43 | 36.16 0.70 |
| Method | TSP | TSP | KP | KP | ASP | ASP |
| Optimal | 3.8199 | 5.6750 | 20.0370 | 40.2710 | 3,003 | 43,596 |
| Greedy Construct | 4.4797 | 6.9590 | 19.9850 | 40.2250 | 1,530 | 15,050 |
| Total Evaluations: | ||||||
| Sample | 4.3286 | 6.7110 | 19.9896 | 40.2297 | 2,753 | 30,336.67 |
| Agentic ESOpt + Sample | 4.2336 | 6.5488 | 19.9899 | 40.2314 | 2,729 | 31,082.67 |
| vs Sample | 22.96% | 18.56% | 0.79% | 4.42% | 8.76% | 5.96% |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Update-magnitude threshold | Fraction of parameters |
| Profile | Mask count | Sigma schedule | Maximum turns |
| Vanilla ES | 5 / 10 | constant | 15 / 30 |
| Vanilla ES | 15 | constant | 45 |
| Agentic ESOpt | 5 / 10 | cosine | 15 / 30 |
| Agentic ESOpt | 15 | cosine | 45 |
| Parameter | Value |
| Backbone | Qwen3.5-4B |
| ES generations | 25 |
| Population size | 16 |
| Cases per direction | 16 |
| Update scale | |
| schedule | cosine |
| Parameter | Value |
| Backbone | Qwen3.5-4B |
| Training records | 400 |
| Prompt batch size | 20 |
| Rollouts per prompt | 8 |
| Training epochs | 1 |
| Training rounds | 20 |
| Parameter | Value |
| Backbone | Qwen3.5-4B |
| ES generations | 40 |
| Population size | 16 |
| Cases per direction | 16 |
| Update scale | |
| schedule | cosine |
| Parameter | Value |
| Backbone | Qwen3.5-4B |
| Training records | 50 |
| Prompt batch size | 4 |
| Rollouts per prompt | 8 |
| Training epochs | 15 |
| Training rounds | 180 |
| Condition | Parameter stage | Skill stage | Data per stage | Additional ES |
| No Skill baseline | none | none | – | none |
| Agentic ESOpt + No Skill | 70 ES generations | none | directions 8 tasks/generation | – |
| Trace2Skill baseline | none | 70 skill iterations | 8 tasks 8 rollouts/iteration | none |
| Agentic ESOpt + Trace2Skill | same 70-generation ES run | one post-hoc distillation | all completed ES trajectories | none |
| Outer scaffold | Outer generations | Candidates/generation | ES update batches | Directions/batch | ||
| EoH ( ) | 1,000 | 25 | 50 | 10 | ||
| EoH ( ) | 2,000 | 25 | 50 | 30 | ||
| Independent Sample | 1,000 | 50 | 20 | 50 | 20 | |
| Independent Sample | 2,000 | 100 | 20 | 100 | 20 |
| Method | TSP | TSP | CVRP | CVRP | BPP | BPP |
| ACO | 5.992 | 8.948 | 11.355 | 18.778 | 208.828 | 417.938 |
| Total Evaluations: | ||||||
| EoH | 6.030 | 8.859 | 9.328 | 15.666 | 203.162 | 405.172 |
| Agentic ESOpt + EoH | 5.882 | 8.391 | 9.265 | 16.073 | 203.500 | 405.787 |
| vs EoH | 2.53% | 5.57% | 0.68% | 2.53% | 0.17% | 0.15% |
| Total Evaluations: | ||||||
| Task | EoH | Agentic ESOpt + EoH | -value |
| TSP ( , ) | |||
| KP ( , ) |
| Task | Sample | Agentic ESOpt + Sample |
| Design constructive heuristics for TSP | 54.8 | 60.6 |
| Design constructive heuristics for KP | 41.2 | 48.6 |
| Design constructive heuristics for ASP | 51.7 | 56.7 |
| Setting | Backbone | Update batches | Directions/update | Reward load/direction | ||
| Sudoku, | Qwen3.5-4B | 100 | 32 | 32 puzzles | ||
| Sudoku, | Qwen3.5-4B | 100 | 32 | 32 puzzles | ||
| Math | Qwen3.5-4B | 25 | 16 | 16 problems | ||
| DocVQA | Qwen3.5-4B | 40 | 16 | 16 examples | ||
| WebArena-Lite | Qwen3.5-27B | 70 | 8 | 8 web tasks | constant | |
| AHD + EoH, | Llama-3.1-8B | 50 | 10 | one heuristic objective |
| Resources | Type | License | URL |
| Qwen3.5-4B | Base LLM | Apache-2.0 License | https://huggingface.co/Qwen/Qwen3.5-4B |
| Qwen3.5-9B | Base LLM | Apache-2.0 License | https://huggingface.co/Qwen/Qwen3.5-9B |
| Qwen3.5-27B | Base LLM | Apache-2.0 License | https://huggingface.co/Qwen/Qwen3.5-27B |
| LLaMA-3.1-8B-Instruct | Base LLM | Llama 3.1 Community License | https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct |
| verl | RL framework | Apache-2.0 License | https://github.com/volcengine/verl |
| EoH | AHD framework | MIT License | https://github.com/FeiLiu36/EoH |
LLM Agent Training
Large language model agent training teaches models to plan, use tools, and learn from multi-step interaction with environments.
See all 586 papers