Social Media & Messaging

Recommendation Algorithms Explained

Learn how recommendation systems guess what you will like, from similar users to embeddings, and where they tend to go wrong.

Key takeaways

  • Collaborative filtering recommends things liked by people whose behavior resembles yours.
  • Content-based methods recommend items that share features with things you already engaged with.
  • Large systems turn users and items into lists of numbers, called embeddings, so that closeness means likely interest.
  • New users and new items are hard to place, which is why apps ask for interests and test fresh content on small groups.
  • A system optimizes whatever it is told to measure, which may differ from what you would say you value.

A recommendation algorithm picks items you haven't asked for, such as a video, a product, a song or an account to follow, by predicting which ones you're likely to want. It learns those predictions from two main sources: what the items are like, and how people have behaved around them.

Once you understand a handful of methods, most "why am I seeing this?" moments make sense. You'll also see why these systems can be uncannily good in some cases and oddly stubborn in others.

The problem being solved

Imagine a table with one row for every user and one column for every item. Each cell records what that person did with that item: watched, bought, rated, skipped. On a large service the table is almost entirely empty, because no one can sample more than a tiny fraction of what exists.

The job of a recommender is to fill in the blanks well enough to choose a short list. It doesn't need to be right about every cell. It needs the items at the top of your list to be better than a random or merely popular choice.

The raw material is feedback. Explicit feedback is a rating, a thumbs up or a "not interested". Implicit feedback is inferred from actions: how long you watched, whether you finished, what you added to a cart. Implicit feedback is plentiful but ambiguous. You may have finished a video because you loved it, or because you left the room.

Collaborative filtering: people like you

Collaborative filtering ignores what an item is about. It looks only at patterns of behavior.

The user-based version finds people whose history overlaps with yours, then suggests items they liked that you haven't seen. The item-based version asks which items tend to be chosen by the same people, which is the logic behind "customers who bought this also bought".

Say you and another viewer have both watched the same five cooking channels. That viewer also watches a channel about knife sharpening. You've never searched for it, but the overlap makes it a reasonable guess. The system doesn't know what a knife is.

The strength is discovery across subjects. The weakness is that it needs behavior to work with, and it leans toward items that are already popular, since popular items overlap with everything.

Content-based filtering: things like this

Content-based methods describe each item with features and recommend items that resemble the ones you engaged with. Features might include category, creator, words in the title, tags, or characteristics a model extracts from audio, images and text.

This works for a brand new item the moment it is uploaded, because its features exist before anyone has watched it. It is also easier to explain: "because you watched woodworking videos". The drawback is narrowness. If the only signal is similarity to your past, you get more of the same.

Hybrids and the two-stage design

Real services combine methods. They also split the work in two, because scoring millions of items with a detailed model for every request would be far too slow.

A typical large recommender, top to bottom
Whole catalog Every video, product or post that could be shown Retrieval Fast methods pull a few hundred or thousand candidates Ranking A detailed model scores each candidate for you Rules and re-ranking Safety filters, variety, freshness, business limits Your screen A short list, plus logging of what you do next Whole catalog Every video, product or post that could be shown Retrieval Fast methods pull a few hundred or thousand candidates Ranking A detailed model scores each candidate for you Rules and re-ranking Safety filters, variety, freshness, business limits Your screen A short list, plus logging of what you do next

Retrieval often runs several sources side by side: items from creators you follow, items similar to your recent activity, items trending in your region. Ranking then compares them on equal terms. The same structure underlies ranked social feeds.

Embeddings: taste as coordinates

Modern systems represent each user and each item as an embedding, a list of numbers learned from data. You can think of it as a position on a map with many dimensions. Training nudges the positions so that users end up near the items they engage with, and items that attract the same people end up near each other.

Nobody labels the dimensions. One might loosely correspond to "slow, calm content" and another to "sports", but many have no tidy meaning.

With positions in hand, finding candidates becomes a search for nearby points, and there are fast approximate methods for doing that across very large collections. One popular arrangement, often called a two-tower model, uses one network to compute the user's position and another for the item's, so item positions can be prepared in advance. The same idea powers semantic search.

The loop that keeps learning

A recommender is never finished. What it shows you shapes what you do, and what you do becomes its training data.

