179 questions
No questions match those filters.
You need a real-time model to recommend new connections across a 500-million-user social graph, serving 50k requests per second. Why might reaching straight for a Graph Neural Network be the wrong first move?
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe pattern-match is obvious — it’s a graph, so use a Graph Neural Network — and that’s precisely what makes it a trap. GraphSAGE or GAT is the theoretically appropriate architecture for non-Euclidean, relational data, but “theoretically appropriate” and “shippable at 50k requests per second across 500 million users” are different questions. A GNN typically means neighbor sampling and aggregation at inference time, which multiplies latency and infrastructure cost well past what a real-time serving SLA can absorb. Optimizing for architectural correctness while ignoring system constraints is optimizing for the wrong variable.
The senior approach is a strict value hierarchy that only escalates complexity when a cheaper layer demonstrably fails. Start with a heuristic floor: hard-coded rules like “suggest a connection if two users share more than fifty mutual friends” cost almost nothing at inference time and typically cover the majority of easy cases. Next, build a tabular bridge — compute graph statistics (PageRank, node degree, Adamic-Adar index) as features and feed them into a gradient-boosted tree like XGBoost or LightGBM, which captures most of the remaining structure at a fraction of a GNN’s latency and operational cost.
Only after both layers stop delivering incremental value do you reach for the GNN, and even then it’s scoped to the smallest slice of traffic where the simpler models genuinely fail to capture the signal — something like the hardest 10-15% of cases rather than the whole population. The discipline is refusing to spend GPU budget and latency headroom on a problem a GROUP BY and a decision tree can already solve.