Neural Spline Flows (NSF) [1]}. An NSF performs element-wise transformations on \(z\) . Specifically, it transforms an element \(z(i)\)  using a monotonic piece-wise spline function \(f_i\)  that is defined using parameters \(\lbrace \lbrace w^{(k)}\rbrace ^K_{k=0} , \lbrace v^{(k)}\rbrace ^K_{k=0}, \lbrace \delta ^{(k)}\rbrace ^{K-1}_{k=1}\rbrace \) . Refer to [1]} for more details on these parameters. In auto-regressive NSF, a neural network predicts the parameters of \(f_i\)  from the elements \(z(j<i)\)  and \(h_t\) . Then, we find a specific \(k\)  for which \(w^{(k)} <z(i)<w^{(k+1)}\)  and transform \(z(i)\)  as follows.
\(s &= \frac{v^{(k+1)}-v^{(k)}}{w^{(k+1)}-w^{(k)}}\\\xi (z(i)) &= \frac{z(i) - w^{(k)}}{w^{(k+1)}-w^{(k)}}\\f_i(\xi ) &= v^{(k)}+\frac{(v^{(k+1)}-v^{(k)})[s\xi ^2+\delta ^{(k)}\xi (1-\xi )]}{s+[\delta ^{(k+1)}+\delta ^{(k)}-2s]\xi (1-\xi )}\) 
