TRICKYwalkthrough
Feed Ranking Algorithm
With chronological feeds, users were missing 70% of posts from close friends because content volume overwhelmed time ordering. We replaced chronological with an ML-based ranking model (not a hand-tuned heuristic) because hand-tuned weights cannot capture the interaction between hundreds of features.
Why not a simpler approach like boosting close friends? Because "closeness" varies per user and per context.
“The model scores every candidate photo using 6 signals: interest (ML prediction of engagement likelihood), recency (exponential decay penalizing older posts), relationship (interaction frequency between viewer and poster), frequency (how often the user opens the app), following count (more followees means more aggressive filtering), and session time.”
An ML model learns these patterns from billions of implicit signals. The model runs on dedicated scoring servers that evaluate candidates in under 50ms.
Why separate scoring servers? Because ML inference is GPU-heavy, and mixing it with feed assembly on the same nodes would starve both workloads.
Trade-off: we lose chronological transparency. Users cannot predict feed order, which created public backlash in 2016.
A/B testing showed ranked feeds increased engagement by 40% and reduced missed posts from close friends, justifying the trade-off. The scoring is photo-centric: image features like detected objects, colors, and aesthetic quality factor into the interest signal, a ranking dimension that text-based feeds do not have.
Related concepts