Our Goal
The goal of this work is to efficiently estimate the graph properties (e.g., #triangles, #k-length paths, clustering coefficient, etc.) by consulting a sample of the whole population.
More specifically, given a large-scale graph, from which we aim to sample a subgraph, which is representative in the sense that graph properties of interest can be estimated with a known degree of accuracy.
To achieve our goal, we do our best to propose a network-sampling algorithm, which is targeted to be
- general: the algorithm is able to support several kinds of graph properties;
- efficient: both of the sampling process and estimation stage should be efficient in time and memory to support graphs with billions of vertices / links.
Algorithm
Generally, our algorithm samples a subgraph by removing edges from original graph.
Specifically, each edge is considered to be remained with the probability p.
After sampling, we use a Horvitz-Thompson construction in which the count of any sampled object is weighted by dividing by its sampling probability.
We will update more details soon.
Dataset
We employ 16 networks from SNAP to test our toolkit. Please find the details of these network below:
Dataset |
#Vertices |
#Edges |
Description |
| 4,039 | 88,234 | Social circles from Facebook (anonymized) | |
| 81,306 | 2,420,766 | Social circles from Twitter | |
| Wiki-vote | 7,150 | 103,710 | Wikipedia who-votes-on-whom network |
| Slashdot-1 | 77,384 | 905,482 | Slashdot social network from November 2008 |
| Slashdot-2 | 82,192 | 948,478 | Slashdot social network from February 2009 |
| Epinion | 75,899 | 508,849 | Who-trusts-whom network of Epinions.com |
| Enron | 36,720 | 367,678 | Email communication network from Enron |
| Europe-Email | 265,253 | 420,067 | Email network from a EU research institution |
| Patent | 3,774,768 | 16,518,948 | Citation network among US patents. |
| Cite-HEP-TH | 27,797 | 352,822 | Arxiv High Energy Physics Theory paper citation network |
| Cite-HEP-PH | 34,572 | 421,593 | Arxiv High Energy Physics paper citation network |
| CA-HEP-TH | 9,913 | 51,991 | Collaboration network of Arxiv High Energy Physics Theory |
| CA-HEP-PH | 12,043 | 237,030 | Collaboration network of Arxiv High Energy Physics |
| CA-GRQC | 5,276 | 28,999 | Collaboration network of Arxiv General Relativity |
| CA-CONDMAT | 23,166 | 186,955 | Collaboration network of Arxiv Condensed Matter |
| CA-ASTROPH | 18,806 | 396,179 | Collaboration network of Arxiv Astro Physics |
Performance
We first test our algorithm on counting the number of triangles in a given network.
In the table below, we compare the following four algorithms:
- Edge Iterator: computes for each edge the number of triangles that contain it, with time complexity as O(\sum_i d_i^2 * log M), where d_i is the degree of i-th node, and M is the number of edges, space complexity as O(m).
- Greedy: only scan top K nodes with largest degrees in Edge Iterator. Particularly, we scan r% (r < 100) of vertices in our experiments.
- EigenTriangle: an algorithm introduced in [Tsourakakis, 08]. It calculates top K eigenvalues of the adjacent matrix of G and uses them to approximate the number of triangles in G. We utilize ARPACK++ for calculating eigenvalues.
- Sampling: our network sampling algorithm.
Table 1. Performance on Triangle counting.
We then test our algorithm on computing clustering coefficient and counting the number of 2-length paths.
In the table below, we compare the brute-force (BF) algorithm and the sampling algorithm.
Table 2. Performance on Clustering Coefficient.
Table 3. Performance on 2-length paths counting.


