A linear flow has the form . If the matrix is invertible, the linear transform is invertible.
For , the computation of the inverse is . The determinant of the Jacobian is just the determinant of , which also be computed in . This means that linear flows become expensive as the dimension increases.
If the matrix takes a special form, then inversion of the determinant can become more efficient, but the transformation becomes less general.
- Diagonal matrices require only computation for inversion and determinant, but the elements of don’t interact.
- Orthogonal matrices are also more efficient to invert, and their determinant is fixed, but they do not allow scaling of the individual dimensions.
- Triangular matrices are more practical; they are invertible using a back-substitution process, which is , and the determinant is just the product of the diagonal values.
One way to make a linear flow that is general, efficient to invert, and for which the Jacobian can be computed efficiently is to parameterize it directly in terms of the LU decomposition. In other words, we use
where is a pre-determined permutation matrix, is a lower triangular matrix, is an upper triangle matrix with zeros on the diagonal, and is a diagonal matrix that supplies those missing diagonal elements. This can be inverted in , and the log determinant is just the sum of the log of the absolute values on the diagonals of and .
Unfortunately, linear flows are not sufficiently expressive. When a linear function is applied to a normally distributed input , the result is also normally distributed with mean and variance . Thus, it is not possible to map a normal distribution to an arbitrary density using linear flows alone.