Repository for "Inductive detection of Influence Operations via Graph Learning" [arXiv]
An overview of the framework can be found in the figure below.
train.py
Train and evaluate models with the following steps:
- Initialize model: LR, RF, MLP, GCN, GCN_MPs, or GCN_MP
- Load up to five positional encodings specified by binary string
- Load train/val/test datasets specified by train/val/test binary strings
- Train and log progress, including best performance
- Compute empirical baseline for Integrated Gradients (IG)
- Compute and log IG values for individual features and feature types
/models
- models.py: Modules for LR, RF, MLP, GCN, GCN_MPs, GCN_MP, as well as training utilities.
/utils
- utils.py: utility Functions for loading, saving, and plotting data.
- twitter_api.py: Wrapper functions for sending requests to the Twitter API by username or uid.
/graph_compute
- compute_courls.py: Iterate over sorted list of integers representing unique URLs in 12M tweets. Uses Cython and multithreading.
- node2vec.py: Computes node2vec embeddings and writes to file.
- positional_encoding.py: Computes random walk positional encoding (RWPE) and laplacian eigenvectors positional encoding (LE) and writes to file.
- network_features.py: Computes network features (degree, clustering coefficient, betweenness, PageRank, HITS) and writes to file.