SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} - \alpha_ {t} (\mathbf {X}) (\overleftarrow {\mathbf {b}} _ {T - t} ^ {\theta} (\mathbf {X}) \cdot \nabla f (\mathbf {X})) + \frac {1}{2} \alpha_ {t} (\mathbf {X}) g _ {t} ^ {2} \Delta f (\mathbf {X}) = \\ \overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) \cdot (f (\mathbf {X}) \nabla \alpha_ {t} (\mathbf {X}) + \alpha_ {t} (\mathbf {X}) \nabla f (\mathbf {X})) \\ + \frac {1}{2} g _ {t} ^ {2} \big (2 \nabla f (\mathbf {X}) \cdot \nabla \alpha_ {t} (\mathbf {X}) + f (\mathbf {X}) \Delta \alpha_ {t} (\mathbf {X}) + \alpha_ {t} (\mathbf {X}) \Delta f (\mathbf {X}) \big) \\ - f (\mathbf {X}) \overrightarrow {\mathbf {b}} _ {t} ((\mathbf {X}) \cdot \nabla \alpha_ {t} (\mathbf {X}) - \frac {1}{2} f (\mathbf {X}) g _ {t} ^ {2} \Delta \alpha_ {t} (\mathbf {X}). \\ \end{array}
$$
Simplifying the above expression, we get
$$
- \alpha_ {t} (\mathbf {X}) \big (\overleftarrow {\mathbf {b}} _ {T - t} ^ {\theta} (\mathbf {X}) \cdot \nabla f (\mathbf {X}) \big) = \alpha_ {t} (\mathbf {X}) \overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) \cdot \nabla f (\mathbf {X}) + g _ {t} ^ {2} \nabla f (\mathbf {X}) \cdot \nabla \alpha_ {t} (\mathbf {X})
$$
$$
\left(- \alpha_ {t} (\mathbf {X}) \overleftarrow {\mathbf {b}} _ {T - t} ^ {\theta} (\mathbf {X})\right) \cdot \nabla f (\mathbf {X}) = \left(\alpha_ {t} (\mathbf {X}) \overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) + g _ {t} ^ {2} \nabla \alpha_ {t} (\mathbf {X})\right) \cdot \nabla f (\mathbf {X}).
$$
This is true for any  $f$  implying
$$
- \alpha_ {t} (\mathbf {X}) \overleftarrow {\mathbf {b}} _ {T - t} ^ {\theta} (\mathbf {X}) = \alpha_ {t} (\mathbf {X}) \overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) + g _ {t} ^ {2} \nabla \alpha_ {t} (\mathbf {X}).
$$
This implies that  $\alpha_{t}(\mathbf{X})$  satisfies
$$
\nabla \log \alpha_ {t} (\mathbf {X}) = - \frac {1}{g _ {t} ^ {2}} \left(\overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) + \overleftarrow {\mathbf {b}} _ {T - t} ^ {\theta} (\mathbf {X})\right) \tag {16}
$$
Comparing terms from the LHS and RHS of (15) relating to the jump part of the process we obtain
$$
\begin{array}{l} \alpha_ {t} (\mathbf {X}) \lambda_ {t} ^ {M} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) \left(K _ {t} ^ {M} (\mathbf {Y} | \mathbf {X}) - \delta_ {\mathbf {X}} (\mathbf {Y})\right) \mathrm {d} \mathbf {y} = \\ \overrightarrow {\lambda} _ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) \alpha_ {t} (\mathbf {Y}) \left(\overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X}) - \delta_ {\mathbf {X}} (\mathbf {Y})\right) \mathrm {d} \mathbf {y} \\ - f (\mathbf {X}) \overrightarrow {\lambda} _ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \alpha_ {t} (\mathbf {Y}) (\overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X}) - \delta_ {\mathbf {X}} (\mathbf {Y})) \mathrm {d} \mathbf {y}. \\ \end{array}
$$
$$
\begin{array}{l} \alpha_ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) \lambda_ {t} ^ {M} (\mathbf {X}) K _ {t} ^ {M} (\mathbf {Y} | \mathbf {X}) \mathrm {d} \mathbf {y} - \alpha_ {t} (\mathbf {X}) \lambda_ {t} ^ {M} (\mathbf {X}) f (\mathbf {X}) = \\ \overrightarrow {\lambda} _ {t} (\mathbf {X}) := \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) \alpha_ {t} (\mathbf {Y}) \overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X}) \mathrm {d} \mathbf {y} \\ - f (\mathbf {X}) \vec {\lambda} _ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \alpha_ {t} (\mathbf {Y}) \vec {K} _ {t} (\mathbf {Y} | \mathbf {X}) \mathrm {d} \mathbf {y}. \\ \end{array}
$$
Recalling the definitions of  $\lambda_t^M (\mathbf{X})$  and  $K^{M}(\mathbf{Y}|\mathbf{X})$ , (13) and (14), we get
$$
\begin{array}{l} \alpha_ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) \stackrel {\leftarrow} {K} _ {T - t} ^ {\theta} (\mathbf {X} | \mathbf {Y}) \mathrm {d} \mathbf {y} \\ - \alpha_ {t} (\mathbf {X}) f (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \overleftarrow {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) \overleftarrow {K} _ {T - t} ^ {\theta} (\mathbf {X} | \mathbf {Y}) \mathrm {d} \mathbf {y} = \\ \overrightarrow {\lambda} _ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) \alpha_ {t} (\mathbf {Y}) \overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X}) \mathrm {d} \mathbf {y} \\ - f (\mathbf {X}) \vec {\lambda} _ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \alpha_ {t} (\mathbf {Y}) \vec {K} _ {t} (\mathbf {Y} | \mathbf {X}) \mathrm {d} \mathbf {y}. \\ \end{array}
$$
This equality is satisfied if  $\alpha_{t}(\mathbf{X})$  follows the following relation
$$
\alpha_ {t} (\mathbf {Y}) = \alpha_ {t} (\mathbf {X}) \frac {\overleftarrow {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) \overleftarrow {K} _ {T - t} ^ {\theta} (\mathbf {X} | \mathbf {Y})}{\overrightarrow {\lambda} _ {t} (\mathbf {X}) \overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X})} \quad \text {f o r} n \neq m \tag {17}
$$
We only require this relation to be satisfied for  $n \neq m$  because both  $\overleftrightarrow{K}_t(\mathbf{Y}|\mathbf{X})$  and  $\overleftarrow{K}_{T - t}^{\theta}(\mathbf{X}|\mathbf{Y})$  are 0 for  $n = m$ . We note at this point, as in [17], that if we have  $\alpha_{t}(\mathbf{X}) = 1 / p_{t}(\mathbf{X})$  and  $\overleftarrow{\lambda}_{T - t}^{\theta}$  and  $\overleftarrow{K}_{T - t}^{\theta}(\mathbf{X}|\mathbf{Y})$  equal to the true time-reversals, then both (16), and (17) are satisfied. However,  $\alpha_{t}(\mathbf{X}) = 1 / p_{t}(\mathbf{X})$  is not the only  $\alpha_{t}$  to satisfy these equations. (16) and (17) can be thought of as enforcing a certain parameterization of the generative process in terms of  $\alpha_{t}$  [17].
Concluding the proof. Now for the final part of the proof, we substitute our value for  $\alpha$  into the  $\mathcal{I}_{\mathrm{ISM}}$  loss from [17] which is equal to the negative of the evidence lower bound on  $\mathbb{E}_{p_{\mathrm{data}}(\mathbf{X}_0)}[\log p_0^\theta (\mathbf{X}_0)]$  up to a constant independent of  $\theta$ . Defining  $\beta_{t}(\mathbf{X}_{t}) = 1 / \alpha_{t}(\mathbf{X}_{t})$ , we have
$$
\mathcal {I} _ {\mathrm {I S M}} (\beta) = \int_ {0} ^ {T} \mathbb {E} _ {p _ {t} (\mathbf {X} _ {t})} [ \frac {\hat {\mathcal {L}} _ {t} ^ {*} \beta_ {t} (\mathbf {X} _ {t})}{\beta_ {t} (\mathbf {X} _ {t})} + \hat {\mathcal {L}} _ {t} \log \beta_ {t} (\mathbf {X} _ {t}) ] \mathrm {d} t.
$$
We split the spatial infinitesimal generator of the forward process into the generator corresponding to the diffusion and the generator corresponding to the jump part,  $\hat{\mathcal{L}} = \hat{\mathcal{L}}_t^{\mathrm{diff}} + \hat{\mathcal{L}}_t^{\mathrm{J}}$  with
$$
\hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f}} (f) (\mathbf {X}) = \overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) \cdot \nabla f (\mathbf {X}) + \frac {1}{2} g _ {t} ^ {2} \Delta f (\mathbf {X}).
$$
$$
\hat {\mathcal {L}} _ {t} ^ {\mathrm {J}} (f) (\mathbf {X}) = \vec {\lambda} _ {t} (\mathbf {X}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) (\vec {K} _ {t} (\mathbf {Y} | \mathbf {X}) - \delta_ {\mathbf {X}} (\mathbf {Y})) \mathrm {d} \mathbf {y}.
$$
By comparison with the approach to find the adjoint  $\hat{\mathcal{K}}_t^*$ , we also have  $\hat{\mathcal{L}}_t^* = \hat{\mathcal{L}}_t^{\mathrm{diff}*} + \hat{\mathcal{L}}_t^{\mathrm{J}*}$  with
$$
\hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f} *} (f) (\mathbf {X}) = - f (\mathbf {X}) \nabla \cdot \overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) - \nabla f (\mathbf {X}) \cdot \overrightarrow {\mathbf {b}} _ {t} (\mathbf {X}) + \frac {1}{2} g _ {t} ^ {2} \Delta f (\mathbf {X}).
$$
In addition, we get
$$
\hat {\mathcal {L}} _ {t} ^ {\mathrm {J *}} (f) (\mathbf {X}) = \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} f (\mathbf {Y}) \overrightarrow {\lambda} _ {t} (\mathbf {Y}) (\overrightarrow {K} _ {t} (\mathbf {X} | \mathbf {Y}) - \delta_ {\mathbf {X}} (\mathbf {Y})) \mathrm {d} \mathbf {y}.
$$
Finally,  $\mathcal{I}_{\mathrm{ISM}}$  becomes
$$
\begin{array}{l} \mathcal {I} _ {\mathrm {I S M}} (\beta) = \int_ {0} ^ {T} \mathbb {E} _ {p _ {t} (\mathbf {X} _ {t})} [ \frac {\hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f}} * \beta_ {t} (\mathbf {X} _ {t})}{\beta_ {t} (\mathbf {X} _ {t})} + \hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f}} \log \beta_ {t} (\mathbf {X} _ {t}) ] d t + \int_ {0} ^ {T} \mathbb {E} _ {p _ {t} (\mathbf {X} _ {t})} [ \frac {\hat {\mathcal {L}} _ {t} ^ {* *} \beta_ {t} (\mathbf {X} _ {t})}{\beta_ {t} (\mathbf {X} _ {t})} + \hat {\mathcal {L}} ^ {\mathrm {J}} \log \beta_ {t} (\mathbf {X} _ {t}) ] \mathrm {d} t \\ = \mathcal {I} _ {\mathrm {I S M}} ^ {\text {d i f f}} (\beta) + \mathcal {I} _ {\mathrm {I S M}} ^ {\mathrm {J}} (\beta), \\ \end{array}
$$
where we have named the two terms corresponding to the diffusion and jump part of the process as  $\mathcal{I}_{\mathrm{ISM}}^{\mathrm{diff}}$ ,  $\mathcal{I}_{\mathrm{ISM}}^{\mathrm{J}}$  respectively. For the diffusion part of the loss, we use the denoising form of the objective proven in Appendix E of [17] which is equivalent to  $\mathcal{I}_{\mathrm{ISM}}^{\mathrm{diff}}$  up to a constant independent of  $\theta$
$$
\mathcal {I} _ {\mathrm {I S M}} ^ {\mathrm {d i f f}} (\beta) = \int_ {0} ^ {T} \mathbb {E} _ {p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t})} [ \frac {\hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f}} (p _ {t | 0} (\cdot | \mathbf {X} _ {0}) \alpha_ {t} (\cdot)) (\mathbf {X} _ {t})}{p _ {t | 0} (\mathbf {X} _ {t} | \mathbf {X} _ {0}) \alpha_ {t} (\mathbf {X} _ {t})} - \hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f}} \log (p _ {t | 0} (\cdot | \mathbf {X} _ {0}) \alpha_ {t} (\cdot)) (\mathbf {X} _ {t}) ] \mathrm {d} t + \mathrm {c o n s t .}
$$
To simplify this expression, we first re-arrange  $\hat{\mathcal{L}}_t^{\mathrm{diff}}(h)$  for some general function  $h:\mathcal{S}\to \mathbb{R}$ .
$$
\begin{array}{l} \frac {\hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f}} (h)}{h} - \hat {\mathcal {L}} _ {t} ^ {\mathrm {d i f f}} (\log h) = \frac {\overrightarrow {\mathbf {b}} _ {t} \cdot \nabla h}{h} + \frac {1}{2} g _ {t} ^ {2} \frac {\Delta h}{h} - \overrightarrow {\mathbf {b}} _ {t} \cdot \nabla \log h - \frac {1}{2} g _ {t} ^ {2} \Delta \log h \\ = \frac {1}{2} g _ {t} ^ {2} \left(\frac {\nabla \cdot \nabla h}{h} - \nabla \cdot \nabla \log h\right) \\ = \frac {1}{2} g _ {t} ^ {2} \| \nabla \log h \| ^ {2}. \\ \end{array}
$$
Setting  $h = p_{t|0}(\cdot |\mathbf{X}_0)\alpha_t(\cdot)$ , our diffusion part of the loss becomes
$$
\mathcal {I} _ {\mathrm {I S M}} ^ {\text {d i f f}} (\beta) = \frac {1}{2} \int_ {0} ^ {T} g _ {t} ^ {2} \mathbb {E} _ {p _ {0, t} \left(\mathbf {X} _ {0}, \mathbf {X} _ {t}\right)} [ \| \nabla \log p _ {t | 0} \left(\mathbf {X} _ {t} \mid \mathbf {X} _ {0}\right) + \nabla \log \alpha_ {t} \left(\mathbf {X} _ {t}\right) \| ^ {2} ] \mathrm {d} t + \text {c o n s t}
$$
We then directly parameterize  $\nabla \log \alpha_{t}(\mathbf{X}_{t})$  as  $-s_t^\theta (\mathbf{X}_t)$
$$
\mathcal {I} _ {\mathrm {I S M}} ^ {\text {d i f f}} (\beta) = \frac {1}{2} \int_ {0} ^ {T} g _ {t} ^ {2} \mathbb {E} _ {p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t})} [ \| \nabla \log p _ {t | 0} (\mathbf {X} _ {t} | \mathbf {X} _ {0}) - s _ {t} ^ {\theta} (\mathbf {X} _ {t}) \| ^ {2} ] \mathrm {d} t + \text {c o n s t .}
$$
We now focus on the expectation within the integral to re-write it in an easy to calculate form
$$
\begin{array}{l} \mathbb {E} _ {p _ {0, t} \left(\mathbf {X} _ {0}, \mathbf {X} _ {t}\right)} [ \| \nabla \log p _ {t | 0} (\mathbf {X} _ {t} | \mathbf {X} _ {0}) - s _ {t} ^ {\theta} (\mathbf {X} _ {t}) \| ^ {2} ] \\ = \mathbb {E} _ {p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t})} [ \| s _ {t} ^ {\theta} (\mathbf {X} _ {t}) \| ^ {2} - 2 s _ {t} ^ {\theta} (\mathbf {X} _ {t}) ^ {T} \nabla \log p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t}) ] + \text {c o n s t} \\ \end{array}
$$
Now we note that we can re-write  $\nabla \log p_{0,t}(\mathbf{X}_0,\mathbf{X}_t)$  using  $M_t$  where  $M_t$  is a mask variable  $M_t\in \{0,1\}^{n_0}$  that is 0 for components of  $\mathbf{X}_0$  that have been deleted to get to  $\mathbf{X}_t$  and 1 for components that remain in  $\mathbf{X}_t$ .
$$
\begin{array}{l} \nabla \log p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t}) = \frac {1}{p _ {0 , t} (\mathbf {X} _ {0} , \mathbf {X} _ {t})} \nabla p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t}) \\ = \frac {1}{p _ {0 , t} (\mathbf {X} _ {0} , \mathbf {X} _ {t})} \nabla \sum_ {M _ {t}} p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t}, M _ {t}) \\ = \sum_ {M _ {t}} \frac {1}{p _ {0 , t} (\mathbf {X} _ {0} , \mathbf {X} _ {t})} \nabla p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t}, M _ {t}) \\ = \sum_ {M _ {t}} \frac {p \left(n _ {t} , M _ {t} , \mathbf {X} _ {0}\right)}{p _ {0 , t} \left(\mathbf {X} _ {0} , \mathbf {X} _ {t}\right)} \nabla p _ {t | 0} \left(\mathbf {x} _ {t} \mid n _ {t}, \mathbf {X} _ {0}, M _ {t}\right) \\ = \sum_ {M _ {t}} \frac {p (M _ {t} | \mathbf {X} _ {0} , \mathbf {X} _ {t})}{p (\mathbf {x} _ {t} | n _ {t} , \mathbf {X} _ {0} , M _ {t})} \nabla p _ {t | 0} (\mathbf {x} _ {t} | n _ {t}, \mathbf {X} _ {0}, M _ {t}) \\ = \mathbb {E} _ {p \left(M _ {t} \mid \mathbf {X} _ {0}, \mathbf {X} _ {t}\right)} [ \nabla \log p _ {t \mid 0} \left(\mathbf {x} _ {t} \mid n _ {t}, \mathbf {X} _ {0}, M _ {t}\right) ] \\ \end{array}
$$
Substituting this back in we get
$$
\begin{array}{l} \mathbb {E} _ {p _ {0, t} \left(\mathbf {X} _ {0}, \mathbf {X} _ {t}\right)} [ \| \nabla \log p _ {t | 0} (\mathbf {X} _ {t} | \mathbf {X} _ {0}) - s _ {t} ^ {\theta} (\mathbf {X} _ {t}) \| ^ {2} ] \\ = \mathbb {E} _ {p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t})} [ \| s _ {t} ^ {\theta} (\mathbf {X} _ {t}) \| ^ {2} - 2 s _ {t} ^ {\theta} (\mathbf {X} _ {t}) ^ {T} \mathbb {E} _ {p (M _ {t} | \mathbf {X} _ {0}, \mathbf {X} _ {t})} [ \nabla \log p _ {t | 0} (\mathbf {x} _ {t} | n _ {t}, \mathbf {X} _ {0}, M _ {t}) ] ] + \text {c o n s t} \\ = \mathbb {E} _ {p _ {0, t} (\mathbf {X} _ {0}, \mathbf {X} _ {t}, M _ {t})} [ \| \nabla \log p _ {t | 0} (\mathbf {x} _ {t} | n _ {t}, \mathbf {X} _ {0}, M _ {t}) - s _ {t} ^ {\theta} (\mathbf {X} _ {t}) \| ^ {2} ] + \text {c o n s t}. \\ \end{array}
$$
Therefore, the diffusion part of  $\mathcal{I}_{\mathrm{ISM}}$  can be written as
$$
\mathcal {I} _ {\mathrm {I S M}} ^ {\text {d i f f}} (\beta) = \frac {T}{2} \mathbb {E} _ {\mathcal {U} (t; 0, T) p _ {0, t} \left(\mathbf {X} _ {0}, \mathbf {X} _ {t}, M _ {t}\right)} \left[ g _ {t} ^ {2} \| \nabla \log p _ {t | 0} \left(\mathbf {x} _ {t} \mid n _ {t}, \mathbf {X} _ {0}, M _ {t}\right) - s _ {t} ^ {\theta} \left(\mathbf {X} _ {t}\right) \| ^ {2} \right] + \text {c o n s t .}
$$
We now focus on the jump part of the loss  $\mathcal{I}_{\mathrm{ISM}}^{\mathrm{J}}$ . We first substitute in  $\hat{\mathcal{L}}_t^{\mathrm{J}}$  and  $\hat{\mathcal{L}}_t^{\mathrm{J*}}$
$$
\begin{array}{l} \mathcal {I} _ {\mathrm {I S M}} ^ {\mathrm {J}} = \int_ {0} ^ {T} \mathbb {E} _ {p _ {t} (\mathbf {X} _ {t})} [ \sum_ {m} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \vec {\lambda} _ {t} (\mathbf {Y}) \frac {\beta_ {t} (\mathbf {Y})}{\beta_ {t} (\mathbf {X} _ {t})} (\vec {K} _ {t} (\mathbf {X} _ {t} | \mathbf {Y}) - \delta_ {\mathbf {Y}} (\mathbf {X} _ {t})) \mathrm {d} \mathbf {y} + \\ \overrightarrow {\lambda} _ {t} (\mathbf {X} _ {t}) \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X} _ {t}) \log \beta_ {t} (\mathbf {Y}) \mathrm {d} \mathbf {y} - \overrightarrow {\lambda} _ {t} (\mathbf {X} _ {t}) \log \beta_ {t} (\mathbf {X} _ {t}) ] \mathrm {d} t. \tag {18} \\ \end{array}
$$
Noting that  $\beta_{t}(\mathbf{X}_{t}) = 1 / \alpha_{t}(\mathbf{X}_{t})$ , we get
$$
\frac {\beta_ {t} \left(\mathbf {X} _ {t}\right)}{\beta_ {t} (\mathbf {Y})} = \frac {\overleftarrow {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) \overleftarrow {K} _ {T - t} ^ {\theta} \left(\mathbf {X} _ {t} \mid \mathbf {Y}\right)}{\overrightarrow {\lambda} _ {t} \left(\mathbf {X} _ {t}\right) \overrightarrow {K} _ {t} \left(\mathbf {Y} \mid \mathbf {X} _ {t}\right)} \quad \text {f o r} n _ {t} \neq m \tag {19}
$$
or swapping labels for  $\mathbf{X}_t$  and  $\mathbf{Y}$
$$
\frac {\beta_ {t} (\mathbf {Y})}{\beta_ {t} \left(\mathbf {X} _ {t}\right)} = \frac {\overleftarrow {\lambda} _ {T - t} ^ {\theta} \left(\mathbf {X} _ {t}\right) \overleftarrow {K} _ {T - t} ^ {\theta} (\mathbf {Y} | \mathbf {X} _ {t})}{\overrightarrow {\lambda} _ {t} (\mathbf {Y}) \overrightarrow {K} _ {t} (\mathbf {X} _ {t} | \mathbf {Y})} \quad \text {f o r} n _ {t} \neq m \tag {20}
$$
Substituting (19) into the second line and (20) into the first line of (18) and using the fact that  $\overrightarrow{K}_t(\mathbf{X}_t|\mathbf{Y}) = 0$  for  $n_t = m$ , we obtain
$$
\begin{array}{l} \mathcal {I} _ {\mathrm {I S M}} ^ {\mathrm {J}} = \int_ {0} ^ {T} \mathbb {E} _ {p _ {t} (\mathbf {X} _ {t})} \left[ \sum_ {m = 1 \backslash n _ {t}} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \vec {\lambda} _ {t} (\mathbf {Y}) \frac {\overleftarrow {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) \overleftarrow {K} _ {T - t} ^ {\theta} (\mathbf {Y} | \mathbf {X} _ {t})}{\overrightarrow {\lambda} _ {t} (\mathbf {Y}) \overrightarrow {K} _ {t} (\mathbf {X} _ {t} | \mathbf {Y})} \overrightarrow {K} _ {t} (\mathbf {X} _ {t} | \mathbf {Y}) \mathrm {d} \mathbf {y} \right. \\ - \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \vec {\lambda} _ {t} (\mathbf {Y}) \frac {\beta_ {t} (\mathbf {Y})}{\beta_ {t} (\mathbf {X} _ {t})} \delta_ {\mathbf {Y}} (\mathbf {X} _ {t}) \mathrm {d} \mathbf {y} \\ + \overrightarrow {\lambda} _ {t} (\mathbf {X} _ {t}) \sum_ {m = 1 \backslash n _ {t}} ^ {N} \int_ {\mathbf {Y} \in \mathbb {R} ^ {m d}} \overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X} _ {t}) \{\log \beta_ {t} (\mathbf {X} _ {t}) - \log \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) \\ - \log \overleftarrow {K} _ {T - t} ^ {\theta} (\mathbf {X} _ {t} | \mathbf {Y}) + \log \overrightarrow {\lambda} _ {t} (\mathbf {X} _ {t}) + \log \overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X} _ {t}) \} \mathrm {d} \mathbf {y} \\ \left. - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \beta_ {t} (\mathbf {X} _ {t}) \right] \mathrm {d} t. \\ \end{array}
$$
$$
\begin{array}{l} \mathcal {L} _ {\mathrm {I S M}} ^ {\mathrm {J}} = \int_ {0} ^ {T} \mathbb {E} _ {p _ {t} (\mathbf {X} _ {t})} \left[ \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) \sum_ {m = 1 \backslash n _ {t}} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \stackrel {\leftarrow} {K} _ {T - t} ^ {\theta} (\mathbf {Y} | \mathbf {X} _ {t}) \mathrm {d} \mathbf {y} - \stackrel {\rightarrow} {\lambda} _ {t} (\mathbf {X} _ {t}) \frac {\beta_ {t} (\mathbf {X} _ {t})}{\beta_ {t} (\mathbf {X} _ {t})} + \right. \\ \overrightarrow {\lambda} _ {t} (\mathbf {X} _ {t}) \sum_ {m = 1 \backslash n _ {t}} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \overrightarrow {K} _ {t} (\mathbf {Y} | \mathbf {X} _ {t}) \{- \log \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) - \log \stackrel {\leftarrow} {K} _ {T - t} ^ {\theta} (\mathbf {X} _ {t} | \mathbf {Y}) \} \mathrm {d} \mathbf {y} ] \mathrm {d} t + \mathrm {c o n s t .} \\ \end{array}
$$
$$
\mathcal {I} _ {\mathrm {I S M}} ^ {\mathrm {J}} = \int_ {0} ^ {T} \mathbb {E} _ {p _ {t} (\mathbf {X} _ {t})} [ \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) + \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \mathbb {E} _ {\vec {K} _ {t} (\mathbf {Y} | \mathbf {X} _ {t})} [ - \log \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) - \log \stackrel {\leftarrow} {K} _ {T - t} ^ {\theta} (\mathbf {X} _ {t} | \mathbf {Y}) ] ] \mathrm {d} t + \text {c o n s t .}
$$
$$
\mathcal {L} _ {\mathrm {I S M}} ^ {\mathrm {J}} = T \mathbb {E} _ {\mathcal {U} (t; 0, T) p _ {t} (\mathbf {X} _ {t}) \vec {K} _ {t} (\mathbf {Y} | \mathbf {X} _ {t})} [ \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \stackrel {\leftarrow} {K} _ {T - t} ^ {\theta} (\mathbf {X} _ {t} | \mathbf {Y}) ] + \mathrm {c o n s t}.
$$
Finally, using the definition of the forward and backward kernels, i.e.  $\overleftrightarrow{K}_t(\mathbf{Y}|\mathbf{X}_t) = \sum_{i=1}^{n} K^{\mathrm{del}}(i|n)\delta_{\mathrm{del}(\mathbf{X},i)}(\mathbf{Y})$  and  $\overleftrightarrow{K}_{T-t}^{\theta}(\mathbf{X}_t|\mathbf{Y}) = \int_{\mathbf{x}^{\mathrm{add}}} \sum_{i=1}^{n} A_t^\theta(\mathbf{x}^{\mathrm{add}},i|\mathbf{Y}) \delta_{\mathrm{ins}(\mathbf{Y},\mathbf{x}^{\mathrm{add}},i)}(\mathbf{X}_t) \mathrm{d}\mathbf{x}^{\mathrm{add}}$ , we get
$$
\begin{array}{l} \mathcal {I} _ {\mathrm {I S M}} ^ {\mathrm {J}} = T \mathbb {E} _ {\mathcal {U} (t; 0, T) p _ {t} (\mathbf {X} _ {t})} [ \sum_ {m = 1} ^ {N} \int_ {\mathbf {y} \in \mathbb {R} ^ {m d}} \sum_ {i = 1} ^ {n _ {t}} K ^ {\mathrm {d e l}} (i | n _ {t}) \delta_ {\mathrm {d e l} (\mathbf {X} _ {t}, i)} (\mathbf {Y}) (\overleftarrow {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) - \overrightarrow {\lambda} _ {t} (\mathbf {X} _ {t}) \log \overleftarrow {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) \\ - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \overleftarrow {K} _ {T - t} ^ {\theta} (\mathbf {X} _ {t} | \mathbf {Y})) \mathrm {d} \mathbf {y} ] + \text {c o n s t} \\ \end{array}
$$
We get
$$
\begin{array}{l} \mathcal {I} _ {\mathrm {I S M}} ^ {\mathrm {J}} = T \mathbb {E} _ {\mathcal {U} (t; 0, T) p _ {t} (\mathbf {X} _ {t}) K ^ {\det  (i | n _ {t})} \delta_ {\det  (\mathbf {X} _ {t}, i)} (\mathbf {Y})} \\ \left[ \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \stackrel {\leftarrow} {K} _ {T - t} ^ {\theta} (\mathbf {X} _ {t} | \mathbf {Y}) \right] + \text {c o n s t .} \\ \end{array}
$$
$$
\begin{array}{l} \mathcal {L} _ {\mathrm {I S M}} ^ {\mathrm {J}} = T \mathbb {E} _ {\mathcal {U} (t; 0, T) p _ {t} (\mathbf {X} _ {t}) K ^ {\mathrm {d e l}} (i | n _ {t}) \delta_ {\mathrm {d e l} (\mathbf {X} _ {t}, i)} (\mathbf {Y})} \\ \left[ \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log A _ {T - t} ^ {\theta} (\mathbf {x} ^ {\mathrm {a d d}}, i | \mathbf {Y}) \right] + \text {c o n s t .} \\ \end{array}
$$
Putting arexpressions for  $\mathcal{I}_{\mathrm{ISM}}^{\mathrm{diff}}$  and  $\mathcal{I}_{\mathrm{ISM}}^{\mathrm{J}}$  together we obtain
$$
\begin{array}{l} \mathcal {I} _ {\mathrm {I S M}} = \frac {T}{2} \mathbb {E} [ g _ {t} ^ {2} \| \nabla \log p _ {t | 0} (\mathbf {x} _ {t} | n _ {t}, \mathbf {X} _ {0}, M _ {t}) - s _ {t} ^ {\theta} (\mathbf {X} _ {t}) \| ^ {2} ] + \\ T \mathbb {E} \left[ \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {X} _ {t}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log \stackrel {\leftarrow} {\lambda} _ {T - t} ^ {\theta} (\mathbf {Y}) - \vec {\lambda} _ {t} (\mathbf {X} _ {t}) \log A _ {T - t} ^ {\theta} (\mathbf {x} ^ {\mathrm {a d d}}, i | \mathbf {Y}) \right] + \text {c o n s t}. \\ \end{array}
$$