All posts
AI/ML Research

How VK Deployed a GNN Ranker on a 194M-User Graph

VK scaled GNN friend recommendation on 194M users and 28B edges. Multi-hash embeddings cut storage by >98%, temporal sampling reduced lookup cost. Online A/B: +16% accuracy, +11.5% more recommenders.

Aug 29, 2026 5분 읽기

Why this matters now

Small-scale graph recommenders are old hat, but deploying message-passing GNNs on billion-scale graphs with tens of billions of edges is still rare enough to notice. This work from VK shows how two design choices—multi-hash embeddings and temporal neighbor sampling—can keep a production GNN recommender within operational constraints. It’s a useful case study whether you’re evaluating GNN recommenders or wrestling with embedding table size and sampling complexity at scale.

What problem does it solve

Friend recommendation usually follows a generate-then-rank two-stage pipeline. This paper treats the ranker stage as a learning-to-rank problem and encodes user-friend interaction graphs with GNNs. The core signal is that user properties are not just node attributes but the social graph structure itself.

Yet real deployments impose hard constraints. First, memory. A graph with 280 million nodes and 28 billion edges means the base user ID embedding table alone exceeds 200 GB. Second, node-content features are sparse. Third, graphs are dynamic; graphs without temporal ordering force you to resample edges repeatedly.

Key methods

The first key idea is multi-hash ID embeddings. Conventional GNN frameworks either ignore trainable user IDs or require a full embedding table of size |V|×d. This work introduces a multi-hash layer that maps IDs to a smaller shared hash table B as the first input to node representation. Hash collisions are possible, but the table shrinks from over 200 GB to 22 GB—a >98% reduction—without hurting ranking quality.

The second key idea is temporal neighbor sampling. Naive implementations scan the entire adjacency list, causing high-degree hubs to be oversampled. The researchers use timestamp-sorted CSR storage with binary search, reducing sampling complexity from O(deg(v)+k) to O(log deg(v)+k). In actual training this cuts the overhead by about 2.5×.

The GNN backbone is GATv2, with separate recipient/candidate two-headed scoring. The model trains with impression-log-based binary classification and feeds GNN scores into a downstream gradient-boosted ranker. With online embedding retrieval and a CPU sampling/GPU training split, the entire 225 GB graph can be trained on a single 8-GPU host.

Results and implications

On a 194M-user, 28B-edge graph, offline ablations quantify each design’s contribution, and online A/B testing against a strong production baseline shows +16% recommendation accuracy and +11.5% unique recommenders. Code is public.

The takeaway is not about a specific model architecture but about what it takes to operate GNNs in industry. Embedding memory and sampling complexity are recurring themes beyond recommenders, and their engineering trade-offs deserve close attention.

Reference links

#Graph Neural Networks#Recommendation#Embeddings#GNN#Temporal Sampling
Robeedau

Curated, fact-checked, and edited by a single operator before publishing.