Abstract
Graph embeddings often force a tradeoff between memory-intensive exact matrix factorization and scalable but mathematically ungrounded neural methods. FREDE (FREquent Directions Embedding) bridges this gap by using matrix sketching to generate graph embeddings with linear space complexity and strict quality guarantees. As an "anytime" algorithm, FREDE produces high-quality embeddings even when stopped after processing only a small fraction of the graph, offering a robust solution for large-scale network analysis.
Introduction
Graph embeddings map nodes into low-dimensional vectors, capturing structural relationships for downstream tasks like node classification and link prediction. Most algorithms rely on a similarity matrix, such as Personalized PageRank (PPR), to measure node proximity. However, computing and storing a dense $n \times n$ similarity matrix requires $O(n^2)$ memory, which is prohibitive for large graphs.
While exact factorization methods like SVD provide optimal quality and mathematical guarantees, they fail to scale. Conversely, popular neural methods like DeepWalk or VERSE scale well via random walks and sampling but lack theoretical error bounds. FREDE addresses this by providing an algorithm with linear space complexity, the high quality of nonlinear transformations, and strict mathematical error bounds.
Methods
FREDE is built on a mathematical connection between neural embedding methods and matrix factorization. The authors prove that VERSE implicitly factorizes a log-transformed PPR matrix. To avoid materializing this massive matrix, FREDE employs a row-streaming matrix sketching algorithm called Frequent Directions (FD).
The algorithm computes rows of the PPR matrix on the fly and feeds them into a small "sketch" matrix. When the sketch fills, it is compressed using a small-scale SVD. This approach requires only $O(dn) space, where $d$ is the embedding dimension and $n$ is the number of nodes. FREDE inherits the mathematical guarantees of FD, strictly bounding the covariance error of the resulting embeddings.
Key Insights
- Preserving Covariance: Factorization-based embeddings essentially preserve the covariance of the similarity matrix. By using matrix sketching designed to minimize column-covariance error, FREDE achieves high fidelity.
- The "Anytime" Property: FREDE updates its sketch iteratively. This allows users to halt the algorithm at any point and extract a valid embedding. Processing just 10% to 20% of the nodes often captures enough global structure to rival fully processed baselines.
- Parallelization: Frequent Directions sketches are mergeable. Different machines can sketch different subsets of the graph, and their results can be combined into a single, mathematically sound embedding without losing error guarantees.
Experimental Evaluation
The authors evaluated FREDE on eight real-world networks, including biological (PPI), social (BlogCatalog, Flickr, YouTube), and citation (CoCit) datasets.
Scalability and Accuracy
FREDE successfully embedded the 1.1 million-node YouTube graph on a standard 64GB RAM machine, whereas exact SVD and NetSMF failed due to out-of-memory errors. In link prediction on the CoAuthor dataset, FREDE achieved 81.28% accuracy, surpassing VERSE (79.62%) and DeepWalk (68.97%).
Anytime Performance
A standout feature of FREDE is its performance even with partial graph traversal. On the PPI dataset, it outperformed competing methods in node classification after processing only ~20% of the matrix rows.
As shown in the results, FREDE (blue line) consistently reaches high Micro-F1 scores much earlier than other sketching-based baselines like Hashing or Random Projections. In some cases, partial information even acts as a form of regularization, preventing overfitting to noisy connections.
Conclusion
FREDE provides a scalable, mathematically grounded framework for graph embeddings. By combining matrix sketching with the "anytime" property, it offers a flexible tool for large-scale network analysis where memory and time are constrained. Future work includes exploring anytime local embeddings and applying these techniques to graph summarization and anonymization.
Summary updated