HyperAIHyperAI

Command Palette

Search for a command to run...

Agentic ESOpt: 최소 GPU 메모리 요구로 장기 지평 LLM 에이전트를 파인튜닝하는 방법

Zhi Zheng Rongsheng Chen Yunpeng Ba Zhenkun Wang Yee Whye Teh Wee Sun Lee

초록

강화학습(RL)은 단일 턴 LLM 파인튜닝에서 유망한 성과를 보여 왔다. 그러나 장기 지평 에이전트 추론은 분기적 상호작용과 희소 보상을 증가시키며, RL의 몇 가지 한계를 드러낸다. 무거운 역전파로 인해 더 큰 LLM을 파인튜닝하기 어렵고, 장기 지평 궤적은 신용 할당을 상당히 어렵게 만든다. 본 논문은 진화 전략(ES)이 장기 지평 LLM 에이전트를 파인튜닝하는 데 더 나은 선택이 될 수 있다고 주장한다. 에이전틱 RL과 비교할 때 ES는 세 가지 핵심 이점을 제공한다. 1) 모델 확장성: ES는 최소한의 추론 수준 GPU 메모리만으로 전체 파라미터 최적화를 가능하게 하여 대규모 LLM을 파인튜닝할 수 있게 한다. 2) 유연성: 가볍고 블랙박스 피드백 인터페이스를 통해 ES 파인튜닝을 프롬프트 공간 진화(예: 스킬 최적화 및 테스트 시간 컴퓨팅)와 쉽게 결합할 수 있다. 3) 장기 지평 확장성: ES는 지평 전반에 걸쳐 보상을 분해하지 않고 궤적 수준의 파라미터 귀속을 수행하므로, 지평 길이가 증가함에 따라 에이전틱 RL보다 더 나은 확장성을 보인다. 이러한 통찰을 바탕으로 우리는 유연한 파라미터-컨텍스트 공동 진화에 맞춘 전체 파라미터 에이전틱 파인튜닝 프레임워크인 Agentic ESOpt를 제안한다. 각 단계에서 Agentic ESOpt는 현재 LLM 파라미터 주변의 섭동을 샘플링하고, 결과 에이전트를 보상으로 평가한 후 온라인 보상 가중 업데이트를 적용한다. 탐색-적응 트레이드오프를 개선하기 위해 Agentic ESOpt는 섭동 스케일 σ의 코사인 감쇠 스케줄을 추가로 도입한다. 우리는 학습 시간 파인튜닝과 에이전틱 테스트 시간 컴퓨팅 설정 모두에서 Agentic ESOpt를 평가한다. 장기 지평 스도쿠에서 Agentic ESOpt는 Qwen3.5-4B로 RL 방법보다 12.50% 높은 성능을 달성한다. WebArena-Lite에서는 Qwen3.5-27B의 전체 파라미터 최적화가 No Skill 기준선을 6.69% 개선하고, Agentic ESOpt를 Trace2Skill과 결합하면 Trace2Skill 기준선을 추가로 2.42% 개선한다. 테스트 시간 자동 휴리스틱 설계에서 Agentic ESOpt는 온라인 프롬프트-파라미터 공동 진화를 수행하여 36개 설정 중 28개에서 대응 기준선을 개선한다.

One-sentence Summary

Researchers from National University of Singapore, Southern University of Science and Technology, and Oxford propose Agentic ESOpt, a full-parameter evolution-strategy fine-tuning framework for long-horizon LLM agents that uses perturbation sampling, online reward-weighted updates, and a cosine decay schedule for the perturbation scale σ while requiring only inference-level GPU memory; on long-horizon Sudoku it outperforms RL by 12.50% with Qwen3.5-4B, and on WebArena-Lite full-parameter optimization of Qwen3.5-27B improves the No Skill baseline by 6.69% while combining Agentic ESOpt with Trace2Skill improves the Trace2Skill baseline by 2.42%.

