MySpace PYMK: Engineering a Recommendation Engine for 12 Billion Social Edges
PYMK: friend recommendation at myspace
This paper presents "People You May Know" (PYMK), the large-scale friend recommendation system developed for MySpace. It details a scalable, modular pipeline that processes a social graph of 140 million nodes and 12 billion edges using sampled 2-level graph traversals to provide personalized suggestions.
TL;DR
At the height of its social dominance, MySpace faced a daunting engineering task: how to suggest relevant friends to 260 million users in a graph containing 12 billion edges. This industry paper introduces the People You May Know (PYMK) pipeline—a scalable, asynchronous system that utilizes sampled graph traversals to achieve linear complexity, ensuring fresh recommendations even for users at the "long tail" of the social distribution.
The Scale Problem: 12 Billion Edges and the "Cold Start"
In 2010, the MySpace social graph was one of the largest datasets in existence. The engineering team identified three primary bottlenecks:
- Massive Graph Size: 140 million active nodes and 12 billion friend connections.
- Churn and Updates: Over 200 million daily relationship updates required a system that could update its state almost hourly.
- The Coverage Gap: Users with the fewest friends—the ones who need recommendations the most—are the hardest to serve because they lack the structural "anchors" needed for traditional collaborative filtering.
Figure 1: The distribution shows that 22% of users had 2 or fewer friends, highlighting the severity of the Cold Start problem.
Methodology: Linear Complexity through Sampling
The core of PYMK is a 2-level deep random traversal. In a naive implementation, traversing the "friend of a friend" (FoF) network for every user would be computationally explosive.
The MySpace team bypassed this by introducing probabilistic sampling. For users with a high friend count, the system only traverses a sample size . By treating as a constant determined by the desired probability of finding a connection, the complexity is reduced to .
The Recommendation Pipeline
The architecture was designed to be modular and resilient:
- Friend Graph Manager: Partitioned across machines based on User-ID ranges to handle high-write throughput.
- Recommendation Generator: Uses the sampling logic to identify candidate friends.
- Repository Manager: Handles the "fading" and deletion of rejected or obsolete suggestions.
Beyond the Graph: Improving Quality and Coverage
The authors found that pure graph connectivity wasn't enough. To improve the Conversion Ratio (the rate at which a recommendation turns into a friend request), they introduced several biases:
- Structural Biasing: Prioritizing candidates who belong to "highly interconnected" clusters. If your friends A and B are also friends with your suggested contact C, the likelihood of a real-life connection is much higher.
- Attribute Matching: For users with zero friends (the absolute Cold Start), the system pivots to metadata. Recommending people from the same school, company, or with overlapping music interests (bands/videos) served as a vital bridge to bring new users into the social graph.
Table 1: The data confirms a direct correlation between friend count and user retention/logins.
Critical Insight: The Value of the Long Tail
One of the most profound takeaways from the MySpace implementation is the focus on the Long Tail. While most recommendation systems optimize for the "average" user, MySpace realized that the survival of the platform depended on the users with 0-10 friends. By implementing deeper traversals (3 or 4 levels) specifically for low-degree nodes—where the computational cost is low—they maximized coverage where it mattered most for growth.
Conclusion and Future Outlook
The MySpace PYMK system proved that simplified, sampled graph traversals could outperform complex models if they are engineered for extreme scale and low latency. Looking forward, the authors anticipated the need for Diversification—preventing users from being "pigeon-holed" into seeing only co-workers or only high-school friends—a challenge that remains central to modern recommendation engines like those at LinkedIn and Facebook today.
