# Attention-Guided Wireless Channel Modeling and Generating
## 3 Modeling and Generating
### Wgan-Gp  
In order to realize complex channel modeling on complex channel dataset, WGAN-GP has strong stability during training, so this study builds upon WGAN-GP as the foundational network for SE-GAN. WGAN-GP evolved from WGAN, which itself evolved from GAN. The Generative Adversarial Network (GAN) consists of a generator (\(G\)) and a discriminator (\(D\)). The generator aims to produce data that closely mimics the distribution of real data, and the discriminator aims to distinguish between real and generated data. The training process of GAN can be conceptualized as a minimax problem, where the objective function is represented as follows:  
\[ \begin{array}{c}min\ max\\ G\quad D\quad V(D,G)=\mathbb{E}_{\mathbf{H}\sim p_{r}}[logD(x)]+\mathbb{E}_{z \sim p_{z}(z)}[log(1-D(G(z)))],\end{array}  \tag{3}\]  
where \(\mathbb{E}_{\mathbf{H}\sim p_{r}}[logD(x)]\) denotes the discriminator's proficiency in identifying the real data from \(\mathbf{H}\). \(\mathbf{H}\) is sampled from the real data distribution \(p_{r}\). The goal of the discriminator is to maximize the recognition probability of the real sample, that is, to maximize \(logD(x)\). \(D(x)\) represents the probability that the discriminator will judge \(\mathbf{H}\) to be the real sample, so the greater the \(logD(x)\), the greater the probability that the discriminator will judge \(\mathbf{H}\) to be the real data. \(\mathbb{E}_{z\sim p_{z}(z)}[\log(1-D(G(z)))]\) denotes the discriminator's capacity to detect the data G(z) generated by the generator. \(G(z)\) represents the data generated by the generator, \(G(z)\sim p_{g}\)[33]. The goal of the \(G(z)\) generator is to generate as much data as possible that the discriminator will judge as true, that is, to minimize the probability that \(\log(1-D(G(z)))\), where \(1-D(G(z))\) indicates the probability that the discriminator will judge that the generated sample is generated by the generator instead of the original data. So, the smaller \(\log(1-D(G(z)))\), the better the discriminator will judge the generator to be the real data. WGAN introduces an approach by employing the Wasserstein distance to quantify the separation between the actual data distribution and the generated data distribution. The Wasserstein distance is defined as follows:  
\[ \begin{array}{c}\mathrm{L}(p_{r},p_{g})=\inf\\ \gamma\in\Pi\big{(}p_{r},p_{g}\big{)}\ \mathbb{E}_{(\mathbf{H},\mathbf{H})\sim \gamma}\big{[}\|\ \mathbf{H}-\mathbf{\hat{H}}\ \|\big{]},\end{array}  \tag{4}\]  
where \(inf\) represents the lower bound, finding the lowest value of the cost function \(\mathbb{E}_{(\mathbf{H},\mathbf{\hat{H}})\sim\gamma}\big{[}\|\ \mathbf{H}-\mathbf{\hat{H}}\ \|\big{]}\) of all the possible joint distributions \(\gamma\). \(\Pi(p_{r},p_{g})\) represents the set of all the possible joint distributions \(\gamma\) whose marginal distributions are \(p_{r}\) and \(p_{g}\), respectively. \(\mathbb{E}_{(\mathbf{H},\mathbf{\hat{H}})\sim\gamma}\big{[}\|\ \mathbf{H}-\mathbf{\hat{H}}\ \|\big{]}\) said in a joint under the \(\gamma\) distribution, transfer from \(p_{r}\) to \(p_{g}\) average minimum cost of a data unit. WGAN trains the models by minimizing the Wasserstein distance with the following objective function:  
\[ \begin{array}{c}min\ max\\ G\quad D\in\mathcal{D}\quad V(D,G)=\mathbb{E}_{\mathbf{H}\sim p_{r}}[D(x)]- \mathbb{E}_{z\sim p_{z}(z)}[D(G(z))],\end{array}  \tag{5}\]  
where \(\mathbb{E}_{\mathbf{H}\sim p_{r}}[D(x)]\) represents the expected value of the discriminator output for sample \(\mathbf{H}\) in the real data distribution \(p_{r}\). \(\mathbb{E}_{z\sim p_{z}(z)}[D(G(z))]\) represents the expected value of the discriminator output of the data generated by the generator for sample \(zdistribution \(p_{z}(z)\). \(\mathcal{D}\) represents the set encompassing all the 1-Lipschitz functions, ensuring that the discriminator function maintains Lipschitz continuity [34].