# FMGAN: A Filter-Enhanced MLP Debias Recommendation Model Based on Generative Adversarial Network
## 3 Methodology
### Adversarial Training  
In the GAN framework, the generator and the discriminator engage in an adversarial training process where the generator generates samples, and the discriminator evaluates their realism by assigning a probability value. This iterative process provides improvement directions for both the generator and the discriminator and is considered the most important aspect of GAN training. During the early stages of training, the generator's sample distribution can differ significantly from the historical interaction data used by the discriminator, leading to high confidence discrimination and subsequent loss feedback to the generator. The generator then uses this loss as guidance to improve its model parameters and generate more realistic data lists. This cyclic process of generating and confronting continues, leading to mutual progress between the two structures.  
The adversarial training process begins by iterating the discriminator on real data and fake data generated by the generator. The discriminator learns the distribution of real data, assigns a loss value, and then learns the distribution of fake data generated by the generator and assigns another loss value. The objective function of the discriminator can thus be expressed as:  
\[J^{D}=\min_{\theta}-\sum_{u}(logD(\mathbf{r})+log(1-D(\left.G(u|\mathbf{c})\right)) \tag{10}\]  
where \(\mathbf{r}\) is the historical interaction data, and \(\mathbf{c}\) is the condition vector.  
With each iteration of the adversarial training process, the discriminator improves its discriminatory ability against the generator. The next step involves iterating the generator. The generator generates fake data and then computes the mean squared error (MSE) loss against real data:  
\[loss_{MSE}=\frac{1}{m}(\mathbf{\hat{r}_{u}}-\mathbf{r_{u}})^{2} \tag{11}\]  
The mean squared error (MSE) loss enables the generator to learn directly from the gap between its generated data and real data; this loss prevents the score generated by G from being too large, as the loss calculated by D is usually small. Excessive generation errors are not easy to be optimized by small discrimination errors. Otherwise, there is a danger of overfitting. The generator's fake data are then input into the discriminator, which assigns  
Figure 3: The structure of the discriminator in our model. The green dots indicate that the output is close to 1, and the red dots indicate that the output is close to 0.  
another loss value. This loss serves as a guide for further training and pushes the generated data towards a direction that is more difficult for the discriminator to distinguish, creating an adversarial effect. The adversarial loss can be expressed as:  
\[loss_{adv}=\sum_{u}log(1-D(G(u|c))) \tag{12}\]  
The objective function of the generator can then be determined according to the two losses as:  
\[J^{G}=\min_{\phi}\sum_{u}(loss_{adv}+\alpha loss_{MSE}) \tag{13}\]  
where \(\alpha\) is a hyperparameter. The adversarial training process involves the two modules improving each other, leading to healthy progress. The generator improves its embedding vector and generates a high-quality recommendation list that better captures the user's preferences. The discriminator initially distinguishes real and fake data but may not be robust to noisy data. It continuously searches for small differences between real and fake data to guide the generator towards the desired target through these slight differences. This iterative process helps both modules improve and achieve better results.