← Latest papers
🤖 machine learning

HARP: Efficient Data Selection for Finetuning Large Language Models

The paper introduces HARP, a hierarchical active region pruning method that efficiently selects finetuning data for large language models by organizing the dataset into a node-leaf hierarchy and using empirical Bayes posteriors to infer utilities, thereby achieving superior downstream performance with significantly fewer training examples and reduced computational cost compared to existing train-based selectors.

Original authors: Ning Wang, Zhengxin Zhang, Maosen Tang, Yitang Gao, Claire Cardie, Sainyam Galhotra

Published 2026-06-09
📖 4 min read☕ Coffee break read

Original authors: Ning Wang, Zhengxin Zhang, Maosen Tang, Yitang Gao, Claire Cardie, Sainyam Galhotra

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a chef trying to create the perfect new recipe for a famous dish. You have a massive library of 100,000 old cookbooks (the training data). You want to teach your AI chef a new skill, like "baking perfect sourdough."

The problem? Most of those 100,000 books are full of:

  • Duplicates: The same recipe written ten different ways.
  • Noise: Pages that are torn, stained, or just nonsense.
  • Irrelevance: Recipes for making soup when you need bread.

If you try to read all 100,000 books to pick the best ones, it will take forever and cost a fortune. If you just pick books randomly, your chef might learn bad habits. If you pick books based on how similar they look (like checking if the cover art matches), you might pick a book that looks like bread but is actually about soup.

HARP is a new, smart system designed to solve this "data selection" problem. It helps you pick the best small subset of books to teach your chef, without having to read every single page first.

Here is how HARP works, broken down into simple steps:

1. The Library Map (Hierarchy)

Instead of looking at every single book individually, HARP organizes the library into a hierarchy.

  • Imagine grouping books into Shelves (Nodes).
  • Then, grouping specific sections of those shelves into Bins (Leaves).
  • Each "Bin" holds a chunk of similar recipes.

This means HARP doesn't have to test 100,000 individual books. It only needs to test a few representative "Bins."

2. The Taste Test (Representative Sampling)

Testing every Bin is still too expensive. So, HARP picks just one or two "Taste Testers" (representative leaves) from each Bin to actually try out.

  • It trains the AI chef on these few samples.
  • It sees how well the chef does on a specific test (like a "Sourdough Challenge").
  • The Magic Trick: Using a statistical method called Empirical Bayes, HARP can look at the results of the few "Taste Testers" and guess how the rest of the Bin would have performed. It's like tasting one cookie from a batch and confidently guessing the whole batch is good, without baking the rest.

3. The Two Selection Strategies (The Envelopes)

Once HARP knows which Bins are good, it has to decide which ones to actually put in the final training set. It offers two different "envelopes" (strategies) depending on the situation:

  • HARP-C (The Conservative Pruner):

    • The Metaphor: Imagine you are packing a suitcase for a trip. You have limited space. HARP-C says, "If two items do the exact same job, only pack the best one. Don't pack duplicates."
    • When to use it: This is great for messy, noisy data (like the "Self-Instruct" dataset in the paper). It avoids over-counting and ensures you don't waste space on redundant recipes.
  • HARP-E (The Expansive Collector):

    • The Metaphor: Imagine you are building a puzzle. HARP-E says, "Even if two pieces look similar, if they both add a little bit of color to the picture, pack them both!"
    • When to use it: This is great for clean, high-quality data (like the "WizardLM" dataset). It rewards having multiple pieces that complement each other, even if they are in the same category.

4. The Results: Smarter, Faster, Cheaper

The paper tested HARP on three different AI models and various datasets. Here is what they found:

  • Better Performance: HARP beat the strongest existing methods by a wide margin (up to 8.9 points higher accuracy).
  • Massive Savings: It achieved these top results using roughly 7 times fewer training examples than the standard "10,000 example" budget.
  • Efficiency: It used about 56 times fewer examples than training on the entire dataset.

The Bottom Line

HARP is like a super-efficient librarian who can look at a few samples from a massive collection, guess the quality of the rest, and pick the absolute perfect handful of books to teach an AI. It saves time, saves money, and produces a smarter AI chef than trying to read everything or guessing randomly.

Key Takeaway: You don't need more data to get better AI results; you just need the right data, and HARP is the tool that finds it efficiently.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →