Skip to main content
QUICK REVIEW

[Paper Review] AReLU: Attention-based Rectified Linear Unit

Dengsheng Chen, Jun Li|arXiv (Cornell University)|Jun 24, 2020
Advanced Neural Network ApplicationsComputer Science41 references14 citations
TL;DR

This paper proposes AReLU, a learnable activation function that integrates an element-wise, sign-based attention mechanism with ReLU to adaptively amplify positive features and suppress negative ones using two learnable parameters per layer. AReLU improves training stability, accelerates convergence under small learning rates, and significantly boosts performance in transfer learning and meta-learning benchmarks across multiple architectures.

ABSTRACT

Element-wise activation functions play a critical role in deep neural networks via affecting the expressivity power and the learning dynamics. Learning-based activation functions have recently gained increasing attention and success. We propose a new perspective of learnable activation function through formulating them with element-wise attention mechanism. In each network layer, we devise an attention module which learns an element-wise, sign-based attention map for the pre-activation feature map. The attention map scales an element based on its sign. Adding the attention module with a rectified linear unit (ReLU) results in an amplification of positive elements and a suppression of negative ones, both with learned, data-adaptive parameters. We coin the resulting activation function Attention-based Rectified Linear Unit (AReLU). The attention module essentially learns an element-wise residue of the activated part of the input, as ReLU can be viewed as an identity transformation. This makes the network training more resistant to gradient vanishing. The learned attentive activation leads to well-focused activation of relevant regions of a feature map. Through extensive evaluations, we show that AReLU significantly boosts the performance of most mainstream network architectures with only two extra learnable parameters per layer introduced. Notably, AReLU facilitates fast network training under small learning rates, which makes it especially suited in the case of transfer learning and meta learning. Our source code has been released (see https://github.com/densechen/AReLU).

Motivation & Objective

  • To address the limitations of fixed activation functions in deep networks, particularly gradient vanishing and suboptimal feature focusing.
  • To improve training dynamics and model expressivity by introducing data-adaptive, learnable activation mechanisms.
  • To enable faster convergence under small learning rates, especially beneficial for transfer learning and meta-learning.
  • To provide a more interpretable and effective alternative to existing learnable activation functions through an attention-based formulation.

Proposed method

  • Introduces an element-wise, sign-based attention module that learns to scale each feature map element based on its sign.
  • Combines the learned attention map with ReLU, forming AReLU as a differentiable, data-adaptive activation function.
  • The attention module learns an element-wise residue relative to ReLU’s identity transformation, improving gradient flow.
  • Uses only two additional learnable parameters per layer, minimizing computational overhead.
  • Applies AReLU across multiple layers in standard CNNs and evaluates performance on image classification, transfer learning, and meta-learning tasks.
  • Employs standard training protocols with SGD and learning rate scheduling, comparing AReLU against non-learnable and other learnable activation functions.

Experimental results

Research questions

  • RQ1Can an attention-based mechanism improve the expressivity and training dynamics of ReLU in deep networks?
  • RQ2Does a learnable, sign-based attention mechanism lead to faster convergence, especially under small learning rates?
  • RQ3How does AReLU compare to existing learnable activation functions in transfer learning and meta-learning scenarios?
  • RQ4Can AReLU achieve better performance with minimal parameter overhead and improved gradient flow?

Key findings

  • AReLU achieves 78.48% test accuracy on SVHN after 20 epochs of fine-tuning, outperforming all other activation functions in the transfer learning setting.
  • On the 5-ways-1-shot meta-learning task, AReLU reaches 92.50% accuracy, significantly exceeding PReLU (88.13%) and PAU (43.13%), demonstrating superior adaptation speed.
  • In meta-learning with 5-ways-5-shots, AReLU achieves 94.30% accuracy, surpassing all baselines including SELU (93.50%) and GELU (69.37%).
  • AReLU enables fast convergence under small learning rates (1e-5), making it highly effective for fine-tuning and meta-learning.
  • Feature visualization confirms that AReLU produces well-focused, task-oriented activation, highlighting relevant regions in feature maps.
  • The addition of only two learnable parameters per layer leads to consistent and significant performance gains across diverse architectures and benchmarks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.