Metric Learning with Graph Convolutional Neural Networks
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Metric Learning using Graph Convolutional Neural Networks (GCNs)

The code in this repository implements a metric learning approach for irregular graphs. The method has been applied on brain connectivity networks and is presented in our papers:



The code is released under the terms of the MIT license. Please cite the above paper if you use it.

There is also implementations of the filters and graph coarsening used in:

The implementaton of the global loss function is based on:


  1. Clone this repository.

    git clone
    cd gcn_metric_learning
  2. Install the dependencies. Please edit requirements.txt to choose the TensorFlow version (CPU / GPU, Linux / Mac) you want to install, or install it beforehand.

    pip install -r requirements.txt  # or make install

Using the model

To use our siamese graph ConvNet on your data, you need:

  1. pairs of graphs as matrices where each row is a node and each column is a node feature,
  2. a class label for each graph,
  3. an adjacency matrix which provides the structure as a graph; the same structure will be used for all samples.

Please get in touch if you are unsure about applying the model to a different setting.