Key Contributions

  • Agentic ESOpt is introduced as a full-parameter evolution-strategy fine-tuning framework for long-horizon LLM agents that samples parameter perturbations, evaluates the resulting agents with trajectory-level rewards, and applies online reward-weighted updates without backpropagation or explicit per-action credit assignment, requiring only inference-level GPU memory.
  • The method includes a cosine decay schedule for the perturbation scale to manage the exploration-adaptation trade-off and supports parameter-context co-evolution with prompt-space optimization such as skill optimization and test-time compute.
  • Experiments show that Agentic ESOpt outperforms agentic RL baselines on long-horizon Sudoku by 12.50% with Qwen3.5-4B; on WebArena-Lite, full-parameter optimization of Qwen3.5-27B improves the No Skill baseline by 6.69%, and combining Agentic ESOpt with Trace2Skill improves the Trace2Skill baseline by 2.42%; in test-time automatic heuristic design, Agentic ESOpt improves its matched baseline in 28 of 36 settings. Its inference-level memory footprint enables full-parameter adaptation of a Qwen3.5-27B WebArena agent on four H100 GPUs.

Introduction

Advanced Large Language Models such as Qwen3, DeepSeek-R1, and Gemini 2.5 can act as general-purpose agents that use tools, process long contexts, and coordinate multi-step software workflows, but they still struggle with uncommon tool APIs and specialized scientific or algorithmic tasks, so efficient task-specific fine-tuning remains important. Prior agentic reinforcement learning methods require heavyweight activations and optimizer states, backpropagation through long branching trajectories, and turn-level or critic-based credit assignment under sparse rewards, which becomes increasingly impractical as horizons grow. Previous evolution-strategy work on single-turn reasoning was mostly memory efficient but often slightly weaker than RL. The authors argue that for long-horizon agentic reasoning, evolution strategies become structurally preferable rather than merely cheaper. They introduce Agentic ESOpt, a full-parameter evolution-strategy framework that samples parameter perturbations, evaluates agents with environment rewards, and applies reward-weighted updates without backpropagation. It supports both train-time fine-tuning and test-time compute, uses a cosine perturbation schedule to balance exploration and adaptation, and enables full-parameter optimization with only inference-level GPU memory.

Method

The authors propose Agentic ESOpt, a method that performs full-parameter Evolutionary Strategy (ES) optimization for Large Language Models (LLMs). The framework operates by sampling parameter perturbations around the current LLM, evaluating the perturbed agents using scalar environment rewards, and applying a reward-weighted parameter update. This forward-only process requires storing only the noise seed and utilizing in-place addition and subtraction, ensuring that GPU memory requirements remain minimal and equivalent to standard inference. Additionally, the black-box trajectory feedback generated can be reused by skill-space optimizers or test-time compute procedures.

As illustrated in the framework diagram:

Formally, let τ=(o0,a0,,oH,aH)\pmb{\tau} = (o_0, a_0, \dots, o_H, a_H)τ=(o0,a0,,oH,aH) denote an interaction trajectory induced by policy πθ\pi_\thetaπθ, and let R(τ)R(\tau)R(τ) denote its scalar trajectory return. For a fixed external agent state ccc, the objective is defined as:

J(θ;c)=Eτπθ(c)[R(τ)]J(\theta; c) = \mathbb{E}_{\boldsymbol{\tau} \sim \pi_\theta(\cdot|c)} [R(\boldsymbol{\tau})]J(θ;c)=Eτπθ(c)[R(τ)]

Agentic ESOpt optimizes this objective by searching the parameter space around θ\thetaθ. Let ϵRd\epsilon \in \mathbb{R}^dϵRd be a full-parameter perturbation on the ddd-dimensional parameters. The Gaussian-smoothed objective is formulated as:

Jσ(θ;c)=EϵN(0,I)[J(θ+σϵ;c)]J_\sigma(\theta; c) = \mathbb{E}_{\epsilon \sim \mathcal{N}(0, I)} [J(\theta + \sigma \epsilon; c)]Jσ(θ;c)=EϵN(0,I)[J(θ+σϵ;c)]

The ES pseudo-gradient is then derived as:

θJσ(θ;c)=1σEϵ[J(θ+σϵ;c)ϵ]\nabla_\theta J_\sigma(\theta; c) = \frac{1}{\sigma} \mathbb{E}_\epsilon [J(\theta + \sigma \epsilon; c) \epsilon]θJσ(θ;c)=σ1Eϵ[J(θ+σϵ;c)ϵ]

