Detecting Spammy Friend Requests on a Social Network
Scenario
You are designing an ML system to detect and reduce spammy friend requests on a social-network platform. The system should run near real time at the moment a request is sent and integrate with product surfaces (e.g., inbox ranking, rate limits, warnings).
Questions
-
Definition and Features: How would you define a "spammy" friend request and choose discriminative features?
-
Modeling: How would you build a classification model (data, validation, algorithms, metrics, deployment constraints)?
-
No Labels: If no labeled data exist, what strategies would you use to bootstrap training data and models?
-
Product Integration: After deployment, how can the model be leveraged to improve user experience?
-
Thresholding: How would you balance precision and recall and decide on the operating threshold?
Assume you can log request-level events (sender, recipient, time, device/IP, graph context) and respect privacy and fairness constraints. If needed, make minimal reasonable assumptions and call them out.