# Haze-Aware Attention Network for Single-Image Dehazing
## 3 Method
### Multiscale Frequency Enhancement Module
\(X_{3\times 3}^{l}\), \(X_{3\times 3}^{h}\), \(X_{5\times 5}^{l}\), \(X_{5\times 5}^{h}\), \(X_{5\times 5}^{h}\), \(X_{7\times 7}^{l}\), and \(X_{7\times 7}^{h}\) denote the low-frequency and high-frequency sub-bands for different receptive field sizes. To emphasize the frequency sub-bands that carry important information, we apply learnable weight parameters to the obtained frequency sub-bands for weighting. Taking only the global receptive field as an example, the formula is as follows:  
\[\tilde{X}_{g}^{l}=M_{g}^{l}X_{g}^{l}, \tag{7}\]  
\(\tilde{X}_{g}^{l}\) represents the global low-frequency sub-band after emphasizing important information. Finally, we modulate the weighted frequency sub-bands along the channel dimension using learnable parameters. The final output of the MFEM is obtained by summing these elements together. \[ \begin{split} MFEM(X)&=W_{g}^{c}(\tilde{X}_{g}^{l} +\tilde{X}_{g}^{h})+W_{3\times 3}^{c}(\tilde{X}_{3\times 3}^{l}+\tilde{X}_{3 \times 3}^{h})+\\ W_{5\times 5}^{c}(\tilde{X}_{5\times 5}^{l}+\tilde{X}_{5 \times 5}^{h})+W_{7\times 7}^{c}(\tilde{X}_{7\times 7}^{l}+\tilde{X}_{7 \times 7}^{h}),\end{split}  \tag{8}\]  
\(W_{k}^{c},k=\{1\times 1,3\times 3,5\times 5,7\times 7\}\) represents the channel attention weight maps from the filters of various scales. Our MFEM excels at addressing uneven fog densities and irregular shapes in images, thus successfully achieving the goal of high-quality image reconstruction. This module, with its innovative multiscale processing approach, can accurately identify and handle various details and textures within the image, thus maintaining clarity and realism even under complex conditions. The core strength of MFEM lies in its fine control over different frequency components, thus allowing it to provide customized treatment for every detail in the image. By separately optimizing low-frequency and high-frequency information, the MFEM can significantly enhance the clarity of edges and textures while preserving the overall structure of the image. Moreover, the lightweight design of the module also means  
Figure 3: Multiscale Frequency Enhancement Module. GAP stands for Global Average Pooling. AP k x k means an Average Pooling operation with a kernel size of k x k. Modulation is a process that recalibrates the channels by setting attention weights as directly learnable parameters, without adding any extra layers. Learnable parameters are adjustable values that help adjust the weights at different scales. it has a significant advantage in computational efficiency, thereby enabling it to quickly process a large amount of image data without compromising performance. For the loss function, We designate the dehazed image, the clear ground truth \(J_{gt}\), and the hazy image \(I\) as the anchor, positive sample, and negative sample, respectively: \(L_{CR}=CR(\text{HAA-Net(I)},J_{gt},I)\). Finally, we combine the loss obtained from Contrastive Regularization with the \(L1\) loss function to form the final loss function:  
\[L_{total}=\lambda L_{CR}+L_{1}(HAA-Net(I),J_{gt}). \tag{9}\]  
Our experimental validation shows that when \(\lambda_{1}=0.5\), excellent metrics were achieved.