## 3 Methods
### Loss Function  
Similar to CycleGAN, cyclic consistency loss and adversarial training loss are used to penalize content consistency and data distribution, respectively. According to the atmospheric scattering model, the degree of fog in the real world is related to the scene depth, d, and the scattering coefficient, \(\beta\). Therefore, pseudo scattering coefficient-supervised loss and pseudo depth-supervised loss are employed to learn physical properties (depth and density) from unpaired hazy-free images.  
Adversarial training loss is used to evaluate whether the generated images belong to a specific domain, penalizing the visual fidelity of the hazy and free images while ensuring that they follow the same distribution as the images in the training set. To address the issue of slow convergence of the discriminator caused by the min-max loss, non-saturating GAN (NSGAN) [29] loss is used. NSGAN loss has good stability and visual quality. For the generator, G, and the corresponding discriminator, D, the adversarial loss can be expressed as follows, where \(rh\) is real_hazy sample of the hazy image set, and \(rc\) is real_clean sample of the clean image set:  
\[Loss_{\rm GAN}({\rm G_{H}},{\rm D_{H}})={\rm E}[\log({\rm D_{H}}(rh)]+{\rm E} [\log(1-{\rm D_{H}}({\rm G_{H}}(rc))] \tag{6}\]  
\[Loss_{\rm GAN}({\rm G_{D}},{\rm D_{D}})={\rm E}[\log({\rm D_{D}}(rc)]+{\rm E} [\log(1-{\rm D_{D}}({\rm G_{D}}(rh))] \tag{7}\]  
Training CycleGAN using only adversarial training loss does not guarantee the cyclic consistency of the network [30], which refers to the consistency between the input and output. Therefore, cyclic consistency loss is used to penalize the consistency of the inputs and outputs. This loss is defined as the difference between the input value, x, and the forward prediction, F(G(x)), as well as the input value, y, and the forward prediction, G(F(y)). The larger the difference, the further the prediction is from the original input. The cyclic consistency loss is implemented using L1 loss, as shown in Equation (8) as follows:  
\[Loss_{\rm cycle}={\rm E}[{\rm G_{H}}({\rm G_{D}}(rh))-rh]+{\rm E}[{\rm G_{D}} ({\rm G_{H}}(rc))-rc] \tag{8}\]  
The pseudo-scattering coefficient supervised loss is used to penalize the difference between the randomly sampled scattering coefficients generated and the scattering coefficients estimated from the generated hazy images. It is calculated as follows:  
Figure 7: The discriminator can output the final discrimination result through a layer-by-layer convolution structure.  
\[Loss_{\beta}=\left(\hat{\beta}-\beta\right)^{2} \tag{9}\]  
Pseudo-depth supervised loss is used to penalize the difference between the depth information, \(d\), estimated from the hazy image, \(H\), and the depth information, \(\hat{d}\), estimated from the dehazed image. The L1 loss is used, which is defined as follows:  
\[Loss_{\rm d}=\rm E[\hat{d}-d] \tag{10}\]  
In summary, joint optimization is performed using a weighted combination of the abovementioned losses as follows:  
\[Loss_{\rm total}=\lambda_{\rm GAN}Loss_{\rm GAN}+\lambda_{\rm cycle}Loss_{ \rm cycle}+\lambda_{\beta}Loss_{\beta}+\lambda_{\rm d}Loss_{\rm d} \tag{11}\]  
where \(\lambda_{\rm GAN}\), \(\lambda_{\rm cycle}\), \(\lambda_{\beta}\), and \(\lambda_{\rm d}\) are the weights used to balance different items. Based on previous experience and experiments conducted, setting these weights to 0.2, 1, 1, and 1, respectively, works well in our experiments.