Notes

Significance Weighting

Two users who have rated exactly two films in common can come out with a perfect similarity of 1.0. That number is arithmetically correct and practically worthless. Significance weighting is the correction that acknowledges it.

Shrinking a thin similarity
In neighbourhood collaborative filtering, the similarity between two users is computed over their co-rated items, so with very few overlaps the estimate carries enormous variance. Significance weighting multiplies the raw similarity by a shrinkage factor — the classic form is min(n, γ)/γ, where n is the number of co-rated items and γ a threshold of roughly 25 to 50. A pair with ample overlap keeps its similarity intact; a pair sharing two items keeps a small fraction of it.

What it fixes

  • Accidental twins stop dominating the top-k neighbourhood, so predictions rest on well-evidenced neighbours.
  • Error on sparse rating data drops measurably — the effect has been reported since the original GroupLens work on Pearson-correlation neighbourhoods.
  • It hardens the model against a shilling attack: an injected profile that co-rates only its target items earns little weight.

Where it sits
It applies at similarity-computation time, before neighbour selection, in user-user and item-item collaborative filtering alike; the Surprise library exposes it as a shrinkage or minimum-support parameter on its similarity options. Model-based factorization reaches the same end by a different route, through L2 regularization that pulls poorly-evidenced factors toward zero. The threshold γ is dataset-dependent: too low corrects nothing, too high discards genuine but sparse neighbours.

Significance weighting shrinks a computed user or item similarity toward zero when it rests on too few co-rated items, typically by scaling it by min(n, γ)/γ for a threshold γ of a few dozen. Without it, two users agreeing on two items score a perfect match and can dominate a neighbourhood. It makes memory-based collaborative filtering depend on well-evidenced neighbours, improves accuracy on sparse data, and blunts fake profiles that co-rate only a target.

If one person tells you a restaurant is wonderful, you take it with a pinch of salt. If fifty people say so, you believe them. Confidence should grow with evidence.

Recommendation software has to be taught that lesson explicitly. It decides whose taste resembles yours by comparing things you have both rated — and if the two of you happen to agree about two films, the arithmetic declares you a perfect match. Significance weighting is the fix. Agreement built on a handful of items gets discounted; agreement built on hundreds counts in full. It is a small adjustment that stops near-strangers from quietly deciding what you see next.