When GOT’S Game of Faces meets Generative Adversarial Networks!!

Kajal Gupta
Aug 23, 2017 · 3 min read

Well, if you are a die hard fan of Game of Thrones and if by little chance, you are a newbie in Neural networks and is interested to learn basic working of GANs, then this is the right place for you to understand its concept using the famous GOT’s Game of Faces.

While watching season 7 - episode 6, Arya explains to Sansa remarking,

“Its simple, I ask you a question about yourself, you try to make lies sound like truth. If you fool me, you win. If I catch the lie, you lose!”

Well that’s exactly how Generative Adversarial Neural Network works. GAN is a new neural network architecture having the capability of generating images on its own, given a dataset and a discriminator network. It learns to generate the output or sequence similar to the kind it sees during the training process.

GAN have two neural networks trying to out-do one other while training. One is Generator Network and other is Discriminator Network. Lets say Sansa is Generator and Arya is Discriminator, task of Sansa(Generator Network) would be to tell a lie in such a way that Arya(Discriminator Network) is unable to catch it. For first time when Sansa plays it, she would be a bad liar and Arya would be able to catch her(she is smart!). This is because Sansa is not experienced in it. In same way, when we start our training process, our generator network is not trained. Its bad at producing outputs similar to ones it sees. Its starts to learn and tries to produce fake outputs which can be not distinguished easily by Discriminator network. It updates its weights and generate better outputs slowly and slowly after each iterations, until Discriminator no longer can discriminate between fake and real images.

Now lets go back at time when Arya was getting trained. Before she became perfect, she must have gone through intense training how to become a faceless man. Similarly, we begin training our Discriminator network by showing it series of fake and real images with labels and training it enough such that its able to distinguish the fake ones from real ones.

After this, these two networks are trained alternatively trying to out-perform each other. When Generator produces an output, it is passed to Discriminator to distinguish. If Generator is able to fake(i.e Sansa is able to fool) and Discriminator is unable to catch, then, discriminator updates its weights(Arya needs to learn!). If Generator is unable to fool Discriminator(i.e Sansa fails in making lie sound like truth) then Generator updates its weights(Sansa needs to learn!). This process is repeated until both becomes efficient in performing tasks they are assigned to.

Well this was just a gist trying to explain the basic working of GAN’s. If you want to understand it in depth navigate to this paper.

Till then happy learning and keep waiting for next episode :D

For any edits, feedback or suggestions please feel free to comment or reach out to me at my email or find me on LinkedIn. I would love to hear from you!

)
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade