---
title: Self-Guided Rejection Sampling Finetuning
url: https://www.emergentmind.com/topics/self-guided-rejection-sampling-finetuning-rsf
type: topic
---

# Self-Guided Rejection Sampling Finetuning

Self-Guided Rejection Sampling Finetuning (RSF) is a family of self-improvement procedures in which a model generates multiple candidate outputs for a prompt, evaluates them with an automatically available signal, accepts only a subset of candidates, and then fine-tunes on the accepted outputs. In the recent literature, RSF is often treated as synonymous with Rejection Sampling Fine-Tuning (RFT), and, in the reasoning setting of AdaSTaR, with Self-Taught Reasoners (STaR). The core pattern is stable across domains: in mathematical reasoning it accepts correct self-generated solutions; in GUI-agent training it accepts self-generated guidelines that cause a frozen downstream agent to produce the correct action; and in hybrid alignment pipelines it serves as the data-construction stage preceding stronger objectives such as DPO. The central methodological question is how acceptance is defined, how much of the sampled pool is discarded, and whether negatives should remain unused or be repurposed by a generalized objective [2601.09253] [2509.24183] [2505.16322].

## 1. Terminology, scope, and canonical identity

RSF denotes a positives-only, self-guided finetuning regime. In the standard formulation described for LLM alignment, the current policy samples $K$ candidate responses per prompt, scores them with a reward or verifier, keeps only the top-scoring response or those above a threshold, and then performs SFT on the retained samples. RS-DPO characterizes this explicitly as “best-of-$n$ SFT”: generate from the current policy, score the pool, keep $y^\*(x)$, and maximize $\log \pi(y^\* \mid x)$ [2402.10038].

In reasoning papers, the same template is presented under the names STaR or RFT. AdaSTaR states that Self-Guided Rejection Sampling Finetuning, STaR, and RFT refer to the same training paradigm: the model generates chains-of-thought and answers, accepts only generations whose final answer is correct, and fine-tunes on those accepted chains-of-thought [2505.16322]. This naming convergence is not merely terminological. It indicates that RSF is best understood as a procedural pattern rather than a single loss function.

The same accept/reject logic appears outside text-only reasoning. In RAG-GUI, RSF is the second training stage for a guideline generator $f_\theta$. The model samples candidate guideline outputs from retrieved tutorials, injects each candidate into a frozen VLM agent $\pi$, and accepts a guideline only if the agent predicts the ground-truth next action. The accepted guidelines become new finetuning targets for $f_\theta$, again with only positives retained [2509.24183].

A common misconception is that RSF necessarily requires human preference labels or an external reward model. The cited systems show otherwise. Reported acceptance signals include final-answer exact match, execution correctness or unit tests, step-consistency checks when available, and exact equality between predicted and ground-truth environment actions. In RAG-GUI, no external reward model or pairwise preference labels are used; in math RFT/RSFT, a simple correctness signal suffices [2601.09253] [2509.24183].

## 2. Formal setup and canonical procedure

A standard formalization begins with an autoregressive policy $p_\theta(y \mid x)$ over trajectories $y = (y_1,\dots,y_T)$, factorized as
$$
p_\theta(y \mid x) = \prod_{t=1}^{T} p_\theta(y_t \mid x, y_{<t}).
$$
In self-guided settings, one constructs an off-policy buffer
$$
D = \{(x, y_i, r_i)\},
$$
where $K$ candidates $y_i \sim p_\theta(\cdot \mid x)$ are sampled for each prompt and scored by a scalar verifier-derived reward $r_i$ [2601.09253].

The canonical RSF/RFT loop is:

1. sample $K$ trajectories for each prompt;
2. evaluate a scalar reward or verifier outcome for each sample;
3. select the best sample or thresholded positives;
4. fine-tune with standard SFT loss on accepted positives only.

With top-1 selection, the RSF objective is
$$
L_{\mathrm{RSFT}}(\theta) = \mathbb{E}_{x \sim X}\big[-\log p_\theta(y^\*(x)\mid x)\big],
$$
or, tokenwise,
$$
L_{\mathrm{RSFT}}(\theta) = \mathbb{E}_{x}\left[-\sum_{t=1}^{T}\log p_\theta\big(y_t^\*(x)\mid x, y_{<t}^\*(x)\big)\right].
$$
This is the defining positive-only feature of RSF: rejected samples do not contribute to the update [2601.09253].

