                 FourierMamba: Fourier Learning Integration with State Space Models for Image Deraining

    Input       PreNet       MPRNet       MAXIM       Restormer       MambaIR    VmambaIR     FreqMamba       Ours         GT




                Figure 5. Qualitative comparison on Rain100H (Yang et al., 2017). Zoom in for better visualization.

where Fg ∈ R1×1×Cr corresponds to the center point of                 where λ is the balancing weight. In particular,λ is set to
the amplitude spectrum of Fr (see supplementary material),            0.02 empirically.
which effectively encapsulates the global information of the
feature. Then, we use the channel-dimensional Fourier trans-          4. Experiment
form shown in Equ. 3 on Fg to obtain F(Fg )(z). Based
on this, we use Equ. 4 for F(Fg )(z) to obtain its ampli-             4.1. Experimental Settings
tude component A(Fg )(z) and phase component P(Fg )(z).
                                                                      Datasets. For training, we employ the widely used Rain13k
Since the amplitude spectrum and phase spectrum have ob-
                                                                      dataset (Chen et al., 2021). It contains 13,712 image
vious information meaning, we choose to perform Mamba
                                                                      pairs in the training set, and we evaluate the results on
scanning on these two components.
                                                                      Rain100H (Yang et al., 2017), Rain100L (Yang et al., 2017),
            A(Fg )(z)′ = ChaScan(A(Fg )(z)),                          Test2800 (Fu et al., 2017b), and Test1200 (Zhang & Patel,
                                                            (9)       2018).
            P(Fg )(z)′ = ChaScan(P(Fg )(z)),
where ChaScan is a one-dimensional sequence transfor-                 Evaluation Metrics. Following previous work (Zamir et
mation that uses the following sequence of operations:                al., 2021; 2022), we adopt two commonly used quantitative
DW Conv → SiLU → SSM → LayerN orm. Its scan-                          metrics for evaluations: Peak Signal-to-Noise Ratio (PSNR)
ning method is shown in Figure 2. After the Mamba cor-                (Huynh-Thu & Ghanbari, 2008) and Structural Similarity
relates different frequencies in the channel dimension, we            Index (SSIM) (Wang et al., 2004).
perform an inverse Fourier transform on it and multiply the           Implementation Details. Our model is implemented within
result with the channel features after SiLU activation.               the PyTorch framework and executed on an NVIDIA A100
                                                                      GPU. The number of blocks per layer has an impact on both
 Fa = (F −1 (A(Fg )(z)′ , P(Fg )(z)′ )) ⊙ SiLU(Fg ), (10)
                                                                      the model’s parameter count and its deraining performance.
where Fa ∈ R1×1×Cr is the channel feature after corre-                After balancing the weights, we configure the blocks per
lating different frequencies. Finally, we multiply it with            layer as [2, 3, 3, 4, 3, 3, 2], which allows us to achieve com-
the spatial feature in a form of attention to get the output          mendable performance with a reasonable number of parame-
Fc ∈ RHr ×Wr ×Cr .                                                    ters. We adopt the progressive training strategy. Specifically,
                                                                      we set the total number of iterations to 80,000 and image
                         Fc = Fa ⊙ Fr .                   (11)        sizes to [160, 256, 320, 384], with the corresponding batch
                                                                      sizes of [8, 4, 2, 1]. We utilize the Adam optimizer with
3.3.4. O PTIMIZATION                                                  default parameters. The initial learning rate is established
                                                                      at 3 × e−4 , followed by a gradual decay to 1 × e−6 using a
We impose constraints in both the spatial and frequency               cosine annealing schedule.
domains. In the spatial domain, we utilize the L1 loss
between the final output Yout and the ground truth Ygt . In           4.2. Comparison with State-of-the-art Methods
the frequency domain, we apply the L1 loss based on the
Fourier transform. The overall loss function is formulated            Comparison on Benchmark Datasets. We first verify the
as follows:                                                           effectiveness of FourierMamba through training models on
                                                                      a mixture of synthetic datasets. We compare our method
 Ltotal = ∥Yout − Ygt ∥1 + λ ∥F(Yout ) − F(Ygt )∥1 , (12)

                                                                  7
