🦓 Module Zoo

Welcome to our module zoo, the place where we discuss all pre-defined modules and outline how they are mapped to logic programs.

All modules listed here are defined in the neuralogic.nn.module package, and their usage is quite similar to the usage of regular rules. You can add them to your template via the += operator or add_module method, e.g.:

from neuralogic.nn.module import GCNConv

template += GCNConv(...)
# or
template.add_module(GCNConv(...))

Right after adding a module into a template, it is expanded into logic form - rules. This allows you to build upon pre-defined modules and create new variations by adding your own custom rules or just mixing modules together.

Pre-defined Modules

Module

Edge formats

GCNConv

R.<edge_name>(<source>, <target>)

SAGEConv

R.<edge_name>(<source>, <target>)

GINConv

R.<edge_name>(<source>, <target>)

RGCNConv

R.<edge_name>(<source>, <relation>, <target>) or R.<relation>(<source>, <target>)

TAGConv

R.<edge_name>(<source>, <target>)

GATv2Conv

R.<edge_name>(<source>, <target>)

SGConv

R.<edge_name>(<source>, <target>)

APPNPConv

R.<edge_name>(<source>, <target>)

ResGatedGraphConv

R.<edge_name>(<source>, <target>)

GINEConv

R.<edge_name>(<source>, <target>)

GENConv

R.<edge_name>(<source>, <target>)


GNN Modules


General Block Modules


Meta Modules