T-SHIRT: Token-Selective Hierarchical Data Selection for Instruction Tuning

Yanjun Fu, Faisal Hamman, Sanghamitra Dutta · DOI

Abstract

Instruction tuning is essential for aligning Large Language Models (LLMs) with human intent, yet it traditionally requires massive datasets and significant compute. This paper introduces T-SHIRT (Token-Selective HIeRarchical Data Selection), a framework that demonstrates "less is more" in data selection. By focusing on informative tokens and ensuring quality robustness through neighborhood analysis, T-SHIRT enables models trained on just 5% of a dataset to outperform those trained on the full 100%. This approach significantly reduces compute requirements while achieving state-of-the-art performance across multiple benchmarks.

Introduction

The prevailing paradigm for instruction tuning involves fine-tuning pre-trained LLMs on millions of prompt-response pairs. However, recent findings suggest that the quality of these samples is far more critical than their quantity. Identifying "high-quality" data remains a challenge. Existing metrics, such as the Instruction-Following Difficulty (IFD) score, suffer from two primary limitations:

  1. Sample-level Myopia: They treat entire responses as monolithic units, failing to account for the fact that many tokens (e.g., "the", "is") offer little to no signal for instruction following.
  2. Brittleness: Scores are often sensitive to minor lexical changes, such as synonyms, suggesting they capture surface-level features rather than deep semantic difficulty.

T-SHIRT addresses these gaps by refining how token-level information is aggregated and by introducing a robustness check based on local embedding neighborhoods.

Methodology: The T-SHIRT Framework

The T-SHIRT framework operates through a multi-stage pipeline designed for both precision and efficiency.

Overview of the T-SHIRT data selection pipeline, from full dataset to hierarchical selection.

Selective IFD (S-IFD)

Rather than averaging the difficulty of every token in a response, T-SHIRT introduces Selective IFD (S-IFD). This metric identifies "informative" tokens—those where the instruction significantly aids the model in predicting the next word. By ranking tokens by their informativeness and calculating quality scores based only on the top $k\%$ (typically 50% or 75%), S-IFD filters out the noise of common, easy-to-predict tokens that otherwise dilute the quality signal.

Hierarchical Selection for Robustness

To combat the brittleness of traditional metrics, T-SHIRT employs a hierarchical selection process. It treats data selection as a robustness problem: a truly high-quality sample should maintain its quality even if its phrasing is slightly altered.

Conceptual illustration of hierarchical selection. Sample A is selected due to its high-quality neighborhood, while Sample B is rejected despite a high-quality outlier.

The process involves:

  • Perturbation: Adding small amounts of random noise to token embeddings to create "neighbors" of the original sample.
  • Consistency Check: Selecting samples that exhibit both high average quality across these neighbors and low variance. This ensures the model learns from stable, reliable "teachers" rather than samples that might be high-scoring due to mere lexical coincidence.

Experimental Setup

The researchers evaluated T-SHIRT using two major datasets: Alpaca-GPT-4 (52k pairs) and Magpie (300k pairs). Performance was measured across eight benchmarks, including the OpenLLM Leaderboard (MMLU, ARC, HellaSwag) and "LLM-as-a-Judge" evaluations like Arena-Hard and AlpacaEval 2.0. Notably, the scoring process used a lightweight GPT-2 model, making the entire selection pipeline highly efficient—processing 52k samples in just 40 minutes on a single GPU.

Key Results and Insights

  • Superior Efficiency: Models trained on a 5% subset selected by T-SHIRT outperformed full-dataset models by up to 5.48 points on average.
  • The 20% Rule: Analysis revealed that over 20% of tokens in common datasets are uninformative, confirming that selective token focus is necessary.
  • State-of-the-Art Performance: T-SHIRT consistently outperformed other leading selection methods like DEITA and DS² across different model families, including Llama-3.1 and Qwen-2.5.

Conclusion and Future Work

T-SHIRT proves that intelligent, token-level data selection can drastically improve the efficiency of instruction tuning. While currently focused on 7B to 14B parameter models, future work will explore scaling these strategies to larger models and integrating safety-aware selection filters. The core insight remains: consistency and informativeness are the true hallmarks of high-quality training data.

Summary updated

BibTeX
@inproceedings{fu2025t,
  author = {Yanjun Fu and Faisal Hamman and Sanghamitra Dutta},
  title = {{T-SHIRT: Token-Selective Hierarchical Data Selection for Instruction Tuning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=oN5YVZ9JeF},
}
Figure