Search⌘ K
AI Features

Social Feed Ranking: Data Strategy and Feature Engineering

Understand how to design a data strategy and engineer features for social feed ranking systems. Learn to leverage social graph structure, interaction history, and content metadata while balancing feature freshness and privacy constraints. Discover dual-pipeline architectures and privacy-preserving methods critical for building scalable and accurate ranking models.

Every ranking objective depends on the quality of the features used to optimize for it. The previous lesson covered the business metrics behind a social feed, such as engagement, meaningful connections, and creator equity. It also introduced the hybrid fan-out architecture, which balances write-time and read-time computation. Now the focus shifts from what we optimize for to which signals make that optimization possible. For social feeds, the social graph is one of the most information-rich data sources available to the ranking system. Unlike item catalog features in e-commerce, graph features capture relationship signals between people, making them highly predictive and sensitive from a privacy and fairness perspective.

Interviewers at L5 and above expect you to articulate which raw data sources map to which business objectives before jumping into feature lists. This lesson covers three data pillars: social graph structure, interaction history, and content metadata. It then architects a near-real-time feature pipeline for feed freshness, engineers cross features between poster and viewer, and addresses the privacy constraints that govern what graph traversals are permissible. The features designed here flow directly into the multi-task model architecture covered in the next lesson.

Social graph features and interaction history

The social graphA directed or undirected graph where nodes represent users and edges represent follow or friend relationships, forming the structural backbone of any social platform. yields features at multiple granularities. At the node level, you extract degree counts and follower-to-following ratios. At the edge level, you compute the mutual friends count and the time since connection. At the neighborhood level, you derive shared community membership and clustering coefficients that capture how tightly knit a user’s local network is.

Interaction history adds a temporal layer on top of this static topology. Likes, comments, reshares, DMs, profile visits, and story views between a viewer-poster pair are aggregated over sliding windows, typically 1 day, 7 days, and 28 days. This transforms a binary “connected or not connected” edge into a continuous relationship-strength signal. Facebook’s meaningful social interactions shift, for example, relied heavily on comment-thread depth and reply chains as stronger engagement indicators than passive likes.

Interaction history also detects decaying relationships. Two users may still be connected but no longer interact, and the ranking system should down-rank content from such posters. Storing per-edge interaction counters for billions of edges requires careful ...