This is the experiment code for the paper "Identifying Informative Nodes in Attributed Spatial Sensor Networks using Attention for Symbolic Abstraction in a GNN-based Modeling Approach". It models an extrinsic regression task using different GCN-based models, one including a transformer. Further including LASA (an attention-based abstraction technique) to find more relevant nodes.
The data (too big to host on github itself) can be downloaded at: https://zenodo.org/record/5767221
In the data folder, the input_ci.npy file should be placed
The input_cw.npy file should be placed in data/othernetwork
A list of all needed dependencies (other versions can work but are not guaranteed to do so):
Requirements for the installation guide (other version might or might not work as well):
- python==3.9.13
- conda==22.9.0
- pip==22.3
We suggest using a fresh conda environment and also to use mamba as on top solution to conda, else an dependency solve freeze can occur.
Create a new environment and run the following lines:
mamba install -c conda-forge python==3.9.13 tensorflow-gpu==2.6.2
Install the following dependencies using pip install:
pip install seml==0.3.7 spektral==1.2.0 scipy==1.9.1 pyts==0.12.0 numpy==1.19.5 gast==0.4.0
To use the jupyter notebook:
pip install --upgrade ipykernel jupyter notebook pyzmq
We have two options to run the experiment. Either just test out single configurations with an anaconda notebook or test out multiple parameter combinations over SEML experiments.
- Go to evalExample.ipynb
- Change parameters
- Have fun
- Set up seml with seml configure (yes you need a mongoDB server for this and yes the results will be saved a in separate file, however seml does a really well job in managing the parameter combinations in combination with slurm)
- Configure the yaml file you want to run. Probably you only need to change the number of maximal parallel experiments ('experiments_per_job' and 'max_simultaneous_jobs') and the memory and cpu use ('mem' and 'cpus-per-task').
- Add and start the seml experiment. For example like this:
- seml eqModel add eqModel.yaml
- seml eqModel start
- Check with "seml eqModel status" till all your experiments are finished
- Please find the results in the results folder. It includes a dict which can be explored with the code in eval.ipynb
This code represents the used model for the following publication:
"Identifying Informative Nodes in Attributed Spatial Sensor Networks using Attention for Symbolic Abstraction in a GNN-based Modeling Approach" (TODO Link)
If you use, build upon this work or if it helped in any other way, please cite the linked publication.