Table of Contents
Fetching ...

From Tags to Trees: Structuring Fine-Grained Knowledge for Controllable Data Selection in LLM Instruction Tuning

Zihan Niu, Wenping Hu, Junmin Chen, Xiyue Wang, Tong Xu, Ruiming Tang

TL;DR

TAGS presents a Tree-aware Aligned Global Sampling framework that integrates fine-grained knowledge tags into a hierarchical knowledge tree to enable controllable data selection for instruction tuning. It combines an Act-Critic-based tagger, bottom-up hierarchical clustering, and a tree-aware information propagation model to quantify data quality and diversity. Sampling strategies maximize global information gain and optionally align data distribution to target domains via KL-divergence, achieving state-of-the-art results with significantly smaller data budgets. The approach demonstrates strong data efficiency and domain adaptability across multiple model sizes and benchmarks, highlighting the practical impact for scalable, high-quality instruction tuning.

Abstract

Effective and controllable data selection is critical for LLM instruction tuning, especially with massive open-source datasets. Existing approaches primarily rely on instance-level quality scores, or diversity metrics based on embedding clusters or semantic tags. However, constrained by the flatness of embedding spaces or the coarseness of tags, these approaches overlook fine-grained knowledge and its intrinsic hierarchical dependencies, consequently hindering precise data valuation and knowledge-aligned sampling. To address this challenge, we propose Tree-aware Aligned Global Sampling (TAGS), a unified framework that leverages a knowledge tree built from fine-grained tags, thereby enabling joint control of global quality, diversity, and target alignment. Using an LLM-based tagger, we extract atomic knowledge concepts, which are organized into a global tree through bottom-up hierarchical clustering. By grounding data instances onto this tree, a tree-aware metric then quantifies data quality and diversity, facilitating effective sampling. Our controllable sampling strategy maximizes tree-level information gain and enforces leaf-level alignment via KL-divergence for specific domains. Extensive experiments demonstrate that TAGS significantly outperforms state-of-the-art baselines. Notably, it surpasses the full-dataset model by \textbf{+5.84\%} using only \textbf{5\%} of the data, while our aligned sampling strategy further boosts average performance by \textbf{+4.24\%}.

From Tags to Trees: Structuring Fine-Grained Knowledge for Controllable Data Selection in LLM Instruction Tuning

TL;DR

TAGS presents a Tree-aware Aligned Global Sampling framework that integrates fine-grained knowledge tags into a hierarchical knowledge tree to enable controllable data selection for instruction tuning. It combines an Act-Critic-based tagger, bottom-up hierarchical clustering, and a tree-aware information propagation model to quantify data quality and diversity. Sampling strategies maximize global information gain and optionally align data distribution to target domains via KL-divergence, achieving state-of-the-art results with significantly smaller data budgets. The approach demonstrates strong data efficiency and domain adaptability across multiple model sizes and benchmarks, highlighting the practical impact for scalable, high-quality instruction tuning.

Abstract

Effective and controllable data selection is critical for LLM instruction tuning, especially with massive open-source datasets. Existing approaches primarily rely on instance-level quality scores, or diversity metrics based on embedding clusters or semantic tags. However, constrained by the flatness of embedding spaces or the coarseness of tags, these approaches overlook fine-grained knowledge and its intrinsic hierarchical dependencies, consequently hindering precise data valuation and knowledge-aligned sampling. To address this challenge, we propose Tree-aware Aligned Global Sampling (TAGS), a unified framework that leverages a knowledge tree built from fine-grained tags, thereby enabling joint control of global quality, diversity, and target alignment. Using an LLM-based tagger, we extract atomic knowledge concepts, which are organized into a global tree through bottom-up hierarchical clustering. By grounding data instances onto this tree, a tree-aware metric then quantifies data quality and diversity, facilitating effective sampling. Our controllable sampling strategy maximizes tree-level information gain and enforces leaf-level alignment via KL-divergence for specific domains. Extensive experiments demonstrate that TAGS significantly outperforms state-of-the-art baselines. Notably, it surpasses the full-dataset model by \textbf{+5.84\%} using only \textbf{5\%} of the data, while our aligned sampling strategy further boosts average performance by \textbf{+4.24\%}.
Paper Structure (26 sections, 10 equations, 5 figures, 18 tables, 1 algorithm)

This paper contains 26 sections, 10 equations, 5 figures, 18 tables, 1 algorithm.

Figures (5)

  • Figure 1: Performance comparison of Qwen3-8B fine-tuned on Tulu3. TAGS consistently outperforms other data selection strategies.
  • Figure 2: Overview of the TAGS framework: (1) Uniform Sampling from diverse data sources; (2) Tagger Training, which employs an LLM-based Act-Critic loop to synthesize fine-grained tags and fine-tune a General Tagger; (3) Hierarchical Clustering structures the generated tag pool into a global Tag Tree; and (4) Data Sampling maps instances to tree nodes and executes controllable selection based on Information Gain and KL-divergence.
  • Figure 3: Comparison of #InsTag and TAGS tagger.
  • Figure 4: The TaggerEval and TreeEval Frameworks.
  • Figure 5: Ablation studies on training data size, hyperparameter $\alpha$ of complicated score $s$, and $\gamma$ value of $\Phi(x)$.