Chapter 02

Non-Personalized Recommendation

Before we know anything about you, what should we recommend? Whatever the crowd likes. Top-Popular, Best-Rated, shrinkage and Global Effects — the trivial-to-build baselines every personalized model must beat, and the bias terms that become the backbone of matrix factorization.

Reading: ~40 min Interactive: 3 widgets Source: Polimi Recommender Systems 2024/25 — Non-Personalized Recommendation · Aggarwal, Recommender Systems — The Textbook, §2

01 · Motivation

Why bother with non-personalized?

Because personalization needs history, and sometimes there is none.

Personalized algorithms read a user’s row of the URM to tailor recommendations. But that row is often empty: a brand-new user, a logged-out visitor, a freshly added item nobody has touched. This is the cold start problem, and a non-personalized list is the standard fallback. Three reasons these algorithms never go away:

  • Cold start — with no history, the crowd’s preference is the best available prior.
  • A strong baseline — “just recommend the popular items” is shockingly hard to beat. Any personalized model that loses to it is broken.
  • A building block — the bias terms we derive at the end (μ,bi,bu\mu, b_i, b_u) reappear inside matrix factorization (Ch. 8) as the model’s backbone.
why

Mental model

Personalization re-orders items per user. A non-personalized algorithm produces one ordering and hands the same list to everybody. Everything in this chapter is a different way to compute that single ordering of the columns of the URM.

02 · Count, not quality

Rank items by how many people interacted — the rating value is ignored.

Top-Popular is the simplest recommender that exists: count the non-zero entries in each column of the URM and rank items by that count. The crucial detail — the rating itself is not considered. A column of four 1-star ratings and a column of four 5-star ratings are equally popular.

!

Popular ≠ good

Because only the count matters, Top-Popular may recommend items with lots of negative ratings — it cannot tell a great film from a mediocre one rated equally often. In our toy catalog, Interstellar is tied for the most-rated item yet has nearly the lowest average; Top-Popular treats it as a top pick anyway.

Hands-on

Top-Popular vs Best-Rated

Both columns rank the same 8 movies. Left ranks by how many ratings; right by the average rating. The left bars are nearly equal — counting barely separates them. Click a movie to trace it across both lists.

▼ Top-Popular (count)
▼ Best-Rated (average)

Click a movie to compare its two ranks.

TakeawayCounting interactions and judging quality are different goals. The Martian has the fewest ratings (last by popularity) yet is the 4th best-liked film — the two lists disagree by design.
Formal Definition 2.1 — popularity

Popularity of item ii is the number of users who interacted with it — the count of non-zero entries in its URM column:

Top-Popular
pop(i)={uU:rui0}=ni.\operatorname{pop}(i) = \bigl\lvert \{\, u \in \mathcal{U} : r_{ui} \neq 0 \,\} \bigr\rvert = n_i.

The recommendation is argmaxipop(i)\arg\max_i \operatorname{pop}(i) over unseen items. ruir_{ui} enters only through rui0r_{ui} \neq 0 — its magnitude is discarded.

03 · Quality, with a catch

Best-Rated & the small-sample trap

Averages reward quality — but a single rating can fake it.

Best-Rated fixes Top-Popular’s blind spot by ranking on the average rating instead of the count: for item ii with nin_i ratings, avgi=1niurui\text{avg}_i = \frac{1}{n_i}\sum_u r_{ui}. Now quality matters — but a new problem appears.

!

One rating is not evidence

An item rated {5,4,3}\{5,4,3\} averages 4.04.0, while an item with a single 55 averages 5.05.0. Best-Rated ranks the one-rating item first — even though we have almost no evidence about it.

The fix is shrinkage: add a constant CC to the denominator. Items with few ratings get pulled toward zero; items with many ratings are barely affected because CC is small next to nin_i. With C=1C=1, the example becomes 12/4=3.012/4 = 3.0 vs 5/2=2.55/2 = 2.5 — the ordering flips back to the well-supported item.

Hands-on

Shrinkage explorer · sum / (n + C)

Best-Rated ranks by average — but a single 5★ shouldn't outrank a long track record. Adding C to the denominator pulls low-support items down. Inject a hyped cold item and drag C.

1.0
1LaLan=43.20
2TopGunn=43.00
3Nottingn=43.00
4MIn=42.80
5LoveActn=42.80
6Avengn=42.80
7Martiann=32.75
8Intern=42.40
TakeawayThe shrink term lives in the denominator — score = sum / (n + C). Items with many ratings (n ≫ C) barely move; one-rating items get discounted hard.
Formal Definition 2.2 — average & shrinkage

Let nin_i be the number of users who rated item ii. The plain and shrunk averages are

Best-Rated
avgi=uruini,avg^i=uruini+C.\text{avg}_i = \frac{\sum_u r_{ui}}{n_i}, \qquad\qquad \widehat{\text{avg}}_i = \frac{\sum_u r_{ui}}{n_i + C}.

Here ruir_{ui} ranges over non-zero ratings only, and C0C \ge 0 is the shrink term. As C0C \to 0 we recover the plain average; as CC grows, low-support items are penalized more heavily.

04 · The bias baseline

Global Effects

Peel off systematic biases — and discover the ranking was never personal.

Some users rate everything high; some items get rated high by everyone. Global Effects models these systematic offsets explicitly, in six steps — start from the global mean, estimate a shrunk item bias and a shrunk user bias, and add them back up:

  1. Global mean μ\mu = average of all non-zero ratings.
  2. Centre each rating: r~ui=ruiμ\tilde{r}_{ui} = r_{ui} - \mu.
  3. Item bias bi=ur~uini+Cb_i = \frac{\sum_u \tilde{r}_{ui}}{n_i + C} (how much item ii beats the mean).
  4. Centre again: r~~ui=r~uibi\tilde{\tilde{r}}_{ui} = \tilde{r}_{ui} - b_i.
  5. User bias bu=ir~~uinu+Cb_u = \frac{\sum_i \tilde{\tilde{r}}_{ui}}{n_u + C} (how generous user uu is).
  6. Predict: r^ui=μ+bi+bu\hat{r}_{ui} = \mu + b_i + b_u.
!

Personalized rating, non-personalized ranking

The prediction r^ui\hat{r}_{ui} contains a user term bub_u, so it looks personalized. But for a fixed user, μ\mu and bub_u are the same for every item — they shift all of that user’s scores by a constant and never change their order. The ranking is driven by bib_i alone, so every user gets the same list. It is the exam’s favourite trap.

Hands-on

Global-Effects stepper · μ + b_i + b_u

Add the terms one at a time and watch the order. The user term b_u shifts every score by a constant, so it can never reorder the items — every user gets the same list.

μ = 3.58b_u = +0.43
1TopGun3.58
2MI3.58
3Inter3.58
4Martian3.58
5Notting3.58
6LoveAct3.58
7Aveng3.58
8LaLa3.58

Every item scores μ — a flat tie, no ranking yet.

Takeawayr̂(u,i) = μ + b_i + b_u looks personalized, but μ + b_u is constant across items for a fixed user — the ranking depends on b_i alone. The exam's favourite trap.
Formal Definition 2.3 — Global Effects

With global mean μ\mu, item counts nin_i, user counts nun_u, and shrink term CC:

Global Effects
μ=1Ω(u,i)Ωrui,bi=u(ruiμ)ni+C,bu=i(ruiμbi)nu+C.\mu = \frac{1}{\lvert\Omega\rvert}\sum_{(u,i)\in\Omega} r_{ui}, \qquad b_i = \frac{\sum_u (r_{ui}-\mu)}{n_i + C}, \qquad b_u = \frac{\sum_i (r_{ui}-\mu-b_i)}{n_u + C}.

Since μ+bu\mu + b_u is constant across items for a fixed user, arg ⁣sortir^ui=arg ⁣sortibi\arg\!\operatorname{sort}_i \hat{r}_{ui} = \arg\!\operatorname{sort}_i b_i — independent of uu. That is the punchline.

05 · Exam intel

What the exam tests

Define each of the three algorithms; compute an average and a shrunk average by hand; and explain why Global Effects, despite the bub_u term, produces a non-personalized ranking. Graders want: Top-Popular ranks by count (the value is ignored); the shrink term in the denominator, never the numerator; and the ranking argument that μ+bu\mu + b_u shifts scores by a constant.

Q

Worked question — rank by Best-Rated, then by shrunk average (C = 1)

Item A has ratings {5,4,3}\{5, 4, 3\}; item B has a single rating {5}\{5\}.

  • Plain. avgA=12/3=4.0\text{avg}_A = 12/3 = 4.0, avgB=5/1=5.0\text{avg}_B = 5/1 = 5.0 → B ranks first (one rating wins).
  • Shrunk. avg^A=12/(3+1)=3.0\widehat{\text{avg}}_A = 12/(3{+}1) = 3.0, avg^B=5/(1+1)=2.5\widehat{\text{avg}}_B = 5/(1{+}1) = 2.5 → A ranks first. Shrinkage discounts B’s thin evidence and restores the sensible order.

Traps: calling Top-Popular an average (it is a count); putting CC in the numerator; calling Global Effects “personalized” because of bub_u (the ranking is not).

06 · Self-check

Three questions before you move on

Top-Popular ranks items by:

Why do we shrink the average with a term C in the denominator?

Global Effects predicts r̂(u,i) = μ + b_i + b_u. Why does every user get the same item ranking?

07 · Recap

One-screen summary

Chapter 02 — load-bearing ideas

  1. Top-Popular = count, Best-Rated = average. Popular and good are different goals, and the two rankings disagree.
  2. Shrinkage (÷(ni+C)\div (n_i + C)) protects the average from low-support items — a single rating is not evidence. The CC goes in the denominator.
  3. Global Effects gives r^ui=μ+bi+bu\hat{r}_{ui} = \mu + b_i + b_u, but the ranking is non-personalized: it depends on bib_i alone.
  4. These baselines are what CF (Ch. 5) must beat, and μ,bi,bu\mu, b_i, b_u become the bias terms of MF (Ch. 8).