The recommendation feedback loop
Retrain New data updates the model and your profile Observe Watches, skips, clicks and hides are logged Predict The model guesses what you will respond to Show Top guesses appear on your screen 1 2 3 4 Predict The model guesses what you will respond to 1 Show Top guesses appear on your screen 2 Observe Watches, skips, clicks and hides are logged 3 Retrain New data updates the model and your profile 4

Loops can narrow over time. If the system only shows cooking videos, it only collects evidence about cooking, and it never learns that you'd enjoy astronomy. To counter this, designers add exploration: a small share of deliberately uncertain picks. Those odd suggestions you see are often the system asking a question.

A second effect is popularity bias. Items shown more get more engagement, which gets them shown more. Without correction, early luck can decide what spreads, a theme that why things go viral picks up.

The cold start problem

What do you recommend to someone with no history, or what do you do with an item no one has seen? This is the cold start problem, and it shapes a lot of app design.

For new users, services ask you to pick interests, import contacts, or watch a few popular items while they measure your reactions. Location, language and device give a rough first guess. Short formats learn quickly because you produce many reactions per minute.

For new items, content features provide a starting point, and many platforms give fresh uploads a small trial audience. If that group responds well, distribution widens.

Shared devices create a related headache. When several people use one account, their tastes blend into a profile that fits nobody. Separate profiles fix most of it.

What is being optimized

Every recommender has an objective: a number it tries to increase. It might be clicks, minutes watched, purchases, subscription renewals or a blend that includes survey answers and penalties for reports.

The choice matters more than the math. Optimize clicks alone and misleading thumbnails win. Optimize watch time alone and long, drawn-out content does well. Companies layer on corrections, such as demoting items people abandon quickly or regret, but each correction is another judgment about what counts as good.

Objective Tends to reward Possible side effect
Clicks Bold titles and thumbnails Clickbait
Watch time Long or looping content Habit over satisfaction
Purchases Items with a history of selling Narrow, familiar choices
Survey satisfaction Content people endorse afterward Sparse, slower feedback

How teams judge whether it works

Before a new model reaches you, it is usually tested twice. Offline evaluation replays past behavior: given what someone did up to a certain day, does the model rank highly the things they chose afterward? It is cheap and fast, but it can only judge items people had a chance to see.

Online experiments show the new version to a portion of users and compare their behavior with a control group. These reveal real reactions, including effects that take weeks to appear, such as people tiring of a repetitive list and returning less often.

Good teams watch several measures together. Accuracy alone can be improved by recommending obvious things you would have found anyway. So they may also track variety, novelty, how much of the catalog gets any exposure, and complaint or hide rates.

Common failure modes

  • One purchase, endless reminders. You bought a washing machine and now see washing machines. The model learned association without understanding that you're done.
  • Gift and guest pollution. A child's cartoon session or a present for a relative skews your suggestions.
  • Manipulation. Fake accounts and coordinated activity try to make items look related or popular. Defenses exist, but it is a continuing contest.
  • Sensitive inferences. Behavior can hint at health, pregnancy, finances or other private matters. Many services restrict some of these categories, with mixed completeness.
  • Drift toward intensity. Critics argue that engagement-driven systems can push people toward more extreme material. Research results vary by platform, method and period, and the question is still argued.

Taking some control

You can usually do more than you think.

  1. Remove individual items from watch, listening or purchase history when they don't represent you.
  2. Use "not interested" and "don't recommend this channel" options.
  3. Pause history during shared or one-off sessions.
  4. Create separate profiles for each person in a household.
  5. Look for a non-personalized or chronological view.
  6. Search directly or follow sources on purpose, so your intent leads and the suggestions trail.

Resetting recommendations, where offered, starts the loop over. Expect a bland period while the system relearns.

Common questions

Do recommendation algorithms understand content?

Many now analyze text, images and sound, so they capture something about what an item contains. That is pattern matching at scale. It still misses irony, context and your reasons for watching.

Why do two friends with similar tastes see different things?

Their histories differ in details, they are in different experiments, and exploration picks are partly random. Small early differences can compound through the feedback loop.

Is a recommendation an endorsement?

No. It reflects a prediction about your behavior, sometimes influenced by paid placement. Sponsored items are usually labeled, so check for the label before treating a suggestion as organic.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Social Media & Messaging →

Latest news on this topic