Skip to main content
QUICK REVIEW

[Paper Review] PLU: The Piecewise Linear Unit Activation Function

Andrei Nicolae|arXiv (Cornell University)|Sep 3, 2018
Neural Networks and ApplicationsComputer Science3 references21 citations
TL;DR

This paper proposes the Piecewise Linear Unit (PLU), a novel activation function that combines the smooth nonlinearity of tanh with the gradient stability of ReLU. PLU uses three linear segments with learnable parameters to better approximate complex nonlinear functions than ReLU, achieving performance close to tanh without vanishing gradients, especially in shallow networks and non-linear function fitting tasks.

ABSTRACT

Successive linear transforms followed by nonlinear "activation" functions can approximate nonlinear functions to arbitrary precision given sufficient layers. The number of necessary layers is dependent on, in part, by the nature of the activation function. The hyperbolic tangent (tanh) has been a favorable choice as an activation until the networks grew deeper and the vanishing gradients posed a hindrance during training. For this reason the Rectified Linear Unit (ReLU) defined by max(0, x) has become the prevailing activation function in deep neural networks. Unlike the tanh function which is smooth, the ReLU yields networks that are piecewise linear functions with a limited number of facets. This paper presents a new activation function, the Piecewise Linear Unit (PLU) that is a hybrid of tanh and ReLU and shown to outperform the ReLU on a variety of tasks while avoiding the vanishing gradients issue of the tanh.

Motivation & Objective

  • To address the limitations of ReLU in fitting smooth, highly nonlinear functions due to its piecewise linear nature with zero gradients.
  • To overcome the vanishing gradient problem of tanh while preserving high nonlinearity for better function approximation.
  • To design an activation function that is computationally efficient, invertible, and avoids the 'dead neuron' problem of ReLU.
  • To evaluate PLU's performance across multiple function approximation tasks and real-world classification benchmarks.

Proposed method

  • PLU is defined as a three-segment piecewise linear function: $\text{PLU}(x) = \max(\alpha(x+c)-c, \min(\alpha(x-c)+c, x))$, where $\alpha$ and $c$ are learnable or fixed hyperparameters.
  • The function is constructed to approximate the shape of the tanh function over a bounded range while remaining unbounded to prevent gradient saturation.
  • The PLU is invertible everywhere, with the inverse given by $\text{PLU}^{-1}(x) = \min\left(\frac{x+c}{\alpha}-c, \max\left(\frac{x-c}{\alpha}+c\right)\right)$, enabling use in invertible networks.
  • The method evaluates PLU in shallow and deep feedforward networks, convolutional networks on CIFAR-10, and in parametric and 3D surface fitting tasks.
  • Training is performed using Adam optimizer with standard hyperparameters across all experiments, comparing PLU against ReLU, tanh, and identity activations.
  • Function approximation tasks use mean squared error (MSE) loss, while image classification uses cross-entropy loss and accuracy metrics.

Experimental results

Research questions

  • RQ1Can a piecewise linear activation function outperform ReLU in approximating smooth, highly nonlinear functions like sin(x) and parametric curves?
  • RQ2Does PLU maintain performance comparable to tanh while avoiding the vanishing gradient problem?
  • RQ3How does PLU compare to ReLU and tanh in deep convolutional networks on real-world image classification tasks?
  • RQ4Is PLU invertible, and can it be used in architectures requiring invertible activation functions?
  • RQ5Does the increased number of linear segments in PLU lead to better function approximation in shallow networks?

Key findings

  • In approximating $\sin(x)$, PLU achieved a mean squared error (MSE) loss two orders of magnitude lower than ReLU, matching the performance of tanh.
  • For parametric function fitting, PLU produced significantly more linear segments than ReLU, enabling a closer fit to the target curve.
  • In 3D surface approximation of the hyperbolic paraboloid $x^2 - y^2$, PLU outperformed ReLU in both visual fit and training loss, approaching tanh performance.
  • On CIFAR-10, while ReLU performed well due to the data's near-linearity, PLU and tanh still trained faster than ReLU, indicating gradient stability.
  • PLU demonstrated invertibility over the entire real domain, unlike tanh (defined only on $(-1,1)$) and unlike ReLU, which is non-invertible.
  • The PLU avoided the 'dead neuron' problem of ReLU and maintained nonzero gradients everywhere, supporting stable training.

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.