NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

RL-Guided Data Selection for Language Model Finetuning

Animesh Jha, Ananjan Nandi, Harshit Gupta

TL;DR

Selecting the right data to fine-tune Large Language Models (LLMs) is typically an intractable combinatorial problem, forcing practitioners to rely on noisy heuristics or pre-training data filters. This paper reformulates data selection as a Markov Decision Process (MDP) over semantic data clusters, using Reinforcement Learning (RL) and a small proxy model to guide the search. On a strict 5% data budget, this RL-guided selection matches or exceeds full-dataset fine-tuning—boosting accuracy by up to 10.8 percentage points on noisy tasks while cutting overall training wall-clock time in half.

What Problem Does This Paper Address?

Fine-tuning datasets often contain substantial noise, mislabeled examples, and redundant samples that inflate training costs and degrade performance. While selecting an optimal subset under a fixed budget is mathematically sound, solving it directly is intractable: evaluating every candidate subset requires training a model from scratch.

Existing approximate data selection methods (e.g., importance resampling or gradient-based influence functions like LESS) are predominantly tailored for pre-training regimes, computationally expensive to adapt, and often prioritize surface-level lexical statistics over downstream, task-specific semantics.

Methods

The authors cast subset selection as a sequential decision-making problem:

  1. Semantic Clustering & State Space: The training set $D$ is partitioned into semantic clusters $C$ using K-Means on sentence embeddings (BAAI/bge-small-en-v1.5). A state $s_t \subseteq C$ is the subset of clusters selected so far, and taking an action $a_t$ adds an unselected cluster to the set ($s_{t+1} = s_t \cup \{a_t\}$). An episode ends when the cluster count reaches the budget fraction $\delta |C|$.
  2. Proxy Reward Function: Rather than training the target LLM (MobileLLM-1.5B) to score candidate subsets, a much smaller proxy model (MobileLLM-600M or 125M) is trained on a subsampled fraction of the selected clusters. The reward $R(s_t, a_t)$ is the log-transformed improvement in the proxy's validation loss after adding cluster $a_t$.
  3. Policy Optimization Approaches:
  4. Deep Q-Networks (DQN): Learns cluster-selection Q-values using state encodings such as mean and variance of cluster embeddings (Mean-Std) with action masking for already-chosen clusters.
  5. Proximal Policy Optimization (PPO): Evaluated with action masking, standard initialization, and a Warm-Start scheme where the critic is pre-trained to predict single-cluster rewards.
  6. Model-Based Search (CLIMB-Disc & DynaDQN): CLIMB-Disc trains a lightweight MLP reward predictor to iteratively rank unseen cluster states and query true rewards for the most promising candidates (Bayesian-style search). DynaDQN uses an ensemble of reward models to synthesize transitions.

Datasets

The authors evaluated their framework on four distinct classification and reasoning benchmarks:

  • ANLI (Adversarial NLI): 162,400 training samples, 3 labels.
  • MetaHate: 1,051,165 training samples, 2 labels (hate speech detection).
  • GooglePlay: 98,836 training samples, 5 labels (sentiment classification).
  • MMLU: 99,842 training samples, 4 labels (multitask multiple-choice QA).

No new benchmarks were created; test sets were held out (including 25k sampled for MetaHate and 5k for GooglePlay).

Key Insights and Ideas

  • Intelligent pruning can beat the full dataset: On noisy datasets like MetaHate, training on just 5% of RL-selected data yielded 94.01% accuracy versus 83.20% on the full dataset. The agent learns to systematically avoid harmful or conflicting clusters.
  • Reward landscapes dictate RL effectiveness: Visualizing state space embeddings with UMAP reveals that datasets with high variance in validation loss across clusters (MetaHate and GooglePlay) show the biggest gains from RL selection. ANLI exhibited lower reward variance and had a larger remaining gap to full-data performance.
  • Simpler architectures work best: Counterintuitively, MLP-based Q-networks generally outperformed more complex Transformer-based encoders, and intrinsic exploration bonuses via Random Network Distillation (RND) hurt or had negligible impact on performance.
  • Synthetic transitions can backfire: While CLIMB-Disc's iterative querying worked exceptionally well, DynaDQN struggled, demonstrating that noisy synthetic rollouts from proxy reward models can derail policy learning.

Key Results

Evaluating downstream performance with a MobileLLM-1.5B target model on a 5% data budget:

Dataset Full Dataset Random 5% Best RL/Search Policy Top Baseline/Policy Name
MetaHate 83.20% 72.60% 94.01% (+10.81% over Full) CLIMB-Disc
GooglePlay 68.10% 58.30% 68.40% (+0.30% over Full) CLIMB-Disc
ANLI 64.76% 54.20% 57.60% DQN
MMLU 49.38% 40.90% 45.68% PPO + RND
  • Compute & Time Efficiency: Even after including the overhead of proxy reward calculations and RL agent training, data selection at an 1/8th data budget achieved competitive performance in less than half the total wall-clock training time required for full-dataset fine-tuning.

Limitations and Future Work

  • Algorithm Sensitivity: No single RL algorithm consistently dominated across all tasks (CLIMB-Disc led on MetaHate and GooglePlay, whereas DQN and PPO performed best on ANLI and MMLU).
  • Extremely Small Budgets: At an aggressive 1/32 selection fraction, RL policies failed to consistently beat random sampling while adding search overhead.
  • Clustering Bottlenecks: Performance scales with the number of clusters $|C|$, but total runtime grows approximately quadratically in $|C|$, restricting experiments to relatively coarse clustering ($|C| = 64$ or $128$).
  • Lack of Error Bars: Results are reported without variance across random seeds, which is important for validating RL stability in production workflows.

Summary updated

BibTeX
@inproceedings{jha2025rl,
  author = {Animesh Jha and Ananjan Nandi and Harshit Gupta},
  title = {{RL-Guided Data Selection for Language Model Finetuning}},
  booktitle = {Reliable ML @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=YfMIkHYxP0},
}
Figure