Download gmnet/project/gmnet_tpami/reference/source/sec/3_method.tex from YFanwang/Backup: direct link, hf CLI and curl.
- Browser
- Download file 7.04 kB
-
https://huggingface.co/datasets/YFanwang/Backup/resolve/main/gmnet/project/gmnet_tpami/reference/source/sec/3_method.tex
- Command line
-
hf download hf://datasets/YFanwang/Backup/gmnet/project/gmnet_tpami/reference/source/sec/3_method.tex
-
curl -L -o 3_method.tex https://huggingface.co/datasets/YFanwang/Backup/resolve/main/gmnet/project/gmnet_tpami/reference/source/sec/3_method.tex
7.04 kB
| \begin{figure*} | |
| \centering | |
| \includegraphics[width=1.0\textwidth]{imgs/mobilenetv2.pdf} | |
| %\caption{Comparison among Res18, Res18-Ewp. Res18-Gate-ReLU and Res18-Gate-GELU.} | |
| \label{bpgg} | |
| \vspace{-6mm} | |
| \caption{Comparison among different variants of MobileNetv2. | |
| Different architectures respond differently to specific frequency component. | |
| To ensure an informative comparison, we select representative frequency thresholds tailored to each model where we set $r$ to $10$. Additional results under other threshold configurations and other based models are included in the supplementary material. | |
| %and EfficientFormer-v2 (Eformerv2) | |
| %for MobileNetv2 and $\{ 4, 8\}$ for %EfficientFormer-v2 respectively. | |
| %All the variants shows almost same training curves and very close testing curves of the raw data where the difference is lower than $0.03$ on average. In this case, a difference value of $0.1$ can be seen as a significant change. | |
| %When accuracy falls below $15\%$, it can be considered close to the random selection, suggesting that neural networks struggle to learn from this particular frequency range. | |
| %For a better view, we only put curves of two variants in a single image for figures a, b and c. Also, we plot all curves in a single plot and highlighted the most upper curves for each images in (d) to have a comprehensive | |
| %understanding. | |
| } | |
| \label{lgw_comparison} | |
| \end{figure*} | |
| \section{Gating Mechanism Network (GmNet)} | |
| \label{sec:method} | |
| \subsection{Rethinking Current Lightweight Model Architectures From A Frequency Perspective} | |
| \begin{wrapfigure}{r}{0.4\textwidth} | |
| \vspace{-7mm} | |
| \centering | |
| \includegraphics[width=0.85\linewidth]{imgs/arch1.png} | |
| \vspace{-4mm} | |
| \caption{{\bf GmNet architecture}. GmNet adopts a traditional hybrid architecture, utilizing convolutional layers to down-sample the resolution and double the number of channels at each stage. | |
| %Several blocks are repeated to extract features. | |
| } | |
| \vspace{-7mm} | |
| %\includegraphics[width=0.8\linewidth]{egfigure.eps} | |
| \label{arch-main} | |
| \end{wrapfigure} | |
| Before introducing our proposed network, we first investigate the importance of capturing high-frequency information in efficient architectures by modifying existing efficient models to incorporate Gated Linear Units (GLUs). | |
| Specifically, we select one representative architecture: the pure CNN-based MobileNetV2 \cite{sandler2018mobilenetv2}. | |
| %and the transformer-based EfficientFormer-V2 \cite{li2023rethinking}. | |
| We replace the activation functions in their MLP blocks with a simple GLU. Detailed architectural modifications are provided in the appendix. | |
| As shown in Fig. \ref{lgw_comparison}, {we present the testing accuracy curves under the frequency threshold $r=10$.} | |
| Our results demonstrate that integrating GLUs improves classification accuracy on high-frequency components. | |
| %under different threshold settings. | |
| Notably, this improvement in high-frequency classification also correlates with a gain in overall performance. | |
| Furthermore, we observe that using GELU as the activation function within the GLUs enhances performance on low-frequency components, though it has a relatively minor effect on overall accuracy. | |
| These findings suggest that effectively modeling high-frequency information is more crucial for improving the performance of lightweight neural networks. | |
| It underscores the critical role of frequency-aware design in the lightweight networks. | |
| Moreover, we also conduct similar experiments on the transformer-based model EfficientFormer-V2 \cite{li2023rethinking} which can be found in the appendix. | |
| %Incorporating activation functions with favorable frequency characteristics, such as GLUs, offers a promising direction to mitigate the performance gap between lightweight and full-sized models. | |
| \subsection{Architecture of GmNet} | |
| %The advantages of learning more from high-frequencies have been investigated by many works in various tasks []. | |
| To address the limitation of low-frequency bias for current lightweight network designs, our | |
| proposed method named as GmNet integrates a simple gated linear unit into the block as illustrated in | |
| Fig. \ref{arch-main}. | |
| GmNet offers both conceptual and practical advantages on encouraging the model to learn | |
| from a broader range of frequency regions, especially the high-frequency domain. | |
| %Building on the intuitive exploration of the gated linear unit (GLU), This enables XX to efficiently leverage high-frequency information. | |
| GmNets employ an extremely streamlined model architecture, carefully designed to minimize both parameter count and computational speed, making them particularly suitable for deployment in resource-constrained environments. | |
| We incorporate two depth-wise convolution layers with kernel sizes of $7\times 7$ at the beginning and | |
| end of the block respectively to facilitate the integration of low- and high-frequency information. | |
| At the core of the block, we have two $1\times 1$ convolution layers and a simple gated linear unit. | |
| We use the ReLU6 as the activation function. | |
| %Unlike existing methods that often rely on complex structures, | |
| % Using such simple structure is mainly for better building a self-reinforcing gating mechanism. | |
| %ReLU6 can not only emphasize the higher frequency components since it has discontinuous higher derivatives, but also it can limit the amplitudes and energy of the high-frequency components with limiting the max values. | |
| % the details are listed in Table \ref{variants}. | |
| GmNet uses a simplified GLU structure for two reasons: (1) to keep the model as | |
| lightweight as possible, reducing computational load; and (2) ensuring that high-frequency signals can be better enhanced without adding any additional convolutional or fully connected layers within the GLU. | |
| %There are two main purposes of employing the simplest GLU architecture: (1) Improving the model efficiency | |
| %Additionally, a layer scaler is placed at the end of the block to regulate frequency amplitudes, effectively reducing high-frequency noise while enhancing the useful frequency range. | |
| %Different from StarNet \cite{ma2024rewrite}, which employs two separate FC layers for element-wise multiplication, our method simplifies this process with a single FC layer before the GLU. | |
| %Besides the purpose of improving the model efficiency, the simplest GLU architecture whic also enhances the model’s capability to extend the frequency spectrum and emphasize high-frequency components form the feature perspective. We have | |
| Furthermore, our gate unit is more interpretable, aligning with our analysis of GLUs in the frequency domain. | |
| %We also provide experimental evidence demonstrating that this simplified structure is indeed the most effective and efficient. | |
| Experimental results and ablation studies consistently demonstrate the superiority of our model, validating its design in accordance with our GLU frequency domain studies. | |
| We also show that the simplest structure achieves the optimal trade-off between efficiency and effectiveness. | |