Top Banner
Eccentricity Heuristics through Sublinear Analysis Lenses Tal Wagner MIT
30

Eccentricity Heuristics through Sublinear Analysis Lenses

Oct 24, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Eccentricity Heuristics through Sublinear Analysis Lenses

EccentricityHeuristicsthroughSublinearAnalysisLenses

TalWagnerMIT

Page 2: Eccentricity Heuristics through Sublinear Analysis Lenses

GraphEccentricities

• Let𝐺(𝑉, 𝐸) byagraph

• Shortest-pathmetric:Δ: 𝑉×𝑉 → ℝ

• Eccentricities:𝒆 𝑣 = max

2∈4Δ(𝑣, 𝑢)

• Max𝒆 𝑣 =diameter;Min𝒆 𝑣 =radius

𝒆 𝑣 = 3

Max𝒆 𝑣 =diameter;Min𝒆 𝑣 =radius90thpercentile𝒆 𝑣 =“effectivediameter”(excludesoutliers)

Applications:Networktopologyanalysis(computers,social,biological),hardwareverification,sparselinearsystemsolving,…

Page 3: Eccentricity Heuristics through Sublinear Analysis Lenses

EccentricityDistributionofLargeGraphs

Eccentricity

Kangetal.TKDD2011

Linkedin (Aug2006)

Outsiders

Leskovec etal.WWW2008

Page 4: Eccentricity Heuristics through Sublinear Analysis Lenses

EccentricityDistributionofLargeGraphs

Eccentricity Eccentricity

Eccentricity

Kangetal.TKDD2011 Iwabuchi etal.CLUSTER2018

U.S.Patent(1985) Linkedin (Aug2006)

YahooWeb (GCConly)

Wikipedia Twitter

com-Friendster Webgraph

(GCCsonly)

Page 5: Eccentricity Heuristics through Sublinear Analysis Lenses

ComputingAllEccentricities

• Exactcomputation:𝑂 𝑚𝑛 (e.g.BFSfromeachnode)• Approximatealgorithms• Theoretical:

• Empirical: [Kangetal.’11],[Boldi etal.’11],[Takes&Kosters ‘13],[…], [Shun’15]

4-approx. 𝑂(𝑚) time [OneBFS]

(2 + 𝛿)-approx. 𝑂>(𝑚 𝛿⁄ ) time [Backurs-Roditty-Segal-V.Williams-Wein’18]

5 3⁄ -approx. 𝑂>(𝑚A.C) time [Chechik-Larkin-Roditty-Schoenebeck-Tarjan-V.Williams’14]

TightunderSETH

Page 6: Eccentricity Heuristics through Sublinear Analysis Lenses

Parallel𝑘-BFSHeuristics[Shun’15]

• 𝑆A ← 𝑘 randomnodes

• ComputeBFSfromeach𝑢 ∈ 𝑆A

• 𝒆G𝟏 𝑣 ←maxdistancefrom𝑆A

• 𝑆I ← 𝑘 furthestnodesfrom𝑆A

• ComputeBFSfromeach𝑢 ∈ 𝑆I

• 𝒆G𝟐 𝑣 ←maxdistancefrom𝑆A ∪ 𝑆I

𝑘-BFS1:

𝑘-BFS2:

Page 7: Eccentricity Heuristics through Sublinear Analysis Lenses

Parallel𝑘-BFSHeuristics[Shun’15]

• 𝑆A ← 𝑘 randomnodes

• ComputeBFSfromeach𝑢 ∈ 𝑆A

• 𝒆G𝟏 𝑣 ←maxdistancefrom𝑆A

• 𝑆I ← 𝑘 furthestnodesfrom𝑆A

• ComputeBFSfromeach𝑢 ∈ 𝑆I

• 𝒆G𝟐 𝑣 ←maxdistancefrom𝑆A ∪ 𝑆I

𝑘-BFS1:

𝑘-BFS2:

Page 8: Eccentricity Heuristics through Sublinear Analysis Lenses

