Using RL for Network Dismantling attacks and defenses. The paper report can be found as paper.pdf.
In the global setting, one can set the data_root variable to indicate the location of the graphs to use. The graphs can be found in the original GDM repository
https://github.com/NetworkScienceLab/GDM under the dataset folder.
To produce the results of the GDM experiment, run the run_gdm.py file. To use reinsertion, add the -r flag. To run it only on the Brazilian corruption network, run it with the --test_size 1 flag.
To run the same grid as is offered in the GDM repository to find a good set of hyperparameters for their GNN model, run run_gdm_grid.py. We include 5 runs of that grid without reinsertion (grid_results_i.json with i in [1,2,3,4,5]) and 1 run with reinsertion (grid_results.json).
To train a next node prediction model, run run_next_node_dm.py. To reproduce the table of results in the paper for the grid search we performed, run run_grid.py.
We include the results to this grid in the results folder.
To run the most up to date experiment on reinforcement learning, run run_rl_v2.py. It differs from run_rl_v1.py in how the graphs are used as training environments. In V1, the models learn from one graph at a time, dismantling each one node at a time before moving to the next. In V2, it learns to dismantle all the graphs at the same time, sampling at random one of the graph at each step and removing one node from it.