0/18 Comparing Temporal Graphs with Time Warping Malte Renken Algorithmics and Computational Complexity, TU Berlin, Germany 8. July 2019 Joint work with Vincent Froese, Brijnesh Jain and Rolf Niedermeier.
1/18 Temporal Graphs t t t t G G G G
1/18 Temporal Graphs t t G G G G t = 1 t = 2
1/18 Temporal Graphs t G G G G t = 1 t = 2 t = 3
1/18 Temporal Graphs G G G G t = 1 t = 2 t = 3 t = 4
1/18 Temporal Graphs G 1 G 2 G 3 G 4 t = 1 t = 2 t = 3 t = 4
1/18 Temporal Graphs G 1 G 2 G 3 G 4 t = 1 t = 2 t = 3 t = 4 G
2/18
2/18 H H H O C H C H C N C N H C H C C N N O H C H H
3/18
4/18 ? ∼ =
5/18 Main Question How can we measure the similarity / distance between two temporal graphs G , H ?
C M G H 6/18 A w v M v w M min dist G H label of v labels of v ’s neighbors v Example vertex signatures: M B C A Graph distance using vertex signatures B C A A H C B A A C B A A G all maximal matchings between the two vertex sets
C M G H 6/18 Graph distance using vertex signatures w v M v w M min dist G H Example vertex signatures: M B C A A B C A A H C B A A C B A A G all maximal matchings between the two vertex sets σ ( v ) = ( label of v , labels of v ’s neighbors )
C M G H 6/18 Graph distance using vertex signatures w v M v w M min dist G H Example vertex signatures: M B C A A B C A A H C B A A C B A A G all maximal matchings between the two vertex sets σ ( v ) = ( label of v , labels of v ’s neighbors )
6/18 A M min Example vertex signatures: M B C Graph distance using vertex signatures A B C A A B G A H A all maximal matchings between the two vertex sets C A A B C σ ( v ) = ( label of v , labels of v ’s neighbors ) � dist ( G , H ) = � σ ( v ) − σ ( w ) � ( v , w ) ∈ M � �� � C M ( G , H )
6/18 A Example vertex signatures: M B C A Graph distance using vertex signatures B C A A H A C G A all maximal matchings between the two vertex sets B C A A B σ ( v ) = ( label of v , labels of v ’s neighbors ) � dist ( G , H ) = min � σ ( v ) − σ ( w ) � M ∈M ( v , w ) ∈ M � �� � C M ( G , H )
7/18 Graph distance using vertex signatures Jouili and Tabbone (GbRPR 2009). Computation in cubic time using Jonker-Volgenant (or Hungarian). dist ( G , H ) = min M ∈M C M ( G , H )
7/18 Graph distance using vertex signatures Computation in cubic time using Jonker-Volgenant (or Hungarian). dist ( G , H ) = min M ∈M C M ( G , H ) ◮ Jouili and Tabbone (GbRPR 2009).
7/18 Graph distance using vertex signatures (or Hungarian). dist ( G , H ) = min M ∈M C M ( G , H ) ◮ Jouili and Tabbone (GbRPR 2009). ◮ Computation in cubic time using Jonker-Volgenant
8/18 Time Warping lifetimes. Even worse, they can have difgerent (non-homogeneous) time scales. Solution: Time warping — assign each layer to the other one it resembles most (no crossings allowed!). Problem: The two temporal graphs may have difgerent
8/18 Time Warping lifetimes. Even worse, they can have difgerent (non-homogeneous) time scales. Solution: Time warping — assign each layer to the other one it resembles most (no crossings allowed!). Problem: The two temporal graphs may have difgerent G
8/18 Time Warping lifetimes. Even worse, they can have difgerent (non-homogeneous) time scales. Solution: Time warping — assign each layer to the other one it resembles most (no crossings allowed!). Problem: The two temporal graphs may have difgerent G H
8/18 Time Warping lifetimes. Even worse, they can have difgerent (non-homogeneous) time scales. Solution: Time warping — assign each layer to the other one it resembles most (no crossings allowed!). Problem: The two temporal graphs may have difgerent G H
9/18 dtgw-distance program in quadratic time … Good news: Time warping can be solved by a dynamic all time warpings between the two layer sets u t W t u min W min Bad news: … if all pairwise distances are known in advance. dist ( G , H ) = C M ( G ) , H M ∈M
9/18 dtgw-distance min all time warpings between the two layer sets Good news: Time warping can be solved by a dynamic program in quadratic time … Bad news: … if all pairwise distances are known in advance. � dtgw-dist ( G , H ) = min C M ( G t , H u ) M ∈M W ∈W ( t , u ) ∈ W
9/18 dtgw-distance min all time warpings between the two layer sets Good news: Time warping can be solved by a dynamic program in quadratic time … Bad news: … if all pairwise distances are known in advance. � dtgw-dist ( G , H ) = min C M ( G t , H u ) M ∈M W ∈W ( t , u ) ∈ W
9/18 dtgw-distance min all time warpings between the two layer sets Good news: Time warping can be solved by a dynamic program in quadratic time … Bad news: … if all pairwise distances are known in advance. � dtgw-dist ( G , H ) = min C M ( G t , H u ) M ∈M W ∈W ( t , u ) ∈ W
10/18 Pairwise distances G H
10/18 Pairwise distances G H
10/18 Pairwise distances G H
10/18 Pairwise distances G H
10/18 Pairwise distances G H
10/18 Pairwise distances G H
10/18 Pairwise distances G H
11/18 time warping vertex-vertex distances layer-layer distances vertex matching required for
… and probably 1 impossible in 12/18 Hardness o #vertices #layers dtgw-dist … even if you limit the time warping to be “nice” … even if your graphs have maximum degree one. But … … you can check in polynomial time whether dtgw-dist . 1 assuming ETH ◮ Computing dtgw-dist ( G , H ) is NP-hard …
12/18 Hardness … even if you limit the time warping to be “nice” … even if your graphs have maximum degree one. But … … you can check in polynomial time whether dtgw-dist . 1 assuming ETH ◮ Computing dtgw-dist ( G , H ) is NP-hard … ◮ … and probably 1 impossible in 2 o ( #vertices + #layers + dtgw-dist )
12/18 Hardness … even if your graphs have maximum degree one. But … … you can check in polynomial time whether dtgw-dist . 1 assuming ETH ◮ Computing dtgw-dist ( G , H ) is NP-hard … ◮ … and probably 1 impossible in 2 o ( #vertices + #layers + dtgw-dist ) ◮ … even if you limit the time warping to be “nice”
12/18 Hardness But … … you can check in polynomial time whether dtgw-dist . 1 assuming ETH ◮ Computing dtgw-dist ( G , H ) is NP-hard … ◮ … and probably 1 impossible in 2 o ( #vertices + #layers + dtgw-dist ) ◮ … even if you limit the time warping to be “nice” ◮ … even if your graphs have maximum degree one.
12/18 Hardness But … … you can check in polynomial time whether dtgw-dist . 1 assuming ETH ◮ Computing dtgw-dist ( G , H ) is NP-hard … ◮ … and probably 1 impossible in 2 o ( #vertices + #layers + dtgw-dist ) ◮ … even if you limit the time warping to be “nice” ◮ … even if your graphs have maximum degree one.
12/18 Hardness But … 1 assuming ETH ◮ Computing dtgw-dist ( G , H ) is NP-hard … ◮ … and probably 1 impossible in 2 o ( #vertices + #layers + dtgw-dist ) ◮ … even if you limit the time warping to be “nice” ◮ … even if your graphs have maximum degree one. ◮ … you can check in polynomial time whether dtgw-dist ( G , H ) = 0 .
13/18 Testing for dtgw-dist ( G , H ) = 0 G H
13/18 Testing for dtgw-dist ( G , H ) = 0 G H
13/18 Testing for dtgw-dist ( G , H ) = 0 G H
13/18 Testing for dtgw-dist ( G , H ) = 0 G H
13/18 Testing for dtgw-dist ( G , H ) = 0 G H
13/18 Testing for dtgw-dist ( G , H ) = 0 G H
14/18 Heuristic time warping vertex-vertex distances layer-layer distances vertex matching required for Make an educated guess on one of these and start cycling.
14/18 Heuristic time warping vertex-vertex distances layer-layer distances vertex matching required for Make an educated guess on one of these and start cycling.
15/18 Heuristic Make an educated guess on one of these and start cycling. Usually reaches a stable state after 2–5 rounds. Depends surprisingly little on your initial guess. Seems to produce good results.
15/18 Heuristic Make an educated guess on one of these and start cycling. Depends surprisingly little on your initial guess. Seems to produce good results. ◮ Usually reaches a stable state after 2–5 rounds.
15/18 Heuristic Make an educated guess on one of these and start cycling. Seems to produce good results. ◮ Usually reaches a stable state after 2–5 rounds. ◮ Depends surprisingly little on your initial guess.
15/18 Heuristic Make an educated guess on one of these and start cycling. ◮ Usually reaches a stable state after 2–5 rounds. ◮ Depends surprisingly little on your initial guess. ◮ Seems to produce good results.
16/18 Experiment: Noise 2. Make multiple copies of each. 3. Add up to 30% noise (change edges, delete layers) . 4. Compute all pairwise distances with v deg v . Result 2 sociopatterns.org 1. Take a couple of real world temporal graphs 2 .
Recommend
More recommend