EmpiricalResultsin[Shun’15]

• 𝑘-BFS1 performsreasonablewell• E.g.,medianaveragerelativeerror7.55%

• 𝑘-BFS2 beatsallothermethodsby

ordersofmagnitude

• Oftencomputesalleccentricitiesexactly

Why?

Page 9: Eccentricity Heuristics through Sublinear Analysis Lenses

Reagan’sPrinciple

“They'rethesortofpeoplewhoseesomethingworksinpracticeandwonderifitwouldworkintheory.”

Page 10: Eccentricity Heuristics through Sublinear Analysis Lenses

ThisWork

• Analyze heuristicsinordertoexplain andimprove• Willgetprovable variantswithbetterempiricalperformance• Needtogobeyondworst-case(duetoSETH-hardness)

• 𝑘-BFS2: ConnectiontoStreamingSetCover• [Demaine,Indyk,Mahabadi,Vakilian ’14]

• 𝑘-BFS1: ConnectiontoDiameterPropertyTesting• [Parnas &Ron’02]

Empiricalvalidationoftheory-basedalgorithms

Page 11: Eccentricity Heuristics through Sublinear Analysis Lenses

𝑘-BFS2 byStreamingSetCover

Page 12: Eccentricity Heuristics through Sublinear Analysis Lenses

SetCoverFormulation

• SetCover:Givenelements𝑉 andsubsets𝒮 ⊂ 24 ,findsmallestcover𝐶 ⊂ 𝒮 of𝑉.

• EccentricitiesasSetCover:• Nodesareelements• Nodesaresets:𝒮 = 𝐴P: 𝑣 ∈ 𝑉

𝑣 𝐴P

𝐴P = 𝑢 ∈ 𝑉: 𝒆 𝑢 = Δ 𝑣, 𝑢

Page 13: Eccentricity Heuristics through Sublinear Analysis Lenses

SetCoverFormulation

• SetCover:Givenelements𝑉 andsubsets𝒮 ⊂ 24 ,findsmallestcover𝐶 ⊂ 𝒮 of𝑉.

• EccentricitiesasSetCover:• Nodesareelements• Nodesaresets:𝒮 = 𝐴P: 𝑣 ∈ 𝑉

𝑣𝐴P

𝐴P = 𝑢 ∈ 𝑉: 𝒆 𝑢 = Δ 𝑣, 𝑢

Page 14: Eccentricity Heuristics through Sublinear Analysis Lenses

SetCoverFormulation

• SetCover:Givenelements𝑉 andsubsets𝒮 ⊂ 24 ,findsmallestcover𝐶 ⊂ 𝒮 of𝑉.

• EccentricitiesasSetCover:• Nodesareelements• Nodesaresets:𝒮 = 𝐴P: 𝑣 ∈ 𝑉

𝐴P = 𝑢 ∈ 𝑉: 𝒆 𝑢 = Δ 𝑣, 𝑢

𝑣

𝐴P = ∅

Page 15: Eccentricity Heuristics through Sublinear Analysis Lenses

SetCoverFormulation

• SetCover:Givenelements𝑉 andsubsets𝒮 ⊂ 24 ,findsmallestcover𝐶 ⊂ 𝒮 of𝑉.

• EccentricitiesasSetCover:• Nodesareelements• Nodesaresets:𝒮 = 𝐴P: 𝑣 ∈ 𝑉

• Covercomputesalleccentricities

• Optimalcover=“eccentriccover”,𝜿𝐴P = 𝑢 ∈ 𝑉: 𝒆 𝑢 = Δ 𝑣, 𝑢

Page 16: Eccentricity Heuristics through Sublinear Analysis Lenses

ComputationalConstraints

• Computingaset𝐴P isprohibitive• 𝑂(𝑚𝑛) work

• Computingwhichsetscover𝑣 isexpensive• SingleBFS,𝑂(𝑚) work

• KnownSetCoveralgorithms?Yes

𝑣𝐴P

𝑣 𝐴PS𝐴PT𝐴PU

Page 17: Eccentricity Heuristics through Sublinear Analysis Lenses

StreamingSetCover[Demaine-Indyk-Mahabadi-Vakilian’14]

• 𝑆A ← 𝑘 randomelements

• 𝐶 ← Cover forsample(e.g.greedy)

ElementSamplingLemma:

Ifglobaloptimumissmall,𝐶 covers

almostallelements.

Page 18: Eccentricity Heuristics through Sublinear Analysis Lenses

𝑘-BFS2 vs.DIMV

𝑘-BFS2 Streaming SetCover[DIMV’14]

𝑆 ← Random sample ⟺ 𝑆 ← Random sample

Compute BFSfromeach𝑣 ∈ 𝑆 ⟺ Compute coveringsetsforeach𝑣 ∈ 𝑆

𝐶 ← 𝑘 nodeswith maxΔ(𝑣, 𝑆) ≉ 𝐶 ← Greedycoverfor 𝑆

Page 19: Eccentricity Heuristics through Sublinear Analysis Lenses

𝑘-BFSSC𝑘-BFS2 Streaming SetCover[DIMV’14]

𝑆 ← Random sample ⟺ 𝑆 ← Random sample

Compute BFSfromeach𝑣 ∈ 𝑆 ⟺ Compute coveringsetsforeach𝑣 ∈ 𝑆

𝐶 ← 𝑘 nodeswith maxΔ(𝑣, 𝑆) ≉ 𝐶 ← Greedycoverfor 𝑆

𝐶 ← Parallelgreedycoverfor𝑆[Blelloch-Peng-Tangwongsan’11]

[Blelloch-Simhadri-Tangwongsan’12]

Page 20: Eccentricity Heuristics through Sublinear Analysis Lenses

𝑘-BFSSCTheorem:Suppose𝐺(𝑉, 𝐸) haseccentriccoversize𝜿.

𝑘-BFSSC with𝑘 = 𝑂> 𝜿 ⋅ 𝜖ZA log 𝑛 satisfies:

• Expectedwork:𝑂(𝑘𝑚),expecteddepth:𝑂>(diam 𝐺 )

• Computesexacteccentricitiesofallbutan𝜖-fractionofnodesw.h.p.

???

Page 21: Eccentricity Heuristics through Sublinear Analysis Lenses

EccentricCover:Warm-Up

• Path,star,clique:𝜿 = 2

• Evencycle,hypercube:𝜿 = 𝑛

• Oddcycle:𝜿 = AI𝑛 + 1

Page 22: Eccentricity Heuristics through Sublinear Analysis Lenses

EccentricCoverintheWild

• 8real-worldgraphsin[Shun’15]

• 1M-4M nodeseach

• Upperboundsoneccentriccoversize:

• 2graphs:𝜿 ≤ 𝟏𝟐𝟖

• 5graphs:𝜿 ≲ 𝟏, 𝟎𝟎𝟎

• 1graph:𝜿 ≲ 𝟏𝟎, 𝟎𝟎𝟎

Real-worldgraphshavesmalleccentriccovers

Page 23: Eccentricity Heuristics through Sublinear Analysis Lenses

Experiments

𝑘-BFS2 vs.𝑘-BFSSC(Real-worldgraphsfromStanford

NetworkAnalysisProject)

BFScount BFScount

averagerelativeerror

Graph1:𝑛 = 36,646𝑚 = 88,303𝜿 ≤ 1,024

Exactratio at𝑘 = 16:𝑘-BFS2:80%𝑘-BFSSC:99%

Graph2:𝑛 = 11,174𝑚 = 23,409𝜿 ≤ 32

Exactratio at𝑘 = 16:𝑘-BFS2:97%𝑘-BFSSC:100%

Page 24: Eccentricity Heuristics through Sublinear Analysis Lenses

𝑘-BFS1 byPropertyTesting

Page 25: Eccentricity Heuristics through Sublinear Analysis Lenses

