| CARVIEW |
Select Language
HTTP/2 200
server: GitHub.com
content-type: application/xml
last-modified: Thu, 26 May 2022 10:55:21 GMT
access-control-allow-origin: *
etag: W/"628f5c99-2bd2"
expires: Mon, 29 Dec 2025 11:05:51 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: 3CDF:328FD3:8B77D8:9C8CDF:69525E36
accept-ranges: bytes
age: 0
date: Mon, 29 Dec 2025 10:55:51 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210074-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1767005751.094789,VS0,VE228
vary: Accept-Encoding
x-fastly-request-id: 02e5e195cd329b8bf03c41d2d5e193b3f4bd074b
content-length: 3476
Jekyll 2022-05-26T03:55:15-07:00 https://panford.github.io/feed.xml Kobby Panford-Quainoo personal description Kobby Panford-Quainoo Getting Started with Graph Neural Networks 2021-05-30T00:00:00-07:00 2021-05-30T00:00:00-07:00 https://panford.github.io/posts/2021/05/blog-post-1 <p>Here, you’ll find a few resources that’ll get you started with Graph Neural Networks. I will keep updating it so you can always check back!.</p>
<p>Intro to graph representation learning</p>
<ol>
<li>Representation learning on graphs: Methods and Applications; <a href="https://arxiv.org/abs/1709.05584">Hamilton et al.</a></li>
<li>Graph Neural Networks: A review or methods and applications; <a href="https://arxiv.org/abs/1812.08434">Zhou et al;</a></li>
<li>Deep Learning on graphs: A survey; <a href="https://arxiv.org/pdf/1812.04202">Ziwei Zhang et al</a></li>
</ol>
<p>Books:</p>
<ol>
<li>Graph Representation learning book; <a href="https://www.cs.mcgill.ca/~wlh/grl_book/">Will Hamilton (Highly recommended for comprehensive understanding)</a></li>
<li>Geometric Deep Learning Grids, Groups, Graphs, Geodesics, and Gauges; <a href="https://arxiv.org/pdf/2104.13478.pdf">Bronstein et al</a></li>
</ol>
<p>Video:</p>
<ol>
<li>Machine Learning with Graphs; Jure Leskovec (Stanford University), <a href="https://www.youtube.com/playlist?list=PLoROMvodv4rPLKxIpqhjhPgdQy7imNkDn">Videos</a>, <a href="https://web.stanford.edu/class/cs224w/">Course website</a></li>
</ol>
<p>Important to know architectures</p>
<ol>
<li>Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering (ChebNet); <a href="https://arxiv.org/pdf/1606.09375">Deferrard et al</a></li>
<li>Graph Convolutional Neural Networks; <a href="https://arxiv.org/pdf/1609.02907">Kipf et al.</a></li>
<li>Graph Attention Networks (GAT); <a href="https://arxiv.org/pdf/1710.10903">Velickovic et al.</a></li>
<li>Inductive Representation learning in large graphs; <a href="https://arxiv.org/pdf/1706.02216">Hamilton et al</a></li>
<li>Graph Isormorphism Networks; <a href="https://arxiv.org/pdf/1810.00826">Xu et al.</a></li>
<li>Gated Graph Sequence Neural Networks; <a href="https://arxiv.org/abs/1511.05493">Li et al</a></li>
<li>Benchmarking Graph Neural Networks; <a href="https://arxiv.org/pdf/2003.00982">Dwivedi et al</a></li>
</ol>
<p>Frameworks/ tools</p>
<ol>
<li>PyTorch Geometric <a href="https://pytorch-geometric.readthedocs.io/en/latest/notes/introduction.html">(Based on pytorch)</a></li>
<li>Spekral <a href="https://graphneural.network/">(Tensorflow/ keras)</a></li>
<li>Deep Graph Library <a href="https://www.dgl.ai/">(Framework agnostic, compatible with PyTorch, Tensorflow, MxNet etc)</a></li>
<li>Open Graph Benchmark: <a href="https://arxiv.org/pdf/2005.00687">Datasets for Machine Learning on graphs</a></li>
</ol> Kobby Panford-Quainoo Here, you’ll find a few resources that’ll get you started with Graph Neural Networks. I will keep updating it so you can always check back!. Adversarial Autoencoders 2021-05-30T00:00:00-07:00 2021-05-30T00:00:00-07:00 https://panford.github.io/posts/2013/08/blog-post-2 <h2 id="short-notes-on-adversarial-autoencoders">Short Notes on Adversarial Autoencoders</h2>
<p>The Adversarial autoencoder (AAE) was proposed by <a href="https://arxiv.org/abs/1511.05644">Alireza Makhzani et al (2016)</a>. AAE is a generative model with two main objectives. First is to learn a compressed/ latent representation of data while ensuring that the learned latent representation follows a prior distribution we get to define.</p>
<p>For instance, with an <em>autoencoder</em>, we have en encoder block that encodes the input data into a fixed vector $z$ of potentially lower dimension that the input and retaining as much information as possible. If we want to retrieve the input data, we simply pass the latent vector ,$z$, to a decoder which attempts to create the data (reconstruct) into the original dimension.</p>
<p>One important point here is that the latent vector $z$ learned by the autoencoder is always fixed and the reconstructed data is pretty much the same each time the decoder reconstructs it. The $z$ is therefore useful if we want only to do <em>dimensionality reduction</em>.</p>
<p>For <em>variational autoencoders</em>, instead of encoding the input data into a fixed vector ,$z$, the encoder learns parameters $\mu$ and $\sigma$ of a distribution which can be reparameterized with samples from a simpler distribution say a standard gaussian (a gaussian distribution with mean 0 and standard deviation 1) to get the z vector ($z = \mu + \sigma \epsilon $, where $\epsilon \sim \mathcal{N}(0,1)$).
This allows us to create new forms of the data by simply sampling from the standard gaussian and have the decoder reconstruct the data. Sometimes however, the prior distribution might be different from the learned distribution. Reconstructing the data from samples from the prior might therefore not be very useful.</p>
<p>The <em>Adversarial autoencoder</em> uses quite a bit different technique to impose the prior distribution on the latent code and besides, it allow some flexibility with the choice of prior distribution. By imposing a prior distribution on the latent code, we mean, we want the latent code to follow a prior distribution, say a gaussian distribution with mean 0 and standard deviation 1.</p>
<p><img src="/images/aae1.png" alt="Adversarial Autoencoder-complete architecture" /></p>
<p><em>Fig 1. Adversarial Autoencoder architecture</em></p>
<!-- <figure>
<img src="/images/aae1.png" alt="Trulli" style="width:100%">
<figcaption align = "center"><b>Fig 1. Adversarial Autoencoder architecture</b></figcaption>
</figure> -->
<p>The AAE is made up of a <em>generator</em> and a <em>discriminator</em> as in the generative adversarial network. The <em>generator</em> is made up of an <em>encoder</em> and a <em>decoder</em> as for an autoencoder and the discriminator is a simple neural network which produces a binary output (0/1).</p>
<p>Again, main objectives of the adversarial autoencoder is 1.) for the generator’s encoder to learn better representation for the input data and the decoder to be able to reconstruct the data as close as possible to the original input from the latent code. 2.) The discriminator should guide the generator’s encoder to produce a latent code that resembles samples from our prior distribution. Below, lets look at the two main training phases;</p>
<p><img src="/images/aae2.png" alt="Reconstruction Phase" /></p>
<p><em>Fig 2. Reconstruction Phase: update generator (encoder + decoder)</em></p>
<p><strong>Phase 1</strong>: The generator’s encoder encodes the input data into a latent representation whiles the decoder attempts to reconstruct the original data from the latent code. This represents the <em>first training phase</em> where the generator’s encoder and decoder are both optimized jointly to minimize reconstruction error in the generator.</p>
<p><img src="/images/aae3.png" alt="Regularization Phase: Discriminator training" /></p>
<p><em>Fig 3. Regularization phase: discriminator training</em></p>
<p><strong>Phase 2</strong>:
i) The discriminator receives samples from the prior distribution and the latent code labeled as <em>true/positive samples</em> and <em>false/ negative samples</em> respectively. The samples are fed to the discriminator which is a neural network model with a binary output for this classification task. Only the discriminator’s parameters are updated at this point.</p>
<p><img src="/images/aae4.png" alt="Regularization Phase: Generator (Encoder) training" /></p>
<p><em>Fig 4. Regularization phase: encoder (generator) training</em></p>
<p>ii) In the second part of the regularization phase, the generator’s encoder trains to fool the discriminator to believe that the samples it has generated come from the prior distribution. If the latent code truly resembles samples from the prior distribution, then the generator yields a low loss and a high loss if otherwise. Gradients from the discriminator is propagated to the generator’s encoder to update its parameters (implementation detail: discriminator’s parameters should be frozen at this point).</p>
<!-- This concludes it you can play around with this code (posted soon)! -->
<!-- hello --> Kobby Panford-Quainoo Short Notes on Adversarial Autoencoders