OrderGrad: Optimizing Beyond the Mean with Order-Statistic Policy Gradient Estimation

Paavo Parmas, Yongmin Kim, Kohsei Matsutani, Shota Takashiro, Soichiro Nishimori +3 more
6/4/2026
6 citations
cs.LGcs.AIcs.CL
rl

Official code: paavo5/ordergrad (15 stars, Python, MIT, last commit 2026-06-05).

Abstract

Policy-gradient methods usually optimize expected return, but many real world applications care about distributional properties of returns: tail risk, outlier robustness, or best-of-K discovery. We introduce OrderGrad, a family of likelihood-ratio and reparameterization gradient estimators for order-statistic objectives.

Show full abstract

OrderGrad optimizes finite-sample L-statistics, i.e., weighted averages of sorted rewards or costs, recovering objectives such as VaR, CVaR, trimmed means, medians, and top-m/best-of-K criteria by changing only the rank weights. For any fixed sample size and rank-weight vector, OrderGrad provides an unbiased gradient estimator for the corresponding order-statistic objective. The method is implemented as a simple reward transformation that can then be used in an otherwise standard policy-gradient or reparameterized update. We study the resulting estimator's variance behavior and evaluate it on tasks where mean optimization is mismatched to the deployment objective, including LLM math post-training and other tasks. OrderGrad provides a unified, plug-and-play route to risk-averse, robust, and exploratory learning. Code: https://github.com/paavo5/ordergrad

View on arXivView PDF

Code Implementations(1)

paavo5/ordergradOfficial100%
MIT

Policy gradient reinforcement learning beyond the mean, e.g., Pass@k, Max@k, TopM@K, CVaR, VaR, Quantiles, Trimmed Means or other functionals of the reward distribution based on unbiased order-statistics gradients. Can be used for LLM training and other REINFORCE / GRPO / PPO based tasks.

151PythonFeb 18, 20265 months agoMIT

Similar Papers

Cite this paper

@article{parmas2026ordergrad,
  title  = {OrderGrad: Optimizing Beyond the Mean with Order-Statistic Policy Gradient Estimation},
  author = {Paavo Parmas and Yongmin Kim and Kohsei Matsutani and Shota Takashiro and Soichiro Nishimori and Takeshi Kojima and Yusuke Iwasawa and Yutaka Matsuo},
  year   = {2026},
  eprint = {2606.06096},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.06096v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.06096.svg)](https://codeofpaper.com/paper/2606.06096)

Discussion