Since linear flows are not sufficiently expressive, we turn to nonlinear flows. The simplest of these are elementwise flows, which apply a pointwise nonlinear function with parameters to each element of the input so that:
The Jacobian is diagonal since the -th input to only affects the -th output. Its determinant is the product of the entries in the diagonal, so:
The function could be a fixed invertible nonlinearity like the leaky ReLU, in which case there are no parameters. It can also be any parameterized invertible one-to-one mapping. A simple example is a linear piecewise function with regions, which maps to as:
where the parameters are positive and sum to , and is the index of the bin that contains . The first term is the sum of all the preceding bins, and the second term represents the proportion of the way through the current bin that lies. This function is easy to invert, and its gradient can be calculated almost everywhere. There are many similar schemes for creating smooth functions, often using splines with parameters that ensure the function is monotonic and hence invertible.
Analysis
Elementwise flows are nonlinear but don’t mix input dimensions, so they can’t create correlations between variables. When alternated with linear flows (which do mix dimensions), more complex transformations can be modeled. However, in practice, elementwise flows are used as components of more complex layers like coupling flows.