We provide a demo of our research in the form a jupyter-notebook, to make our work more easily accessible. To use the demo, simply download demo.ipynb and run it on a Google Colab GPU instance. The demo works for the Polblogs dataset; for the other datasets please download the data as outlined below.
- Clone the conda environment
conda env create -f environment.yml
- Download the Cora-2, Citeseer-2, CoauthorCS-2 and SBM datasets here:
https://drive.google.com/drive/folders/1_QQyfUzZ75zmadLU-RhAgNYzaLzBnBMb?usp=sharing
- Run the MAC (Dynamic IP) attack,
python multi_state_community_attack.py --dataset [name_of_dataset] --exp [name_of_exp]
The experiment logs and results will be dumped in,
./logs/[name_of_dataset]/[name_of_exp]
If you use this code, please cite our work:
@misc{sharma2024electioneering,
title={Electioneering the Network: Dynamic Multi-Step Adversarial Attacks for Community Canvassing},
author={Saurabh Sharma and Ambuj SIngh},
year={2024},
eprint={2403.12399},
archivePrefix={arXiv},
primaryClass={cs.LG}
}