Skip to main content
Back

ByteDance's SamS Makes AI Alignment Training 12% Smarter by Picking Better Examples

SamS treats each DPO training batch as a bandit problem, dynamically picking the best samples per step — boosting AlpacaEval win rates by up to 12.4% with 18% less GPU memory

Pro

  • SamS is a lightweight scheduler that dynamically selects the best 50% of samples per DPO training batch based on the model's live internal state, accepted at NeurIPS 2025.
  • It frames sample selection as a contextual bandit problem, using exploitation and exploration networks to score each candidate sample every round.
  • On AlpacaEval 2, DPO+SamS improves raw win rate by 3%–12.4% and length-controlled win rate by 5.5%–8.4% over baselines across four model configs.
  • Despite training on half the batch, SamS uses 18% less GPU memory than vanilla DPO with nearly identical wall-clock time (~2.4 vs 2.3 hrs).
  • Under 20% label noise, SamS cuts accuracy degradation roughly in half compared to standard DPO, making it robust to noisy preference datasets.
  • Code is open-source at github.com/hzx122/SamS and plugs into existing DPO pipelines without modifying the core algorithm.

Getting a language model to follow human preferences is hard enough. Getting it to do so efficiently, without drowning in noisy or poorly-matched training samples, is harder still. A new paper from Beihang University and ByteDance targets exactly this gap with SamS (Sample Scheduling for DPO), a lightweight add-on that teaches the training loop itself to be smarter about which examples to learn from at every step.

The problem hiding inside DPO

Direct Preference Optimization (DPO) is the dominant method for aligning LLMs with human preferences without training a separate reward model. Given pairs of responses where one is preferred over the other, DPO directly nudges the model to increase the probability of the chosen response and decrease the probability of the rejected one. It is simpler and cheaper than full RLHF, which is why it has been widely adopted.

DPO's heavy reliance on high-quality human preference data poses a significant bottleneck for practical deployment due to the associated annotation costs. But the data quality problem is more subtle than it first appears. The paper identifies two compounding issues:

  • Shifting difficulty: A sample that is easy for the model at step 1,000 may be trivial or impossible at step 20,000. As the model's internal state evolves over time, the relative difficulty of each sample may also shift. Without an adaptive scheduling mechanism, the model may overemphasize samples misaligned with its current learning capacity or overfit to some error patterns.
  • Label noise: Real preference datasets contain mislabeled pairs. The authors injected 20% noise into the Anthropic-HH dataset and found DPO's test accuracy dropped by 6 percentage points , a stark reminder of how sensitive the method is to bad labels.

Prior work addressed data quality through static pre-selection: filter your dataset once before training starts, then run DPO as usual. Methods in the data pre-selection category overlook the evolving internal states of the language model throughout the DPO process. That is the blind spot SamS is designed to fix.

Framing it as a bandit problem

The core insight is to reframe batch-level sample selection as a contextual bandit problem , a classic reinforcement learning setup where an agent picks actions (here: which samples to train on) and observes rewards (here: how much the model improved). Each sample in a batch is an "arm" to pull, and the scheduler's job is to figure out which arms are worth pulling at this particular moment in training.

SamS architecture showing the policy network, scheduler with encoder and exploitation/exploration networks, and the training workflow across rounds

The scheduler itself is a small neural network sitting alongside the main LLM. It reads the LLM's internal hidden states for each candidate sample and outputs a predicted reward score. The top-K samples by score are selected for the actual DPO gradient update. Here is the high-level loop:

  1. Forward pass: Run the full batch through the LLM to compute DPO losses per sample.
  2. Scheduler training: Use the reward signal from the previous round to update the scheduler's weights. This lagged update is key , it avoids any extra LLM forward passes.
  3. Scheduling: The updated scheduler scores each sample and selects the top 50% (configurable) for training.
  4. Backward pass: Run the DPO gradient update on the selected subset only.

The reward signal has two components. A batch-level reward measures how much the average DPO loss dropped from one batch to the next , a proxy for actual generalization improvement. A sample-level reward scores individual samples by their preference margin (how clearly one response beats the other) and model uncertainty (how unsure the model is about the preferred response). Samples that are clear-cut but still challenging for the current model state get the highest scores.

Exploitation vs. exploration, inside the scheduler

There is a classic tension here: should the scheduler keep picking samples it already knows are good (exploitation), or try unfamiliar ones that might be even better (exploration)? SamS handles this with a two-headed architecture. An exploitation network predicts reward values from encoded hidden states. An exploration network estimates the uncertainty of those predictions and adds a bonus for samples the scheduler is less confident about , similar in spirit to Upper Confidence Bound (UCB) algorithms from bandit theory.

The final score for each sample is: reward = exploit_score + λ * explore_bonus, where λ controls how adventurous the scheduler is. Both networks are 16-layer residual MLPs , tiny compared to the LLM they are guiding.

The numbers

The team tested SamS on four model configurations: Mistral-7B-Instruct, Llama-3-8B-Instruct, Llama-3-8B-Instruct v0.2, and Gemma-2-9B-Instruct. Benchmarks used were AlpacaEval 2 (measuring win rate against GPT-4 Turbo responses) and MT-Bench (a multi-turn conversation score). Key results:

  • DPO+SamS improves the AlpacaEval 2 win rate by 3.0%–12.4% and the length-controlled win rate by 5.5%–8.4% compared to baselines.
  • Compared to simply training on a random 50% of each batch, SamS's intelligent selection accounts for all of those gains , showing it is the which samples, not just the fewer samples, that matters.
  • SamS also generalizes beyond DPO: applying SamS to two baseline methods yields an average increase of 2.65% in test accuracy, a 19.9% improvement in the reward value of the preferred response, and a 5.8% gain in the log-probability of the preferred response.
  • Under 20% label noise, DPO+SamS loses only ~2–3% accuracy versus ~4–6% for vanilla DPO.

Cheaper to run, not more expensive

One of the more surprising results is on compute. Because SamS trains on only half the batch during the backward pass, and because the scheduler itself is lightweight, DPO+SamS reduces GPU memory usage by approximately 18% with similar runtime, owing to SamS's reduction in computational overhead during backward propagation of LLM updates. A full DPO run takes about 2.3 hours; DPO+SamS takes 2.4 hours. Compare that to Selective DPO, a competing static pre-selection method, which requires 6+ hours of reference model training before the actual DPO phase even begins.

When to use it , and when not to

SamS is most valuable when your preference dataset is imperfect , which, in practice, is almost always. It is a strong fit for:

  • Fine-tuning on real-world human annotation data with inconsistent labelers
  • Synthetic preference datasets where reward model scoring introduces noise
  • Multi-epoch DPO training where the model's learning needs shift over time
  • Any setting where you want to stack SamS on top of a static pre-selection method for compounding gains

The one honest limitation: SamS is most effective as a compensatory strategy for suboptimal data, and its benefits may be less pronounced in scenarios where traditional DPO can fully leverage a large number of high-quality samples. If you already have a pristine, large, high-quality preference dataset, the marginal gain shrinks.

The code is available as a NeurIPS 2025 paper release at github.com/hzx122/SamS. The scheduler plugs into an existing DPO training loop with no changes to the core algorithm , making it one of the more practical alignment improvements to land recently.