**Introduction**

**GANs** are a prevalent class of deep layer models, an example of an implicit problem model; that is, a model where we are defining a Sampling procedure.

In GANs, we essentially have this process, and we will effectively draw some random vectors from the standard Gaussian. Then we will feed that into a determinant transformation parametrized by theta, a neural network, so that's usually called a generator. Then we will take the output of the neural network as the sample from our distribution. The fundamental idea of GANs is to introduce classifiers known as the discriminator and try to train them to differentiate between actual data and examples. And then, our goal is to teach the generator to fool the discriminator. One of the critical problems with GANs is that we can have mode collapse.

We have taken a simple one-dimensional setting where, for example, the data is coming from the shown distribution. The model may only capture one of the modes of the data distribution, so it may forget or ignore that this is the part of the data. Now, how serious is this problem? Google does a paper, and they studied how bad mode collapse is, and then it turns out even for the best GANs, we can drop 72% of the mode. They did this study on the synthetic data set where precision and recall can be precisely computed. The other exciting thing to notice is that this GAN that achieves the best recall level is the original GAN. The other ones are essentially the later improvements.

Why does mode collapse happen?

Here we have simple two-dimensional data. Here the red squares are the actual data examples, and the blue circles are generated samples. When we train GAN on this data set, we will prepare the discriminator in the first step.

In this case, we have one nearest neighbour classifier. The Yellow regions correspond with the area where the discriminator thinks that the thing is real, and the White region is where things are fake. The objective for the generator is to try to portrait all these blue circles that the generator samples to the yellow area.

After one random training, we train the generator to have all the blue circles in the yellow region. We will prepare the discriminator to differentiate between blue circles and red squares and a new decision boundary. We will train the generator again, and all the blue circles will go to the yellow region.

And that is what we get after two rounds of training, and we can notice that here at the top right corner, there are the red squares that don't have any blue Circles. So these are the form modes that the generator is not capturing. Why did this happen? If we think back to what just happened, we essentially pushed all these different generator samples, that is, the blue circles, towards the nearest data example. This ensures that the generated model is a nearby data example, but it does not guarantee a nearby generated sample.

Also See, __Resnet 50 Architecture__

**Ways To Tackle Model Collapse**

We can tackle modal collapse in GANs by following approaches.

- Grouping the classes empowers the discriminator to discriminate against sub-batches to determine if a given batch is real or fake.
- Anticipating counter action removes the situation of the discriminator chasing the generator by training the generator to fool the discriminator maximally.
- Learning from experience involves training the discriminator on the fake data generated by the generator in a given number of rounds.
- Multiple networks involve training multiple generative networks for each class and covering all the data classes.