PReLU
PReLU gives a neural network a small, learnable escape route when an activation receives a negative value. It keeps the simple, fast shape of ReLU while avoiding the rule that all negative inputs must become exactly zero.
How it works
A standard ReLU outputs x when x is positive and zero when it is negative. Its negative-side gradient is therefore zero: a unit pushed into that region can stop receiving updates, becoming a “dead” ReLU. A Parametric ReLU (PReLU) instead uses:
- output = x for positive inputs;
- output = a × x for negative inputs.
Crucially, a is a trainable parameter, learned by backpropagation along with weights and biases. The network can decide whether negative signals should be nearly blocked (a near zero), passed weakly, or retained more strongly. The slope can be shared across a layer or learned separately for each channel; PyTorch’s torch.nn.PReLU supports both choices.
Why it helps training
For negative inputs, PReLU has gradient a rather than zero. This preserves a route for error signals to travel backward through deep stacks, reducing stalled units and helping early layers continue to learn. Unlike sigmoid or tanh, it does not saturate on the positive side, so positive gradients remain one. In a deep network whose loss plateaus because many ReLUs have become inactive, replacing them with PReLU can restore useful gradient flow. The cost is tiny—one or a small set of extra parameters per layer—but it adds freedom the model can misuse if data is limited. PReLU is commonly initialized with a small positive slope, such as 0.25; learning then adjusts it to the layer’s needs.
Practical perspective
PReLU is not a cure for exploding gradients, an excessive learning rate, or poor initialization. If loss suddenly diverges after a few epochs, the optimizer settings remain the first suspect. But when the issue is silent inactivity—units consistently outputting zero—PReLU directly addresses the mechanism causing the stall, while retaining the efficient piecewise-linear behavior that made ReLU popular.
PReLU (Parametric Rectified Linear Unit) is a piecewise-linear activation function that outputs x for positive inputs and ax for negative inputs, where the negative slope a is learned during training rather than fixed. It preserves gradient flow for negative activations, reducing dead neurons and allowing the network to adapt its nonlinearity to the data.
Imagine a row of doors that let useful information through. A standard ReLU door opens for positive signals but shuts completely for negative ones. Sometimes, a door that stays shut stops contributing to learning.
PReLU, short for Parametric Rectified Linear Unit, gives each door a small adjustable opening on the negative side. Instead of deciding in advance how much negative information may pass, the network learns the best amount from its examples.
This helps keep more signals alive while the network learns. It can be useful when completely blocking negative values would make parts of a network stop improving, while still preserving the simple, fast behavior that makes ReLU popular.