to approximate the sequence of joint smoothing distributions (JSDs) $p_{\theta}(x_{1:t}|y_{1:t})$ for $t = 1$ to $T$. The APF makes use of a particle system consisting of $N$ weighted particles $\{x_{1:t}\pIdx{i},w_t\pIdx{i}\}_{i=1}^N$ to approximate the JSD at time $t$ by $$\begin{aligned}
    \widehat{p}_{\theta}(\dd x_{1:t} | y_{1:t} ) 
    \triangleq 
    \sum_{i=1}^N 
    \frac 
    { w_t\pIdx{i}  }
    { \sum_{k=1}^N w_t\pIdx{k} }
    \delta_{x_{1:t}\pIdx{i}} (\dn x_{1:t}).
    \label{eq:empericalfiltering}\end{aligned}$$ Here, $\delta_z(\dn x_{1:t})$ denotes the Dirac measure placed at $z$. The particle system is propagated from $t-1$ to $t$ by first sampling an *ancestor index* $a_t\pIdx{i}$, with $$\begin{aligned}
 \mathbb{P}( a_t\pIdx{i} = j ) = \nu_{t-1}^{(j)} \left[ \sum_{k=1}^N \nu\pIdx{k}_{t-1} \right]^{-1},
\quad i,j = 1,\dots,N,
    \label{eq:APFresampling} \end{aligned}$$ where $\nu\pIdx{i}_{t-1}$ denotes the resampling weights. Given the ancestor index, a new particle is sampled according to $$\begin{aligned}
    \quad
    x_t\pIdx{i} \sim R_{\theta} \Big( x_t | x^{a_t\pIdx{i}}_{1:t-1}, y_t \Big),
    \quad i = 1,\dots,N.
    \label{eq:APFpropagation} \end{aligned}$$ Finally, we append the obtained sample to the trajectory by $x_{1:t}\pIdx{i}=\{x_{1:t-1}^{a_t\pIdx{i}},x_t\pIdx{i}\}$ and compute a new importance weight by $$\begin{aligned}
    w_{t}\pIdx{i}
    &\triangleq 
    \frac
    {w_{t-1}^{a\pIdx{i}_t}}
    {\nu_{t-1}^{a\pIdx{i}_t}}
    \frac
    { g_{\theta} \Big( y_t \Big| x_t\pIdx{i} \Big) f_{\theta} \Big( x_t\pIdx{i} \Big| x_{t-1}^{a\pIdx{i}_t} \Big) }
    { R_{\theta} \Big( x_t\pIdx{i} \Big| x_{1:t-1}^{a\pIdx{i}_t},y_t \Big) },
    \quad i = 1,\dots,N.
    \label{eq:APFweights}\end{aligned}$$Hence, the empirical approximations of the smoothing distributions can be computed sequentially 