These ES gradients are estimated from scalar scores without differentiating through the agent-environment interaction. In implementation, to estimate the gradient, the authors sample GGG perturbations ϵ1,,ϵG\epsilon_1, \dots, \epsilon_Gϵ1,,ϵG, evaluate the corresponding perturbed agents, and obtain rewards Ri=R(τi)R_i = R(\tau_i)Ri=R(τi). To reduce variance, the rewards are normalized within the population using a z-score:

R^i=RiμRsR+ε,whereμR=1Gj=1GRj,sR2=1Gj=1G(RjμR)2\hat{R}_i = \frac{R_i - \mu_R}{s_R + \varepsilon}, \quad \text{where} \quad \mu_R = \frac{1}{G} \sum_{j=1}^G R_j, \quad s_R^2 = \frac{1}{G} \sum_{j=1}^G (R_j - \mu_R)^2R^i=sR+εRiμR,whereμR=G1j=1GRj,sR2=G1j=1G(RjμR)2

In practice, the explicit 1/σ1/\sigma1/σ factor is omitted, with α\alphaα serving as the effective update scale. The implemented update rule is:

θt+1=θt+αGi=1GR^iϵi\theta_{t+1} = \theta_t + \frac{\alpha}{G} \sum_{i=1}^G \hat{R}_i \boldsymbol{\epsilon}_iθt+1=θt+Gαi=1GR^iϵi

The method also facilitates prompt-space composition and prompt-parameter co-evolution. Unlike test-time compute and prompt-space optimization methods that keep LLM parameters fixed, the lightweight black-box updates of Agentic ESOpt allow parameter adaptation to occur on the fly alongside prompt-space search. Let Dt\mathcal{D}_tDt denote the trajectories and scores collected at iteration ttt, UES\mathcal{U}_{ES}UES the Agentic ESOpt parameter update, and Uc\mathcal{U}_cUc an external update rule for prompt ctc_tct. A general alternating outer loop updates the two spaces as:

θt+1=UES(θt;ct,Dt),ct+1=Uc(ct;Dt)\theta_{t+1} = \mathcal{U}_{ES}(\theta_t; c_t, \mathcal{D}_t), \quad c_{t+1} = \mathcal{U}_c(c_t; \mathcal{D}_t)θt+1=UES(θt;ct,Dt),ct+1=Uc(ct;Dt)

To manage the trade-off between exploration and objective bias, the authors introduce a cosine decay for the perturbation radius σ\sigmaσ. The Gaussian-smoothed objective introduces a smoothing bias characterized by the second-order term Tr(θ2J)\text{Tr}(\nabla_\theta^2 J)Tr(θ2J), which acts as a regularization term penalizing sharp local optima. A larger σ\sigmaσ increases this regularization but also increases bias from the original objective. The radius is gradually decreased over TTT update steps as follows:

σt=σT+(σ0σT)1+cos(πt/T)2,t=0,,T\sigma_t = \sigma_T + (\sigma_0 - \sigma_T) \frac{1 + \cos(\pi t / T)}{2}, \qquad t = 0, \dots, Tσt=σT+(σ0σT)21+cos(πt/T),t=0,,T

For train-time Agentic ESOpt, a nonzero σT\sigma_TσT is retained to balance exploitation with exploration and regularization. In contrast, for test-time compute, which focuses on the unbiased outcome of the current task rather than generalization, σT\sigma_TσT is decayed to zero to minimize objective bias toward the end of optimization.

Experiment

The experiments evaluate Agentic ESOpt across controlled long-horizon tasks, train-time fine-tuning, test-time compute, and population scaling. In multi-turn Sudoku, parameter-space search shows a horizon-dependent advantage over action-space policy gradients because it avoids per-step credit assignment, while also requiring only inference-level GPU memory. For ReAct-style Math and DocVQA fine-tuning, Agentic ESOpt consistently outperforms matched Agentic GRPO baselines and composes effectively with Trace2Skill, and WebArena results confirm that full-parameter adaptation of a 27B agent is feasible. On automatic heuristic design, Agentic ESOpt improves most Sample and EoH comparisons under matched budgets, and population-scaling experiments suggest stronger backbones are less sensitive to small population sizes.

