APL (Adaptive Piecewise Linear) is an activation function that adds several "hinges" (bends) to ReLU. The position and slope of each bend are learned separately for every neuron. It was proposed so that the network learns a shape that fits the data, instead of a person choosing which activation function to use (Agostinelli et al., 2015).
- : index of the neuron (unit)
- : number of hinges, set by hand before training
- : slope of each hinge, learned during training
- : position of each hinge, learned during training
Each added term is 0 when is at least , and grows as decreases below . A hinge therefore changes the shape only to the left of its own position. Where is large enough, every hinge is 0 and the output equals .
With , the two examples in the graph take the following values.
| Input | โ3 | โ1 | 0 | 2 |
|---|---|---|---|---|
| โ0.6 | โ0.2 | 0 | 2 | |
| 1 | 0 | 0 | 2 |
The first has the same shape as Leaky ReLU, with a small slope on the negative side. In the second, the output increases to the left of .
Training adds parameters per neuron ( values each of and ). Across the whole network this is parameters ( is the total number of hidden units), which the paper describes as small compared with the number of weights in a typical network.
