Article GNN is a project implementing Graph Neural Networks, for the purpose of predicting the number of reads an article is going to get.
This project aims to understand the effect of locality graphs could create.
Graph generation is very simple in itself - articles of the same domain (source) are connected to each other, forming the connected components. This creates an isolated environment for each domain, and no communication is happening amongst the articles.
Leveraging these connected components, GNNs learn that the environment also matters, aside from the content. This leads to the obvious point - even if two different sources published the article with exactly the same content, we don't expect the same number of reads, simply because of the popularity and timing of the article publishing.
The architecture is relatively simple: GNN block, followed by an MLP block.
GNN block consists of several Graph Attention Network (GAT) layers, whilst the MLP consists of several Fully Connected Layers.
Testing is performed by adding a single article into the graph, and then evaluating the precision of the inferred value, compared to the ground truth value present within the dataset.
git clone https://github.com/LukaNedimovic/article_gnn.git cd article_gnn source ./setup.sharticle_gnn βββ data βΒ Β βββ make_graph.py # Graph generation script βΒ Β βββ preprocess.py # Preprocess the dataset βββ model βΒ Β βββ gnn.py # Core GNN block implementation βΒ Β βββ mlp.py # Core MLP block implementation βΒ Β βββ model.py # Combining GNN -> MLP into general model βββ requirements.txt βββ setup.sh # Use this to set up the project! βββ train βΒ Β βββ train.py # Main code used for training the model βΒ Β βββ train.sh # Run training, as described in `train.py` βββ utils βββ argparser.py # Parse cmdline arguments βββ merge.py # Utility file, used to merge CSVs together βββ merge.sh # Run CSV merging βββ path.py # Utility file, expand environment variables within the path@article{ velickovic2018graph, title="{Graph Attention Networks}", author={Veli{\v{c}}kovi{\'{c}}, Petar and Cucurull, Guillem and Casanova, Arantxa and Romero, Adriana and Li{\`{o}}, Pietro and Bengio, Yoshua}, journal={International Conference on Learning Representations}, year={2018}, url={https://openreview.net/forum?id=rJXMpikCZ}, note={accepted as poster}, }