AI of the future: ‘Generative adversarial networks’ (GANs)

AI of the future: ‘Generative adversarial networks’ (GANs)

AI of the future: ‘Generative adversarial networks’ (GANs)

Advancements in artificial intelligence (AI) in the past decade have been tremendous. Machines can now differentiate between humans (even twins!), recognize your voice with utmost precision, and can model any data you provide for analysis and prediction of future trends. But all of this is meager compared to what the next-generation AI can do.

Machines can now generate text, images, and even music that is indistinguishable as fake to an average human. This is possible using a breakthrough idea called the Generative Adversarial Networks by Ian Goodfellow. To understand GANs and their applications better, let’s dive into a very brief introduction to the basic building blocks of a GAN.

Decoding GANs:

GANs stands for generative adversarial networks. As the name adversarial suggests, there are two adversaries in the network that constantly try to better the other. To understand this intuitively, consider that you want to learn and get better at playing chess. Typically, you would learn the basics and then play with someone who is better than you, learn from your mistakes and your opponent’s moves, and improve yourself in every game. That is exactly what GANs do. There are two networks in a GAN:

  1. A generative network that takes a random noise input and generates images/text or any data, depending on our application.
  2. A discriminative network that discriminates the output from the generator as true or false.

These two networks are at war with each other. The generative network learns to create more believable data to fool the discriminator while the discriminator learns to better differentiate false and true samples. The discriminator is also fed with actual samples from a dataset so that it can learn how the true samples look like. For example, we can train the discriminator with a dataset of face images if we want to generate artificial face images. With the basic working of a GAN brushed up, let’s see one in action.

GANs in action:

One most common dataset used to test machine learning algorithms is the MNIST dataset which includes a set of handwritten digits from 0 to 9.

These are 28×28 images with the background in black and the digit itself in white. So now, let’s train this on a GAN and see if it’s able to generate realistic digits.

Keras-dcgan is used for this demo. Within a few hundred epochs (an epoch is one full run of the training algorithm), we can see pretty good images. A sample set of generated images is shown below.

numbers changing

A set of generated images are put together in a single image for analysis. We can see that the network really has learned how most numbers look. The gif below clearly shows how the system gets better after every few training iterations. The numbers the network generates are not something directly taken from the dataset and spit out. They are actual images generated from scratch. Not impressed yet? It just generates some random numbers, right? Then look at this next application where a GAN generates artificial images of objects.

A GAN is trained here with the CIFAR10 dataset, which is a collection of 10 classes of objects, including animals, birds, flowers, motor vehicles, etc. This is how this DCGAN network performs for the CIFAR10 dataset, where it learns to generate fake images of birds, animals, and vehicles.

Source: codeDCGAN_code

The network just generates random images of what it has learned to fake. It can also generate faces of people who technically do not exist on the planet (or do they?). Most faces are skewed and disoriented, but there are also faces that actually look realistic and appealing. Another funny application is we can even do algebra on the faces.

Arithmetic on faces: DCGAN_code

Still not impressed? AI generates realistic images of fake people and animals. Big deal. Pfffft.

All the images I’ve shown here so far are fake ones a GAN generated. But the only control we have over the generated images is through the input noise vector fed to the generator. For different noise vectors, it generates different faces or objects. We really don’t have control here on generating the exact face or the exact object we want. However, a GAN can deal with that too.

What if I told you that a GAN can generate an image of something that’s not even naturally available when you ask for it specifically? For example, you can ask for an image of a “small yellow bird with a brown crown and yellowtail,” and the network would give one for you.

These are the images that the network stack-GAN generated for the above text. Again, these are not images that the generator picked from the dataset matching our text and thrown out. These are images that the generator drew as per our text. Astonishing and scary at the same time, right?

Other applications of GANs:

The above-mentioned applications were mostly of images because it’s easier to understand the effectiveness of GANs with a visual representation. Below are other influential applications of a GAN:

1. Drug discovery and cancer research:

A user can train the generator on available drugs for existing illnesses to generate new possible treatments for incurable diseases. Researchers proposed an adversarial autoencoder (AAE) model for the identification and generation of new compounds based on available biochemical data.

Results of this work are the following: the trained AAE model predicted compounds that are already proven to be anticancer agents and new, untested compounds that should be validated with experiments on anticancer activity.

2. Image inpainting/completion:

Imagine that you had someone photobomb your favorite picture and you couldn’t do anything about it. You can now remove them from the picture using GANs for image inpainting. Example:

Illustration from this paper.

3. Interactive visual manipulation:

As shown below, GANs can create drawings/paintings with simple strokes.

user edits vs generated images

Source: project

Semantic manipulation is amazing and frightening at the same time, as shown in this video:

4. Anomalous tissue detection:

GANs can be used for tissue analysis to find anomalies like in this paper, where results on optical coherence tomography images of the retina demonstrate that the approach correctly identifies anomalous images, such as images containing retinal fluid or hyperreflective foci.

5. Music and video generation

GANs can also generate artificial music and videos. Below is an example of a gif a GAN has generated from a still image.

normal image behaviour

normal image as gif

Source: project

Drawbacks and ongoing research:

While the previous GAN-generated images were nearly perfect, the same network generated the images below. GANs fail to adapt with 3D objects, miss perspective, and sometimes fail to differentiate how many of a particular attribute should appear in an object.

GAN generated images

Source: GAN

GANs are highly unstable, and they require the proper design to prevent one network from overpowering the other inside a GAN. Stabilizing GANs is ongoing research. Facebook’s WassersteinGAN shows promising improvements in GAN stability by using a different loss function. In naive terms, we are still not completely into “what GANs can do for us,” as we are still debating “what we can do for GANs” to make them stable.

But the future of GANs looks bright, and in no time, we could see machine-generated code, music, videos, and even essays and blogs. However, I can assure you this blog post wasn’t written by a GAN (or was it?).

This post may or may not have been written by Infolob’s resident AI guru, Sailesh Krishnamurthy. But you can definitely reach him at [email protected] Sailesh’s next article can be read here.

This Post Has 0 Comments

  1. Mixrak

    Your comment is awaiting moderation.

    https://www.hackathon.io/imvufreecredits2021

    Buying a computer is an investment that should be on purpose made. Due to the tall costs, it pays to find something that fits with how you scheme upon using it. If you buy one that is not right, you will not be able to reach everything that you desire it for. Rather than fall victim to this, the considering article has many fine tips that will helpfully your shopping experience taking into account you looking for a computer.

    KW:
    Free IMVU Credits 2021
    IMVU How To Get Free Credits 2021
    Free IMVU Credits No Offers 2021
    IMVU Hack No Survey 2021

  2. Mixrak

    Your comment is awaiting moderation.

    https://www.hackathon.io/imvufreecredits2021

    Buying a computer is an investment that should be purposefully made. Due to the tall costs, it pays to find something that fits as soon as how you plot on using it. If you purchase one that is not right, you will not be competent to attain everything that you desire it for. Rather than fall victim to this, the next article has many fine tips that will handily your shopping experience next you looking for a computer.

    KW:
    Free IMVU Credits Without Paying 2021
    IMVU Hack 2021
    IMVU Hack Online 2021
    IMVU Hack Apk 2021

  3. Mixrak

    Your comment is awaiting moderation.

    http://zunal.com/evaluation.php?w=755550

    Buying a computer is an investment that should be intentionally made. Due to the tall costs, it pays to locate something that fits similar to how you plot upon using it. If you buy one that is not right, you will not be dexterous to pull off everything that you desire it for. Rather than drop victim to this, the in the manner of article has many fine tips that will conveniently your shopping experience in the same way as you looking for a computer.

    KW:
    How To Hack IMVU Credits 2021
    Free Vip IMVU Membership 2021
    IMVU Free Credits 2021
    IMVU Hack 2021

  4. Mixrak

    Your comment is awaiting moderation.

    http://zunal.com/evaluation.php?w=755550

    Buying a computer is an investment that should be on purpose made. Due to the tall costs, it pays to locate something that fits in the manner of how you scheme upon using it. If you buy one that is not right, you will not be clever to complete anything that you want it for. Rather than drop victim to this, the subsequently article has many fine tips that will understandably your shopping experience later than you looking for a computer.

    KW:
    IMVU Hack Apk 2021
    Free IMVU Credits 2021
    How To Get Free Credits On IMVU Cheats 2021
    How To Get Free Credits On IMVU 2021

  5. Mixrak

    Your comment is awaiting moderation.

    https://tapas.io/marekeugisenmor

    Buying a computer is an investment that should be purposefully made. Due to the high costs, it pays to find something that fits as soon as how you scheme upon using it. If you buy one that is not right, you will not be able to complete all that you desire it for. Rather than fall victim to this, the past article has many fine tips that will usefully your shopping experience following you looking for a computer.

    KW:
    How To Earn Free Credits On IMVU 2021
    IMVU Hack Download 2021
    Earn Free IMVU Credits 2021
    IMVU Hack Generator 2021

  6. Mixrak

    Your comment is awaiting moderation.

    https://www.pinterest.com/eugisen/imvu-generator-android-ios-credits-updated-2021/

    Buying a computer is an investment that should be intentionally made. Due to the high costs, it pays to find something that fits afterward how you plot upon using it. If you purchase one that is not right, you will not be nimble to accomplish whatever that you desire it for. Rather than fall victim to this, the bearing in mind article has many good tips that will helpfully your shopping experience once you looking for a computer.

    KW:
    How To Get Free Credits On IMVU Fast 2021
    How To Hack People On IMVU 2021
    Free IMVU Membership 2021
    IMVU Free Credits Hack 2021

  7. Mixrak

    Your comment is awaiting moderation.

    https://www.pinterest.com/pin/582794008027784820

    Buying a computer is an investment that should be purposefully made. Due to the tall costs, it pays to find something that fits as soon as how you plan upon using it. If you buy one that is not right, you will not be dexterous to complete anything that you desire it for. Rather than drop victim to this, the like article has many fine tips that will suitably your shopping experience subsequent to you looking for a computer.

    KW:
    IMVU Hack Generator 2021
    Free IMVU Credits 2021
    IMVU Cheat Codes For Free Credits 2021
    IMVU Hack Generator 2021

  8. Mixrak

    Your comment is awaiting moderation.

    How To Get Ap On IMVU Free

    Buying a computer is an investment that should be purposefully made. Due to the tall costs, it pays to find something that fits later how you scheme on using it. If you buy one that is not right, you will not be skillful to pull off whatever that you want it for. Rather than fall victim to this, the following article has many good tips that will understandably your shopping experience gone you looking for a computer.

    KW:
    IMVU Earn Free Credits 2021
    How To Get Free Credits On IMVU Cheats 2021
    How To Get Free Credits On IMVU 2021
    How To Get Free Credits On IMVU 2021

  9. ramboPlemn

    Your comment is awaiting moderation.

    IMVU Credits Code

    Buying a computer is an investment that should be on purpose made. Due to the high costs, it pays to find something that fits subsequent to how you plan on using it. If you purchase one that is not right, you will not be skilled to accomplish whatever that you want it for. Rather than fall victim to this, the like article has many fine tips that will clearly your shopping experience subsequently you looking for a computer.

    KW:
    Free IMVU Membership
    IMVU Vip Club Membership Promo
    IMVU Hack Apk
    Free IMVU Credits No Offers

  10. ramboPlemn

    Your comment is awaiting moderation.

    How To Get Ap On IMVU Free

    Buying a computer is an investment that should be carefully made. Due to the high costs, it pays to find something that fits next how you plot on using it. If you buy one that is not right, you will not be able to attain everything that you desire it for. Rather than fall victim to this, the later article has many fine tips that will helpfully your shopping experience behind you looking for a computer.

    KW:
    How To Hack Someone On IMVU
    How To Hack IMVU Accounts
    How To Hack IMVU Accounts
    IMVU How To Get Free Credits

  11. ramboPlemn

    Your comment is awaiting moderation.

    https://www.fcc.gov/fcc-bin/bye?https://lbwic.com/

    Buying a computer is an investment that should be on purpose made. Due to the tall costs, it pays to locate something that fits in imitation of how you plot upon using it. If you purchase one that is not right, you will not be able to accomplish whatever that you want it for. Rather than fall victim to this, the gone article has many good tips that will conveniently your shopping experience bearing in mind you looking for a computer.

    KW:
    How To Hack Someone On IMVU
    How To Get Free Credits On IMVU Mobile
    IMVU Hack No Survey
    IMVU Hack Download

  12. ramboPlemn

    Your comment is awaiting moderation.

    https://sd40.senate.ca.gov/sites/sd40.senate.ca.gov/files/outreach/Common/sd40-hueso-redirect.php?URL=https://lbwic.com/

    Buying a computer is an investment that should be intentionally made. Due to the high costs, it pays to find something that fits gone how you scheme upon using it. If you buy one that is not right, you will not be nimble to attain all that you desire it for. Rather than drop victim to this, the when article has many good tips that will handily your shopping experience subsequently you looking for a computer.

    KW:
    How To Get Free Credits On IMVU
    How To Get Free IMVU Credits
    Free IMVU Credits
    IMVU Hack Account

  13. ramboPlemn

    Your comment is awaiting moderation.

    http://www.sfb606.kit.edu/index.pl/Haupt_Menu_Allgemein/extern/https://lbwic.com/

    Buying a computer is an investment that should be purposefully made. Due to the tall costs, it pays to find something that fits considering how you plot on using it. If you buy one that is not right, you will not be dexterous to reach whatever that you desire it for. Rather than drop victim to this, the in the same way as article has many fine tips that will suitably your shopping experience following you looking for a computer.

    KW:
    IMVU Cheat Codes For Free Credits
    How To Get Free Credits On IMVU Mobile
    Free IMVU Credits Generator
    IMVU Mobile Hack

  14. ramboPlemn

    Your comment is awaiting moderation.

    http://lodserver.iula.upf.edu/describe/?url=https://lbwic.com/

    Buying a computer is an investment that should be carefully made. Due to the high costs, it pays to find something that fits taking into account how you plot upon using it. If you purchase one that is not right, you will not be accomplished to reach whatever that you desire it for. Rather than fall victim to this, the with article has many good tips that will suitably your shopping experience next you looking for a computer.

    KW:
    IMVU Hack No Survey
    IMVU Hack Apk
    IMVU Vip Club Membership Promo
    How To Earn Free Credits On IMVU

  15. ramboPlemn

    Your comment is awaiting moderation.

    https://www.treasury.gov/cgi-bin/redirect.cgi/?https://lbwic.com/

    Buying a computer is an investment that should be intentionally made. Due to the tall costs, it pays to find something that fits taking into account how you plan on using it. If you buy one that is not right, you will not be practiced to attain whatever that you desire it for. Rather than drop victim to this, the later than article has many good tips that will conveniently your shopping experience in the same way as you looking for a computer.

    KW:
    IMVU How To Get Free Credits
    Free IMVU Membership
    Free Vip IMVU Membership
    Free IMVU Credits Without Paying

  16. ramboPlemn

    Your comment is awaiting moderation.

    http://ezp.ulakbim.gov.tr/login?url=https://lbwic.com/

    Buying a computer is an investment that should be deliberately made. Due to the tall costs, it pays to find something that fits past how you plan on using it. If you purchase one that is not right, you will not be able to do all that you desire it for. Rather than fall victim to this, the when article has many good tips that will helpfully your shopping experience taking into account you looking for a computer.

    KW:
    Free IMVU Credits Hack
    How To Get Free Credits On IMVU Mobile
    Free IMVU Credits Hack
    Free IMVU Credits Generator

  17. Mixrak

    Your comment is awaiting moderation.

    http://lodserver.iula.upf.edu/describe/?url=https://lbwic.com/

    Buying a computer is an investment that should be intentionally made. Due to the tall costs, it pays to locate something that fits once how you scheme upon using it. If you buy one that is not right, you will not be competent to accomplish whatever that you want it for. Rather than drop victim to this, the behind article has many fine tips that will handily your shopping experience later you looking for a computer.

    KW:
    IMVU Membership Free
    IMVU Hack Download
    IMVU Hack Tool
    Free IMVU Credits

  18. Mixrak

    Your comment is awaiting moderation.

    http://wasearch.loc.gov/e2k/*/https://lbwic.com/

    Buying a computer is an investment that should be intentionally made. Due to the high costs, it pays to locate something that fits as soon as how you plot upon using it. If you purchase one that is not right, you will not be accomplished to accomplish all that you want it for. Rather than drop victim to this, the once article has many fine tips that will understandably your shopping experience afterward you looking for a computer.

    KW:
    How To Hack IMVU Credits
    IMVU Hack Credits
    IMVU Free Credits Hack
    IMVU Hack Download

  19. Mixrak

    Your comment is awaiting moderation.

    https://slack-redir.net/link?url=https://lbwic.com/

    Buying a computer is an investment that should be with intent made. Due to the tall costs, it pays to find something that fits following how you plan on using it. If you purchase one that is not right, you will not be able to get all that you want it for. Rather than drop victim to this, the subsequent to article has many good tips that will suitably your shopping experience like you looking for a computer.

    KW:
    IMVU Hack Apk
    IMVU Mobile Hack
    IMVU Hack Tool
    IMVU Free Credits Hack

  20. Mixrak

    Your comment is awaiting moderation.

    https://slack-redir.net/link?url=https://lbwic.com/

    Buying a computer is an investment that should be purposefully made. Due to the tall costs, it pays to locate something that fits once how you scheme on using it. If you purchase one that is not right, you will not be accomplished to pull off anything that you want it for. Rather than drop victim to this, the like article has many fine tips that will usefully your shopping experience as soon as you looking for a computer.

    KW:
    IMVU Free Credits No Download
    IMVU Membership Free
    IMVU Hack
    How To Get Free Credits On IMVU Without Surveys

  21. Mixrak

    Your comment is awaiting moderation.

    https://www.hobowars.com/game/linker.php?url=https://lbwic.com/

    Buying a computer is an investment that should be on purpose made. Due to the tall costs, it pays to locate something that fits behind how you plan upon using it. If you purchase one that is not right, you will not be competent to accomplish everything that you want it for. Rather than drop victim to this, the subsequently article has many good tips that will simply your shopping experience subsequent to you looking for a computer.

    KW:
    Earn Free IMVU Credits
    How To Hack IMVU Credits
    How To Get Free IMVU Credits Instantly
    How To Get Free Credits On IMVU Without Surveys

  22. Mixrak

    Your comment is awaiting moderation.

    https://advisor.wmtransfer.com/SiteDetails.aspx?url=https://lbwic.com/

    Buying a computer is an investment that should be on purpose made. Due to the high costs, it pays to locate something that fits similar to how you plan upon using it. If you purchase one that is not right, you will not be accomplished to realize whatever that you desire it for. Rather than drop victim to this, the taking into account article has many good tips that will suitably your shopping experience taking into account you looking for a computer.

    KW:
    How To Hack Someones IMVU Account
    IMVU Hack No Survey
    How To Hack An IMVU Account
    Free IMVU Credits No Survey Or Download

  23. Mixrak

    Your comment is awaiting moderation.

    http://wasearch.loc.gov/e2k/*/https://lbwic.com/

    Buying a computer is an investment that should be deliberately made. Due to the tall costs, it pays to locate something that fits considering how you scheme on using it. If you purchase one that is not right, you will not be nimble to pull off everything that you desire it for. Rather than drop victim to this, the taking into consideration article has many good tips that will usefully your shopping experience past you looking for a computer.

    KW:
    Free IMVU Credits Generator
    IMVU Hack Account
    IMVU Vip Hack
    IMVU Credit Hack Download

  24. Mixrak

    Your comment is awaiting moderation.

    http://anekanews.net/?direct=https://chelseacollins.org#How_To_Get_Free_IMVU_Credits_2021_Whats_about_IMVU

    Buying a computer is an investment that should be deliberately made. Due to the high costs, it pays to find something that fits taking into consideration how you plan upon using it. If you buy one that is not right, you will not be clever to complete anything that you desire it for. Rather than fall victim to this, the in the same way as article has many fine tips that will usefully your shopping experience once you looking for a computer.

    KW:
    IMVU Credits Free
    IMVU Free Credits
    How To Get Free IMVU Credits Instantly
    How To Get Free Credits On IMVU

  25. Mixrak

    Your comment is awaiting moderation.

    https://www.hobowars.com/game/linker.php?url=https://chelseacollins.org

    Buying a computer is an investment that should be carefully made. Due to the high costs, it pays to find something that fits as soon as how you plan on using it. If you buy one that is not right, you will not be clever to attain all that you desire it for. Rather than drop victim to this, the like article has many good tips that will conveniently your shopping experience once you looking for a computer.

    KW:
    How To Hack People On IMVU
    How To Hack IMVU Credits
    IMVU Hack No Survey
    IMVU How To Get Free Credits

  26. Mixrak

    Your comment is awaiting moderation.

    http://www.doetest.virginia.gov/home_files/leaving/redirect.cfm?url=https://chelseacollins.org

    Buying a computer is an investment that should be with intent made. Due to the high costs, it pays to find something that fits in imitation of how you plan on using it. If you purchase one that is not right, you will not be dexterous to reach anything that you desire it for. Rather than drop victim to this, the gone article has many fine tips that will conveniently your shopping experience taking into account you looking for a computer.

    KW:
    How To Hack People On IMVU
    IMVU Hack Tool
    IMVU Hack
    IMVU Free Credits Generator

  27. Mixrak

    Your comment is awaiting moderation.

    http://wasearch.loc.gov/e2k/*/https://chelseacollins.org

    Buying a computer is an investment that should be purposefully made. Due to the high costs, it pays to find something that fits like how you plot on using it. If you buy one that is not right, you will not be practiced to accomplish whatever that you desire it for. Rather than fall victim to this, the once article has many good tips that will helpfully your shopping experience as soon as you looking for a computer.

    KW:
    IMVU Hack Apk
    Free Vip IMVU Membership
    Free IMVU Credits No Survey Or Download
    How To Get Free Credits On IMVU

  28. Mixrak

    Your comment is awaiting moderation.

    http://lodserver.iula.upf.edu/describe/?url=https://chelseacollins.org

    Buying a computer is an investment that should be purposefully made. Due to the tall costs, it pays to find something that fits afterward how you plot upon using it. If you purchase one that is not right, you will not be accomplished to do whatever that you desire it for. Rather than drop victim to this, the considering article has many fine tips that will helpfully your shopping experience next you looking for a computer.

    KW:
    IMVU Hack
    IMVU Free Credits
    IMVU Hack
    IMVU Cheat Codes For Free Credits

  29. Mixrak

    Your comment is awaiting moderation.

    https://slack-redir.net/link?url=https://chelseacollins.org

    Buying a computer is an investment that should be with intent made. Due to the tall costs, it pays to find something that fits following how you plot upon using it. If you buy one that is not right, you will not be skilled to attain all that you want it for. Rather than drop victim to this, the when article has many good tips that will clearly your shopping experience taking into account you looking for a computer.

    KW:
    Free IMVU Credits
    Free IMVU Credits Without Paying
    How To Hack IMVU
    Free IMVU Credits

  30. Mixrak

    Your comment is awaiting moderation.

    https://opensees.berkeley.edu/community/viewtopic.php?f=4&t=65506&p=119198#p119198

    Buying a computer is an investment that should be intentionally made. Due to the tall costs, it pays to locate something that fits next how you plot on using it. If you purchase one that is not right, you will not be accomplished to get all that you desire it for. Rather than drop victim to this, the afterward article has many fine tips that will straightforwardly your shopping experience past you looking for a computer.

    KW:
    IMVU Earn Free Credits
    IMVU Hack Online
    IMVU Cheat Codes For Free Credits
    How To Get Free Credits On IMVU Cheats

Leave a Reply