Factorized Graph Representations for semi-supervised ...

21
1 Factorized Graph Representations for semi-supervised learning from sparse data Krishna Kumar, Paul Langton, Wolfgang Gatterbauer SIGMOD 2020, Thursday, June 18, 2020, R16: 3:00 – 4:30 pm PT This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 International License. See https://creativecommons.org/licenses/by-nc-sa/4.0/ for details Slides: https://github.com/northeastern-datalab/factorized-graphs/ DOI: https://doi.org/10.1145/3318464.3380577 Data Lab: https://db.khoury.northeastern.edu

Transcript of Factorized Graph Representations for semi-supervised ...

Page 1: Factorized Graph Representations for semi-supervised ...

1

Factorized Graph Representationsfor semi-supervised learningfrom sparse dataKrishna Kumar, Paul Langton, Wolfgang Gatterbauer

∑ ∏

SIGMOD 2020, Thursday, June 18, 2020, R16: 3:00 – 4:30 pm PT

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 International License.See https://creativecommons.org/licenses/by-nc-sa/4.0/ for details

Slides: https://github.com/northeastern-datalab/factorized-graphs/DOI: https://doi.org/10.1145/3318464.3380577Data Lab: https://db.khoury.northeastern.edu

Page 2: Factorized Graph Representations for semi-supervised ...

2

Learning from few labels with algebraic amplification

unlabeled data

Weak (or distant) supervisionadd noisier labels (e.g. heuristics, or external knowledge base)

Algebraic cheatingthis requires "nice" algebraic properties; we may have to modify the algorithms J

Algebraic amplificationleverage algebraic properties of the algorithm to amplify signal in sparse data

weak labelslabeled ∑ ∏

Semi-supervised learningexploit relationships on label distribution (e.g. smoothness in networks)

unlabeled data

labeled

Page 3: Factorized Graph Representations for semi-supervised ...

3

0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

Our focus today: Node classification in undirected graphs

Compatibilities between classes

Σ=1class 1(blue)

class 2(orange)

class 3(green)

Preference among node classes

orange prefers blue (and v.v.)green prefers green

𝐇=

Page 4: Factorized Graph Representations for semi-supervised ...

4

Our focus today: Node classification in graphs

Compatibilities between classesPreference among node classes

?

?

? ?

?

??

?

?

Goal: Classify the remaining nodes: Propagate those compatibilities

most of which are unlabeled

𝐇=

Σ=1

0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

not known to us L

linearized belief propagation, semi-supervised learning

Goal: Classify the remaining nodes: Estimate & propagate those compatibilities

State-of-the-art: Heuristics / domain expertsWe will estimate (learn) from sparse data

Page 5: Factorized Graph Representations for semi-supervised ...

5

How well does it work?

Page 6: Factorized Graph Representations for semi-supervised ...

6

Time and Accuracy for label propagation if we know H

Accuracy by labeling with the true H

Fewer labels

Details: 10k nodes, degree d=25, H =

Label propagation linear in # edges0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

10 labeled nodes

Page 7: Factorized Graph Representations for semi-supervised ...

7

Accuracy by labeling with the true H

Estimation uses inference as subroutine (thus slower) L

Time and Accuracy if we need to first estimate H L

Fewer labels

10 labeled nodes

Compatibility estimation based on hold-out sets not that great L

Page 8: Factorized Graph Representations for semi-supervised ...

8

10 labeled nodes

Compatibility estimation based on hold-out sets not that great L

Time and Accuracy with our method J

Fewer labels

No more need for heuristics or domain experts J

Our method for estimating H needs <5% of the time later needed for labeling J

10 labeled nodes

Accuracy as good as if estimated on fully labeled graph J

Page 9: Factorized Graph Representations for semi-supervised ...

9

What is the trick?

Page 10: Factorized Graph Representations for semi-supervised ...

10

Splitting parameter estimation into two steps

?

? ?

?

??

?

??

Parameter Estimation Label Propagation

Fully labeled network

Sparsely labeled network

Compatibilitymatrix

𝑘×𝑘 matrix

1 2

Optimization

Derived statistics for path lengths 1,2,…,ℓ

Factorizedgraph representations

𝑘×𝑘 matrices

linear in # edges (m)and # of classes (k)

independent of graph size

𝑂(𝑚𝑘ℓ) 𝑂(𝑘!)

Page 11: Factorized Graph Representations for semi-supervised ...

11

A myopic view: counting relative neighbor frequenciesFully labeled graph

Neighbor count Gold standard compatibilities

normalize Σ=1

𝐇= 𝐌= ⇒2 6 26 2 22 2 6

0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

Sparsely labeled graph

Σ=1#𝐇

?

? ?

?

??

?

??

#𝐌= Σ=2 ⇒

Labeled neighbor count

0 1 01 0 10 1 0

Idea: normalize, then find closest symmetric, doubly-stochastic matrix

Page 12: Factorized Graph Representations for semi-supervised ...

12

A myopic view: counting relative neighbor frequenciesFully labeled graph Sparsely labeled graph

normalize

𝐇= 𝐌= ⇒1% L Few nodes ⇒even fewer edges 𝑚𝑓"

Assume f=10% labeled nodes.What is the percentage of edges with labeled end points?Neighbor count Gold standard compatibilities

2 6 26 2 22 2 6

0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

?

? ?

?

??

?

??

Σ=1

Page 13: Factorized Graph Representations for semi-supervised ...

13

Distant compatibility estimation (DCE)

010

