# Reflected Schrödinger Bridge


This repo shows how to implement **Reflected Schrodinger Bridge**. 


### Part I: Reflected Langevin dynamics

The folder **sampling_bounded_domain** includes two jupyter notebooks to show how to implement reflected Langevin dynamics using the cache trick.


The following is a gif demo to show the trajectories.
<p float="left">
  <img src="figures/flower.gif" width="250"  title="Flower"/>
  <img src="figures/heart.gif" width="250"   title="Heart" /> 
</p>




### Part II: Reflected Schrödinger bridge

The folder **rSB-FBSDE** demonstrates constrained generative modeling through reflected Schrödinger bridge.


A demo of transport from moon to spiral on the heart domain.
<p float="left">
  <img src="figures/moon-to-spiral_stage12-forward.png" width="800"  title="Flower"/>
  <img src="figures/moon-to-spiral_stage12-backward.png" width="800"   title="Heart" /> 
</p>


The vector field of the moon to spiral transport.
<p float="left">
  <img src="figures/moon-to-spiral_vec_field_forward.png" width="800"  title="Flower"/>
  <img src="figures/moon-to-spiral_vec_field_backward.png" width="800"   title="Heart" /> 
</p>
