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
+23-9
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,34 @@
1
1
# Graph Scattering Transforms
2
2
Code for experimentation on graph scattering transforms. If any part of this code is used, the following paper must be cited:
3
3
4
-
F. Gama, J. Bruna, and A. Ribeiro, "<ahref="http://arxiv.org/abs/1906.04784">Stability of graph scattering transforms</a>," arXiv:1906.04784v1 [cs.LG], 11 June 2019.
4
+
F. Gama, J. Bruna, and A. Ribeiro, "<ahref="http://arxiv.org/abs/1906.04784">Stability of graph scattering transforms</a>," in <em>33rd Conf. Nerual Inform. Process. Syst</em>. Vancouver, BC: Neural Inform. Process. Syst. Foundation, 8-14 Dec. 2019.
5
5
6
6
Any questions, comments or suggestions, please e-mail Fernando Gama at [email protected]. The specific random seeds used to get the results that appear in the paper can be obtained by request.
7
7
8
8
## Wavelets
9
9
Graph scattering transform depend on a multi-resolution graph wavelet filter bank. This code implements three different wavelet filter banks, namely:
F. Gama, A. Ribeiro, and J. Bruna, "<ahref="https://openreview.net/forum?id=BygqBiRcFQ">Diffusion Scattering Transforms on Graphs</a>," in 7th Int. Conf. Learning Representations. New Orleans, LA: Assoc. Comput. Linguistics, 6-9 May 2019, pp. 1–12.
13
+
F. Gao, G. Wolf, and M. Hirn, "<ahref="http://proceedings.mlr.press/v97/gao19e/gao19e.pdf">Geometric scattering for graph data analysis</a>," in <em>36th Int. Conf. Mach. Learning</em>, Long Beach, CA, 15-9 June 2019, pp. 1–10.
14
14
15
-
R. R. Coifman and M. Maggioni, "<ahref="https://www.sciencedirect.com/science/article/pii/S106352030600056X">Diffusion wavelets</a>," Appl. Comput. Harmonic Anal., vol. 21, no. 1, pp. 53–94, July 2006.
15
+
F. Gama, A. Ribeiro, and J. Bruna, "<ahref="https://openreview.net/forum?id=BygqBiRcFQ">Diffusion Scattering Transforms on Graphs</a>," in <em>7th Int. Conf. Learning Representations</em>. New Orleans, LA: Assoc. Comput. Linguistics, 6-9 May 2019, pp. 1–12.
16
+
17
+
R. R. Coifman and M. Maggioni, "<ahref="https://www.sciencedirect.com/science/article/pii/S106352030600056X">Diffusion wavelets</a>," <em>Appl. Comput. Harmonic Anal.</em>, vol. 21, no. 1, pp. 53–94, July 2006.
16
18
17
19
2. <i>Monic polynomials interpolated by a cubic polynomial:</i>
18
20
19
-
D. K. Hammond, P. Vandergheynst, and R. Gribonval, "<ahref="https://www.sciencedirect.com/science/article/pii/S1063520310000552">Wavelets on graphs via spectral graph theory</a>," Appl. Comput. Harmonic Anal., vol. 30, no. 2, pp. 129–150, March 2011.
21
+
D. K. Hammond, P. Vandergheynst, and R. Gribonval, "<ahref="https://www.sciencedirect.com/science/article/pii/S1063520310000552">Wavelets on graphs via spectral graph theory</a>," <em>Appl. Comput. Harmonic Anal.</em>, vol. 30, no. 2, pp. 129–150, March 2011.
20
22
21
23
3. <i>Tight frames of Hann wavelets:</i>
22
24
23
-
D. I. Shuman, C. Wiesmeyr, N. Holighaus, and P. Vandergheynst, "<ahref="https://ieeexplore.ieee.org/document/7088640">Spectrum-adapted tight graph wavelet and vertex-frequency frames</a>," IEEE Trans. Signal Process., vol. 63, no. 16, pp. 4223–4235, Aug. 2015.
25
+
D. I. Shuman, C. Wiesmeyr, N. Holighaus, and P. Vandergheynst, "<ahref="https://ieeexplore.ieee.org/document/7088640">Spectrum-adapted tight graph wavelet and vertex-frequency frames</a>," <em>IEEE Trans. Signal Process.</em>, vol. 63, no. 16, pp. 4223–4235, Aug. 2015.
26
+
27
+
4. Additionally, this code allows for comparison with a trainable GNN, in particular, a GIN:
28
+
29
+
K. Xu, W. Hu, J. Leskovec, and S. Jegelka, "<ahref="https://openreview.net/pdf?id=ryGs6iA5Km">How powerful are graph neural networks?</a>" in <em>7th Int. Conf. Learning Representations</em>. New Orleans, LA: Assoc. Comput. Linguistics, 6-9 May 2019, pp. 1–17.
30
+
31
+
F. Gama, A. G. Marques, G. Leus, and A. Ribeiro, "<ahref="https://ieeexplore.ieee.org/document/8579589">Convolutional neural network architectures for signals supported on graphs</a>," <em>IEEE Trans. Signal Process.</em>, vol. 67, no. 4, pp. 1034–1049, Feb. 2019.
24
32
25
33
## Datasets
26
34
Three experiments are run.
@@ -41,14 +49,20 @@ J. McAuley and J. Leskovec, "<a href="https://papers.nips.cc/paper/4532-learning
41
49
The code is written in Python3. Details as follows.
42
50
43
51
### Dependencies
44
-
The following Python libraries are required: <code>os</code>, <code>numpy</code>, <code>matplotlib</code>, <code>pickle</code>, <code>datetime</code>, <code>sklearn</code>, <code>hdf5storage</code>, <code>urllib</code>, <code>gzip</code>, <code>shutil</code> and <code>scipy</code>, as well as a LaTeX installation.
52
+
The following Python libraries are required: <code>os</code>, <code>numpy</code>, <code>matplotlib</code>, <code>pickle</code>, <code>datetime</code>, <code>sklearn</code>, <code>torch</code>, <code>hdf5storage</code>, <code>urllib</code>, <code>gzip</code>, <code>shutil</code> and <code>scipy</code>, as well as a LaTeX installation.
45
53
46
54
### Concept
47
55
The three main files <code>GSTauthorship.py</code>, <code>GSTfacebook.py</code> and <code>GSTsmallWorld.py</code> consists of the three main experiments. The first lines of code on each of those files (after importing the corresponding libraries) have the main parameters defined, which could be edited for running experiment under a different set of hyperparameters.
48
56
49
-
The directory <code>Modules/</code> contains the implemented graph scattering transforms. In most cases, it has a function that just compute the corresponding equation, a wavelet function that computes the graph wavelet filter bank, and a graph scattering transform class that computes the entire representation.
57
+
The directory <code>Modules/</code> contains the implemented graph scattering transforms. In most cases, it has a function that just compute the corresponding equation, a wavelet function that computes the graph wavelet filter bank, and a graph scattering transform class that computes the entire representation. Additionally, the directory <code>Modules/</code> contains <code>architectures.py</code> which has the basic definition of a GNN, and <code>model.py</code> which provides the class that binds together the architecture, optimizer and loss function of a trainable GNN, as well as the methods for training and evaluating.
50
58
51
-
Under <code>Utils/</code> there are three modules containing utilitary classes and functions, such as those handling the graph <code>graphTools.py</code>, handling the data <code>dataTools.py</code> and some miscellaneous tools <code>miscTools.py</code>.
59
+
Under <code>Utils/</code> there are four modules containing utilitary classes and functions, such as those handling trainable GNNs <code>graphML.py</code>, the graph <code>graphTools.py</code>, handling the data <code>dataTools.py</code> and some miscellaneous tools <code>miscTools.py</code>.
52
60
53
61
### Run
54
62
The code runs by simply executing <code>python GSTsmallWorld.py</code> or any of the two other experiments (assuming <code>python</code> is the command for Python3). For running the authorship attribution experiment, the .rar files on <code>datasets/</code> have to be uncompressed. For obtaining the entire Facebook graph, a connection to the internet is required since the dataset is download from its <ahref="https://snap.stanford.edu/data/ego-Facebook.html">source</a>.
63
+
64
+
## Version History
65
+
66
+
<i>October 27, 2019:</i> Upload corresponding to the revised version of the paper, camera-ready for NeurIPS 2019. Main changes include the implementation of the geometric scattering as well as the addition of a trainable GNN (GIN). Also, bugs put forward by other users have been addressed.
67
+
68
+
<i>June 12, 2019:</i> First upload corresponding to the original submission of the paper to NeurIPS 2019 (arXiv:1906.04784v1).
0 commit comments