Abstract
We present a conceptually simple but effective funnel activation for image recognition tasks, called Funnel activation (FReLU), that extends ReLU and PReLU to a 2D activation by adding a negligible overhead of spatial condition. The forms of ReLU and PReLU are $y=\max(x,0)$ and $y=\max(x,px)$, respectively, while FReLU is in the form of $y=\max(x, \mathbb{T}(x))$, where $\mathbb{T}(\cdot)$ is the 2D spatial condition. Moreover, the spatial condition achieves a pixel-wise modeling capacity in a simple way, capturing complicated visual layouts with regular convolutions. We conduct experiments on ImageNet, COCO detection, and semantic segmentation tasks, showing great improvements and robustness of FReLU in the visual recognition tasks.
Introduction: Rethinking Spatial Modeling in Activations
In traditional Convolutional Neural Networks (CNNs), there is a strict division of labor: convolution layers capture spatial dependencies, while activation layers like ReLU provide point-wise non-linearity. Standard activations are "spatially insensitive"—they treat every pixel in isolation. While complex convolutions (like deformable or atrous convolutions) have been developed to better grasp spatial context, they often come with high computational costs.
FReLU (Funnel Activation) addresses this by asking: Can we design an activation function specifically for visual tasks that handles spatial modeling itself? By allowing the activation layer to capture local context through a tiny, learnable spatial window, FReLU significantly boosts performance in image classification, object detection, and semantic segmentation with negligible computational overhead.
Methods: From 1D to 2D Activations
FReLU extends the concept of parametric activations into the spatial domain. To understand FReLU, it helps to look at its predecessors:
- ReLU: $y = \max(x, 0)$
- PReLU: $y = \max(x, px)$ (where $p$ is a learnable scalar)
- FReLU: $y = \max(x, T(x))$
In FReLU, $T(x)$ is a 2D spatial condition. Instead of comparing a pixel to zero or a scalar, FReLU compares it to a value derived from its local neighborhood.
To keep the overhead negligible, $T(x)$ is implemented using a simple $k \times k$ depth-wise separable convolution followed by Batch Normalization. A $3 \times 3$ window is typically the "sweet spot" for performance. This allows each pixel's activation to be conditioned on its immediate surroundings, effectively moving some of the spatial modeling burden from the heavy convolution layers into the lightweight activation layers. This creates a pixel-wise modeling capacity, allowing the network to capture irregular and detailed object layouts more naturally.
Key Results and Performance
The authors evaluated FReLU across three primary computer vision benchmarks: ImageNet 2012 for classification, MS COCO for object detection, and Cityscapes for semantic segmentation. FReLU consistently outperformed ReLU and the popular "searched" activation, Swish, across all tasks.
- Image Classification: On ResNet-50, FReLU achieved a 22.4% Top-1 error, a significant improvement over ReLU's 24.0% and Swish's 23.5%. The gains were even more dramatic for small models; ShuffleNetV2 (0.5x) saw a 2.5% boost in Top-1 accuracy.
- Object Detection & Segmentation: On COCO, FReLU improved mAP by 1.4% over the ReLU baseline. On Cityscapes, it provided a 1.7% increase in mean IU.
- Efficiency: For a ResNet-50, FReLU only increased the parameter count from 25.5M to 25.5M (a tiny fraction) and FLOPs from 3.86G to 3.87G.
Conclusion
FReLU demonstrates that spatial modeling does not have to be the exclusive domain of convolution layers. By integrating a simple spatial condition into the activation function, FReLU provides a powerful, drop-in replacement for ReLU that improves performance across a wide variety of visual recognition tasks. Future work may explore how entire network architectures can be co-designed to fully exploit FReLU’s unique spatial modeling capabilities.
Summary updated