Glow
Glow は、Flow-based model を high-quality image generation に適用した代表的な model です。RealNVP を発展させ、actnorm、invertible 1x1 convolution、affine coupling layer を組み合わせます。
One step of flow
Glow の一つの flow step は、主に次の三つから構成されます。
- Actnorm
- Invertible 1x1 convolution
- Affine coupling layer

画像出典: Lilian Weng, “Flow-based Deep Generative Models”。Glow の一つの step は、actnorm、invertible 1x1 convolution、affine coupling から構成されます。
Actnorm
Actnorm は、activation normalization の一種です。Batch Normalization のように batch statistics に依存するのではなく、learnable な scale と bias を使います。
Invertible 1x1 convolution
RealNVP では、dimension を入れ替えるために fixed permutation が使われます。Glow では、これを learnable な invertible 1x1 convolution に置き換えます。これによって channel 間の mixing をより柔軟に学習できます。
Affine coupling
Glow でも、RealNVP と同様に affine coupling layer が使われます。Coupling layer によって invertibility と efficient Jacobian determinant calculation を両立します。
性能比較

画像出典: Lilian Weng, “Flow-based Deep Generative Models”。Glow の likelihood と sampling quality の比較が示されています。
数式で見る affine coupling と log determinant
Glow のような flow-based model は、可逆変換 と change of variables を使って likelihood を計算します。
Affine coupling layer では、入力を二つに分けて次のように変換します。
この変換の Jacobian は triangular になるため、log determinant は簡単に計算できます。
この式の気持ちは、「表現を十分に混ぜたいが、likelihood を計算するために Jacobian determinant は簡単にしたい」という trade-off を、coupling 構造で解いているということです。