SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} \left\| \frac {\partial}{\partial \boldsymbol {x}} \log | \det  \mathbf {J} _ {g} (\boldsymbol {x}; \theta_ {1}) | - \frac {\partial}{\partial \boldsymbol {x}} \log | \det  \mathbf {J} _ {g} (\boldsymbol {x}; \theta_ {2}) | \right\| _ {2} \\ = \| \boldsymbol {v} (\boldsymbol {x}; \theta_ {1}) - \boldsymbol {v} (\boldsymbol {x}; \theta_ {2}) \| _ {2} \\ = \sqrt {\sum_ {i} \left(\operatorname {T r} \left(\mathbf {M} (i , \boldsymbol {x} ; \theta_ {1})\right) - \operatorname {T r} \left(\mathbf {M} (i , \boldsymbol {x} ; \theta_ {2})\right)\right) ^ {2}} \\ = \sqrt {\sum_ {i} \left(\operatorname {T r} \left(\mathbf {M} (i , \boldsymbol {x} ; \theta_ {1}) - \mathbf {M} (i , \boldsymbol {x} ; \theta_ {2}))\right)\right) ^ {2}} \\ \stackrel {(i)} {\leq} \sqrt {\sum_ {i} D ^ {2} \left\| \mathbf {M} (i , \boldsymbol {x} ; \theta_ {1}) - \mathbf {M} (i , \boldsymbol {x} ; \theta_ {2}) \right\| _ {2} ^ {2}} \\ \stackrel {(i i)} {\leq} \sqrt {\sum_ {i} D ^ {2} \left(l _ {1} ^ {\prime} (\boldsymbol {x}) r _ {2} (\boldsymbol {x}) + l _ {2} (\boldsymbol {x}) r _ {1} ^ {\prime} (\boldsymbol {x})\right) ^ {2} \| \theta_ {1} - \theta_ {2} \| _ {2} ^ {2}} \\ = \sqrt {D ^ {3}} \left(l _ {1} ^ {\prime} (\boldsymbol {x}) r _ {2} (\boldsymbol {x}) + l _ {2} (\boldsymbol {x}) r _ {1} ^ {\prime} (\boldsymbol {x})\right) \| \theta_ {1} - \theta_ {2} \| _ {2}, \\ \end{array}
$$
where  $(i)$  holds by Von Neumann's trace inequality,  $(ii)$  is due to the Lipschitzness of  $\mathbf{M}$ .
Step 3. (Sufficient condition of the Lipschitzness of  $\partial_i s(\pmb{x};\theta)$ )
$\partial_i s(\pmb{x}; \theta)$  can be decomposed as  $(\partial_i s_{\mathbf{u}}(g(\pmb{x}; \theta)))^T \mathbf{J}_g(\pmb{x}; \theta), (s_{\mathbf{u}}(g(\pmb{x}; \theta)))^T \partial_i \mathbf{J}_g(\pmb{x}; \theta)$ , and  $\partial_i [\pmb{v}(\pmb{x}; \theta)]$  as follows:
$$
\begin{array}{l} \partial_ {i} s (\boldsymbol {x}; \theta) = \partial_ {i} \left[ \left(s _ {\mathbf {u}} (g (\boldsymbol {x}; \theta))\right) ^ {T} \mathbf {J} _ {g} (\boldsymbol {x}; \theta) \right] + \partial_ {i} [ \boldsymbol {v} (\boldsymbol {x}; \theta) ] \\ = \left[ \left(\partial_ {i} s _ {\mathbf {u}} (g (\boldsymbol {x}; \theta))\right) ^ {T} \mathbf {J} _ {g} (\boldsymbol {x}; \theta) \right] + \left[ \left(s _ {\mathbf {u}} (g (\boldsymbol {x}; \theta))\right) ^ {T} \partial_ {i} \mathbf {J} _ {g} (\boldsymbol {x}; \theta) \right] + \partial_ {i} \left[ \boldsymbol {v} (\boldsymbol {x}; \theta) \right]. \\ \end{array}
$$
(3.1) The Lipschitzness of  $(\partial_i s_{\mathbf{u}}(g(\pmb{x};\theta)))^T \mathbf{J}_g(\pmb{x};\theta)$  and  $(s_{\mathbf{u}}(g(\pmb{x};\theta)))^T \partial_i \mathbf{J}_g(\pmb{x};\theta)$  can be derived using proofs similar to that in Step 2.1:
$$
\left\| \left(\partial_ {i} s _ {\mathbf {u}} (g (\boldsymbol {x}; \theta_ {1}))\right) ^ {T} \mathbf {J} _ {g} (\boldsymbol {x}; \theta_ {1}) - \left(\partial_ {i} s _ {\mathbf {u}} (g (\boldsymbol {x}; \theta_ {2}))\right) ^ {T} \mathbf {J} _ {g} (\boldsymbol {x}; \theta_ {2}) \right\| _ {2} \leq \left(t _ {2} r _ {1} (\boldsymbol {x}) + t _ {4} r _ {0} (\boldsymbol {x}) l _ {1} (\boldsymbol {x})\right) \| \theta_ {1} - \theta_ {2} \| _ {2},
$$
$$
\left\| \left(s _ {\mathbf {u}} (g (\boldsymbol {x}; \theta_ {1}))\right) ^ {T} \partial_ {i} \mathbf {J} _ {g} (\boldsymbol {x}; \theta_ {1}) - \left(s _ {\mathbf {u}} (g (\boldsymbol {x}; \theta_ {2}))\right) ^ {T} \partial_ {i} \mathbf {J} _ {g} (\boldsymbol {x}; \theta_ {2}) \right\| _ {2} \leq \left(t _ {1} r _ {2} (\boldsymbol {x}) + t _ {3} r _ {0} (\boldsymbol {x}) l _ {2} (\boldsymbol {x})\right) \| \theta_ {1} - \theta_ {2} \| _ {2}.
$$
(3.2) Lipschitzness of  $\partial_i[\pmb {v}(\pmb {x};\theta)]$
Let  $\partial_i[\pmb{v}_j(\pmb{x};\theta)] \triangleq \partial_i \operatorname{Tr}(\mathbf{M}(j,\pmb{x};\theta)) = \operatorname{Tr}(\partial_i \mathbf{M}(j,\pmb{x};\theta))$ . We first show that  $\partial_i \mathbf{M}(j,\pmb{x};\theta)$  can be decomposed as:
$$
\partial_ {i} \mathbf {M} (j, \boldsymbol {x}; \theta) = \partial_ {i} \left(\mathbf {J} _ {g} ^ {- 1} (\boldsymbol {x}; \theta) \partial_ {j} \mathbf {J} _ {g} (\boldsymbol {x}; \theta)\right) = \left(\partial_ {i} \mathbf {J} _ {g} ^ {- 1} (\boldsymbol {x}; \theta) \partial_ {j} \mathbf {J} _ {g} (\boldsymbol {x}; \theta)\right) + \left(\mathbf {J} _ {g} ^ {- 1} (\boldsymbol {x}; \theta) \partial_ {i} \partial_ {j} \mathbf {J} _ {g} (\boldsymbol {x}; \theta)\right)
$$
The Lipschitz constant of  $\partial_i\mathbf{M}$  equals to  $\left(l_2'(x)r_2(x) + l_2(x)r_2'(x)\right) + \left(l_1'(x)r_3(x) + l_3(x)r_1'(x)\right)$  based on a similar derivation as in Step 3.1. The Lipschitzness of  $\partial_i\mathbf{M}(j,\pmb {x};\theta)$  leads to the Lipschitz-ness of  $\partial_i[\pmb {v}(\pmb {x};\theta)]$  ..
$$
\begin{array}{l} \left\| \partial_ {i} \left[ \boldsymbol {v} (\boldsymbol {x}; \theta_ {1}) \right] - \partial_ {i} \left[ \boldsymbol {v} (\boldsymbol {x}; \theta_ {2}) \right] \right\| _ {2} \\ = \sqrt {\sum_ {j} \left(\operatorname {T r} \left(\partial_ {i} \mathbf {M} (j , \boldsymbol {x} ; \theta_ {1})\right) - \operatorname {T r} \left(\partial_ {i} \mathbf {M} (j , \boldsymbol {x} ; \theta_ {2})\right)\right) ^ {2}} \\ = \sqrt {\sum_ {j} \operatorname {T r} \left(\partial_ {i} \mathbf {M} (j , \boldsymbol {x} ; \theta_ {1}) - \partial_ {i} \mathbf {M} (j , \boldsymbol {x} ; \theta_ {2})\right) ^ {2}} \\ \stackrel {(i)} {\leq} \sqrt {\sum_ {j} D ^ {2} \left\| \partial_ {i} \mathbf {M} (j , \boldsymbol {x} ; \theta_ {1}) - \partial_ {i} \mathbf {M} (j , \boldsymbol {x} ; \theta_ {2}) \right\| _ {2} ^ {2}} \\ \stackrel {(i i)} {\leq} \sqrt {\sum_ {j} D ^ {2} \left(l _ {2} ^ {\prime} (\boldsymbol {x}) r _ {2} (\boldsymbol {x}) + l _ {2} (\boldsymbol {x}) r _ {2} ^ {\prime} (\boldsymbol {x}) + l _ {1} ^ {\prime} (\boldsymbol {x}) r _ {3} (\boldsymbol {x}) + l _ {3} (\boldsymbol {x}) r _ {1} ^ {\prime} (\boldsymbol {x})\right) ^ {2} \| \theta_ {1} - \theta_ {2}) \| _ {2} ^ {2}} \\ = \sqrt {D ^ {3}} \left(l _ {2} ^ {\prime} (\boldsymbol {x}) r _ {2} (\boldsymbol {x}) + l _ {2} (\boldsymbol {x}) r _ {2} ^ {\prime} (\boldsymbol {x}) + l _ {1} ^ {\prime} (\boldsymbol {x}) r _ {3} (\boldsymbol {x}) + l _ {3} (\boldsymbol {x}) r _ {1} ^ {\prime} (\boldsymbol {x})\right) \| \theta_ {1} - \theta_ {2}) \| _ {2} \\ \end{array}
$$
where  $(i)$  holds by Von Neumann's trace inequality,  $(ii)$  is due to the Lipschitzness of  $\partial_i\mathbf{M}$ .
A.1.2 Derivation of Eqs. (8) and (9)
Energy-based models are formulated based on the observation that any continuous pdf  $p(\boldsymbol{x};\theta)$  can be expressed as a Boltzmann distribution  $\exp(-E(\boldsymbol{x};\theta))Z^{-1}(\theta)$  [13], where the energy function  $E(\cdot;\theta)$  can be modeled as any scalar-valued continuous function. In EBFlow, the energy function  $E(\boldsymbol{x};\theta)$  is selected as  $-\log(p_{\mathbf{u}}(g(\boldsymbol{x};\theta))\prod_{g_i \in S_n}|\det(\mathbf{J}_{g_i}(\boldsymbol{x}_{i-1};\theta))|)$  according to Eq. (9). This suggests that the normalizing constant  $Z(\theta) = \int \exp(-E(\boldsymbol{x};\theta))dx$  is equal to  $(\prod_{g_i \in S_l}|\det(\mathbf{J}_{g_i}(\theta))|)^{-1}$  according to Lemma A.11.
Lemma A.11.
$$
\left(\prod_ {g _ {i} \in \mathcal {S} _ {l}} | \det  (\mathbf {J} _ {g _ {i}} (\theta)) |\right) ^ {- 1} = \int_ {\boldsymbol {x} \in \mathbb {R} ^ {D}} p _ {\mathbf {u}} (g (\boldsymbol {x}; \theta)) \prod_ {g _ {i} \in \mathcal {S} _ {n}} | \det  (\mathbf {J} _ {g _ {i}} (\boldsymbol {x} _ {i - 1}; \theta)) | d \boldsymbol {x}. \tag {A1}
$$
$$
\begin{array}{l} 1 = \int_ {\boldsymbol {x} \in \mathbb {R} ^ {D}} p (\boldsymbol {x}; \theta) d \boldsymbol {x} \\ = \int_ {\boldsymbol {x} \in \mathbb {R} ^ {D}} p _ {\mathbf {u}} (g (\boldsymbol {x}; \theta)) \prod_ {g _ {i} \in \mathcal {S} _ {n}} | \det  (\mathbf {J} _ {g _ {j}} (\boldsymbol {x} _ {i - 1}; \theta)) | \prod_ {g _ {i} \in \mathcal {S} _ {l}} | \det  (\mathbf {J} _ {g _ {i}} (\theta)) | d \boldsymbol {x} \\ = \prod_ {g _ {i} \in \mathcal {S} _ {l}} | \det  (\mathbf {J} _ {g _ {i}} (\theta)) | \int_ {\boldsymbol {x} \in \mathbb {R} ^ {D}} p _ {\mathbf {u}} (g (\boldsymbol {x}; \theta)) \prod_ {g _ {i} \in \mathcal {S} _ {n}} | \det  (\mathbf {J} _ {g _ {i}} (\boldsymbol {x} _ {i - 1}; \theta)) | d \boldsymbol {x} \\ \end{array}
$$
By multiplying  $\left(\prod_{g_i\in S_l}|\operatorname *{det}(\mathbf{J}_{g_i}(\theta))|\right)^{-1}$  to both sides of the equation, we arrive at the conclusion:
$$
\left(\prod_ {g _ {i} \in \mathcal {S} _ {l}} | \det  (\mathbf {J} _ {g _ {i}} (\theta)) |\right) ^ {- 1} = \int_ {\boldsymbol {x} \in \mathbb {R} ^ {D}} p _ {\mathbf {u}} (g (\boldsymbol {x}; \theta)) \prod_ {g _ {i} \in \mathcal {S} _ {n}} | \det  (\mathbf {J} _ {g _ {i}} (\boldsymbol {x} _ {i - 1}; \theta)) | d \boldsymbol {x}.
$$
Figure A1: An illustration of the relationship between the variables discussed in Proposition 4.1, Lemma A.12, and Lemma A.13.  $\mathbf{x}$  represents a random vector sampled from the data distribution  $p_{\mathbf{x}}$ .  $\{g_i\}_{i=1}^L$  is a series of transformations.  $\mathbf{x}_j \triangleq g_j \circ \dots \circ g_1(\mathbf{x})$ , and  $p_{\mathbf{x}_j}$  is its pdf.  $p_j(\mathbf{x}_j) = p_{\mathbf{u}}(g_L \circ \dots \circ g_{j+1}(\mathbf{x}_j)) \prod_{i=j+1}^L |\det(\mathbf{J}_{g_i})|$ , where  $p_{\mathbf{u}}$  is a prior distribution. The properties of KL divergence and Fisher divergence presented in the last two rows are derived in Lemmas A.12 and A.13.
A.1.3 Theoretical Analyses of KL Divergence and Fisher Divergence
In this section, we provide formal derivations for Proposition 4.1, Lemma A.12, and Lemma A.13. To ensure a clear presentation, we provide a visualization of the relationship between the variables used in the subsequent derivations in Fig. A1.
Lemma A.12. Let  $p_{\mathbf{x}_j}$  be the pdf of the latent variable of  $\mathbf{x}_j \triangleq g_j \circ \dots \circ g_1(\mathbf{x})$  indexed by  $j$ . In addition, let  $p_j(\cdot)$  be a pdf modeled as  $p_{\mathbf{u}}(g_L \circ \dots \circ g_{j+1}(\cdot)) \prod_{i=j+1}^{L} |\det(\mathbf{J}_{g_i})|$ , where  $j \in \{0, \dots, L-1\}$ . It follows that:
$$
\mathbb {D} _ {\mathrm {K L}} \left[ p _ {\mathbf {x} _ {j}} \| p _ {j} \right] = \mathbb {D} _ {\mathrm {K L}} \left[ p _ {\mathbf {x}} \| p _ {0} \right], \forall j \in \{1, \dots , L - 1 \}. \tag {A2}
$$
Proof. The equivalence  $\mathbb{D}_{\mathrm{KL}}[p_{\mathbf{x}}\| p_0] = \mathbb{D}_{\mathrm{KL}}[p_{\mathbf{x}_j}\| p_j]$  holds for any  $j\in \{1,\dots ,L - 1\}$  since:
$$
\begin{array}{l} \mathbb {D} _ {\mathrm {K L}} \left[ p _ {\mathbf {x}} \| p _ {0} \right] \\ = \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \log \left(\frac {p _ {\mathbf {x}} (\boldsymbol {x})}{p _ {0} (\boldsymbol {x})}\right) \right] \\ = \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \right. \log \left(\frac {p _ {\mathbf {x} _ {j}} \left(g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right) \prod_ {i = 1} ^ {j} | \det  \left(\mathbf {J} _ {g _ {i}}\right) |\right)}{p _ {\mathbf {u}} \left(g _ {L} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right) \prod_ {i = 1} ^ {L} | \det  \left(\mathbf {J} _ {g _ {i}}\right) |\}\left. \right)\left. \right] \\ = \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \log \left(\frac {p _ {\mathbf {x} _ {j}} (g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x}))}{p _ {\mathbf {u}} (g _ {L} \circ \cdots \circ g _ {1} (\boldsymbol {x})) \prod_ {i = j + 1} ^ {L} | \det (\mathbf {J} _ {g _ {i}}) |}\right) \right] \\ \stackrel {(i)} {=} \mathbb {E} _ {p _ {\mathbf {x} _ {j}} (\boldsymbol {x} _ {j})} \left[ \log \left(\frac {p _ {\mathbf {x} _ {j}} (\boldsymbol {x} _ {j})}{p _ {\mathbf {u}} (g _ {L} \circ \cdots \circ g _ {j + 1} (\boldsymbol {x} _ {j})) \prod_ {i = j + 1} ^ {L} | \det  (\mathbf {J} _ {g _ {i}}) |}\right) \right] \\ = \mathbb {D} _ {\mathrm {K L}} \left[ p _ {\boldsymbol {x} _ {j}} \| p _ {j} \right], \\ \end{array}
$$
where  $(i)$  is due to the property that  $\mathbb{E}_{p_{\mathbf{x}}(\boldsymbol{x})}[f \circ g_j \circ \dots \circ g_1(\boldsymbol{x})] = \mathbb{E}_{p_{\mathbf{x}_j}(\boldsymbol{x}_j)}[f(\boldsymbol{x}_j)]$  for a given function  $f$ . Therefore,  $\mathbb{D}_{\mathrm{KL}}[p_{\mathbf{x}_j} \| p_j] = \mathbb{D}_{\mathrm{KL}}[p_{\mathbf{x}} \| p_0]$ ,  $\forall j \in \{1, \dots, L-1\}$ .
Lemma A.13. Let  $p_{\mathbf{x}_j}$  be the pdf of the latent variable of  $\mathbf{x}_j \triangleq g_j \circ \dots \circ g_1(\mathbf{x})$  indexed by  $j$ . In addition, let  $p_j(\cdot)$  be a pdf modeled as  $p_{\mathbf{u}}(g_L \circ \dots \circ g_{j+1}(\cdot)) \prod_{i=j+1}^{L} |\operatorname{det}(\mathbf{J}_{g_i})|$ , where  $j \in \{0, \dots, L-1\}$ . It follows that:
$$
\mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x}} \| p _ {0} \right] = \mathbb {E} _ {p _ {\mathbf {x} _ {j}} \left(\boldsymbol {x} _ {j}\right)} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial \boldsymbol {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} \left(\boldsymbol {x} _ {j}\right)}{p _ {j} \left(\boldsymbol {x} _ {j}\right)}\right)\right) \prod_ {i = 1} ^ {j} \mathbf {J} _ {g _ {i}} \right\| ^ {2} \right], \forall j \in \{1, \dots , L - 1 \}. \tag {A3}
$$
Proof. Based on the definition, the Fisher divergence between  $p_{\mathbf{x}}$  and  $p_0$  is written as:
$$
\begin{array}{l} \mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x}} \| p _ {0} \right] \\ = \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \frac {1}{2} \left\| \frac {\partial}{\partial \boldsymbol {x}} \log \left(\frac {p _ {\mathbf {x}} (\boldsymbol {x})}{p _ {0} (\boldsymbol {x})}\right) \right\| ^ {2} \right] \\ = \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \frac {1}{2} \left\| \frac {\partial}{\partial \boldsymbol {x}} \log \left(\frac {p _ {\mathbf {x} _ {j}} \left(g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right) \prod_ {i = 1} ^ {j} | \det  \left(\mathbf {J} _ {g _ {i}}\right) |\right)}{p _ {\mathbf {u}} \left(g _ {L} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right) \prod_ {i = 1} ^ {L} | \det  \left(\mathbf {J} _ {g _ {i}}\right) |\}\right) \right\| ^ {2} \Bigg ] \\ = \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \frac {1}{2} \left\| \frac {\partial}{\partial \boldsymbol {x}} \log \left(\frac {p _ {\mathbf {x} _ {j}} \left(g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right)}{p _ {\mathbf {u}} \left(g _ {L} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right) \prod_ {i = j + 1} ^ {L} | \det  \left(\mathbf {J} _ {g _ {i}}\right) |\}\right) \right\| ^ {2} \right] \\ = \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x})} \log \left(\frac {p _ {\mathbf {x} _ {j}} (g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x}))}{p _ {\mathbf {u}} (g _ {L} \circ \cdots \circ g _ {1} (\boldsymbol {x})) \prod_ {i = j + 1} ^ {L} | \det  (\mathbf {J} _ {g _ {i}}) |\}\right)\right) \frac {\partial g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x})}{\partial \boldsymbol {x}} \right\| ^ {2} \right] \\ \stackrel {(i)} {=} \mathbb {E} _ {p _ {\mathbf {x}} (\boldsymbol {x})} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x})} \log \left(\frac {p _ {\mathbf {x} _ {j}} \left(g _ {j} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right)}{p _ {\mathbf {u}} \left(g _ {L} \circ \cdots \circ g _ {1} (\boldsymbol {x})\right) \prod_ {i = j + 1} ^ {L} | \det  \left(\mathbf {J} _ {g _ {i}}\right) |\}\right)\right) \prod_ {i = 1} ^ {j} \mathbf {J} _ {g _ {i}} \right\| ^ {2} \right] \\ \stackrel {(i i)} {=} \mathbb {E} _ {p _ {\mathbf {x} _ {j}} (\boldsymbol {x} _ {j})} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial \boldsymbol {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} (\boldsymbol {x} _ {j})}{p _ {\mathbf {u}} (g _ {L} \circ \cdots \circ g _ {j + 1} (\boldsymbol {x} _ {j})) \prod_ {i = j + 1} ^ {L} | \det  (\mathbf {J} _ {g _ {i}}) |\}\right)\right) \prod_ {i = 1} ^ {j} \mathbf {J} _ {g _ {i}} \right\| ^ {2} \right], \\ = \mathbb {E} _ {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial \mathbf {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})}{p _ {j} (\mathbf {x} _ {j})}\right)\right) \prod_ {i = 1} ^ {j} \mathbf {J} _ {g _ {i}} \right\| ^ {2} \right], \\ \end{array}
$$
where  $(i)$  is due to the chain rule, and  $(ii)$  is because  $\mathbb{E}_{p_{\mathbf{x}}(\mathbf{x})}[f \circ g_j \circ \dots \circ g_1(\mathbf{x})] = \mathbb{E}_{p_{\mathbf{x}_j}(\mathbf{x}_j)}[f(\mathbf{x}_j)]$  for a given function  $f$ .
Remark A.14. Lemma A.13 implies that  $\mathbb{D}_{\mathrm{F}}[p_{\mathbf{x}_j}\| p_j]\neq \mathbb{D}_{\mathrm{F}}[p_{\mathbf{x}}\| p_0]$  in general, as the latter contains an additional multiplier  $\prod_{i = 1}^{j}\mathbf{J}_{g_i}$  as shown below:
$$
\mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x}} \| p _ {0} \right] = \mathbb {E} _ {p _ {\mathbf {x} _ {j}} (\boldsymbol {x} _ {j})} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial \boldsymbol {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} (\boldsymbol {x} _ {j})}{p _ {j} (\boldsymbol {x} _ {j})}\right)\right) \prod_ {i = 1} ^ {j} \mathbf {J} _ {g _ {i}} \right\| ^ {2} \right],
$$
$$
\mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x} _ {j}} \| p _ {j} \right] = \mathbb {E} _ {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial \mathbf {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})}{p _ {j} (\mathbf {x} _ {j})}\right)\right) \right\| ^ {2} \right].
$$
$$
\mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x} _ {j}} \| p _ {j} \right] = 0 \Leftrightarrow \mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x}} \| p _ {0} \right] = 0, \forall j \in \{1, \dots , L - 1 \}. \tag {A4}
$$
Proof. Based on Remark A.14, the following holds:
$$
\mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x} _ {j}} \| p _ {j} \right] = \mathbb {E} _ {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})} \left[ \frac {1}{2} \left\| \frac {\partial}{\partial \mathbf {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})}{p _ {j} (\mathbf {x} _ {j})}\right) \right\| ^ {2} \right] = 0
$$
$$
\stackrel {(i)} {\Leftrightarrow} \left\| \frac {\partial}{\partial \boldsymbol {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} (\boldsymbol {x} _ {j})}{p _ {j} (\boldsymbol {x} _ {j})}\right) \right\| ^ {2} = 0
$$
$$
\stackrel {(i i)} {\Leftrightarrow} \left\| \frac {\partial}{\partial \boldsymbol {x} _ {j}} \log \left(\frac {p _ {\boldsymbol {x} _ {j}} (\boldsymbol {x} _ {j})}{p _ {j} (\boldsymbol {x} _ {j})}\right) \prod_ {i = 1} ^ {j} \mathbf {J} _ {g _ {i}} \right\| ^ {2} = 0
$$
$$
\stackrel {(i)} {\Leftrightarrow} \mathbb {D} _ {\mathrm {F}} \left[ p _ {\mathbf {x}} \| p _ {0} \right] = \mathbb {E} _ {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})} \left[ \frac {1}{2} \left\| \left(\frac {\partial}{\partial \mathbf {x} _ {j}} \log \left(\frac {p _ {\mathbf {x} _ {j}} (\mathbf {x} _ {j})}{p _ {j} (\mathbf {x} _ {j})}\right)\right) \prod_ {i = 1} ^ {j} \mathbf {J} _ {g _ {i}} \right\| ^ {2} \right] = 0,
$$
where  $(i)$  and  $(ii)$  both result from the positiveness condition presented in Assumption A.1. Specifically, for  $(i)$ ,  $p_{\mathbf{x}_j}(\boldsymbol{x}_j) = p_{\mathbf{x}}(g_1^{-1} \circ \dots \circ g_j^{-1}(\boldsymbol{x}_j)) \prod_{i=1}^j \left| \det(\mathbf{J}_{g_i^{-1}}) \right| > 0$ , since  $p_{\mathbf{x}} > 0$  and  $\prod_{i=1}^j \left| \det(\mathbf{J}_{g_i^{-1}}) \right| = \prod_{i=1}^j |\det(\mathbf{J}_{g_i})|^{-1} > 0$ . Meanwhile  $(ii)$  holds since  $\prod_{i=1}^j |\det(\mathbf{J}_{g_i})| > 0$  and thus all of the singular values of  $\prod_{i=1}^j \mathbf{J}_{g_i}$  are non-zero.
A.2 Experimental Setups
In this section, we elaborate on the experimental setups and provide the detailed configurations for the experiments presented in Section 5 of the main manuscript. The code implementation for the experiments is provided in the following repository: https://github.com/chen-hao-chao/ebflow. Our code implementation is developed based on [7, 17, 44].
A.2.1 Experimental Setups for the Two-Dimensional Synthetic Datasets
Datasets. In Section 5.1, we present the experimental results on three two-dimensional synthetic datasets: Sine, Swirl, and Checkerboard. The Sine dataset is generated by sampling data points from the set  $\{(4w - 2,\sin (12w - 6))\mid w\in [0,1]\}$ . The Swirl dataset is generated by sampling data points from the set  $\{(-\pi \sqrt{w}\cos (\pi \sqrt{w}),\pi \sqrt{w}\sin (\pi \sqrt{w}))\mid w\in [0,1]\}$ . The Checkerboard dataset is generated by sampling data points from the set  $\{(4w - 2,t - 2s + \lfloor 4w - 2\rfloor \bmod 2)\mid w\in [0,1], t\in [0,1], s\in \{0,1\} \}$ , where  $\lfloor \cdot \rfloor$  is a floor function, and mod represents the modulo operation.
To establish  $p_{\mathbf{x}}$  for all three datasets, we smooth a Dirac function using a Gaussian kernel. Specifically, we define the Dirac function as  $\hat{p}(\hat{\boldsymbol{x}}) \triangleq \frac{1}{M} \sum_{i=1}^{M} \delta(\|\hat{\boldsymbol{x}} - \hat{\boldsymbol{x}}^{(i)}\|)$ , where  $\{\hat{\boldsymbol{x}}^{(i)}\}_{i=1}^{M}$  are  $M$  uniformly-sampled data points. The data distribution is defined as  $p_{\mathbf{x}}(\boldsymbol{x}) \triangleq \int \hat{p}(\hat{\boldsymbol{x}}) \mathcal{N}(\boldsymbol{x} | \hat{\boldsymbol{x}}, \hat{\sigma}^2 \boldsymbol{I}) d\hat{\boldsymbol{x}} = \frac{1}{M} \sum_{i=1}^{M} \mathcal{N}(\boldsymbol{x} | \hat{\boldsymbol{x}}^{(i)}, \hat{\sigma}^2 \boldsymbol{I})$ . The closed-form expressions for  $p_{\mathbf{x}}(\boldsymbol{x})$  and  $\frac{\partial}{\partial \boldsymbol{x}} \log p_{\mathbf{x}}(\boldsymbol{x})$  can be obtained using the derivation in [45]. In the experiments,  $M$  is set as 50,000, and  $\hat{\sigma}$  is fixed at 0.375 for all three datasets.
Implementation Details. The model architecture of  $g(\cdot ;\theta)$  consists of ten Glow blocks [4]. Each block comprises an actnorm [4] layer, a fully-connected layer, and an affine coupling layer. Table A2 provides the formal definitions of these operations.  $p_{\mathbf{u}}(\cdot)$  is implemented as an isotropic Gaussian with zero mean and unit variance. To determine the best hyperparameters, we perform a grid search over the following optimizers, learning rates, and gradient clipping values based on the evaluation results in terms of the KL divergence. The optimizers include Adam [46], AdamW [47], and RMSProp. The learning rate and gradient clipping values are selected from (5e-3, 1e-3, 5e-4, 1e-4) and (None, 2.5, 10.0), respectively. Table A1 summarizes the selected hyperparameters. The optimization processes of Sine and Swirl datasets require 50,000 training iterations for convergence, while that of the Checkerboard dataset requires 100,000 iterations. The batch size is fixed at 5,000 for all setups.
A.2.2 Experimental Setups for the Real-world Datasets
Datasets. The experiments presented in Section 5.2 are performed on the MNIST [19] and CIFAR-10 [37] datasets. The training and test sets of MNIST and CIFAR-10 contain 50,000 and 10,000 images, respectively. The data are smoothed using the uniform dequantization method presented in [1]. The observable parts (i.e.,  $\boldsymbol{x}_O$ ) of the images in Fig. 5 are produced using the pre-trained model in [48].