You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,45 +21,46 @@ This set of scripts primarily implements the two signed whole graph embedding me
21
21
* Perform classification tasks based on the embeddings extracted with our method.
22
22
23
23
In addition, these scripts reproduce the experiments described in our paper [[CLDA'24](#references)]. In particular, they compares the performance of our method with three alternatives from the literature:
24
-
*`SiNE`[[WTAC'17](#references)]: a method that handles signed graphs, but only to represent individual vertices, and not the whole graph.
25
-
*`Graph2vec`[[NCVC'17](#references)]: a method that handle whole-graphs, but only for unsigned graphs.
26
-
*`SGCN`[[DMT'18](#references)]: like SiNE, a method that handles signed graphs, but only to represent individual vertices, and not the whole graph.
24
+
*`SiNE`[[WTAC'17](#references)]: this method handles signed graphs, but only to represent individual vertices, and not the whole graph.
25
+
*`Graph2vec`[[NCVC'17](#references)]: this method handle whole-graphs, but only for unsigned graphs.
26
+
*`SGCN`[[DMT'18](#references)]: as for SiNE, this method handles signed graphs, but only to represent individual vertices, and not the whole graph.
27
27
28
28
29
29
## Data
30
-
We include a few graphs for each dataset in the `data` folder. The full datasets can be downloaded from [Zenodo](https://doi.org/10.5281/zenodo.13851362). Place the downloaded graphs directly into the corresponding folder in `data`.
30
+
The scripts are meant to be applied to a corpus of three datasets constituted of signed networks annotated for graph classification. Because of GitHub's file size limit, we include only a few graphs from each dataset in the `data` folder. The full datasets can be downloaded from [Zenodo](https://doi.org/10.5281/zenodo.13851362). Place the downloaded graphs directly into the corresponding folders in `data`.
31
31
32
32
33
33
## Organization
34
34
This repository is composed of the following elements:
35
-
36
35
* Folder `data`: input signed networks.
37
-
* Folder `out`: contains the files produced by our scripts.
38
-
*`requirements.py`: List of Python packages used in SWGE.
39
-
* There are 3 main scripts:
40
-
*`SG2V.py`: Performs the representation learning step related to the Signed Graph2Vec methods.
41
-
*`run_sgcn.py`: Performs the representation learning step related to the Signed Graph Convolutional Networks methods.
36
+
* Folder `out`: files produced by the scripts.
37
+
* Folder `SG2V`: implementation of our signed version of the Graph2vec method.
38
+
* Folder `SGCN`: implementation of the standard Signed Graph Convolutional Network method, taken from repository [SGCN](https://github.com/benedekrozemberczki/SGCN).
39
+
* Folder `SiNE`: implementation of the standard Signed Network Embeddings method.
40
+
* Folder `WSGCN`: implementation of our whole-graph variant of the SGCN method.
41
+
* File `requirements.txt`: list of `Python` packages used by the scripts.
42
+
* The main scripts are:
43
+
*`main.py`: learns the graph representations.
42
44
*`evaluation.py`: Performs the classification task.
43
45
44
46
45
47
## Installation
46
-
* Install Python (tested with Python 3.6.9)
48
+
* Install `Python` (tested with `Python` v3.6.9)
47
49
* Install dependencies using the following command:
48
50
```
49
51
pip install -r requirements.txt
50
52
```
51
-
* The SGCN method is based on the code of [SGCN](https://github.com/benedekrozemberczki/SGCN).
52
-
* Retrieve the data from Zenodo and place them into the `data` folder.
53
+
* Retrieve the data from Zenodo and place them into the `data` folder (as nexplained in section [Data](#data)).
53
54
54
55
55
-
## How to use ?
56
-
In order to learn representations `Graph2Vec`-based representations, run the file `SG2V.py`. You can configure the `model_type` between the 3 versions proposed in our paper: `g2v`, `sg2vn` or `sg2vsb`. To learn representations `SGCN`-based representations, run the file `run_sgcn.py`. These scripts will export the learned representations into the `out` folder.
56
+
## How to use
57
+
In order to learn `Graph2Vec`-based representations, run the file `SG2V.py`. You can configure the `model_type` between the 3 versions proposed in our paper: `g2v`, `sg2vn` or `sg2vsb`. To learn representations `SGCN`-based representations, run the file `run_sgcn.py`. These scripts will export the learned representations into the `out` folder.
57
58
58
59
After running the previous scripts, you can perform the classification by running `evaluation.py`. You can configure the `path_emb` and `path_label` variables to change the dataset used. The `main.py` file can be used to run all the experiment with a single script.
59
60
60
61
61
62
## References
62
-
***[CLDA'24]** N. Cécillon, V. Labatut, R. Dufour, N. Arınık: *Whole-Graph Representation Learning For the Classification of Signed Networks*, IEEE Access (in press), 2024. DOI: [xxxx](https://dx.doi.org/xxxx)[⟨hal-xxxxxxxx⟩](https://hal.archives-ouvertes.fr/hal-xxxxxxxx)
63
+
***[CLDA'24]** N. Cécillon, V. Labatut, R. Dufour, N. Arınık: *Whole-Graph Representation Learning For the Classification of Signed Networks*, IEEE Access (in press), 2024. DOI: [xxxx](https://dx.doi.org/xxxx)[⟨hal-04712854⟩](https://hal.archives-ouvertes.fr/hal-04712854)
63
64
***[NCVC'17]** A. Narayanan, M. Chandramohan, R. Venkatesan, L. Chen, Y. Liu, and S. Jaiswal: *graph2vec: Learning distributed representations of graphs*, International Workshop on Mining and Learning with Graphs, 2017. URL: [http://www.mlgworkshop.org/2017/paper/MLG2017_paper_21.pdf]
64
65
***[DMT'18]** T. Derr, Y. Ma, and J. Tang: *Signed graph convolutional network*, 18th International Conference on Data Mining, 2018, p.929-934. DOI: [10.1109/ICDM.2018.00113](https://doi.org/10.1109/ICDM.2018.00113).
65
66
***[WTAC'17]** S. Wang, J. Tang, C. Aggarwal, Y. Chang, and H. Liu. *Signed network embedding in social media*. 17th SIAM International Conference on Data Mining, 2017, p.327-335. DOI: [10.1137/1.9781611974973.37](https://doi.org/10.1137/1.9781611974973.37).
0 commit comments