Superfiltering: Weak-to-Strong Data Filtering for Fast Instruction-Tuning

Ming Li, Yong Zhang, Shwai He, Zhitao Li, Hongyu Zhao, Jianzong Wang, Ning Cheng, Tianyi Zhou

Abstract

Instruction tuning is critical for aligning Large Language Models (LLMs) with human intent, yet the process is often bottlenecked by the quality of training data. Traditional filtering methods are either computationally expensive or rely on proprietary models. We present "Superfiltering," a novel approach that leverages small, "weak" models (e.g., GPT-2 124M) to identify high-quality, difficult instruction-following samples for "strong" target models (e.g., LLaMA2-7B/13B). Our findings demonstrate that data difficulty rankings are remarkably consistent across model scales. By training on just 5% of a dataset selected via Superfiltering, models can outperform those trained on the full 100% dataset while achieving a 20x speedup in the filtering process.

Introduction

The performance of instruction-tuned LLMs depends heavily on the quality of the instruction-response pairs used during fine-tuning. Massive datasets often contain redundant or low-quality examples that consume unnecessary compute and can even degrade final model performance. Current data selection strategies typically involve using powerful proprietary models as judges or using the target student model itself to evaluate data—a process that is prohibitively slow for large-scale models.

Superfiltering addresses this by asking: Can a tiny model effectively curate data for a giant one? This "weak-to-strong" data filtering paradigm exploits the observation that models of varying sizes share a consistent perception of what constitutes a "difficult" or "informative" instruction.

Overview of Superfiltering pipeline and performance/time benefits.

Methodology: The Superfiltering Pipeline

The core metric used in Superfiltering is the Instruction-Following Difficulty (IFD) score. This score measures the relative difficulty of generating a response given an instruction versus generating the same response without the instruction. A high IFD score indicates that the instruction significantly influences the output, suggesting the sample provides a meaningful learning signal.

The Superfiltering process follows four steps:

  1. Scoring: A small, open-source model (e.g., GPT-2 124M) calculates IFD scores for every sample in a large dataset.
  2. Ranking: Samples are ranked based on their IFD scores.
  3. Selection: The top $k$% (typically 5-15%) of samples with the highest scores are selected.
  4. Fine-tuning: The target large model (e.g., LLaMA2-7B) is fine-tuned exclusively on this high-quality subset.

This approach is significantly more efficient than self-filtering. For instance, using GPT-2 as a filter is approximately 20 times faster than using LLaMA2-7B, and it can be executed on consumer-grade hardware with minimal VRAM.

Experimental Setup

The effectiveness of Superfiltering was evaluated across several prominent instruction-tuning datasets:

  • Alpaca: 52,000 instructions generated by GPT-3.
  • Alpaca-GPT4: 52,000 instructions with higher-quality GPT-4 responses.
  • WizardLM 70k: A dataset featuring complex, multi-step instructions.

Performance was measured using the HuggingFace Open LLM Leaderboard (ARC, HellaSwag, MMLU, TruthfulQA), AlpacaEval, and GPT-4 based pairwise comparisons.

Key Results and Analysis

The experimental results confirm that "less is more" when data is selected intelligently.

Performance Gains

As shown in the table below, LLaMA2-7B trained on just 5% (2,600 samples) of the Alpaca dataset selected by Superfiltering achieved a pairwise winning score of 1.133 against the baseline trained on the full 100% (52,000 samples). This trend holds across different datasets and base models, with Superfiltered models consistently matching or exceeding full-data performance.

Detailed performance metrics across various datasets and model sizes.

Rank Consistency

A pivotal finding is the high Spearman’s rank correlation (often > 0.8) between the IFD scores generated by tiny models and those from much larger models. This suggests that the "difficulty" of an instruction is a fundamental property that scales across model architectures.

Qualitative Insights

Analysis of the selected data reveals that Superfiltering prioritizes tasks requiring creativity and deep understanding (e.g., "write a story," "generate an essay") while filtering out simple rule-following tasks (e.g., "rewrite this sentence") that the model likely mastered during pre-training.

Conclusion

Superfiltering demonstrates that small models can act as highly effective "teachers" by identifying the most valuable data for larger models. This method provides a path toward more efficient LLM development, reducing both the time and cost of instruction tuning while simultaneously improving model quality. Future work will explore the limits of this weak-to-strong consistency in even larger model regimes and Mixture-of-Experts (MoE) architectures.

Summary updated

BibTeX
@inproceedings{li2024superfiltering,
  author = {Ming Li and Yong Zhang and Shwai He and Zhitao Li and Hongyu Zhao and Jianzong Wang and Ning Cheng and Tianyi Zhou},
  title = {{Superfiltering: Weak-to-Strong Data Filtering for Fast Instruction-Tuning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.769},
}
Figure