# A Joint Channel Estimation and Compression Method Based on GAN in 6G Communication Systems
## 3 A GAN Based Channel Estimation Scheme
### Model Usage Stage: Using Generator Model to Achieve Data Channel Estimation  
In this subsection, the trained GAN model is used to estimate the data channels with the pilot channels known. The channel recovery problem is similar to the image completion problem in the computer vision domain [12]. This problem can be solved based on the premise condition that any channel images following the real data distribution can be generated if the generator is well trained. Since there is a one-to-one correspondence between the latent variable and the channel matrix, there is potential to find the target entire channel with the partial pilot channels information known by adjusting the latent  
Figure 4: Training procedure of a GAN model.  
variable \(z\). Thus, the original channel recovery problem \(\mathcal{P}_{1}\) given by (5) can be transformed into the search problem of an optimal latent variable \(z^{*}\), which is expressed as  
\[\mathcal{P}_{3}=\arg\min_{z^{*}}\frac{1}{N_{p}}\sum_{i=1}^{N_{s}}\sum_{j=1}^{N_{ f}}\|\hat{h}_{p}(i,j)-\alpha_{p}(i,j)G(z;\theta_{g})\|,\ 1\leq i\leq N_{s},\ 1\leq j\leq N_{f}, \tag{10}\]  
where \(N_{p}=\sum_{i=1}^{N_{s}}\sum_{j=1}^{N_{f}}\alpha_{p}(i,j)\).  
The procedure of recovering data channels to solve \(\mathcal{P}_{3}\) is presented in Figure 5. Note that only the generator model is involved in channel estimation. During the searching process, the trained generator is used without parameter modification. The entire process can be regarded as the interpolation function \(\mathcal{H}\) defined in (5). As shown in Figure 5, the comparison between the real channels and the generated channels over all pilot positions is conducted to determine the gap between each other. Afterward, the value of latent variable \(z\) can be updated by using gradient descent methods, which makes the new output generated channels at pilot positions closer to the real ones. Once the gap is minimized, an optimal latent variable \(z^{*}\) that reconstructs the pilot channels faithfully can be found. Hence, the channels over all data positions will be recovered well due to the learned strong correlations among elements. The corresponding algorithm is provided in Algorithm 2.  
```
Initialization: Trained generator model \(\theta_{g}^{*}\), latent variable \(z(0)\), learning rate \(\eta\), the form of loss function \(F_{u}(\cdot)\), the maximum number of iterations \(L\) and the convergence threshold \(\epsilon\). Input: The position indicator of pilot channels \(\alpha_{p}(i,j)\), \(1\leq i\leq N_{s}\), \(1\leq j\leq N_{f}\).
```  
**Algorithm 2** Generator based Channel Estimation.  
In Algorithm 2, the optional loss function \(F_{u}(\cdot)\) has a wide range, including \(L_{1}\)-norm and \(L_{2}\)-norm and others. When the updating process of latent variable \(z\) is terminated, the final version of recovered entire channel matrix \(G(z^{*};\theta_{g}^{*})\) with both pilot and data channels can be obtained. Note that the proposed algorithm is available for supporting the implement of any pilot configuration without retraining the neural network since there is no reliance on pilot information during the training process of the GAN model. Therefore, the proposed scheme does not require additional training cost if the pilot configuration changes, which is beneficial for flexible deployment.  
Figure 5: Procedure of recovering data channels with trained generator.