Official code release for our paper ‘Diffusion-Generated Social Graphs Enhance Bot Detection’, presented at the New Perspectives in Graph Machine Learning Workshop @ NeurIPS 2025.
conda env create -f env-graph.yml
conda activate GraphMaker
pip install torch==1.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.13.1+cu116.html
pip install torch-geometric
pip install "dgl==1.0.2+cu116" -f https://data.dgl.ai/wheels/cu116/repo.htmlYou also need to compile orca.cpp (https://file.biolab.si/biolab/supp/orca/orca.html).
cd src/graph_maker/orca
g++ -O2 -std=c++11 -o orca orca.cpp- Install the GraphMaker environment and compile orca.cpp.
- Save the TwiBot dataset to bot-graph-maker/dataset/ (e.g., dataset/edge.csv, dataset/split.csv, etc.).
- Add your WandB API key to bot-graph-maker/src/constants.py.
./run_experiment.sh <DATA_DIR> <N_SAMPLES> <MODEL_NAME>
Arguments:
<DATA_DIR>– full path to the TwiBot data (e.g., .../bot-graph-maker/dataset)<N_SAMPLES>– number of nodes to sample and generate<MODEL_NAME>– name for the model/checkpoints
This will create two datasets (sampled and synthetic + sampled) and train both using BotRGCN.
If you use this work, please cite:
@inproceedings{
laprevotte2025diffusiongenerated,
title={Diffusion-Generated Social Graphs Enhance Bot Detection},
author={Alec Laprevotte and Ryan Y. Lin and Siddhartha Ojha},
booktitle={New Perspectives in Graph Machine Learning},
year={2025},
url={https://openreview.net/forum?id=291xPefJRO}
}This work builds upon and is conceptually related to the following foundational studies:
-
GraphMaker — Can Diffusion Models Generate Large Attributed Graphs?
Li et al., 2024
arXiv:2310.13833 -
TwiBot-22 — TwiBot-22: Towards Graph-Based Twitter Bot Detection
Feng et al., 2022
arXiv:2206.04564 -
BotRGCN — BotRGCN: Twitter Bot Detection with Relational Graph Convolutional Networks
Feng et al., 2021
arXiv:2106.13092
