Skip to content

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.

License

Notifications You must be signed in to change notification settings

Rlin232/bot-graph-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diffusion-Generated Social Graphs Enhance Bot Detection

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.

[Paper]

model

Table of Contents

Installation

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.html

You 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

Usage

  • 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.

Train

./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.

Citations

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}
}

Acknowledgements

This work builds upon and is conceptually related to the following foundational studies:

  • GraphMakerCan Diffusion Models Generate Large Attributed Graphs?
    Li et al., 2024
    arXiv:2310.13833

  • TwiBot-22TwiBot-22: Towards Graph-Based Twitter Bot Detection
    Feng et al., 2022
    arXiv:2206.04564

  • BotRGCNBotRGCN: Twitter Bot Detection with Relational Graph Convolutional Networks
    Feng et al., 2021
    arXiv:2106.13092

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •