Graph Partitoning Using Graph Convolutional Networks
Graph Partitoning Using Graph Convolutional Networks as described in GAP: Generalizable Approximate Graph Partitioning Framework
To handle large graphs, the loss function is implemented using sparse torch tensors using a custom loss class.
If (1%20-%20Y)%5E%7BT%7D%20%5Ccirc%20A%20)
where Y_{ij} is the probability of node i being in partition j.
Then the gradients can be calculated by the equations:
%20-%20y%7Bij%7D(1%20-%20y%7B%5Calpha%20j%7D)D%7Bi%7D%7D%7B%5CGamma%7Bj%7D%5E%7B2%7D%7D%5Cright))
%20-%20y%7B%5Calpha%20j%7D(1%20-%20y%7Bij%7D)D%7Bi%7D%7D%7B%5CGamma%7Bj%7D%5E%7B2%7D%7D%5Cright))
%20y%7Bi%5E%7B’%7Dj%7DD%7Bi%7D%7D%7B%5CGamma_%7Bj%7D%5E%7B2%7D%7D%5Cright)%20%5C%3B%5C%3B%5C%3B%20i%5E%7B’%7D%2C%20%5Calpha%20%5Cneq%20i)
Create a virtual environment using venv
python3 -m venv env
Source the virtual environment
source env/bin/activate
Use the package manager pip to install requirements.
pip install -r requirements.txt
python TrialModel.py
Has only been tested on small custom graphs.