# Single Image Super-Resolution Method Based on an Improved Adversarial Generation Network
## 3 An Enhanced Generative Adversarial Network for SR
### Perceptual Loss Function  
A two-player minimax game proposed by [PERSON] et al. [9] has been proven to show a relatively good performance for loss functions. Firstly, the authors incorporate noise z from the distribution in the generative model \(G\) over data x as an input variable \(p_{z}(z)\). Secondly, they map the input z to the data space \(G(z;\theta)\) over the generative network. During the training procedure, the generator has enough capacity to fool the discriminative model in order to maximize the probability that the discriminator believes the fake samples from the real images. The generative model \(G\) is trained to minimize the \(\log(1-D(G(z)))\). Thirdly, the discriminative model \(D\) constantly improves its learning ability, and then it distinguishes whether the images are from the generator or from the data distribution. Likewise, they maximize the \(\log(D(x))\) for the discriminator. The value function for the GAN is composed as follows:  
\[\min_{G}\max_{D}V(D,G)=E_{x\sim p_{\text{data}}(x)}[\log D(x)]+E_{z\sim p_{z}(z )}[\log(1-D(G(z)))] \tag{6}\]  
When \(G\) and \(D\) have been sufficiently trained, they will reach a stationary point where they both converge to a Nash equilibrium. Then, the discriminative model \(D\) can be denoted in Equation (7) via a fixed \(G\). \[D_{G}^{\sharp}(x)=\frac{p_{\text{data}}\left(x\right)}{p_{\text{data}}(x)+p_{ g}(x)} \tag{7}\]  
When reaching a stationary Nash equilibrium for \(p_{g}=p_{data}\), we use \(D_{G}^{\sharp}(x)\) to denote \(D_{(x)}\) for simplicity, and Equation (8) can be reformulated as:  
\[\max_{D}V\left(D^{\sharp},G\right) =E_{x\sim p_{\text{data}}}\left[\log D_{G}^{\sharp}(x)\right]+E_{ z\sim p_{z}}\left[\log\left(1-D_{G}^{\sharp}(G(z))\right)\right] \tag{8}\] \[=E_{x\sim p_{\text{data}}}\left[\log\frac{p_{\text{data}}\left(x \right)}{p_{\text{data}}\left(x\right)+p_{g}(x)}\right]+E_{z\sim p_{z}}\left[ \log\frac{p_{g}(x)}{p_{\text{data}}\left(x\right)+p_{g}(x)}\right]\] (9) \[=\int_{x}p_{\text{data}}\left(x\right)\log\frac{\frac{0.5\times p _{\text{data}}\left(x\right)}{p_{\text{data}}\left(x\right)+p_{g}(x)}}{2}dx+ \int_{x}p_{g}(x)\log\frac{\frac{0.5\times p_{g}(x)}{p_{\text{data}}\left(x \right)+p_{g}(x)}}{2}dx\] (10) \[=2\log\frac{1}{2}+\int_{x}p_{\text{data}}\left(x\right)\log\frac{ \frac{p_{\text{data}}\left(x\right)}{p_{\text{data}}\left(x\right)+p_{g}(x)}}{2 }dx+\int_{x}p_{g}(x)\log\frac{\frac{p_{g}(x)}{p_{\text{data}}\left(x\right)+p_{ g}(x)}}{2}dx\] (11) \[=2\log\frac{1}{2}+2\text{JD}\big{(}p_{\text{data}}\left(x\right) \|p_{g}(x)\big{)} \tag{12}\]  
Here, the \(\text{JD}(x\mid y)\) function is the abbreviation of the Jensen-Shannon Divergence between the generative model and the data distribution [26]. However, the above loss function exhibits some limitations. For instance, the discriminator only focuses on whether the input is effectively distinguished (true or false), but there is no penalty for D when it misclassifies those fake samples. This easily causes the gradient vanishing problem where a saddle point may be found. Inspired by LSGAN, [PERSON] et al. [30] adopted the least squares loss function for the discriminative model. Based on this observation, we employed an energy-based regularization term as part of our loss function, to further improve the accuracy of the GAN. Since the center pixels in the synthesized images were correlated with their neighboring ones, we argued that the generator could autonomously converge to reach a point where there is lower energy and it is more stable, under the conditions of a regularization term. In our adversarial network, the generator and discriminator have different perceptional loss functions, respectively. There are three parts for the generative loss function, which includes content loss, adversarial loss, and energy-based regularization. We define the content loss as the MSE between the synthesized images \(G(z)\) from the generator and the real images x, from the data distribution.