What is a hard negative?

Definition

Easy mismatches teach little because a model can reject them without learning subtle distinctions. A hard negative is close enough to a correct result that the model must notice an important difference.

In retrieval training, hard negatives can sharpen ranking, but they must truly be unsuitable for the query. If a supposedly negative item is actually useful, teaching the model to reject it may harm results.

ELI5

A hard negative is a convincing wrong answer used for practice. It is harder to spot than an obviously unrelated answer, which makes it useful for careful comparison.

For example, a search for puppy food might return adult dog food. It is much closer than a bicycle, but it still misses the shopper's specific need.

Why not train only with obviously wrong results?

Obvious mismatches are easy for a model to separate. Similar but wrong examples help it learn finer distinctions.

Can a hard negative be labeled incorrectly?

Yes. An item that seems wrong in one context may be useful in another, so training labels and examples need careful review.

  1. Raghav Saboo in a blue shirt beside the headline “DISTILL THE LLM” on a black background.
Definition card for hard negative: What is a hard negative?

A hard negative is a training example that looks relevant to an AI model but is actually the wrong match for the task.