Hot AI News

Recommendation systems: How Instagram narrows billions of posts to your feed

A recommendation system picks a few items from billions for each person. Here is the funnel Meta and YouTube describe: retrieval, cheap ranking, heavy ranking, and rules.

Recommendation systems: How Instagram narrows billions of posts to your feed
Image: Meta

A recommendation system is software that chooses a short list of items for one person out of a catalog far too large to show. It does this by predicting what that person is likely to watch, like or skip, then sorting by those predictions. Instagram’s Explore page, YouTube’s home page and the channels on a TV app all rely on this idea.

Picking a few videos out of billions without checking every one

Imagine a librarian who must hand you five books in one second. The library holds a billion volumes. Reading every title against your tastes is impossible. So the librarian first grabs a few hundred plausible books from the shelves you usually visit. Then a quick assistant trims that pile. Finally an expert reads the survivors closely and picks five.

That is the standard design: a funnel. Early steps are cheap and rough. Later steps are expensive and precise, but only see a small pile. Meta’s engineers describe this shape for Instagram Explore, and Google researchers described a similar two-stage split for YouTube.

Our story on Instagram for TV reaching India mentions Reels grouped into channels by interest, popularity and followed accounts. Meta’s announcement does not say how those channels are ranked. The sources below describe Explore, not the TV app, so they show the general method, not the TV product itself.

Advertisements

Four stages that shrink the pile

A touchscreen shows four stages narrowing a dense collection of photo posts into three selected feed cards.
Photo illustration: Aiholics

In a 2023 post on the Meta engineering blog, Vladislav Vorotilov and Ilnur Shugaepov describe four stages for Explore.

  • Retrieval: several “sources” each pull hundreds of items from a pool of billions. Some sources are simple rules, such as trending posts. Others use machine learning, such as items similar to ones you liked, saved or shared.
  • First-stage ranking: a light model scores thousands of candidates quickly.
  • Second-stage ranking: a heavy model scores the best 100 candidates in detail.
  • Final reranking: rules adjust the list, for example filtering low-quality items or avoiding several posts from the same author in a row.

Meta’s transparency page for Explore, updated in June 2026, uses three stages (retrieval, early-stage ranking, late-stage ranking). It says retrieval fetches up to 1,500 items and the top 100 move on. The two sources count stages differently but describe the same funnel.

The two-tower model: Matching you and a video by number

The workhorse of the early stages is the two-tower model. Per Meta’s engineers, it is two separate neural networks, one for the user and one for the item. Each turns its inputs into an embedding, a list of numbers that acts like coordinates. Items whose coordinates sit close to yours are good candidates.

The design is fast because item coordinates can be computed ahead of time. Meta says item embeddings are generated daily offline and searched with approximate nearest neighbor methods (it names FAISS and HNSW as examples). Only the user side runs live.

The cost is that a two-tower model cannot look at features that combine one user with one item, since that would break the precomputing. Meta’s post notes this limit directly. That is why a heavier model follows.

Predicting clicks, likes and skips, then weighting them

The heavy model is a multi-task, multi-label network, meaning one model predicts many outcomes at once. Meta’s engineering post lists the probability of a click, a like and a “see less” action, among others. A value model then combines them as a weighted sum: positive actions add, negative ones subtract. Raising the weight on likes makes likes count for more in the final order.

The transparency page lists many more predictions. Examples include following the author, viewing a post for more than five seconds, watching more than 95% of a video, commenting, saving and tapping “Not Interested.” For reels it also names predicted watch time and watching less than three seconds, which counts as a negative signal.

These are Meta’s own descriptions. The sources do not say how the weights are set for each user or how they compare across surfaces.

Advertisements

Where the idea came from

Splitting the work into candidate generation and ranking is older than Instagram’s current system. Paul Covington, Jay Adams and Emre Sargin of Google presented “Deep Neural Networks for YouTube Recommendations” at the ACM Conference on Recommender Systems (RecSys) in 2016. Its abstract describes YouTube as one of the largest industrial recommendation systems and follows what it calls the classic two-stage information retrieval dichotomy: a deep candidate generation model, then a separate deep ranking model. We read the abstract only, so details beyond it are not covered here.

Meta’s transparency page also names older techniques inside retrieval, including item collaborative filtering (recommending items liked by people with similar histories) and personalized PageRank (a graph method that scores items by how closely they connect to you).

Trade-offs and what to watch

Several limits follow from the design.

  • Speed against accuracy. Every stage trades one for the other. Good items dropped early never reach the careful model.
  • Freshness. Meta says its models are fine-tuned every hour with continual online training, a response to tastes and trends that shift quickly.
  • Tuning is slow. Meta’s engineers say ranking has hundreds of tunable parameters and Bayesian optimization can take more than a month to converge.
  • What is optimized. A system built on predicted engagement rewards whatever people react to. Rules and integrity scores in the last stage exist to counter that, and their details are mostly not public.

On a shared TV screen, one signed-in profile may stand in for several viewers, which makes per-person predictions harder. The announcement does not say how Meta handles this. Readers can look for three things: whether Meta documents the TV app’s ranking separately, how teen accounts are treated on a shared profile, and what controls such as “Not Interested” do on the big screen.

Sign Up for the Daily AI Pulse

One email a day. All the stories that matter.

Daniel ReedAI Research, Safety & Ethics Analyst

Daniel Reed currently works as an AI Research, Safety & Ethics Analyst at Aiholics, writing about how changes in artificial intelligence are affecting and will affect scholarship,…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like