Learning Graph Node Embeddings by Smooth Pair Sampling
Konstantin Kutzkov
TL;DR
This work identifies a pronounced skew in positive pair frequencies produced by random-walk based graph embeddings and introduces a beta-smoothed regularization that reweights positive pairs via $T_\beta\#(u,v)^\beta$ with $\beta \in (0,1]$. It proposes SmoothDeepWalk, an efficient on-the-fly sampling algorithm where candidate positive pairs are selected with probability proportional to $\#(u,v)^{\beta-1}$, yielding predictable sampling counts $S_{u,v}=T_\beta\#(u,v)^\beta$ and reducing overreliance on very frequent pairs. The paper provides theoretical analyses showing how smoothing mitigates data-skew, formalizes a generalized objective, and develops a sketch-based method (Frequent) to estimate heavy-pair frequencies at scale, achieving $O(n\,d + b)$ space and $O(M)$ time. Empirical results on eight graphs demonstrate that smoothing improves link prediction on large, sparse graphs and yields robust, sometimes substantial gains in node classification, with recommended defaults for the smoothing parameter $\beta$ and sketch budget $b$. Overall, pair-frequency smoothing offers a scalable, principled regularization for random-walk embeddings, with potential extensions to other embedding frameworks and graph neural networks.
Abstract
Random walk-based node embedding algorithms have attracted a lot of attention due to their scalability and ease of implementation. Previous research has focused on different walk strategies, optimization objectives, and embedding learning models. Inspired by observations on real data, we take a different approach and propose a new regularization technique. More precisely, the frequencies of node pairs generated by the skip-gram model on random walk node sequences follow a highly skewed distribution which causes learning to be dominated by a fraction of the pairs. We address the issue by designing an efficient sampling procedure that generates node pairs according to their {\em smoothed frequency}. Theoretical and experimental results demonstrate the advantages of our approach.
