12 분 소요

0. Introduction

Paper link

Code link

OPID는 agentic RL에서 익숙한 두 축을 꽤 깔끔하게 결합한다. 하나는 GRPO-style outcome reward다. trajectory가 성공했는지 실패했는지를 보고 policy를 update한다. 다른 하나는 on-policy self-distillation이다. 같은 policy가 만든 output에 대해 auxiliary context를 붙였을 때 token probability가 어떻게 바뀌는지 보고 dense signal을 만든다.

Agent task에서 outcome reward는 안정적이지만 너무 sparse하다. ALFWorld, WebShop, Search-based QA 같은 multi-turn task에서는 마지막 success/failure만으로 어떤 intermediate decision이 좋았는지 알기 어렵다. 반대로 skill-conditioned distillation은 dense token-level supervision을 줄 수 있지만, 기존 방법은 external skill memory, retrieved skill file, privileged context에 의존하는 경우가 많다. 그러면 maintenance cost가 생기고, current policy가 실제로 방문하는 state distribution과 skill context가 어긋날 수 있다.

OPID의 아이디어는 간단하다. Skill을 외부에서 가져오지 말고, 현재 policy가 방금 만든 on-policy trajectory에서 hindsight skill을 뽑아내자. 성공 trajectory에서는 reusable workflow를, 실패 trajectory에서는 failure-avoidance rule을 뽑는다. 그리고 critical timestep에는 local step-level skill을, 나머지에는 global episode-level skill을 붙여 같은 sampled response를 old policy로 다시 score한다. Skill context가 있을 때 token log-probability가 올라간다면, 그 token은 hindsight skill이 지지하는 behavior로 볼 수 있다.

한 줄 요약: OPID는 completed on-policy trajectories에서 episode-level and step-level hindsight skills를 추출하고, critical-first routing으로 각 decision step에 맞는 skill을 주입한 뒤, original context와 skill-augmented context의 token log-probability shift를 dense self-distillation advantage로 바꿔 outcome-based agentic RL을 보완하는 framework다.

이 논문을 지금 볼 가치가 있는 이유는 다음과 같음.

  • Sparse trajectory reward와 dense token-level supervision 사이의 gap을 agent trajectory hindsight로 연결한다.
  • External skill memory나 inference-time skill retrieval 없이 training-time skill distillation만 사용한다.
  • Episode-level skill and step-level skill의 granularity trade-off를 명확히 분리한다.
  • Critical-first routing이 단순히 skill을 많이 넣는 것보다 낫다는 ablation을 제공한다.
  • ALFWorld, WebShop, Search-based QA에서 outcome-only GRPO 대비 일관된 gain을 보고한다.
  • Agentic RL에서 trajectory는 reward sample일 뿐 아니라 reusable decision knowledge source라는 관점을 준다.

이 글에서는 OPID를 “또 하나의 GRPO variant”보다, on-policy rollout을 skill memory로 쓰되 inference-time에는 skill memory를 남기지 않는 distillation recipe로 읽는다.

1. Problem Setting

1-1. Problem definition

Long-horizon agent task는 partially observable decision process로 볼 수 있다. 시간 $t$에서 agent는 observation $o_t$와 interaction history $h_t$를 보고 response 또는 action $y_t$를 생성한다.

\[h_t = (o_0,y_0,o_1,y_1,\ldots,o_t)\] \[y_t \sim \pi_{\theta}(\cdot \mid h_t)\]

Episode가 끝나면 environment는 outcome reward를 준다.

\[R(\tau) \in \{0,1\}\]

여기서 $\tau$는 completed trajectory다. GRPO-style RL에서는 같은 prompt에 대해 여러 trajectory를 sample하고, group-relative outcome advantage로 policy를 update한다.

문제는 reward가 trajectory level에만 있다는 점이다. Trajectory는 한 번의 잘못된 step, 반복되는 invalid action, 잘못 잡은 subgoal, 너무 이른 stopping, 또는 poor search action 때문에 실패할 수 있다. Outcome reward는 “failed”라고 말하지만, 어떤 token이나 action이 실패를 만들었는지는 말해주지 않는다.

OPID는 이 missing credit assignment를 trajectory hindsight skill로 보완한다.

1-2. Why previous approaches are insufficient

1) Outcome-only RL

Outcome-only RL은 stable하고 simple하다. 하지만 multi-turn interaction에서는 terminal reward가 sparse하고 delayed되어 있으며 variance도 높다. Local decision knowledge를 직접 주지 않는다.

단순 RL objective는 다음과 같다.

\[J(\theta) = \mathbb{E}_{\tau \sim \pi_{\theta}} [ R(\tau) ]\]

이 objective는 success를 최적화하지만 intermediate decision에 대한 direct token-level supervision은 주지 않는다.

2) External skill memory

Skill memory는 workflow, template, failure-avoidance rule을 저장할 수 있다. 하지만 두 문제가 생긴다.

  • Skill insertion, update, deletion, retrieval을 유지해야 한다.
  • Retrieved skill이 current policy의 실제 state distribution과 off-policy일 수 있다.

Multi-turn agent에서는 작은 deviation이 state drift로 이어질 수 있다. 한 trajectory state에 맞는 skill이 다른 state에는 맞지 않을 수 있다.

3) Skill prompt at inference

Model이 skill prompt에 의존하도록 학습되면, validation이나 deployment에서 skill이 없을 때 성능이 떨어질 수 있다. 논문은 validation-time skill을 제거하면 Skill-GRPO가 ordinary GRPO보다 낮아질 수 있음을 보여준다. 이것은 train-test context mismatch다.

OPID는 skill을 training 중에만 사용해 이 문제를 피한다. Inference time에는 analyzer도, skill retrieval도, privileged context도 필요 없다.

2. Core Idea

2-1. Main contribution

OPID에는 세 가지 핵심 component가 있다.

  1. On-policy hindsight skill extraction
    • Current policy가 생성한 completed trajectory를 사용한다.
    • Policy가 실제로 방문한 state distribution에서 skill supervision을 뽑는다.
  2. Hierarchical skill representation
    • Episode-level skill은 global workflow나 failure-avoidance rule을 요약한다.
    • Step-level skill은 critical timestep의 local decision knowledge를 담는다.
  3. Critical-first skill-conditioned self-distillation
    • Critical timestep이 있으면 step-level skill을 사용한다.
    • 그렇지 않으면 episode-level skill로 fallback한다.
    • Original context와 skill-augmented context에서 old policy log-probability를 비교한다.
    • Log-probability shift를 dense token-level skill advantage로 바꾼다.

2-2. Design intuition

OPID의 intuition은 hindsight learning이다. Episode가 끝난 뒤에는 다음처럼 되돌아볼 수 있다.

  • 이 trajectory는 특정 workflow를 따른 덕분에 성공했다.
  • 이 trajectory는 invalid action을 반복했기 때문에 실패했다.
  • 이 step은 잘못된 object를 선택했기 때문에 critical했다.
  • 이 step은 너무 일찍 stop했기 때문에 critical했다.
  • 이 task에는 locate-clean-place pattern이 필요하다.

사람은 이런 lesson을 요약할 수 있다. OPID는 LLM analyzer에게 이를 natural-language skill로 요약하게 하고, 그 효과를 policy에 distill한다.

핵심 detail은 OPID가 inference time에 policy가 이 skill을 읽도록 요구하지 않는다는 점이다. Skill은 training gradient를 shaping하는 데 쓰고, 이후 제거한다.

on-policy rollout
-> hindsight skill extraction
-> skill-augmented rescoring
-> token-level skill advantage
-> RL update
-> no skill prompt at inference

그래서 OPID는 “skill retrieval”보다 “skill internalization”에 가깝다.

3. Architecture / Method

3-1. Overview

Item Description
Goal Outcome-based agentic RL에 dense decision-level supervision 추가
Base RL GRPO-style outcome optimization
Source of skills Completed on-policy trajectories
Skill levels Episode-level과 step-level
Routing Critical-first, step skill if available, else episode skill
Distillation signal Log-probability shift under skill-augmented context
Inference-time requirement Trained policy 외에는 없음
Benchmarks ALFWorld, WebShop, Search-based QA

3-2. On-policy trajectory sampling

각 task prompt에 대해 OPID는 current policy에서 trajectory group을 sample한다.