0.60.20.2

0.280.440.28

0.380.310.31

Expected signals for neighbors

ℓ = 1 ℓ = 2 ℓ = 3

𝑑 = 2

𝐇=

𝐇!=

0.6, 0.44, 0.38, 0.35, ...

𝐇!=

0.44 0.28 0.280.28 0.44 0.280.28 0.28 0.44

0.31 0.38 0.310.38 0.31 0.310.31 0.31 0.38

0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

Page 14: Factorized Graph Representations for semi-supervised ...

14

Distant compatibility estimation (DCE)

graph with: • 𝑚 edges• 𝑓 fraction labeled nodes• 𝑑 node degree

𝑑ℓ()𝑚𝑓" expected neighbors of distance ℓ

Idea: amplify the signal from observed length-ℓ paths J

?

010

0.60.20.2

0.280.440.28

0.380.310.31

Expected signals for neighbors

ℓ = 1 ℓ = 2 ℓ = 3

𝑑 = 2 Expected # of labeled neighbors of distance ℓ

𝐇= 0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

Page 15: Factorized Graph Representations for semi-supervised ...

15

Distant compatibility estimation (DCE)

𝐸 𝐇 = )ℓ*)

ℓ!"#

𝑤ℓ 𝐇ℓ − ,𝐏 ℓ 2

𝑤ℓ+) = 𝜆𝑤ℓ 𝐰 = 1, 𝜆, 𝜆", … 𝖳

!𝐇 − 𝐇(smaller is better)

010

0.60.20.2

0.280.440.28

0.380.310.31

Expected signals for neighbors

ℓ = 1 ℓ = 2 ℓ = 3

𝑑 = 2

DETAILS

distance-smoothed energy function

one single hyperparameter J

𝐇= 0.2 0.6 0.20.6 0.2 0.20.2 0.2 0.6

Statistics for path lengths 1, 2, ...

Page 16: Factorized Graph Representations for semi-supervised ...

16

Signal

0.6

0.440.38

0.35

Two technical difficulties

gap L

1. Idea from previous page gives biased estimates L

?

0.6

0.440.38

0.35

2. Calculating longer paths leads to dense matrix operations L(W = sparse adjacency matrix)

?

𝑑 = 2

1. We must ignore backtracking paths

unbiased J

2. Requires more careful re-factorization of the calculation

1014 pathsin 200 msecJJJ

"factorized graph representations"

10 sec too long for 10k nodes L

Page 17: Factorized Graph Representations for semi-supervised ...

17

Scalable, Factorized Path summationDetails Intuition

π" R(x) ⋈ S(x, y)R(x) ⋈ π"S(x, y)⇒

W ⋅ W ⋅ X

(X = thin label matrix)

Relational algebra

Linear algebra

W ⋅ W ⋅ X⇒

Page 18: Factorized Graph Representations for semi-supervised ...

18

Scalable factorized path summationIntuition

π" R(x) ⋈ S(x, y)⇒

W ⋅ W ⋅ XW ⋅ W ⋅ X

(X = thin label matrix)

Relational algebra

Linear algebra

R(x) ⋈ π"S(x, y)

Similar ideas of factorized calculation:• Generalized distributive law

[Aji-McEliece IEEE TIT '00]

• Algebraic path problems[Mohri JALC'02]

• Valuation algebras[Kohlas-Wilson AI'08]

• Factorized databases [Olteanu-Schleich Sigmod-Rec'16]

• FAQ (Functional Aggregate Queries) [AboKhamis-Ngo-Rudra PODS'16]

• Associative arrays[Kepner, Janathan MIT-press'18]

• Optimal ranked enumeration[Tziavelis+ VLDB'20]

Page 19: Factorized Graph Representations for semi-supervised ...

19

More details (super happy to discuss further in 1-on-1's)

1. Constrained optimization → unconstrained opt. in free parameters2. Closed form for gradient: gradient-based optimization even faster3. Random restarts for optimization: but for an optimization on graph

sketches, thus independent of 𝑛, yet 𝛰 𝑘#

4. Energy-minimization based explanation of LinBP5. Originally proposed "centering" for LinBP not necessary6. Proof of unbiased estimator for equal label distribution7. Non-backtracking paths in factorized calculation that does not

require larger (2𝑚×2𝑚) "Hashimoto matrix"8. Lots of experiments on real graphs9. Even works on graphs without any labeled neighbors J

Page 20: Factorized Graph Representations for semi-supervised ...

20

Back to the big picture

Page 21: Factorized Graph Representations for semi-supervised ...

21

Loopy BP

InferencePGMs

"Algebraic cheating" for approximation-aware learning

Prediction

Prediction'Approximate

Inference

Learning

Algebraic cheating

Labeleddata

Approx.Model

InferenceApproximation-aware Learning

Model

Prediction''

[Arxiv 2014] Semi-supervised learning with heterophily[VLDB 2015] Linearized and Single-pass belief propagation[AAAI 2017] The linearization of pairwise Markov random fields[VLDBJ 2017] Dissociation and propagation for approximate lifted inference [UAI 2018] Dissociation-based oblivious bounds for weighted model counting[SIGMOD 2019] Anytime approximation in probabilistic databases via scaled dissociations[SIGMOD 2020] Factorized graph representations for semi-supervised learning from sparse dataSupported by NSF IIS-1762268-CAREER: Scaling approximate inference and approximation-aware learning Thank you J

For more details please visit

https://db.khoury.northeastern.edu/

LinBPDCEH