\vspace{-0.1in}
\section{Preliminaries} \label{sec:likelihood_training}
 \vspace{-0.05in}
Diffusion models \citep{score_sde} have achieved tremendous progress in  (text-to-)image generation. However, real-world data (such as the bounded pixel space in images) often comes with bounded support. As such, practitioners often employ ad-hoc thresholding techniques to project the data to the desired space, which inevitably affects the theoretical understanding and hinders future updates. 

To generalize these techniques, \citet{reflected_diffusion_model} utilized reflected Brownian motion to train explicit score-matching loss in bounded domains. They first perturb the data with a sequence of noise and then propose to generate the constrained data distribution via the corresponding reflected backward process \citep{reversal_reflected_BM, Cattiaux_1988}. 

\vspace{-0.2in}
\begin{subequations}\label{vanilla_diffusion_model}
\begin{align}
\dd \bx_t &= \bbf(\bx_t, t) \dd t+g(t) \dd \bm{\mathrm{w}}_t + \dd \mathbf{L}_t,\ \ \  \bx_0\sim p_{\text {data}}\subset \Omega \label{SGM-SDE-f}\\
\dd \bx_t&=\left[\bbf(\bx_t, t)-g(t)^2 \nabla \log p_t\left(\bx_t\right)\right] \dd t \label{SGM-SDE-b}  \\
&\qquad\qquad\qquad +g(t) \dd \overline{\bm{\mathrm{w}}}_t+ \dd \overline{\mathbf{L}}_t, \ \bx_T\sim p_{\text {prior}}\subset \Omega\notag
\end{align}
\end{subequations}
where $\Omega$ is the state space in $\mathbb{R}^d$; $\bbf\left(\bx_t, t\right)$ and $g(t)$ are the vector field and the diffusion term, respectively; $\bm{\mathrm{w}}_t$ is the Brownian motion; $\overline{\bm{\mathrm{w}}}_t$ is another independent Brownian motion from time $T$ to $0$; $\mathbf{L}_t$ and $\overline{\mathbf{L}}_t$ are the local time to confine the particle within the domain and are defined in Eq.\eqref{local-time}; the marginal density at time $t$ for the forward process \eqref{SGM-SDE-f} is denoted by $p_t$. $\nabla \log p_t\left(\cdot\right)$ is the score function at time $t$, which is often approximated by a neural network $s_{\theta}(\cdot, t)$. Given proper score approximations, the data distribution $p_{\text{data}}$ can be generated from the backward process \eqref{SGM-SDE-b}. 

% \begin{figure}[!ht]
%   \centering
%   \vskip -0.3in
%   \subfigure[Flower]{\includegraphics[scale=0.3]{figures/flower.pdf}} 
%   \subfigure[Heart]{\includegraphics[scale=0.3]{figures/heart.pdf}}
%   \subfigure[Star]{\includegraphics[scale=0.3]{figures/star.pdf}}
%   \subfigure[Cross]{\includegraphics[scale=0.3]{figures/cross.pdf}}
%   \subfigure[Octagon]{\includegraphics[scale=0.3]{figures/polygon.pdf}}
%     \vskip -0.15in
%   \caption{Reflected Ornstein-Uhlenbeck (OU) process (\textbf{\textcolor{red}{reflected}} v.s. \textcolor{teal}{unconstrained}), driven by the same Brownian motion, excluding the reflections. All boundaries are defined to be differentiable.}\label{reflected_Langevin}
%   \vspace{-1em}
% \end{figure}




% \nicole{shall we also compare the reflected with the projection on boundary menthod } Wei: will add more demos in the future when we have time.


