Skip to content
Preprint

Scaling Graph Neural Networks for Friend Recommendation: Multi-Hash User Embeddings and Temporal Neighbor Sampling

Aug 2026 · 0 citations · 28 references
Computer Science

TL;DR

This work presents a scalable end-to-end GNN ranking system for production social graphs, focusing on two design choices that are critical in this setting: multi-hash ID embeddings and temporal neighbor sampling.

Abstract

Friend recommendation is inherently graph-structured: the relevance of a potential connection depends on multi-hop social context rather than user attributes alone. However, deploying message-passing GNNs on a production-scale social graph with hundreds of millions of users and tens of billions of edges requires addressing numerous modeling and systems challenges. We present a scalable end-to-end GNN ranking system for production social graphs, focusing on two design choices that are critical in this setting: multi-hash ID embeddings and temporal neighbor sampling. Multi-hash embeddings are common for high-cardinality features, but industrial GNN systems typically either ignore trainable IDs or accept full embedding tables, exceeding 200 GB for our graph. We integrate multi-hash as the primary node representation, reducing the ID-embedding table size by more than 98 percent while preserving ranking quality. Temporal neighbor sampling is well understood in principle, but existing implementations scan full adjacency lists, which is a non-starter for users with tens of thousands of friends. We implement timestamp-sorted CSR storage with binary search, reducing the per-node temporal sampling cost from $O(deg(v) + k)$ to $O(\log(deg(v)) + k)$. Beyond these components, we show that this combination scales and yields measurable production impact. On a graph with 194M users and 28B edges, offline ablations isolate each design choice's contribution. In an online A/B test, our system increases friend additions from recommendations by 16 percent and unique friend adders by 11.5 percent over a strong production baseline. We release our framework for distributed training and inference on large temporal graphs.

View source

Similar papers

Book Open access Aug 2026

Embedding-Space Orthogonal Decomposition for Robust Social Recommendation

Orthogonal Decomposition for Social Recommendation (ODSR) is proposed, an embedding-space framework that orthogonally decomposes the aggregated social message into an aligned component and an orthogonal deviation, and learns a dimension-wise vector gate to regulate the deviation under ranking supervision.

Rongfeng Guo, Yinxuan Huang, Wei Chen et al. · 0 citations
#graph neural networks Open access Sep 2026

Beyond Model Complexity: A Reproducible Comparison of Classical Machine Learning, Matrix Factorization, Graph Embeddings, and LightGCN for Recommendation

Findings show that under the evaluated setting, greater model complexity did not consistently translate into higher recommendation effectiveness, and they thus highlight the importance of strong baselines, model tuning, standardized evaluation, and reproducible experimental protocols.

R. Bojorque, David Yánez-Peter, Miguel Arcos-Argudo · 0 citations
Aug 2026

Graph-based social recommendation with redundant information suppression

A social relationship adjustment loss function, which dynamically adjusts the weights of social connections, and the Hilbert-Schmidt independence criterion loss function, which reduces the dependence between pre- and post-adjusted user/item embeddings, thereby amplifying the effect of adjusted social relationships on t...

Shu-Run Zuo, Heng-Ru Zhang, Yuan-Yuan Xu · 0 citations
Jul 2026

Cardinality-Decomposed Loss: Matching Training Objectives to Relation Structure in Heterogeneous Recommendation Graphs

A Cardinality-Decomposed Loss (CDL) is proposed that combines both Cross Entropy (CE) and BPR to enable the model to collectively optimize for relations across cardinalities and is found that CDL consistently improves discriminability in attribute embeddings.

Parul Maheshwari, Amulya Paruchuri, Yiqing Zou et al. · 0 citations
Open access Aug 2026

SimGAT: structure-aware graph attention network with multi-scale structural embedding

SimGAT, a structure-aware graph attention model built on SimRank-derived structural embeddings, is proposed, which computes structural similarity in the SimRank2Vec embedding space and injects it as a topological prior into the graph attention mechanism, enabling neighborhood aggregation to be jointly guided by node at...

Chengda Xu, Yinglong Zhang · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.