GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
ICML 2024

LESS: Selecting Influential Data for Targeted Instruction Tuning

Pick the 5% of a fine-tuning pool whose gradients point the same way as a few examples of the skill you want. It often beats training on everything, and the gradients come from a cheap LoRA warmup.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2024
AUTHORS
Xia, Malladi, Gururangan, Arora, Chen
FROM
Princeton University, University of Washington
PUBLISHED
Feb 2024 · ICML 2024
CITED BY
654Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 20% of this breakdown.

01

The paper in one minute

The setting is targeted instruction tuning: you have a big, mixed pool of instruction data (here about 270,000 examples from FLAN v2, CoT, Dolly and Open Assistant) and a handful of examples of the capability you want, and you want to pick the training subset that builds that capability.

LESS (Low-rank gradiEnt Similarity Search) uses a first-order idea from earlier influence work: if training on example z moves the model's weights in a direction that also lowers the loss on target example z′, then z helps. With SGD that is the dot product of the two gradients. LESS adapts it in three ways. It uses the Adam update direction for the training example, since instruction tuning uses Adam. It uses cosine instead of a dot product, because an example's gradient averages over its tokens and so shrinks for long examples, which made the dot product pick very short data. And it makes the computation cheap with LoRA gradients and a random projection to 8,192 dimensions.

The steps: warm up a LoRA model on a random 5% of the pool for 4 epochs; compute and store every example's projected gradient at each checkpoint; for each target subtask, average the target examples' gradients and score every candidate by cosine similarity, summed over checkpoints; keep the top 5% and train the target model on it.

The selected 5% beat a random 5% everywhere and beat the full pool in 5 of 9 cases across LLaMA-2-7B, LLaMA-2-13B and Mistral-7B. Data selected with LLaMA-2-7B worked for the other two models. Word-frequency, n-gram and hidden-state selectors did not beat random consistently.

THE IDEA, VISUALLY
LESS IN FOUR STEPS (FIGURE 1, TABLE 4) 1 warm up LoRA on a random 5% 4 epochs, checkpoint each 6 A100-h 2 gradient per example Adam-adjusted, LoRA only, ±1 projection to 8,192 48 A100-h 3 score against a few target examples cosine, best of the subtasks < 1 min 4 train on the top 5% LoRA or full fine-tuning, any model steps 1-2 run once per pool; the 17.7 GB datastore is reused for every new target task WHY COSINE, NOT DOT PRODUCT (TABLE 13) mean length MMLU TydiQA BBH random 105.4 46.5 52.7 38.9 dot product 11-20 47.3 52.3 37.4 cosine (LESS) 15-101 50.2 56.2 41.5 averaging over more tokens shrinks a gradient, so dot products favor short examples; cosine removes the length 5% RANDOM → 5% LESS, VS FULL DATA (TABLE 2) LLaMA-2-7B MMLU 46.5 → 50.2 | 51.6 LLaMA-2-7B TydiQA 52.7 → 56.2 | 54.0 LLaMA-2-7B BBH 38.9 → 41.5 | 43.2 LLaMA-2-13B MMLU 53.4 → 54.0 | 54.5 Mistral-7B MMLU 60.0 → 61.8 | 60.4 Mistral-7B TydiQA 56.9 → 60.3 | 57.7 Mistral-7B BBH 54.5 → 56.0 | 53.0 red tick = full pool; LESS beats it in 5 of 9 cells OTHER SELECTORS, LLAMA-2-7B (TABLE 3) random 46.0 BM25 (words) 46.7 DSIR (n-grams) 42.5 RDS (representations) 42.8 LESS 49.3 average of MMLU, TydiQA, BBH; axis starts at 38 THE BASE MODEL CAN WIN (TABLE 10) MMLU without any tuning: LLaMA-2-13B 55.3, Mistral-7B 62.4, above both full-data tuning and LESS on those models
LESS scores each candidate by how closely its training gradient points the way the target examples' gradient does, using cosine so long examples are not penalized. The scores come from a datastore built once and reused for any new target.
Research notes: the problem, approach and results
5 of 9

model-task cells where training on the LESS-selected 5% beat training on the full pool

54 A100-hours

one-time cost to warm up and compute gradients for about 270K examples; selecting for a new task takes under a minute

11-20 tokens

average length of examples picked with dot products instead of cosine, against 105 for random picks

THE PROBLEM

Teams have large mixed instruction datasets but want a model good at one skill. Training on everything can dilute or even hurt that skill, and picking data by keyword or embedding similarity finds examples that look like the target rather than ones that teach it.

THE IDEA

Estimate each training example's influence on a few target examples from gradients: warm up a LoRA model briefly, store each example's Adam-adjusted LoRA gradient projected to 8,192 dimensions, and pick the examples with the highest cosine similarity to the target's average gradient.

THE RESULT

On MMLU, TydiQA and BBH, the LESS-selected 5% beat a random 5% on every model and beat the full 270K-example pool in 5 of 9 model-task cells. Data chosen with a 7B model's gradients also worked for a 13B model and for Mistral-7B. Keyword, n-gram and embedding selectors did about as well as random or worse.

02

Why it matters to an FDE

Customers often arrive with a pile of data (old tickets, chat logs, generic instruction sets) and a short list of examples of what they want the model to do well. The usual moves are to fine-tune on everything or to filter by keyword or embedding similarity. This paper shows both can be worse than a principled selection, and gives a method that is affordable.

Less data can be better. Training on the selected 5% beat the full pool in 5 of 9 cells, because much of a generic pool is irrelevant or harmful for a specific skill. The authors also note that fine-tuning on this pool lowered MMLU below the untuned base model for LLaMA-2-13B and Mistral-7B, a reminder that fine-tuning can take capability away.

Similar-looking is not the same as useful. Selecting by words, n-grams or the model's hidden representations picked data on the same topic or in the same language, and scored about as well as random or worse. Gradients pick data that exercises the same reasoning.

The cost is front-loaded and reusable. About 54 A100 hours and 17.7 GB of storage for 270K examples, once. After that, each new target skill is a sub-minute query. A team serving several customers or skills from one data pool pays the cost once.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 149 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    What made selection work, what each choice was worth, transfer, and three misreadings

    Free account
  2. 04How it works

    The influence formula with Adam, the length problem, the datastore and the selection rule

    Premium
  3. 05The numbers that matter

    Main results with variance, baselines, costs, ablations and the transfer results

    Premium
  4. 06Try it yourself

    Check the paper's tables, then select data by gradients on a toy pool and watch the length bias

    Premium
  5. 07Where it breaks

    Up-front compute, fixed 5%, uneven gains, fragile transfer, loss versus accuracy and slips

    Premium
  6. 08Using it on a deployment

    Building a gradient datastore from a customer's data and selecting for each skill they care about

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →