Compile | AI technology base (rgznai100)

Participate in | ShangYan, Zhou Xiang



Generative adversarial networks (GANs) are a kind of neural networks used to solve unsupervised learning problems. They can accomplish various tasks, such as generating images through description, restoring high-resolution images from low-resolution images, predicting which drugs can treat a certain disease and retrieving images containing a given pattern.

The Statsbot team invited data scientist Anton Karazeev to talk about GAN engines and their applications in everyday life.

GAN is a kind of neural network proposed by Ian Goodfellow in 2014. They are not the only way to solve the problem of unsupervised learning. Before GAN, Earlier, Boltzmann Machine proposed by Geoffrey Hinton and Terry Sejnowski in 1985 and Dana H. Ballard in 1987 Autoencoders were proposed in 1999. These two neural networks realize feature extraction by learning identity function F (x) = x, and rely on Markov chain to train and generate samples.

Generative adversarial networks are designed to avoid the use of Markov chains because of their high computational cost. GAN has the advantage over Boltzmann machines in that it has fewer constraints on generator functions (only a few probability distributions allow Sampling of Markov chains).

In this article, we will introduce you to how generative adversarial networks work and their most common applications in the real world. This article also provides some useful resources to further your understanding of these methods.

The engine of GAN

Here we use an analogy to explain the concept of GAN.



Let’s say you’re looking to buy a premium watch. If you’ve never seen one before, you probably won’t be able to tell the difference between a branded watch and a fake one. Only with relevant buying experience, you will not be cheated by the seller.

Over the years, when you start to be able to spot most of the knockoffs, sellers will start “producing” more authentic knockoffs. This example explains the behavior of generative adversarial networks: discriminators (watch buyers) and generators (fake watch sellers).

Discriminator and generator networks work against each other. This approach ensures that the generator generates an actual object, such as an image. The generator is forced to produce a sample that looks real, and the discriminator learns to tell if the sample generated by the generator is real data.



What’s the difference between a discriminant algorithm and a generative algorithm? In a nutshell: the discriminant algorithm learns the boundaries between categories (that’s the discriminator’s job), while the generative algorithm learns the distribution of categories (that’s the generator’s job).

The principle of GAN

To learn the distribution of the generator, p_g of data x, the input noise variable p_z(z) should be defined first. G(z, θ_g) then maps z in latent space Z to the data space, and D(x, θ_d) outputs a single scalar — x comes from real data rather than P_G.

Train the discriminator to maximize the probability that actual data and generated sample labels are assigned correctly. Train the generator to minimize the log(1 — D(G(z)) value. In other words, minimize the probability that the discriminator will get the right answer.

Such training tasks can be regarded as minimax algorithm of value function V(G, D) :



In other words — the generator increases its efforts to fool the discriminator, and the discriminator becomes more selective in order not to be fooled by the generator:

“Confrontation training is the coolest thing since sliced bread.” — Yann LeCun

When the discriminator cannot distinguish p_g from p_ data (that is, D(x, θ_d) = ½), the training process stops. A balance is reached between the generator and discriminator error rates.

Image retrieval of historical documents

Similar tags in visual retrieval “Prize Papers” are an interesting example of a GAN application. The Prize Papers are one of the most valuable documents in maritime history research. Adversarial networks make it easier to research important historical documents that contain information about the legitimacy of boat fishing.



Sketch retrieval of adversarial training

Each question included examples of Merchant Marks (unique identifiers of a Merchant’s property) and pictograph-like symbols.

When obtaining the feature expression of each marker, the application of conventional machines and deep learning methods (including convolutional neural network) has the following problems:

  • Need a lot of tagged images;

  • There is no corresponding label for the merchant logo;

  • Flag is not detached from the data set.

This new approach shows how GAN can be used to extract and learn features from a merchant logo image. After learning the feature expression of each symbol, visual retrieval can be carried out on scanned documents.

Text to image

Some researchers have proved that it is feasible to generate corresponding images using description attributes of natural language. However, the text-to-image approach can demonstrate the performance of generating models that simulate real data samples.



Generative adversarial web text to image synthesis

Multi – mode image distribution is the main problem of image generation. For example, there are many correct samples that can accurately express the description, and GAN can help solve this problem.

Take the following task, which maps a blue input dot to a green output dot (the green dot is the possible output of the blue dot). The red arrow represents a prediction error, meaning that the blue dots map to the mean of the green dots over time — which is exactly what makes the image we’re trying to predict blurry.



Generative adversarial networks do not use paired inputs and outputs directly. However, they learn how to pair inputs and outputs.

Here are some images generated using text descriptions:



Generative adversarial web text to image synthesis

Data set used for GAN training:

  • Caltech-ucsd-200 — 2011 is an image dataset consisting of 11,788 images of 200 bird species.

  • The Oxford-102 Flowers dataset consists of photographs of 102 species of Flowers, each with a number of images between 40 and 258.

Drug development

Generative adversative networks are typically used to process images and videos, but researchers at Insilico Medicine have proposed an ai drug discovery approach that utilizes GAN.

Their goal is to train generators to collect as accurately as possible samples of drug candidates from a drug data set that could treat a particular disease.



After completing the training, a generator can be used to generate a drug to treat an incurable disease and a discriminator can be used to determine whether the sample drug actually cures the disease.

Molecular drug development in oncology

Another Insilico Medicine study attempts to generate new anticancer molecules using a defined set of parameters. The aim of the study is to predict drug responses as well as compounds with good anticancer effects.

An adversarial autoencoder (AAE) based on existing biochemical data is proposed to identify and generate novel compounds.



Adversarial autoencoder



“To our knowledge, this is the first application of the GAN approach in cancer drug development.” “– the researchers.

In areas such as Cancer Cell Line Encyclopedia (CCLE), Genomics of Drug Sensitivity in Cancer (GDSC), Data sets such as the NCI-60 Cancer Cell Line Collection have a lot of existing biochemical data. These data sets contain screening data from anticancer trials for different drugs.



GDSC website

The company trained counterencoders using Growth Inhibition percentage data (GI indicates how much cancer cells are reduced after treatment), drug concentration and fingerprints as input.

A molecule’s fingerprint contains a fixed number of bits, which represent the absence or presence of a feature.



The latent layer consists of five neurons, one of which is responsible for GI(efficiency of anticancer cells), and the remaining four are distinguished using normal distribution. A regression term is added to the encoder loss function, and the encoder can only map the same fingerprint to the same latent vector and map the input concentration independently through additional multiple losses.



After completing the training, molecules can be generated with the desired distribution and the output compounds can be tuned using GI neurons.

The conclusions of this study are as follows: trained AAE models can predict compounds with proven anticancer effects and novel compounds that should be validated by experiments on anticancer effects.

“The results show that our proposed AAE model can significantly improve the ability and efficiency of developing new molecular drugs with specific anticancer properties using a deep generative model.”

conclusion

Unsupervised learning is the next frontier of ARTIFICIAL intelligence, and we’re well on our way.

Generative adversarial networks can be used in many fields, from generating images to predicting drugs, so we need to invest heavily in this area. We believe. Generative adversarial networks could make the future of machine learning even brighter. Here are some useful resources for readers to learn more about fighting the web.

Here’s an excerpt from Generative Adversarial Networks:

  • GAN enables the model to understand that there are many correct answers to certain questions (that is, to correctly process multi-modal data); Semi-supervised learning: when the number of existing marker data is limited, the features derived from inference net or discriminator can improve the performance of the classifier.

  • Adversarial network can be used to realize a random extension of deterministic multi-prediction depth Boltzmann machine.

  • C at the same time as a generator and the discriminant of input are added to the function, so that you can get a generated model p (x | c).

Continue reading

What is a Variational Autoencoder?



Ian Goodfellow about GANs for Text on Reddit



“StackGAN: Text to Stacked Generative Adversarial Networks with Photo-realistic Image Synthesis” by Baidu Research



Generative Visual Manipulation on the Natural Image Manifold by Adobe Research



“Unsupervised cross-domain Image Generation” by Facebook AI Research



“Image-to-image Translation with Conditional Adversarial Networks” by Berkeley AI Research


The original address

https://blog.statsbot.co/generative-adversarial-networks-gans-engine-and-applications-f96291965b47