• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A TensorFlow implementation of Relational Graph Attention Networks, paper: https://arxiv.org/abs/1904.05811

Note This repository is no longer actively maintained by Babylon Health. For further assistance, reach out to the paper authors.

Relational Graph Attention Networks

A TensorFlow implementation of Relational Graph Attention Networks for semi-supervised node classification and graph classification tasks introduced in our paper Relational Graph Attention Networks. It is compatible with static and eager execution modes.

Contact [email protected] for comments and questions.

Installation

To install rgat, run:

$ pip install git+git://github.com/Babylonpartners/rgat.git

To allow both the CPU and GPU versions of TensorFlow, we have not listed Tensorflow as a requirement. You will need to install a version separately. The TensorFlow version must be >= 1.10.

Examples

To make it easy to jump right in, we have provided a few examples:

  • RDF: Semi-supervised node classification on AIFB and MUTAG.
  • Batch comparison: Batched graph forward pass examples using both static and eager mode.

Usage

The graphs handles are composed of:

  • An inputs dense tensor* corresponding to node features, and
  • A support sparse tensor corresponding to node connectivity.

Below is a standard pattern for using RGAT

from rgat.layers import RGAT

inputs = get_inputs()                                # Dense tensor with shape (?, Features)

support = get_support()                              # Sparse tensor with dense shape (?, ?)
support = tf.sparse_reorder(support)                 # May be neccessary, depending on construction

rgat = RGAT(units=FLAGS.units, relations=RELATIONS)  # RELATIONS is an integer indicating the number 
                                                     # of relation types in the graph

outputs = rgat(inputs=inputs, support=support)       # Dense tensor with shape (?, FLAGS.units)

Here, get_inputs and get_support are user-provided functions. For guidance on their definition, see the usage guide.

*Note, it is possible to pass a SparseTensor as the inputs to the layer call. This will result in the identity matrix for the input (but skipping the trivial matrix multiply).

Cite

Please cite our paper if you use this code in your own work:

@article{busbridge2019rgat,
title = {Relational Graph Attention Networks},
author = {Busbridge, Dan and Sherburn, Dane and Cavallo, Pietro and Hammerla, Nils Y},
year = {2019},
eprint = {arXiv:1904.05811},
url = {http://arxiv.org/abs/1904.05811}
}

More Repositories

1

fastText_multilingual

Multilingual word vectors in 78 languages
Jupyter Notebook
1,195
star
2

DrawerKit

DrawerKit lets an UIViewController modally present another UIViewController in a manner similar to the way Apple's Maps app works.
Swift
780
star
3

ios-playbook

Ruby
397
star
4

orbit-mvi

An MVI framework for Kotlin and Android
Kotlin
384
star
5

Bento

Swift library for building component-based interfaces on top of UITableView and UICollectionView 🍱
Swift
372
star
6

iOS-Interview-Demo

Interview Demo Project for babylon health
Objective-C
200
star
7

certificate-transparency-android

Certificate transparency for Android and Java
Kotlin
198
star
8

ReactiveFeedback

Unidirectional reactive architecture
Swift
158
star
9

hmrb

Python
70
star
10

android-playbook

Babylon Health Android Team Playbook
68
star
11

Stevenson

Stevenson is a Vapor framework designed to build integrations between Slack apps, GitHub, JIRA and CI services (CircleCI).
Swift
58
star
12

counterfactual-diagnosis

Python
54
star
13

Tota11y

Accessibility visualization toolkit for web content creators and editors.
JavaScript
44
star
14

fuzzymax

Code for the paper: Don't Settle for Average, Go for the Max: Fuzzy Sets and Max-Pooled Word Vectors, ICLR 2019.
Python
43
star
15

corrsim

Code for the papers: Correlation Coefficients and Semantic Textual Similarity, NAACL-HLT 2019 & Correlations between Word Vector Sets, EMNLP-IJCNLP 2019.
Python
35
star
16

primock57

Dataset of 57 mock medical primary care consultations: audio, consultation notes, human utterance-level transcripts.
Python
35
star
17

lit-fhir

Opinionated library for easily constructuring FHIR (http://hl7.org/fhir) resources in Scala and Java.
Scala
35
star
18

Wall-E

A bot that monitors and manages your pull requests.
Swift
32
star
19

github-proxy

A minimal caching proxy to GitHub's REST & GraphQL APIs
Python
29
star
20

neuralTPPs

Shell
27
star
21

medisim

Medical Similarity Dataset creation from SNOMED
Python
27
star
22

simba

Semantic similarity measures from Babylon Health
Python
16
star
23

decoding-decoders

Python
12
star
24

EHR-Rel

Biomedical concept relatedness benchmark sampled from electronic health records
10
star
25

multiverse

MultiVerse: Probabilistic Programming Language for Causal Reasoning
Python
9
star
26

TwinNetworks

A library for handling Structural Causal Models and performing interventional and counterfactual inference on them.
Python
9
star
27

MCSG

Python
8
star
28

web-interview

JavaScript
6
star
29

nameko-extras

Nameko run with autoloading, logging file CLI option
Python
6
star
30

event-stream-registry-ui

A React component for observing and monitoring event streams.
TypeScript
5
star
31

slack011y-bus

Python
4
star
32

sticky-layoutmanager

Java
2
star
33

fhir-hydrant

FHIR templating engine
Scala
2
star
34

snow-owl

πŸ¦‰ Snow Owl - production ready, scalable terminology server (SNOMED CT, ICD-10, LOINC, dm+d, ATC and others)
Dockerfile
2
star
35

terraform-provider-aws-babylon

Go
1
star
36

laymaker

1
star