Introduction
1. Course Outline
1). Traditional methods: Graphlets: Graph kernels
2). Methods for node embeddings: DeepWalk, Node2Vec
3). Graph Neural Networks: GCN, GraphSAGE, GAT, Theory of GNNs
4). Knowledge graphs and reasoning: TransE, BetaE
5). Deep generative models for graphs
6). Applications to Biomedicine, Science, Industry
2. Different Types of Tasks
- Node level
- Edge level
- Community (subgraph) level
- Graph-level prediction, Graph generation
3. Classic Graph ML Tasks
1). Node classification: predict a property of a node
- Example: Categorize online users/items
2). Link prediction: predict whether there are missing links
- Example: Knowledge graph completion
3). Graph classification: categorize different graphs
- Example: Molecule property prediction
4). Clustering: detect if nodes form a community
- Example: Social circle detection
5). Graph generation: drug discovery
6). Physical simulation
3. Components of a Network
- Objects: nodes, vertices N N N
- Interactions: links, edges E E E
- Systems: network, graph G ( N , E ) G(N,E) G(N,E)
4. Directed vs Undirected Graphs
- Undirected
Links: undirected (symmetrical, reciprocal)
Examples: Collaborations, Friendship on Facebook - Directed
Links: directed (arcs)
Examples: Phone calls, Following on Twitter
5. Node Degrees
- Undirected
Node degree k i k_i ki: the number of edges adjacent to node i i i
Average degree: k ˉ = 2 E N \bar k=\frac{2E}{N} kˉ=N2E - Directed
The total degree of a node is the sum of in-degrees and out-degrees.
k ˉ = E N \bar k=\frac{E}{N} kˉ=NE k ˉ i n = k ˉ o u t \bar k^{in}=\bar k^{out} kˉin=kˉout
6. Representing Graphs
- Adjacency Matrix
A i j = 1 A_{ij}=1 Aij=1 if there is a link from node i i i to node j j j
A i j = 0 A_{ij}=0 Aij=0 otherwise
The adjacency matrix of an undirected graph is symmtrical ( A i j = A j i A_{ij}=A_{ji} Aij=Aji) but that of a directed graph may not ( A i j ≠ A j i A_{ij}\neq A_{ji} Aij=Aji).
Adjacency Matrices are sparse (filled with zeros). - Edge List
( N i , N j ) (N_i, N_j) (Ni,Nj): an edge from node i i i to node j j j - Adjacency List
Easier to work with if network is large and sparse.
Allow us to quickly retrieve all neighbors of a give node
N i N_i Ni: its neighors
7. Node and Edge Attributes
- Weight (e.g., frequency of communication)
- Ranking (best friend, second best friend…)
- Type (friend, relative, co-worker)
- Sign: Friend vs. Foe, Trust vs. Distrust
- Properties depending on the structure of the rest of the graph: Number of common friends
8. More Types of Graphs
- Unweighted graphs: A i j ∈ { 0 , 1 } A_{ij} \in \{0, 1\} Aij∈{0,1}; Weighted graphs: A i j ∈ R A_{ij} \in R Aij∈R
- Self-edges (self-loops): A i i ≠ 0 A_{ii}\neq 0 Aii=0
9. Connectivity of Undirected Graphs
Connected graph: Any two vertices can be joined by a path
A disconnected graph is made up by two or more connected components
10. Connectivity of Directed Graphs
Strongly connected directed graph has a path from each node to every other node.
Weakly connected directed graph is connected if we disregard the edge directions.