Presentation on theme: "Practical Recommendations on Crawling Online Social Networks"— Presentation transcript:
1Practical Recommendations on Crawling Online Social Networks Minas GjokaMaciej KurantCarter ButtsAthina MarkopoulouUniversity of California, Irvine
2Online Social Networks (OSNs) # UsersTraffic Rank500 million200 million130 million100 million75 million2912431029> 1 billion users(Nov 2010)(over 15% of world’s population, and over 50% of world’s Internet users !)
3Why study Online Social Networks? OSNs shape the Internet trafficdesign more scalable OSNsoptimize server placementsInternet services may leverage the social graphTrust propagation for network securityCommon interests for personalized servicesLarge scale data miningsocial influence marketinguser communication patternsvisualization
4Collection of OSN datasets Social graph of Facebook:500M users130 friends each8 bytes (64 bits) per user IDThe raw connectivity data, with no attributes:500 x 130 x 8B = 520 GBTo get this data, one would have to download:260 TB of HTML data!This is not practical. Solution: Sampling!
5Sampling NodesEstimate the property of interest from a sample of nodes
6Population Sampling Classic problem Challenge in online networks given a population of interest, draw a sample such that the probability of including any given individual is known.Challenge in online networksoften lack of a sampling frame: population cannot be enumeratedsampling of users: may be impossible (not supported by API, user IDs not publicly available) or inefficient (rate limited , sparse user ID space).Alternative: network-based sampling methodsExploit social ties to draw a probability sample from hidden populationUse crawling (a.k.a. “link-trace sampling”) to sample nodes
9Sampling Nodes Questions: How do you collect a sample of nodes using crawling?What can we estimate from a sample of nodes?
10Related Work Graph traversal (BFS, Snowball) Random walks (MHRW, RDS) A. Mislove et al, IMC 2007Y. Ahn et al, WWW 2007C. Wilson, Eurosys 2009Random walks (MHRW, RDS)M. Henzinger et al, WWW 2000D. Stutbach et al, IMC 2006A. Rasti et al, Mini Infocom 2009
11How do you crawl Facebook? Before the crawlDefine the graph (users, relations to crawl)Pick crawling method for lack of bias and efficiencyDecide what information to collectImplementation: efficient crawlers, access limitationsDuring the crawlWhen to stop? Online convergence diagnosticsAfter the crawlWhat samples to discard?How to correct for the bias, if any?How to evaluate success? ground truth?What can we do with the collected sample (of nodes)?
12Crawling Method 1: Breadth-First-Search (BFS) Starting from a seed, explores all neighbors nodes. Process continues iterativelySampling without replacement.BFS leads to bias towards high degree nodesLee et al, “Statistical properties of Sampled Networks”, Phys Review E, 2006Early measurement studies of OSNs use BFS as primary sampling techniquei.e [Mislove et al], [Ahn et al], [Wilson et al.]
13Crawling Method 2: Simple Random Walk (RW) Randomly choose a neighbor to visit next(sampling with replacement)leads to stationary distributionRW is biased towards high degree nodesDegree of node υ
14Correcting for the bias of the walk Crawling Method 3:Metropolis-Hastings Random Walk (MHRW):IENKDGMBHALCJFDAAC……
15Correcting for the bias of the walk Crawling Method 3:Metropolis-Hastings Random Walk (MHRW):Crawling Method 4:Re-Weighted Random Walk (RWRW):IENKDGMBHALCJFDAAC…Now apply the Hansen-Hurwitz estimator:…15
16Uniform userID Sampling (UNI) As a basis for comparison, we collect a uniform sample of Facebook userIDs (UNI)rejection sampling on the 32-bit userID spaceUNI not a general solution for sampling OSNsuserID space must not be sparse
17Data Collection Sampled Node Information What information do we collect for each sampled node u?
19Data Collection Parallelization Distributed data fetchingcluster of 50 machinescoordinated crawlingMultiple walks/traversalsRW, MHRW, BFSPer walkmultiple threadslimited caching (usually FIFO)
20Data Collection BFS … … Seed nodes Queue Pool of threads 1 2 n Visited User AccountServer
21Summary of Datasets April-May 2009 Sampling methodMHRWRWBFSUNI#Valid Users28x81K984K# Unique Users957K2.19M2.20MMHRW & UNI datasets publicly availablemore than 500 requests
22Detecting Convergence Number of samples to lose dependence from seed nodes (or burn-in)Number of samples to declare the sample sufficientAssume no ground truth available
23Detecting Convergence Running means Average node degreeMHRW
24Online Convergence Diagnostics Gelman-Rubin Detects convergence for m>1 walksA. Gelman, D. Rubin, “Inference from iterative simulation using multiple sequences“ in Statistical Science Volume 7, 1992Between walksvarianceWalk 1Walk 2Node degreeWalk 3Within walksvariance
25Methods Comparison Node Degree Poor performance for BFS, RWMHRW, RWRW produce good estimatesper chainoverall28 crawls
26Sampling Bias Node Degree AverageMedianBFS323208UNI9438BFS is highly biased
27Sampling Bias Node Degree AverageMedianMHRW9540UNI9438Degree distribution of MHRW identical to UNI
28Sampling Bias Node Degree AverageMedianRW338234RWRW9439UNI38RW as biased as BFS but with smaller variance in each walkDegree distribution of RWRW identical to UNI
31Graph Sampling Methods Practical Recommendations Use MHRW or RWRW. Do not use BFS, RW.Use formal convergence diagnosticsmultiple parallel walksassess convergence onlineMHRW vs RWRWRWRW slightly better performanceMHRW provides a “ready-to-use” sample
32What can we infer based on probability sample of nodes? Any node propertyFrequency of nodal attributesPersonal data: gender, age, name etc…Privacy settings : it ranges from 1111 (all privacy settings on) to 0000 (all privacy settings off)Membership to a “category”: university, regional network, groupLocal topology propertiesDegree distributionAssortativity (extended egonet samples)Clustering coefficient (extended egonet samples)
33Privacy Awareness in Facebook Probability that a user changes the default (off) privacy settingsPA =
34Facebook Social Graph Degree Distribution Degree distribution not a power law
35Facebook Social Graph Assortativity [Wilson09] Assortativity Coefficient = 0.17
36FB Social Graph Clustering coefficient [Wilson09] C(k) range is [0.05, 0.18]
37Conclusion Compared graph crawling methods Practical recommendations MHRW, RWRW performed remarkably wellBFS, RW lead to substantial biasPractical recommendationsusage of online convergence diagnosticsproper use of multiple chainsMHRW & UNI datasets publicly availablemore than 500 requestsM. Gjoka, M. Kurant, C. T. Butts, A. Markopoulou, “Practical Recommendations on Crawling Online Social Networks”, JSAC special issue on Measurement of Internet Topologies, Vol.29, No. 9, Oct. 2011