In reasoning-oriented STaR notation, each example is $\langle x,c,y\rangle$, where $x$ is the query, $c$ is the chain-of-thought, and $y$ is the final answer. The model $\pi_{\theta_t}$ generates $K$ samples $\langle \hat c_i,\hat y_i\rangle$, and acceptance is outcome-only:
$$
r := I(\hat y_i = y_i).
$$
Accepted samples form
$$
D_t^+ := \{\langle x_i,\hat c_i,\hat y_i\rangle \mid \hat y_i = y_i\},
$$
and the model minimizes an NLL loss on the accepted rationales and, optionally, answers [2505.16322].

Reported verifier choices are domain-specific. For mathematical reasoning, the cited experiments use final-answer correctness; in RIFT’s experiments on MATH and NuminaMath, the reward is $r=+1.0$ for correct and $r=-0.2$ for incorrect answers. In GUI-agent training, acceptance is the hard indicator $\mathbb{I}[\hat a_t = a_t]$, where $\hat a_t$ is the frozen agent’s action conditioned on the generated guideline [2601.09253] [2509.24183].

## 3. Objective functions and theoretical interpretations

The baseline RSF objective is algorithmically simple but statistically lossy because it discards all negatives. RIFT isolates this limitation directly: when $K$ is modest and base models are not extremely strong, a large fraction of generated data is thrown away, reducing gradient-signal diversity and removing information about failure modes [2601.09253].

One theoretical interpretation comes from RAG-GUI, which formulates RSF through an ELBO over the probability that the frozen agent selects the correct action given a retrieved tutorial:
$$
\log p(\hat a_t = a_t \mid g, s_t, \tau_i)
\ge
\mathbb{E}_q\big[\log p(\hat a_t = a_t \mid g, s_t, \hat\sigma_i)\big]
+
\mathbb{D}_{\mathrm{KL}}(q \,\|\, p_\theta(\hat\tau_i \mid \tau_i)).
$$
Under the acceptance assumption
$$
p(a_t \mid g, s_t, \hat\tau) \propto \mathbb{I}[\hat a_t = a_t],
$$
the posterior over sampled guidelines is proportional to the generator probability times the hard success indicator, and the finetuning loss reduces to NLL on the accepted set:
$$
\mathcal{L}_{\mathrm{RSF}} = - \sum_{(\tau_i,\hat\tau)\in D_{\mathrm{RSF}}} \log p_\theta(\hat\tau \mid \tau_i).
$$
This formalizes standard RSF as positive-only posterior concentration under a hard acceptance criterion [2509.24183].

A second interpretation is supplied by Statistical Rejection Sampling Optimization (RSO). RSO distinguishes deterministic RSF from probabilistic rejection sampling with an explicit target distribution $\pi_t(y\mid x)\propto q(y\mid x)\exp(r_\psi(x,y)/\beta)$. Its acceptance probability is
$$
\alpha(x,y)=\exp\!\big((r_\psi(x,y)-r_{\max}(x))/\beta\big).
$$
Within this framework, deterministic top-1 RSF appears as the limit $\beta \to 0$: only the argmax-reward sample is accepted. This casts standard RSF as a special case of a broader rejection-sampling family, but without the exact probabilistic acceptance semantics or associated consistency guarantees emphasized in RSO [2309.06657].

RIFT provides a third interpretation by generalizing RSF from positives-only filtering to a reward-informed objective that uses all sampled trajectories. Let $D^+$ and $D^-$ denote positive- and negative-reward samples. RIFT defines
$$
L_{\mathrm{RIFT}}(\theta)
=
- \mathbb{E}_{(x,y)\sim D^+}\big[r(x,y)\log p_\theta(y\mid x)\big]
- \mathbb{E}_{(x,y)\sim D^-}\big[r(x,y)p_\theta(y\mid x)\big].
$$
Its practical token-level version uses reward-weighted cross-entropy for positives and a reward-weighted linear-in-probability penalty for negatives. The paper’s motivation is that naive signed reward weighting with $w(r)=r$ collapses training because for $r<0$ the objective is unbounded below as $p\to 0$, whereas the negative RIFT term has bounded constant gradient with respect to $p$ and therefore remains numerically stable [2601.09253].

## 4. Variants, generalizations, and hybridizations

The RSF design space has expanded along three main axes: pairwise preference learning, adaptive data sampling, and task-specific acceptance signals.

