SetPO: Set-Level Policy Optimization for Diversity-Preserving LLM Reasoning

Chenyi Li1,*, Yuan Zhang2,*,†, Bo Wang3, Guoqing Ma2, Wei Tang2, Haoyang Huang2, Nan Duan2

1Peking University 2JD Explore Academy, China 3Beijing Institute of Technology

*Equal contribution    Project leader

ICML — International Conference on Machine Learning 2026

SetPO augments group-based policy optimization with a leave-one-out diversity credit, rewarding each trajectory according to its marginal contribution to diversity within the rollout set.

Trajectory embeddings showing GRPO collapsing toward fewer modes while SetPO maintains coverage across four correct modes.
Preserving reasoning modes during training. GRPO progressively concentrates on a dominant mode, while SetPO keeps multiple correct semantic modes covered.

SetPO Method Overview

SetPO integrates each trajectory’s marginal diversity contribution as a plug-in shaping term for group policy optimization. It uses the standard rollout group and the base advantages produced by GRPO, DAPO, or GSPO.

1

Start from group policy optimization

Sample a group of outputs, compute task rewards, and obtain the original base advantage.

GRPO / DAPO / GSPO → Āi
2

Build the semantic rollout set

Embed complete trajectories and compute pairwise semantic similarities within the same group.

Kij = k(oi, oj)
3

Estimate set-level diversity

Aggregate local semantic mass over the sampled trajectories to evaluate the generated batch as a whole.

Ω = {o₁, …, oG} → D(Ω)
4

Assign the leave-one-out credit

Contrast the full-set estimate with the subset that excludes one trajectory.

si = D(Ω) − D(Ω ∖ {oi})
5

Plug SetPO into the base optimizer

Add the weighted credit to the base advantage, then use the augmented advantage in the original surrogate objective.

Âi = Āi + λsi
Base optimizer signal GRPO / DAPO / GSPO supplies Āi.
SetPO diversity credit The same rollout group supplies si.
Advantage-only plug-in Āi + λsi replaces Āi.
01

Trajectory-level semantic similarity

Unlike methods that focus on diversity at the token level, SetPO evaluates complete outputs semantically. It uses a bounded, symmetric similarity kernel k(y, y′) ∈ [0, 1] and a pre-defined semantic embedding function e(·).

Local mass m ^ ( y ; S ) = 1 | S | 1 z S { y } k ( y , z )

A high local mass indicates that y resides in a crowded neighborhood, implying redundancy. A low value places y in a sparse region, signifying relative novelty.

02

Set-level diversity objective

SetPO aggregates the local semantic mass over the sampled set. Let g : [0, 1] → ℝ be a continuous, non-increasing function. The paper adopts g(x) = −log(1 + x).

Set diversity D ( S ) = 1 | S | y S g ( m ^ ( y ; S ) )

Since g is non-increasing, a smaller local mass yields a larger return. This mechanism rewards semantic novelty and prioritizes the preservation of highly unique trajectories.

03

Leave-one-out margin for a single trajectory

SetPO contrasts the diversity estimate of the full generated batch Ω with that of the subset Ω ∖ {oi} to quantify the contribution of a single trajectory.

Marginal credit si = D(Ω) − D(Ω ∖ {oi})

A larger si indicates that including oi yields a more significant gain in the estimated diversity of the set. A small or negative value suggests redundancy.

04

Set-level policy optimization

Starting from the base advantage Āi produced by GRPO, DAPO, or GSPO, SetPO adds the marginal diversity contribution as a plug-in shaping term. The coefficient λ controls the trade-off between task performance and diversity.

SetPO advantage Âi = Āi + λsi

The augmented advantage Âi directly replaces the original base advantage in the corresponding GRPO, DAPO, or GSPO objective. SetPO modifies only the advantage term; the remaining design of the chosen base optimizer is unchanged.

Experimental Results

SetPO improves strong group-RL baselines across 1.5B, 7B, and 32B models.

53.8% Best 7B average Pass@1
+5.6 Average gain over GRPO at 7B
<10% Additional wall-clock time
Pass at k curves on four benchmarks showing SetPO plus GRPO above the GRPO baseline for a 32B model.
Scaling to 32B. SetPO maintains higher Pass@K on AIME 2024, AIME 2025, AMC 23, and Olympiad.

Average Pass@1 across six math benchmarks

Method 1.5B 7B
GRPO 43.4 47.2
SetPO + GRPO 46.7 +3.3 52.8 +5.6
GSPO 43.2 48.4
SetPO + GSPO 45.2 +2.0 51.1 +2.7
DAPO 44.7 51.7
SetPO + DAPO 46.7 +2.0 53.8 +2.1
Bar chart showing higher diversity scores when SetPO is added to GRPO, GSPO, and DAPO.
Semantic diversity. SetPO increases diversity for all three policy optimization baselines.
Countdown Pass at k curves comparing SetPO and GRPO under different rollout and KL settings.
Countdown. Higher Pass@K across rollout counts, temperatures, and KL settings.

BibTeX

If you find SetPO useful, please cite our work.

setpo.bib
@article{setpo2026,
  title={SetPO: Set-Level Policy Optimization for
    Diversity-Preserving LLM Reasoning},
  author={Li, Chenyi and Zhang, Yuan and Wang, Bo
    and Ma, Guoqing and Tang, Wei and Huang, Haoyang
    and Duan, Nan},
  year={2026},
  eprint={2602.01062},
  archivePrefix={arXiv},
  primaryClass={cs.AI}
}