$$
\begin{array}{l} \mathcal {L} _ {\mathrm {A I R}} (B; \theta , \epsilon) = \operatorname {K L} \left(p ^ {d o (\tau_ {i})} \left(y ^ {R} | \tilde {x}\right) p ^ {d o (\tau_ {i})} (\tilde {x} | x) \| p ^ {d o (\tau_ {j})} \left(y ^ {R} | \tilde {x}\right) p ^ {d o (\tau_ {j})} (\tilde {x} | x); B\right) (20) \\ = \sum_ {x \in B} p ^ {d o \left(\tau_ {i}\right)} \left(y ^ {R} | \tilde {x}\right) p ^ {d o \left(\tau_ {i}\right)} (\tilde {x} | x) \log \frac {p ^ {d o \left(\tau_ {i}\right)} \left(y ^ {R} | \tilde {x}\right) p ^ {d o \left(\tau_ {i}\right)} (\tilde {x} | x)}{p ^ {d o \left(\tau_ {j}\right)} \left(y ^ {R} | \tilde {x}\right) p ^ {d o \left(\tau_ {j}\right)} (\tilde {x} | x)} (21) \\ = \sum_ {x \in B} p ^ {d o (\tau_ {i})} \left(y ^ {R} | \tilde {x}\right) p ^ {d o (\tau_ {i})} (\tilde {x} | x) \left(\log \frac {p ^ {d o (\tau_ {i})} \left(y ^ {R} | \tilde {x}\right)}{p ^ {d o (\tau_ {j})} \left(y ^ {R} | \tilde {x}\right)} + \log \frac {p ^ {d o (\tau_ {i})} (\tilde {x} | x)}{p ^ {d o (\tau_ {j})} (\tilde {x} | x)}\right) (22) \\ = \sum_ {x \in B} p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x}) \log \frac {p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x})}{p ^ {d o (\tau_ {j})} (y ^ {R} | \tilde {x})} \cdot p ^ {d o (\tau_ {i})} (\tilde {x} | x) \\ + \sum_ {x \in B} p ^ {d o (\tau_ {i})} (\tilde {x} | x) \log \frac {p ^ {d o (\tau_ {i})} (\tilde {x} | x)}{p ^ {d o (\tau_ {j})} (\tilde {x} | x)} \cdot p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x}) (23) \\ = \sum_ {x \in B} \left(\sum_ {x \in \{x \}} p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x}) \log \frac {p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x})}{p ^ {d o (\tau_ {j})} (y ^ {R} | \tilde {x})}\right) \cdot p ^ {d o (\tau_ {i})} (\tilde {x} | x) \\ + \sum_ {x \in B} \left(\sum_ {x \in \{x \}} p ^ {d o \left(\tau_ {i}\right)} (\tilde {x} | x) \log \frac {p ^ {d o \left(\tau_ {i}\right)} (\tilde {x} | x)}{p ^ {d o \left(\tau_ {j}\right)} (\tilde {x} | x)}\right) \cdot p ^ {d o \left(\tau_ {i}\right)} \left(y ^ {R} | \tilde {x}\right) (24) \\ = \sum_ {x \in B} \operatorname {K L} \left(p ^ {d o \left(\tau_ {i}\right)} \left(y ^ {R} | \tilde {x}\right) \| p ^ {d o \left(\tau_ {j}\right)} \left(y ^ {R} | \tilde {x}; \{x \}\right) \cdot p ^ {d o \left(\tau_ {i}\right)} (\tilde {x} | x) \right. \\ + \sum_ {x \in B} \mathrm {K L} \left(p ^ {d o \left(\tau_ {i}\right)} (\tilde {x} | x) \| p ^ {d o \left(\tau_ {j}\right)} (\tilde {x} | x); \{x \}) \cdot p ^ {d o \left(\tau_ {i}\right)} \left(y ^ {R} | \tilde {x}\right) \right. (25) \\ = \mathbb {E} _ {x \sim p ^ {d o (\tau_ {i})} (\tilde {x} | x)} [ \mathrm {K L} (p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x}) \| p ^ {d o (\tau_ {j})} (y ^ {R} | \tilde {x}); \{x \}) ] \\ + \mathbb {E} _ {x \sim p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x})} [ \mathrm {K L} (p ^ {d o (\tau_ {i})} (\tilde {x} | x) \| p ^ {d o (\tau_ {j})} (\tilde {x} | x); \{x \}) ] (26) \\ = \mathbb {E} _ {x \sim p ^ {d o (\tau_ {i})} (\tilde {x} | x)} [ \mathrm {K L} (p ^ {d o (\tau_ {i})} (y ^ {R} | \tilde {x}) \| p ^ {d o (\tau_ {j})} (y ^ {R} | \tilde {x})) ] \\ + \mathbb {E} _ {x \sim p ^ {d o (\tau_ {i})} \left(y ^ {R} \mid \tilde {x}\right)} [ \mathrm {K L} \left(p ^ {d o (\tau_ {i})} (\tilde {x} | x) \| p ^ {d o (\tau_ {j})} (\tilde {x} | x)\right) ] (27) \\ \end{array}
$$