This repository is an official implementation of the Paper : NeuroCUT: A Neural Approach for Robust Graph Partitioning, accepted in KDD'24.
- Activate Environment or create from requirements.txt
source {environment name}/bin/activate
- Various parameters are listed in makefile, run commmand
make parameter_1={value_1} parameter_2={value_2} ..
Example command has been provided in the run.sh file.
Reults will be formed in the results
folder, and model will be saved in models
folder.
A sample Cora graph is given in the data folder. The structure of input graph is as follows:
<Graph_name> //input to the model
<test_set>
<1>...<n>
<val_set>
<1>...<n>
<train_set>
<1>...<n>
// Each folder in train/val/test set should have a graph.txt and graph_stats.txt. The number of required cuts can be modifited in the graph_stats file.
Also, to run on any new graph, you need to add the graph.txt and node_embedding.pt file in raw_data folder.
- Add the
graph.txt
andnode_embedding.pt
file in theraw_data
folder. You can use the a.py file to download and modify the dataset. - Create an experiment in the
data
folder containing the train, test, and validation subdirectories. You will need to add thegraph.txt
andgraph_stats.txt
file there. - Our framework supports training on multiple graphs and inferring on different graphs as well. Configure your experiment folder accordingly to take advantage of this flexibility.