Abstract
Is it possible to restructure the non-linear activation functions in a deep network to create hardware-efficient models? To address this question, we propose a new paradigm called Restructurable Activation Networks (RANs) that manipulate the amount of non-linearity in models to improve their hardware-awareness and efficiency. First, we propose RAN-explicit (RAN-e) -- a new hardware-aware search space and a semi-automatic search algorithm -- to replace inefficient blocks with hardware-aware blocks. Next, we propose a training-free model scaling method called RAN-implicit (RAN-i) where we theoretically prove the link between network topology and its expressivity in terms of number of non-linear units. We demonstrate that our networks achieve state-of-the-art results on ImageNet at different scales and for several types of hardware. For example, compared to EfficientNet-Lite-B0, RAN-e achieves a similar accuracy while improving Frames-Per-Second (FPS) by 1.5x on Arm micro-NPUs. On the other hand, RAN-i demonstrates up to 2x reduction in #MACs over ConvNexts with a similar or better accuracy. We also show that RAN-i achieves nearly 40% higher FPS than ConvNext on Arm-based datacenter CPUs. Finally, RAN-i based object detection networks achieve a similar or higher mAP and up to 33% higher FPS on datacenter CPUs compared to ConvNext based models.
Introduction
In the pursuit of efficient deep learning, standard metrics like parameter count and Multiply-Accumulate operations (MACs) often fail to correlate with actual hardware performance, measured in Frames Per Second (FPS). A primary reason for this discrepancy is the structure of modern efficient blocks, such as the Inverted Bottleneck (IBN) blocks used in MobileNet and EfficientNet. While IBN blocks are low-MAC, their frequent interleaving of depthwise convolutions and non-linear activations creates "fences" that prevent hardware compilers from fusing layers into larger, more efficient operations. This leads to poor hardware utilization on AI accelerators like Neural Processing Units (NPUs).
Restructurable Activation Networks (RANs) address this by treating non-linear activation functions as structural components that can be strategically added, removed, or collapsed to optimize hardware awareness without sacrificing accuracy.
Methods
RAN-explicit (RAN-e)
RAN-e introduces the Activation Function Restructuring Block (AFRB). This block utilizes Parametric ReLUs (PReLUs) with a trainable parameter $\alpha$. By adjusting $\alpha$, the block can transition between high expressivity and hardware efficiency. When $\alpha=0$, the block functions as a standard IBN block. When $\alpha=1$, the activation becomes a linear identity function ($y=x$), allowing the surrounding layers to be mathematically collapsed into a single, regular convolution.
A lightweight search algorithm is employed to prune unnecessary non-linearities, transforming slow IBN blocks into hardware-friendly regular convolutions where they are not critical for model accuracy.
RAN-implicit (RAN-i)
RAN-i is a training-free model scaling method based on a topological metric called NN-Mass. This metric measures the density of connections within a network. The authors theoretically demonstrate that for architectures like ResNet and ConvNext, NN-Mass is directly proportional to the number of non-linear units and the model's mathematical expressivity. This allows for scaling model width and depth by sampling configurations and selecting those with the highest NN-Mass for a given computational budget, bypassing the need for expensive training during the search phase.
Results and Discussion
The RAN framework was evaluated on ImageNet for classification and COCO for object detection.
Key findings include:
- Hardware Acceleration: RAN-e achieved parity with EfficientNet-Lite-B0 in accuracy while delivering a 1.5× FPS improvement on Arm micro-NPUs.
- Computational Efficiency: RAN-i models reached 83.6% Top-1 accuracy on ImageNet with 1.82× fewer MACs than ConvNext-B. On Arm-based datacenter CPUs, RAN-i achieved nearly 40% higher FPS than ConvNext-S.
- Object Detection: As a backbone for object detection, RAN-i provided a 33% FPS boost on datacenter CPUs while maintaining or improving mean Average Precision (mAP) compared to ConvNext-based models.
Conclusion
RANs demonstrate that non-linearity is a potent lever for hardware optimization. By strategically restructuring activations, models can achieve significant speedups on specialized hardware. Future work includes automating the RAN-e search process and developing more stable, high-dimensional activation functions to further push the boundaries of efficient deep learning.
Summary updated