\[G_q = \{\tau^{(1)},\tau^{(2)},\ldots,\tau^{(N)}\}\]

각 trajectory는 observation, action 또는 response, environment feedback, terminal outcome을 포함한다.

\[\tau = \{(o_t,y_t,r_t)\}_{t=0}^{T-1}\]

Outcome reward는 sparse하고 terminal에만 있지만, trajectory record는 agent가 무엇을 시도했고 어디서 실패했는지에 대한 풍부한 local evidence를 갖고 있다.

3-3. Hierarchical skill extraction

LLM-based analyzer는 completed trajectory를 처리해 두 종류의 skill을 만든다.

Episode-level skill

Episode-level skill $s_{\tau}^{ep}$는 global behavior를 요약한다.

Successful trajectory에서는 다음을 담을 수 있다.

  • reusable workflow
  • effective subgoal order
  • search strategy
  • object interaction pattern

Failed trajectory에서는 다음을 담을 수 있다.

  • failure-avoidance rule
  • repeated invalid action warning
  • mistaken subgoal correction
  • early stopping risk

Step-level skill

Step-level skill $s_{\tau,t}^{step}$는 critical timestep의 local decision knowledge를 포착한다.

Analyzer는 sparse critical timestep set도 식별한다.

\[C_{\tau} \subseteq \{0,\ldots,T-1\}\]

추출된 skill set은 다음과 같다.

\[A(\tau) = \left( s_{\tau}^{ep}, \{s_{\tau,t}^{step}\}_{t \in C_{\tau}} \right)\]

Episode-level skill은 broad하고 stable하다. Step-level skill은 precise하지만 sparse하다.

3-4. Critical-first routing

Timestep $t$에서 OPID는 어떤 skill을 주입할지 선택한다.

\[s_{\tau,t} = \begin{cases} s_{\tau,t}^{step}, & t \in C_{\tau} \\ s_{\tau}^{ep}, & t \notin C_{\tau} \end{cases}\]

이것이 critical-first routing이다. 설계 이유는 단순하다.

  • Local decision이 critical하면 specific step skill이 우선되어야 한다.
  • 그렇지 않으면 episode-level workflow로 충분하다.
  • 둘을 직접 결합하면 redundant하거나 conflicting한 guidance가 생길 수 있다.

Ablation도 이를 지지한다. Critical-first routing을 제거하면 보고된 Qwen2.5-3B setting에서 ALFWorld average가 84.3에서 77.5로 떨어진다.

3-5. Skill-conditioned self-distillation

Sampled response token sequence $y_t$에 대해 OPID는 old policy probability를 두 context에서 비교한다.

  1. Original interaction history
\[\log \pi_{\mathrm{old}} (y_t \mid h_t)\]
  1. Skill-augmented history
\[\log \pi_{\mathrm{old}} (y_t \mid h_t \oplus s_{\tau,t})\]

Skill effect는 log-probability shift다.

\[A_{\mathrm{skill}} = \log \pi_{\mathrm{old}} (y_t \mid h_t \oplus s_{\tau,t}) - \log \pi_{\mathrm{old}} (y_t \mid h_t)\]

Skill을 추가했을 때 old policy가 같은 sampled response를 더 낼 가능성이 커진다면, 그 token은 skill-supported behavior로 간주된다. 이렇게 external teacher 없이 dense token-level supervision을 만든다.

3-6. Combined objective

OPID는 skill advantage와 outcome advantage를 결합한다. 개념적으로는 다음과 같다.

\[A_{\mathrm{total}} = A_{\mathrm{outcome}} + \lambda A_{\mathrm{skill}}\]

Policy는 여전히 outcome-based RL을 중심으로 최적화된다. Skill distillation은 RL을 대체하는 것이 아니라 auxiliary dense shaping signal이다.

이 점이 중요하다. Analyzer가 추출한 skill은 noisy할 수 있기 때문에 outcome reward가 anchor로 남아야 한다.

4. Training / Data / Recipe

4-1. Benchmarks

OPID는 세 agentic benchmark family에서 평가된다.

Benchmark Task type Metric
ALFWorld Text-based embodied household tasks Success rate
WebShop E-commerce web interaction Normalized score and success rate
Search-based QA Search environment QA Answer accuracy

Search-based QA에는 Natural Questions, TriviaQA, PopQA, HotpotQA, 2WikiMultiHopQA, MuSiQue, Bamboogle이 포함된다.

4-2. Baselines

논문은 prompting baseline과 training baseline을 비교한다.

Baseline Description
Vanilla Original prompting baseline
Skill-Prompt Inference나 validation time에 skill description 추가
GRPO Outcome-only on-policy RL
Skill-GRPO GRPO with skill conditioning
OPSD / GRPO+OPSD On-policy self-distillation baselines
Skill-SD Skill-conditioned self-distillation
RLSD RL plus self-distillation variant
SDAR Self-distillation for multi-turn agents

이 broad baseline set이 중요하다. OPID는 outcome-only RL뿐 아니라 다른 skill method와 self-distillation method와도 비교된다.

4-3. Model and training setup

논문은 다음 model로 실험한다.

Model Notes
Qwen2.5-3B-Instruct Main mid-size backbone
Qwen2.5-7B-Instruct Larger backbone
Qwen3-1.7B-Instruct Smaller backbone

논문에 보고된 training detail은 다음과 같다.

Setting Value
Training steps 150
Batch size, ALFWorld와 WebShop 16
Batch size, Search-based QA 128

Training run이 비교적 짧으므로 sample efficiency 분석이 특히 중요하다.

4-4. Engineering notes

  1. Skill extraction should be on-policy
    • Skill은 current policy가 실제 방문한 trajectory에서 나와야 한다.
  2. Do not rely on skills at inference
    • Training-time skill로 behavior를 internalize한다.
    • Validation-time privileged context mismatch를 피한다.
  3. Global skill과 local skill을 함께 사용한다
    • Episode skill은 default workflow를 제공한다.
    • Step skill은 pivotal local decision을 교정한다.
  4. 모든 skill을 concatenate하지 말고 route한다
    • Episode guidance와 step guidance를 단순히 모두 합치는 것보다 critical-first routing이 낫다.
  5. Invalid behavior와 repetitive behavior를 monitoring한다
    • OPID의 qualitative gain에는 shorter episode와 fewer invalid local decision이 포함된다.
  6. Analyzer quality가 중요하다
    • LLM analyzer가 critical timestep과 skill content를 정한다.
    • Bad extracted skill은 noisy shaping signal을 만들 수 있다.

5. Evaluation

5-1. Main results vs GRPO

논문은 OPID가 대부분의 model-domain combination에서 outcome-only GRPO보다 개선된다고 보고한다.

Backbone ALFWorld gain Search-based QA gain WebShop gain
Qwen2.5-3B +9.3 +8.6 +10.9
Qwen2.5-7B +8.8 +7.2 +7.1
Qwen3-1.7B +12.8 Close to GRPO +26.5

가장 큰 gain은 embodied task와 web-shopping task에서 나타난다. Long-horizon action sequence와 local decision quality가 강하게 작용하는 영역이다.

5-2. Comparison to hybrid methods

OPID는 strong self-distillation baseline과 skill-distillation baseline과 비교해도 경쟁력이 있다.

논문에 보고된 예시는 다음과 같다.

Setting OPID Strongest baseline Gain
ALFWorld, Qwen2.5-7B 90.0 88.3 +1.7
ALFWorld, Qwen3-1.7B 58.9 53.9 +5.0
Search QA, Qwen2.5-3B 45.0 44.6 +0.4
Search QA, Qwen2.5-7B 49.2 49.0 +0.2
WebShop success, Qwen3-1.7B 64.8 58.6 +6.2

Margin은 다양하다. Search-based QA에서는 strongest baseline 대비 gain이 작다. ALFWorld와 WebShop에서는 OPID의 advantage가 더 강하게 나타난다.

5-3. Skill prompt mismatch

논문은 validation time에 skill이 제거되면 Skill-GRPO가 ordinary GRPO보다 낮아질 수 있음을 강조한다.

Backbone GRPO Skill-GRPO without validation skills Drop
Qwen2.5-3B 75.0 60.2 -14.8
Qwen2.5-7B 81.2 69.5 -11.7
Qwen3-1.7B 46.1 21.1 -25.0

이 결과는 매우 중요하다. Inference에 존재하지 않을 skill context에 policy가 의존하도록 학습시키는 위험을 보여준다.

OPID는 inference에서 skill input 없이 평가되며, 같은 ALFWorld comparison에서 Skill-GRPO보다 +24.1, +20.5, +37.8 point 높게 나온다.

5-4. Training dynamics

ALFWorld with Qwen2.5-3B에서 OPID는 training middle stage부터 GRPO와 갈라지고 더 높은 success를 유지한다.

논문은 episode length reduction도 보고한다.

Method Average episode length
OPID 15-16 steps
GRPO 17-18 steps

이는 OPID가 success rate만 높이는 것이 아니라 더 direct한 action sequence를 학습한다는 뜻이다. Episode-level skill이 workflow를 가르치고 step-level skill이 local detour를 막는다는 해석과 맞다.

5-5. Sample efficiency

OPID는 ALFWorld에서 sample efficiency를 개선한다.

Data fraction OPID result Comparison
60% 71.9 Close to full-data GRPO 75.0
80% 78.9 Above full-data GRPO 75.0

Data scale 전반에서 OPID의 GRPO 대비 gain은 +9.3에서 +20.3 point 범위다.

이는 trajectory-derived dense supervision이 같은 rollout에서 더 많은 learning signal을 뽑아낸다는 강한 signal이다.

5-6. Cross-domain generalization

ALFWorld Unseen에서 OPID는 다음을 보고한다.

Metric Value
Average success rate 78.6
Gain over GRPO +7.7
Look gain +26.7
Heat gain +18.5

이는 OPID가 exact training trajectory를 단순 memorization하는 것만은 아님을 시사한다. Distilled skill이 reusable behavioral pattern을 포착할 수 있다.

5-7. Ablation

Ablation은 Qwen2.5-3B를 사용한다.

Variant ALFWorld Avg WebShop Success
OPID 84.3 74.2
w/o episode skill 74.1 67.2
w/o step skill 79.1 65.6

두 skill level 모두 중요하다. Episode-level skill은 ALFWorld에 더 큰 영향을 주고, step-level skill은 WebShop에 큰 영향을 준다.

Critical-first routing도 중요하다.

Variant ALFWorld Avg
OPID 84.3
w/o routing 77.5

이는 올바른 skill granularity를 routing하는 것이 available skill을 단순히 모두 추가하는 것보다 낫다는 점을 보여준다.

5-8. What really matters in the experiments

1) Inference-time skill removal is the main design win

OPID는 inference에서 external skill memory를 필요로 하지 않는다. 이는 train-test mismatch를 피하고 deployment를 단순하게 만든다.

2) Dense supervision is distribution-matched

Skill은 current policy의 completed trajectory에서 나오므로, policy가 실제 방문하는 state와 supervision이 맞는다.

3) Long-horizon tasks benefit most

ALFWorld와 WebShop은 Search-based QA보다 더 강한 gain을 보인다. OPID는 local action error가 long-horizon failure로 누적되는 task에 특히 유용해 보인다.

4) Ablation은 hierarchy와 routing을 지지한다

Hierarchy는 장식이 아니다. Episode skill, step skill, critical-first routing을 제거하면 모두 성능이 떨어진다.

6. Limitations

  1. Analyzer dependence가 있다
    • OPID는 skill extraction과 critical timestep identification에 LLM-based analyzer를 사용한다.
    • Analyzer error는 noisy skill advantage를 만들 수 있다.
  2. Training-time cost가 있다
    • Skill extraction과 skill-augmented rescoring은 training overhead를 추가한다.
    • 정확한 compute cost는 paper에서 다시 확인해야 한다.
  3. Inference-time skill이 없는 것은 장점이지만 debug는 더 어렵다
    • Distillation 이후 policy는 skill을 internalize한다.
    • 이는 explicit skill retrieval보다 덜 투명할 수 있다.
  4. Benchmark scope가 제한적이다
    • ALFWorld, WebShop, Search-based QA는 유용하지만 모든 agentic setting을 포괄하지 않는다.
  5. Search QA에서 strongest baseline 대비 gain은 작다
    • 일부 Search-based QA improvement는 marginal하다.
  6. Training horizon이 짧다
    • 보고된 experiment는 150 training steps다.
    • 더 긴 RL training에서는 다른 saturation이나 instability가 나타날 수 있다.
  7. Skill quality 자체는 충분히 평가되지 않았다
    • 논문은 downstream performance를 평가하지만, skill extraction quality 자체는 더 깊은 audit이 필요하다.
  8. Self-confirmation 가능성이 있다
    • Hindsight skill은 model 자신의 trajectory에서 추출된다.
    • Bad trajectory가 misleading failure rule을 만들 수 있다.
  9. General OPD theory는 아니다
    • OPID는 practical agent RL framework이지 OPD stability에 대한 완전한 이론은 아니다.
  10. External baseline과 skill setting이 복잡하다
    • 일부 baseline은 validation-time skill을 쓰고 OPID는 쓰지 않는다.
    • Context assumption을 공정하게 비교하려면 주의 깊게 읽어야 한다.

7. My Take

7-1. Why this matters for my work

OPID의 핵심은 “skill을 잘 만들자”보다, trajectory를 outcome sample이 아니라 reusable decision knowledge로 다루는 것이다.

Agentic RL에서는 rollout이 비싸다. 하나의 trajectory에서 terminal reward만 얻고 끝내면 supervision을 너무 적게 쓰는 셈이다. OPID는 같은 trajectory를 다시 읽어 episode workflow, failure rule, critical local decision을 뽑아내고, 이를 dense token-level advantage로 바꾼다.

이 방향은 agent training에서 중요하다.

trajectory as reward sample
-> trajectory as skill source
-> trajectory as distillation context
-> trajectory as internalized policy update

7-2. Reuse potential

Agent RL training

Sparse reward 환경에서 OPID-style hindsight skill extraction을 붙이면 rollout efficiency를 높일 수 있다. 특히 web, embodied, tool-use task처럼 local mistake가 long-horizon failure로 이어지는 환경에 잘 맞는다.

Coding agents

Coding trajectory에서도 episode-level skill과 step-level skill을 나눌 수 있다.

  • Episode skill: reproduce failing test, inspect relevant file, apply minimal patch, rerun regression
  • Step skill: avoid editing tests, inspect stack trace, check import path, stop after passing tests

다만 coding agent에서는 reward hacking과 verifier leakage도 같이 고려해야 한다.

Memory-free deployment

Skill memory는 유용하지만 운영 비용이 크다. OPID는 training-only skill path를 제안한다. Skill로 model을 학습시키고 inference에서는 retrieval을 제거한다.

Process supervision

OPID의 skill context 아래 log-prob shift는 유용한 pattern이다. External teacher에게 token label을 묻는 대신, 같은 policy를 original context와 hindsight-augmented context에서 비교한다.

7-3. Production considerations

  • Skill analyzer prompt는 versioning하고 audit해야 한다.
  • Critical timestep identification은 별도로 평가해야 한다.
  • Skill extraction cost를 rollout당 측정해야 한다.
  • Skill-induced advantage는 noisy over-shaping을 피하기 위해 clipping이나 normalization이 필요하다.
  • Inference-time behavior는 validation skill이 아니라 skill 없이 확인해야 한다.
  • Repeated invalid action, loop length, early stopping을 secondary metric으로 추적해야 한다.
  • High-risk domain에서는 self-extracted skill이 unsafe shortcut을 강화하지 못하게 해야 한다.

7-4. Follow-up papers

  • GRPO
  • On-policy distillation of language models
  • Self-Distillation Zero
  • Skill-SD
  • SDAR
  • RLSD
  • SOD
  • ALFWorld
  • WebShop
  • Agentic RL과 trajectory-level process reward papers

8. Summary

  • OPID는 completed on-policy trajectory에서 hindsight skill을 추출한다.
  • Episode-level skill은 global workflow를, step-level skill은 critical local decision을 포착한다.
  • Critical-first routing은 critical timestep에서 step skill을, 그 외에는 episode skill을 선택한다.
  • Skill-augmented rescoring은 dense token-level self-distillation advantage를 만든다.
  • OPID는 inference-time skill retrieval 없이 outcome-only RL을 개선한다.

댓글남기기