arXiv:2610.29965cs.LGOct 2026

Manuscript Offprint

arXiv:2610.29965

CORD: Conflict-Aware Optimization for Joint RL and Distillation in Agents

Wenhao Yu, Zhengcheng Wang, Jiahong Liu, Zexuan Qiu, Minda Hu, Shaohang Wei, Jiafei Lyu, Junyan Lyu, Haobo Fu, Irwin King

Abstract

Joint reinforcement learning and self-distillation combines task rewards with dense teacher guidance for agent training, but their gradients can partly cancel. A mixing coefficient controls relative scale without selectively removing opposing components. We present CORD, a general framework for conflict-aware optimization of two objectives. CORD separates the choice of protected objective from the condition that triggers projection, and combines the gradients once per optimizer mini-batch. A nearest-point formulation yields a closed-form update and characterizes its first-order effect on the protected objective before optimizer transformations. Gradient diagnostics connect conflict in agent training to lost local optimization progress and motivate selective correction. As a gradient-combination mechanism, CORD can be added to different joint training recipes while retaining their objectives. Across three such recipes, it improves ALFWorld success by 1.5–15.9 percentage points. On WebShop, it improves two of the three pairs, with SDAR rising from 60.7% to 64.6% success. Our analyses explain why protection direction and projection gate must be chosen together, and why the distillation objective and its mixing weight remain consequential after projection.

Code github.com/LvAoAo/CORD-release

1 Introduction

Language-model agents learn to complete tasks through sequences of actions, but outcome rewards provide limited credit for individual decisions (Feng et al., 2025). Group Relative Policy Optimization (GRPO) compares returns across sampled attempts (Shao et al., 2024), yet supplies little learning signal when rewards tie. On-policy distillation (OPD) provides dense token-level feedback on student trajectories (Agarwal et al., 2024), but its usefulness depends on the teacher's guidance. Joint training couples this guidance with reward-based optimization, allowing agents to learn from both task outcomes and informed action preferences (Lu et al., 2026).

Existing approaches refine how teacher guidance enters learning. Skill-conditioned self-distillation supplies an informed contextual view of the policy (Wang et al., 2026), while SDAR weights token supervision using detached teacher–student confidence gaps (Lu et al., 2026). RLSD incorporates detached log-probability differences into token advantages, preserving their signs without a separate distillation loss (Yang et al., 2026a). Confidence gates reweight token signals, whereas a gradient inner-product gate tests their accumulated effect. The two operations can be composed for separate RL and OPD losses.

Figure

Figure

Figure

Figure 1. From gradient conflict to improved agent training. Left, observations (a) and (c): cosine quantiles of conflicting WebShop/Qwen3-1.7B gradient records (Qwen Team, 2025), before and after analytic CORD projection. Middle, observation (b): first-order RL-surrogate progress relative to RL alone on the same log, evaluated at λ=0.005\lambda = 0.005 with RL protection. Right: preliminary WebShop/3B training success with k3k_3, λ=0.001\lambda = 0.001, and conflict-only distillation protection. The right panel shows iterations 75–148 after 21-iteration smoothing. Curves average two training seeds and bands show their range. Appendix C.1 gives measurement and smoothing details.

Joint optimization still requires a rule for combining these gradients. Which contribution to preserve on conflict depends on the losses' roles and the training goal. A mixing coefficient changes scale but cannot selectively remove opposing components. Figure 1 diagnoses this interaction:

(a) Conflict occurs during agent training. In the WebShop (Yao et al., 2022) log used for the left panel, 48.2% of mini-batch gradient records have negative RL–distillation cosine.

(b) Conflict reduces local optimization progress. The middle panel shows that a conflicting distillation gradient reduces first-order progress on the RL surrogate relative to RL alone.

(c) The opposing component can be removed selectively. On conflict, projecting one gradient onto the other's orthogonal complement moves the displayed cosine quantiles to zero and recovers the protected gradient's first-order progress. Aligned pairs remain unchanged.

We introduce CORD, a general framework for conflict-aware optimization of two objectives. CORD accumulates both gradients under the specified loss weights for each optimizer mini-batch. It retains the selected protected gradient and minimally modifies the other before combining them. Conflict-only projection removes opposing components, while an always-projection variant also removes aligned components. Either objective can be protected. Our analysis relates the resulting first-order contribution on fixed sampled losses to finite step size and optimizer transformations. The agent experiments evaluate protection, triggering, and loss construction while retaining each host's objectives. Appendix A discusses related work.

Our contributions are threefold:

• Conflict-aware joint optimization. We connect measured gradient conflict to lost first-order progress and formulate CORD to preserve a selected objective’s contribution while correcting the conflicting component of the other.

• Incremental gains across training methods. CORD improves all three host recipes on ALFWorld by 1.5–15.9 percentage points, and two of three on WebShop. These paired comparisons establish the value of gradient combination while retaining each host’s objectives.

• Guidance for configuring joint training. We show why protection direction and triggering must be selected together, and how the distillation loss, mixing weight, and aggregation determine the gradient that projection receives. Agent cases connect these choices to attribute completion, repeated actions, and token probability changes.

References (27)