Graphs I

Introduction

Graphs are probably the most versatile and the most important construction when we refer to representation. They are astonishly ubiquitous. We can describe practically any system of relations or interactions as a graph. This is true at nano scales where we can model individual molecules, to micro scale where we can look at different interactions between biological entities like molecules, drugs and proteins modelled in interactomes, to finally concluding at macro scale by modelling social graphs of people.

1. Idea

Conceptualization: When we think of a graph, we think about a system of relations and interactions between its elements.

A graph is a collection of vertices and edges, each edge links a pair of vertices, defining a relationship of incidence between vertices and edges. There are several variations on the idea.

2. Definition

This brings us with the following types of graphs according to their ordering:

  1. Undirected graphs

  2. Directed graphs

  3. Undirected graphs as directed graphs with an involution

We can also attach some features to the nodes that will be modeled as d-dimensional vectors. For example, in a social network graph, each node might contain information relative to the user of the node such as age, height, sex... For the sake of simplicity we are going to ignore possible features linked to edges, but they could exist.

3. History of Graph Neural Networks

The term graph neural networks first appeared in a series of papers by the group of research conformed by M. Gore and F. Scarselli. But graph theory research argue that graph neural networks are just a rebranding of a graph isomorphism test called the Weisfeiler-Lehman test (1968). This test address a classical graph theory problem that tries to determine if 2 graphs are isomorphic or have the same connectivity up to reordering the nodes.

NOTE: Nowadays there isn't any algorithm that can compute and solve the Weisfeiler-Lehman Test in polynomial time. Only solvable in polynomial time up to graphs with 9 nodes. Indeed this problem was proved to have a computational solution in quasi-polynomial

4. Key Structural Properties of Graphs

The representation of the adjacency matrix depends on the selected ordering to the set of nodes.

NOTE: The representation differs with respect to the type of the object. The permutation group acts differently on vectors and matrices.

4.2 Invariant Graph Functions: Permutation-invariant

Strong precondition needed: In order to implement a function acting on a graph that produces a single output for the entire graph, it's mandatory to assert that this single value generated output is unaffected by the chosen ordering of the input nodes. Independently of the ordering of the nodes, the computed output for the same graph must be always the same, although the nodes were or not rearranged.

4.3 Equivariant Graph Functions

In this scenario it's convenient that the output of the function changes harmoniously to the fluctuations in the input with the reordering of the nodes.

5. Construct Graphs Functions

5.1 Multiset

Idea

Definition

It is common to define them in terms of sets and functions.

5.2 Local Aggregation and Message Passing

This is the main operation of a classical Graph Neural Network architecture.

Question: How this operation works? Answer: For each node in the graph we look at the neighbors and take the feature vectors that together conforms the multiset. Even though the indices of the neighbors are unique, the feature vectors are not necessarily unique.

NOTE: In this example, we have the blue feature repeated twice. Two nodes have the same feature vector. In this scenario we dealing with a multiset. (See section 5.1 Multiset)

Now we try to aggregate these features together with the feature vector of the node itself. It must be done in a permutation invariant way because we don't have a canonical ordering of the neighbors on a graph.

This local aggregation function on GNN typically looks as follows:

References

Last updated