Success rates decline for all methods as the minimum required planning horizon increases. Agentic ESOpt with sigma decay maintains the highest success at the longest horizon and keeps GPU memory at the lightweight 4B backbone level, while Agentic PPO collapses to zero success and requires substantially more memory. Removing sigma decay from the ES run reduces success relative to Agentic ESOpt across tested horizons. Every evaluated method loses success rate as the minimum successful horizon grows. Agentic ESOpt is the strongest at the longest horizon and uses far less GPU memory than Agentic PPO and Agentic GRPO. Agentic PPO performs well at the shortest horizon but fails at the longest horizon. Vanilla ES without sigma decay trails Agentic ESOpt at all tested horizons.

Across the agentic Sudoku horizons tested, Qwen3.5-4B with Agentic ESOpt requires less training compute and less wall-clock time than with Agentic GRPO on the same four-GPU hardware. The compute advantage is small at the shortest horizon and widens as the horizon lengthens, while wall-clock time remains substantially lower throughout. Agentic ESOpt reduces training FLOPs relative to Agentic GRPO at every tested horizon, with the savings increasing as the horizon grows. Wall-clock time for Agentic ESOpt is roughly half that of Agentic GRPO at the longer horizons and remains lower at the shortest horizon, despite both methods fully using the same four H100 GPUs.

Agentic ESOpt consistently improves the Qwen3.5-4B base model and matched Agentic GRPO baselines on math reasoning and DocVQA. The gains are strongest on DAPO, AIME 2026, and DocVQA Mean@4, and the method composes with Trace2Skill to reach the strongest Qwen3.5-4B Mean@4 results. Pass@4 and Max@4 metrics also favor Agentic ESOpt over Agentic GRPO, while DAPO Pass@4 is unchanged from the No Skill baseline. Agentic ESOpt plus No Skill produces double-digit Mean@4 gains on DAPO and AIME 2026 and a large DocVQA accuracy improvement over the Qwen3.5-4B No Skill baseline. Agentic ESOpt plus No Skill outperforms matched Agentic GRPO plus No Skill on DAPO, AIME 2026, and DocVQA mean and best-of-four metrics, with especially large AIME 2026 Pass@4 and DocVQA Max@4 gains.

On WebArena-Lite, Agentic ESOpt improves the Qwen3.5-27B No Skill baseline on the dataset average and across most major site categories, with particularly large gains in OSS, GitLab, CMS, and Map. The Reddit category is a slight exception, where the adapted model does not improve over its baseline. Combining Agentic ESOpt with Trace2Skill yields the highest reported Qwen3.5-27B average, indicating compatibility with skill-space optimization. Agentic ESOpt improves the Qwen3.5-27B No Skill baseline on the dataset average and in four of the five major site categories, while Reddit shows a small decline. The largest category gains over the No Skill baseline appear in OSS, GitLab, CMS, and Map, in that order. The strongest Qwen3.5-27B dataset average is achieved by combining Agentic ESOpt with Trace2Skill, surpassing the No Skill and Trace2Skill baselines.

Agentic ESOpt improves existing heuristic design search methods across most constructive problem settings. When paired with EoH, it improves all six constructive test sets at both evaluation budgets; when paired with Sample, it improves nine of twelve matched comparisons. Across constructive and ACO-style settings, the approach improves 28 of 36 matched comparisons. Agentic ESOpt + EoH improves all six constructive heuristic design test sets at both evaluation budgets. Agentic ESOpt + Sample improves nine of twelve matched comparisons, with one tie and two regressions. Across both constructive baselines, Agentic ESOpt improves 21 of 24 matched comparisons. In the T=1000 results, Agentic ESOpt + Sample shows the largest relative gains on TSP instances and smaller mixed changes on KP and ASP instances.

Across agentic Sudoku, math reasoning, web navigation, and heuristic design tasks, Agentic ESOpt is evaluated against PPO, GRPO, and baseline skill or search methods. It maintains higher success at long planning horizons while using substantially less GPU memory, training compute, and wall-clock time than PPO and GRPO, and sigma decay contributes to that advantage. Agentic ESOpt also improves Qwen3.5-4B results on math reasoning and DocVQA, improves Qwen3.5-27B WebArena-Lite performance especially when combined with Trace2Skill, and enhances existing heuristic design search methods in most matched comparisons.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp