Skip to content
AI360XpertBeta

The Cold Start Problem

A recommender that learns only from past clicks has nothing to say about a brand-new user or item, so it falls back to popularity lists until clicks arrive.

A new user row and a new item column sit empty beside a warm core, so similarity math has nothing to average
A new user row and a new item column sit empty beside a warm core, so similarity math has nothing to average

Why Does This Exist?

Picture a new film that lands on a streaming home page with zero views. Collaborative filtering only knows what to do when it can compare overlapping watch histories, so with no overlap it stays quiet. No views means no recommendation, and no recommendation means no views.

You'll see this as an empty row or an empty column. Think of a table RR with one row per user and one column per item, where entry ru,ir_{u,i} means the stars user uu gave item ii. Most cells stay blank, and the method learns only from the filled ones. Matrix factorization makes this explicit by fitting small user and item vectors to those filled cells.

This page names the two cold edges, works the math on a 4-by-5 table, and shows the standard fallback. For the behavior method itself, read collaborative filtering. For the factor math, read matrix factorization. For the retrieval fix that leans on side details, read two-tower retrieval.

Think of It Like This

The new student with no library slips

You join a school where the librarian recommends only from borrowing slips. Ana's slips show she loves space operas, and Ben's slips match hers almost exactly, so the librarian hands Ben what Ana loved. Then you walk in with no slips at all, and a brand-new book arrives with no slips either. The librarian can only point you both at the bestseller shelf until slips pile up.

Ana, Ben, and you are users, books are items, slips are ratings, and the bestseller shelf is the popularity fallback. Matching overlapping slips is similarity.

Where it stops: a real librarian chats with you and learns you love maps in two minutes. The algorithm can't chat. Unless you hand it side details like genre or an onboarding pick, it stays on bestsellers longer than any human would.

How It Actually Works

Call the ratings table RR, with mm rows for users and nn columns for items. Entry ru,ir_{u,i} means the stars user uu gave item ii, and Ω\Omega means the set of cells you actually observed. User-based prediction for a missing cell starts from your own mean and mixes in neighbors who rated that item:

r^u,i=rˉu+∑vsim(u,v)(rv,i−rˉv)∑v∣sim(u,v)∣\hat{r}_{u,i} = \bar{r}_u + \frac{\sum_{v} sim(u,v)(r_{v,i} - \bar{r}_v)}{\sum_{v} |sim(u,v)|}

Here rˉu\bar{r}_u means the mean rating of user uu, sim(u,v)sim(u,v) means cosine similarity between uu and vv over items both rated, and the sum runs over neighbors vv who rated item ii. The factor view writes the same table as R≈UVTR \approx U V^T, where UU means the mm-by-kk user factors, VV means the nn-by-kk item factors, and kk means a small count of hidden tastes. Both forms fit only on Ω\Omega.

The table and its two cold edges

Our fixture is 4 users by 5 movies. Ana rates M1 5, M2 4, M4 1. Ben rates M1 5, M3 4, M4 1. Cara rates M1 1, M2 1, M4 5. Dan is new and rates nothing. M5 is new and holds no ratings from anyone. The warm core is the 3-by-4 block in the corner. Dan is the empty row. M5 is the empty column. The diagram draws this exact grid.

Why warm math works and cold math goes quiet

Warm pairs share cells, so similarity has something to divide. Cold pairs share none, so the neighbor sum is empty and the denominator is zero. In factor terms, Dan holds no row in Ω\Omega, so his vector never moves from its start, and M5 never updates either. The model still returns a number if you ask, but that number reflects the start, not taste. That is why production code must branch before it scores.

Worked example: one warm cosine and one empty row

Ana and Ben overlap on M1 and M4 as [5,1][5, 1] and [5,1][5, 1]:

a⋅b=5×5+1×1=26a \cdot b = 5 \times 5 + 1 \times 1 = 26 ∣a∣=∣b∣=25+1=26≈5.10|a| = |b| = \sqrt{25 + 1} = \sqrt{26} \approx 5.10 cos⁡=26/26=1.00\cos = 26 / 26 = 1.00

Ana and Cara overlap on M1, M2, and M4 as [5,4,1][5, 4, 1] and [1,1,5][1, 1, 5]:

dot=5×1+4×1+1×5=5+4+5=14dot = 5 \times 1 + 4 \times 1 + 1 \times 5 = 5 + 4 + 5 = 14 ∣A∣=25+16+1=42≈6.48,∣C∣=1+1+25=27≈5.20|A| = \sqrt{25 + 16 + 1} = \sqrt{42} \approx 6.48, \quad |C| = \sqrt{1 + 1 + 25} = \sqrt{27} \approx 5.20 product≈6.48×5.20≈33.67,cos⁡≈14/33.67≈0.42product \approx 6.48 \times 5.20 \approx 33.67, \quad \cos \approx 14 / 33.67 \approx 0.42

Dan overlaps with no one on any movie, so both sums stay empty and the formula asks for zero divided by zero. There is no score to compute. Popularity fills the gap by counting ratings: M1 holds 3, M4 holds 3, M2 holds 2, M3 holds 1, M5 holds 0, so the fallback order starts M1, M4, M2. Means agree: M1 averages (5+5+1)/3=11/3≈3.67(5 + 5 + 1) / 3 = 11 / 3 \approx 3.67 and M4 averages (1+1+5)/3=7/3≈2.33(1 + 1 + 5) / 3 = 7 / 3 \approx 2.33.

The trade is clear. Popularity and onboarding picks work on day one but feel generic, while behavior math feels personal but needs history. Don't trust pure behavior when most traffic is new or the catalog turns over fast. The method assumes past overlap predicts future taste, and that assumption fails for new rows, new columns, and shifting tastes.

Code

The point is the check: recompute the two warm cosines and confirm the cold row routes to fallback.

from math import sqrt
def cosine(a: list[float], b: list[float]) -> float:    dot: float = sum(x * y for x, y in zip(a, b))    norm: float = sqrt(sum(x * x for x in a) * sum(y * y for y in b))    return dot / norm
def fallback_for(user: list[float | None], popular: list[str]) -> list[str]:    if all(r is None for r in user):        return popular    return ["personalized"]
ana_ben: float = cosine([5.0, 1.0], [5.0, 1.0])ana_cara: float = cosine([5.0, 4.0, 1.0], [1.0, 1.0, 5.0])print(f"{ana_ben:.2f} {ana_cara:.2f}")  # -> 1.00 0.42print(fallback_for([None, None, None, None], ["M1", "M4", "M2"]))  # -> ['M1', 'M4', 'M2']

The printout matches the hand computation: 1.00 for the identical pair, 0.42 for the partial match, and the empty row returns the popularity list.

Watch Out For

Treating a cold factor score as a real preference

A new user with no entries still gets a number if you score them, because their factor row sits at its random start. Symptom: new movies with zero views show confident highs, yet offline checks look fine because cold rows were left out of the split. Fix: count overlaps first. When the count is zero, skip the model and return the popularity list, and track how often the cold path fires in recommendation evaluation.

Letting popularity hide new items forever

When every slot goes to past winners, new items never collect the clicks that would warm them. Symptom: the same titles top the list for weeks and the new catalog share of impressions sits near zero. Fix: hold a small fixed slice of slots for new items, spread impressions across them, and watch their click share climb before you promote winners.

The Quick Version

  • Cold start means a user row or an item column in RR holds zero observed entries, so neighbor sums stay empty and factor rows never fit.
  • In our 4-by-5 table Ana and Ben score cosine 1.00 over [5,1][5, 1] and [5,1][5, 1], Ana and Cara score 0.42, and Dan scores nothing because his row is empty.
  • New rows and columns get popularity lists or onboarding picks until clicks arrive, because behavior math cannot invent a preference.
  • A factor score for a zero-history row reflects its start, not taste, so gate it and route cold cases to the fallback.
  • When new items never win impressions, they never warm up, so reserve a small fixed slice of slots for them and track their share.