D3: Diversity, Difficulty, and Dependability-Aware Data Selection for Sample-Efficient LLM Instruction Tuning

Jia Zhang, Chen-Xi Zhang, Yao Liu, Yi-Xuan Jin, Xiao-Wen Yang, Bo Zheng, Yi Liu, Lan-Zhe Guo

Introduction

Instruction tuning—fine-tuning a pre-trained LLM on (instruction, response) pairs—is the standard way to make models helpful. However, massive datasets like Alpaca are often riddled with redundancy, low-quality responses, and varying levels of difficulty. Existing data selection methods usually suffer from one-dimensional metrics (like looking only at perplexity) and heuristic thresholds that prevent a dynamic balance between quality and variety.

The D3 Framework

The authors propose D3, a two-step iterative method consisting of Scoring and Selection. This framework demonstrates that "less is more": by selecting a tiny, high-quality subset (often just 5-10%) of a large dataset, models can actually outperform those trained on the full data.

The D3 framework overview, illustrating the iterative cycle of Warm-up, Scoring (Diversity, Difficulty, Dependability), and Selection of a weighted coreset.

1. The Scoring Step

D3 evaluates every sample in the pool across three dimensions:

  • Diversity ($d_1$): Uses sample embeddings to ensure the selected "coreset" represents the entire data distribution, avoiding clusters of near-identical instructions.
  • Difficulty ($d_2$): The paper introduces Uncertainty-based Prediction Difficulty (UPD). Instead of raw loss, UPD uses Shannon entropy to identify tokens where the model is uncertain because of poor instruction following versus tokens where uncertainty is just due to natural linguistic variation.
  • Dependability ($d_3$): Uses a "teacher" LLM (like GPT-4) to provide a soft score on whether the instruction and response are actually correct, fluent, and reliable.

2. The Selection Step

Rather than using hard filters, D3 formulates a weighted coreset objective. It treats selection as a combinatorial optimization problem, greedily picking samples that maximize the product of all three scores. This process can run in multiple rounds, allowing the selection to adapt to what the model hasn't learned yet.

Avoiding the "CoGD" Trap

A core innovation of D3 is addressing Context-oriented Generation Diversity (CoGD). In open-ended text generation, one prompt can have many valid answers. Standard "difficulty" scores often penalize a model for being uncertain in these cases, leading the model to overfit to specific, arbitrary phrasings.

Comparison of prediction difficulty. UPD identifies samples where difficulty arises from poor instruction following (left) versus natural linguistic diversity (right), preventing the model from overfitting to arbitrary phrasings.

By ignoring this "noise," the model focuses its learning capacity on actual logic and instruction following. This prevents the model from being "confused" by prompts that naturally have 100 right answers.

Key Results and Insights

  • 5% > 100%: On the Alpaca dataset, training on a 5% subset selected by D3 achieved an AlpacaEval score of 42.01, compared to only 28.00 for the model trained on the full 100% dataset.
  • The "U-Shaped" Curve: Performance often drops as the budget increases beyond 10-15% because the model starts absorbing the noise and redundancy inherent in large, uncurated datasets.
  • Real-world Application: In testing on a proprietary dataset from Taobao Live, D3-selected data led to higher satisfaction and fluency scores in generated sales pitches compared to full-dataset training.

Limitations

Scoring every sample using a teacher LLM and calculating token-wise entropy can be computationally expensive. However, the authors argue this is offset by the massive savings in actual training time and the significantly higher quality of the resulting model.

Summary updated

Abstract

Recent advancements in instruction tuning for large language models (LLMs) suggest that a small, high-quality dataset can significantly equip LLMs with instruction-following capabilities, outperforming large datasets often burdened by quality and redundancy issues. However, the challenge lies in automatically identifying valuable subsets from large datasets to boost both the effectiveness and efficiency of instruction tuning. In this paper, we first establish data selection criteria based on three distinct aspects of data value: diversity, difficulty, and dependability, and then propose the D3 method comprising two key steps of scoring and selection. Specifically, in the scoring step, we define the diversity function to measure sample distinctiveness and introduce the uncertainty-based prediction difficulty to evaluate sample difficulty by mitigating the interference of context-oriented generation diversity. Additionally, we integrate an external LLM for dependability assessment. In the selection step, we formulate the D3 weighted coreset objective, which jointly optimizes three aspects of data value to solve for the most valuable subset. The two steps of D3 can iterate multiple rounds, incorporating feedback to refine the selection focus adaptively. Experiments on both public datasets and the real-world Taobao Live application demonstrate the effectiveness of D3 in endowing LLMs with competitive or even superior instruction-following capabilities using less than 10\% of the entire dataset.
BibTeX
@inproceedings{zhang2025d,
  author = {Jia Zhang and Chen-Xi Zhang and Yao Liu and Yi-Xuan Jin and Xiao-Wen Yang and Bo Zheng and Yi Liu and Lan-Zhe Guo},
  title = {{D3: Diversity, Difficulty, and Dependability-Aware Data Selection for Sample-Efficient LLM Instruction Tuning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.24963/ijcai.2025/928},
}
Figure