RS-DPO preserves RSF’s on-policy sample generation but replaces one-sided SFT on the best sample with DPO over contrastive pairs extracted from the same sampled pool. Starting from an SFT policy $\pi_{\mathrm{SFT}}$, it samples $k$ responses per prompt, scores them with a scalar reward model, and accepts preference pairs when the temperature-scaled reward gap exceeds a margin threshold. The retained pairs are then optimized with the DPO loss using $\pi_{\mathrm{SFT}}$ as the reference model and $\beta=0.1$. The paper emphasizes that this reuses substantially more of the sampled data than RSF and reduces sensitivity to absolute reward calibration because learning depends on pairwise gaps rather than top-1 selection alone [2402.10038].

AdaSTaR modifies the sampling policy inside the STaR/RSF loop rather than the loss. It tracks, for each observation, the last-sampled iteration $\tilde t_i$ and a win statistic $w_i\in[0,1]$, where
$$
w_i := \frac{1}{K}\sum_{k=1}^{K} I[y_i = \hat y_i].
$$
Observations are prioritized by a hierarchical min-heap: first those not sampled recently, then those with lower win rates. A curriculum mechanism updates only the top $\lfloor m\alpha^2\rfloor$ considered observations, where $\alpha$ is current training accuracy and $m$ is the number of considered observations. This explicitly targets the observation-imbalance problem in vanilla RSF, where easy observations are repeatedly oversampled and hard ones remain undertrained [2505.16322].

RAG-GUI adapts RSF to a retrieval-augmented VLM system. Here the object being accepted is neither a final answer nor a preference winner but a generated guideline $\hat\tau_i=(\hat\ell_i,\hat\sigma_i)$ derived from a retrieved tutorial. The frozen agent $\pi$ consumes the candidate summary $\hat\sigma_i$, and acceptance requires $\hat a_t = a_t$. Accepted candidates with conflicting relevance labels for the same tutorial are discarded to avoid ambiguity. This variant shows that RSF need not optimize the action policy directly; it can instead optimize an auxiliary component whose outputs causally affect a frozen downstream decision-maker [2509.24183].

RIFT is best viewed as a strict generalization of RSF rather than a replacement of its self-guided data-generation stage. The sampling procedure remains the same—sample from the current model, verify with automatic reward—but the finetuning stage changes from positive-only SFT to a stabilized mixed-sign objective that uses both correct and incorrect trajectories. A plausible implication is that “self-guided rejection sampling” increasingly refers to the data-construction stage, while the training objective applied to that data is now an active design dimension [2601.09253].

## 5. Empirical behavior across reasoning, alignment, and GUI tasks

The empirical record shows a consistent pattern: plain RSF is effective but often data-inefficient, and methods that preserve its self-guided sampling while extracting more signal from the sampled pool usually improve performance.

On mathematical reasoning benchmarks, RIFT consistently outperforms RFT. Using MATH training buffers and $K=8$ samples per problem, Mean@8 improved from $25.6$ to $37.0$ for Qwen2.5-Math-1.5B, from $45.8$ to $48.7$ for Qwen2.5-Math-7B, and from $42.4$ to $44.3$ for Qwen3-1.7B. Pass@8 improved from $42.4$ to $61.5$ for Qwen2.5-Math-1.5B and from $66.1$ to $67.5$ for Qwen2.5-Math-7B. For DeepSeek-R1-Distill-Qwen-1.5B, RIFT reached Mean@8 $44.0$ versus $37.9$ for RFT and Pass@8 $63.2$ versus $59.4$ for RFT. The same study reports that the positive fraction in generated buffers often ranged from roughly $33\%$ to $85\%$, underscoring how much trajectory mass plain RSF can discard [2601.09253].

The same paper also reports resource trade-offs. Peak memory for RIFT was about $20$–$22$ GB, compared with about $41$–$43$ GB for DPO and about $18$–$19$ GB for RFT, while RIFT achieved higher Mean@8 than DPO and used only slightly more VRAM than SFT/RFT. Its gains depended on the fraction of mixed-reward problems: on MATH the mixed fraction decreased with stronger models from $84.7\%$ to $32.4\%$, and RIFT’s advantage over RFT shrank accordingly; on NuminaMath, where mixed fractions were higher, the gains increased [2601.09253].

In pairwise alignment, RS-DPO consistently exceeds RSF on both Anthropic HH helpfulness and WebGPT. On Anthropic HH with the pythia-6.9B-RM-OA reward model, RSF achieved MT-Bench $4.84$ and AlpacaEval $60.20\pm2.84$, whereas RS-DPO reached up to MT-Bench $5.49$ and AlpacaEval $79.67\pm2.33$ depending on the margin threshold $\eta$. On WebGPT, RS-DPO remained stronger than RSF under both the weaker RM-WG judge and the stronger RM-OA judge. The reported explanation is that RS-DPO converts one sampling round into many high-margin comparisons, while RSF discards $k-1$ samples per prompt [2402.10038].

In GUI-agent training, the RSF stage in RAG-GUI yields consistent gains over an otherwise identical system without RSF. The ablation “w/o RSF” shows AndroidWorld success rate improving from $32.8$ to $35.3$ with the $7$B backbone and from $44.4$ to $45.7$ with the $72$B backbone; mm-Mind2Web cross-task Step SR improving from $46.8$ to $51.5$ for $7$B and from $53.8$ to $56.8$ for $72$B; and AndroidControl Step Acc improving from $54.9$ to $59.6$ for high-level $7$B and from $80.9$ to $84.6$ for low-level $72$B. Across three tasks and two model sizes, RAG-GUI improved over inference baselines by $2.6\%$ to $13.3\%$ absolute [2509.24183].

AdaSTaR shows that substantial RSF gains can come from changing the sampling schedule rather than the acceptance criterion. Across six reasoning benchmarks, it achieved the best test accuracy in all $6/6$ cases while reducing training FLOPs by an average of $58.6\%$ relative to the strongest accuracy baseline. Illustrative results include ARC-C at $73.8\%$ accuracy with $174.4$ PFLOPs versus STaR-Acc at $73.2\%$ with $639.8$ PFLOPs, ANLI-R1 at $66.8\%$ with $1340.9$ PFLOPs versus STaR-Acc at $64.8\%$ with $3528.4$ PFLOPs, and GSM8K with Qwen 2.5 3B at $77.0\%$ with $19.3$ PFLOPs versus $77.0\%$ for STaR-Acc at $305.2$ PFLOPs [2505.16322].

## 6. Limitations, misconceptions, and open directions

The most persistent limitation of standard RSF is that it uses only positives. This is computationally attractive and stable, but it throws away negative trajectories that may encode informative failure modes. RIFT’s entire contribution is motivated by this inefficiency, and its results suggest that standard RSF is not data-optimal when a verifier can provide mixed-sign scalar rewards [2601.09253].

A second limitation is verifier granularity. In AdaSTaR’s main experiments, acceptance is outcome-only: a sample is kept if the final answer is correct, regardless of whether the chain-of-thought is internally sound. The paper reports that diversity-only sampling increases false positives in accepted CoTs by about $9\%$ on average across four datasets relative to STaR-Acc, showing that accepted trajectories need not be process-correct. RAG-GUI exhibits an analogous ambiguity problem: conflicting relevance labels among accepted samples for the same tutorial must be discarded, which reduces usable data [2505.16322] [2509.24183].

A third misconception is that “rejection sampling” in RSF always refers to statistically exact rejection sampling. In much of the RSF/RFT literature, acceptance is deterministic top-1 selection or thresholding. RSO argues that this should be distinguished from probabilistic rejection sampling with an explicit acceptance probability and target distribution; within that framework, best-of-$N$ RSF is the $\beta\to 0$ limit, not the general case [2309.06657].

Reward and domain assumptions also constrain applicability. RIFT explicitly notes that its upper bound is limited by the discriminative power of the reward, that subjective tasks make reward design harder, and that long CoT trajectories may require step-wise rewards because a single local error can flip a sequence-level reward negative. RAG-GUI depends on retrieval quality and a frozen agent: irrelevant tutorials, domain shift, or sparse acceptance can weaken the RSF signal. RS-DPO remains dependent on reward-model quality and margin calibration, even though pairwise gaps mitigate absolute calibration errors [2601.09253] [2509.24183] [2402.10038].

Current extensions point in several directions. The cited papers propose per-step or chain-of-thought rewards, dynamic sampling and curriculum strategies, adaptive $K$ and temperature, richer verifier integration, optional KL constraints to manage drift, better handling of negatives and ambiguity, and joint adaptation of auxiliary modules and downstream agents rather than freezing one side of the system [2601.09253] [2509.24183] [2505.16322]. This suggests that RSF is evolving from a simple best-of-$n$ SFT heuristic into a broader design space centered on self-generated data, verifier-based acceptance, and increasingly explicit control over how rejected samples influence optimization.

Source: https://www.emergentmind.com/topics/self-guided-rejection-sampling-finetuning-rsf