PropertyTestingApproximation

• Usualapproximation:𝒆G 𝑣 iscloseto𝒆(𝑣)

• Propertytestingapproximation:𝒆G 𝑣 isexactonsome𝑮k closeto𝑮• Graphsare𝝐-closeifupto𝝐 ⋅ 𝒎 edgescanbeadded/removedtoget𝑮k from𝑮

• Nosparsity/densityassumption(“GeneralGraphModel”)

• Notation:𝒆G 𝑣 ≤ 𝒆 𝑣 ≼𝝐 𝒆G 𝑣

𝒆G 𝑣 = 1𝒆 𝑣 = 2

𝑮k is𝟒𝟗-closeto𝑮

Page 26: Eccentricity Heuristics through Sublinear Analysis Lenses

𝑘-BFS1 vs.DiameterTesting

𝑘-BFS1 with𝑘 = 𝑂 𝜖ZA log 𝑛 satisfies𝒆G 𝑣 ≤ 𝒆 𝑣 ≼𝝐 𝒆G 𝑣 forall𝑣.• Work:𝑂>(𝜖ZA𝑚),depth:𝑂>(diam 𝐺 )• Algorithm:StartBFSat𝑘 randomnodes

Theorem [Parnas &Ron]:Givenagraph𝐺,computeadiameterestimate𝑫k suchthat𝑫k ≤ diam 𝐺 ≼𝝐 2𝑫k + 2.• Time:𝑝𝑜𝑙𝑦 𝜖ZA

• Algorithm:Starttruncated BFSat𝑘 randomnodes

Butthisislineartime

Page 27: Eccentricity Heuristics through Sublinear Analysis Lenses

EccentricityTesting

Aux.Theorem:Given𝐺 and𝑣,compute𝒆G 𝑣 s.t. 𝒆G 𝑣 ≤ 𝒆 𝑣 ≼𝝐 𝒆G 𝑣intime𝑝𝑜𝑙𝑦 𝜖ZA .• Corollary– Diametertesting:𝑫k ≤ diam 𝐺 ≼𝝐 2𝑫k (shavedoff+2)

• Corollary– Radiustesting:𝑹k ≤ radius 𝐺 ≼𝝐 𝑹k + 𝟏

Impliesvariantof𝑘-BFS1:𝑘-BFSTST

Page 28: Eccentricity Heuristics through Sublinear Analysis Lenses

𝑘-BFSTSTTheorem:𝑘-BFSTST satisfies𝒆G 𝑣 ≤ 𝒆 𝑣 ≼𝝐 𝒆G 𝑣 forall𝑣.• Work:𝑂(𝜖ZI𝑛),depth:𝑂>(𝜖ZA log 𝑛)

Sameguaranteeas𝑘-BFS1butinsublinear workand

depth,independentofgraph.

• Algorithm:truncatedBFS• 𝑆A ← 𝑘 randomnodes

• Fromeach𝑢 ∈ 𝑆A,startaBFSuptofirstlevelℓ2where𝑂>(𝜖ZA) nodesareseen.Allunseennodes

areconsideredat“distance”ℓ2 + 1 from𝑢.

• 𝒆G𝐓𝐒𝐓 𝑣 ←max“distance”from𝑆A

Page 29: Eccentricity Heuristics through Sublinear Analysis Lenses

Experiments

𝑘-BFS1 vs.𝑘-BFSTST (withdifferentBFScutoffs)

Edgetraversals Edgetraversals

averagerelativeerror

Graph1:𝑛 = 36,646𝑚 = 88,303

Graph2:𝑛 = 11,174𝑚 = 23,409

Page 30: Eccentricity Heuristics through Sublinear Analysis Lenses

Conclusion

• Explainandimprovehigh-performingheuristics

• Practicalalgorithm->“fit”analysis->practicalimprovementwithguarantees

• Inter-connectionsofparallel,streaming,sketching,andproperty

testingalgorithms

• All“pointtosamedirection”Thankyou