Temporal Policy:
History Initialized Action Generation for Robotic Learning from Demonstration
Dylan Miller
Supervisor: Dr. Martin Jagersand
The Goal: Teach robots complex behaviors directly from expert demonstrations.




One of the most successful generative models for robotic LfD

The field has recognized the bottleneck of pure noise initialization.
Instead of mapping from noise to data, we map the past to the future.
\mathrm{d}\mathbf{x}_t = \underbrace{\mathbf{f}(\mathbf{x}_t, t)\mathrm{d}t}_{\text{Drift}} + \underbrace{g(t)\mathrm{d}\mathbf{w}_t}_{\text{Diffusion}}
Diffusion models learn to reverse a noise injection process.
1. Forward Process: Systematically degrades data into an simple prior over time t \in [0, T] (where T \to \infty): \mathrm{d}\mathbf{x} = \mathbf{f}(\mathbf{x}, t)\mathrm{d}t + g(t)\mathrm{d}\mathbf{w}
2. Reverse Process: This process can be reversed (Anderson 1982): \mathrm{d}\mathbf{x} = [\mathbf{f}(\mathbf{x}, t) - g(t)^2 \nabla_{\mathbf{x}} \log p_t(\mathbf{x})]\mathrm{d}t + g(t)\mathrm{d}\bar{\mathbf{w}}

CFM reframes generation as learning a deterministic vector field (ODE).
The Linear Interpolant: Straight line connecting noise \mathbf{x}_0 to target data \mathbf{x}_1 \mathbf{x}_t = (1-t)\mathbf{x}_0 + t\mathbf{x}_1; \quad t \in [0,1]
The Target Velocity: Constant straight line \mathbf{u}_t(\mathbf{x}|\mathbf{x}_0, \mathbf{x}_1) = \mathbf{x}_1 - \mathbf{x}_0
The Objective: Train a network v_\theta to predict this straight-line velocity via MSE regression.
Inference: Follow the predicted velocity field (Euler). \mathbf{x}_{t+\Delta t} = \mathbf{x}_t + v_\theta(\mathbf{x}_t, t) \Delta t
Coupling describes the joint distribution (x_0, x_1) \sim q(p_0, p_1)
1. Independent Coupling:
2. Optimal Transport (OT) Coupling:

State and actions share the same representation
Action Chunking Strategy
We exploit the temporal structure of expert demonstrations.
We construct an interpolant that mixes the source, target, and a non-stationary Wiener process:
\mathbf{x}_\lambda = (1-\lambda)\mathbf{x}_0 + \lambda\mathbf{x}_1 + \epsilon(1-\lambda)\mathbf{w}_\lambda
Boundary Conditions:
\mathrm{d}\mathbf{x}_\lambda = \underbrace{\left[ (\mathbf{x}_1 - \mathbf{x}_0) - \epsilon \mathbf{w}_\lambda \right]}_{\text{Drift}} \mathrm{d}\lambda + \epsilon (1 - \lambda) \mathrm{d}\mathbf{w}_\lambda.
We train a neural network b_\theta to match the drift of the interpolant.
\mathbf{w}_\lambda \stackrel{d}{=} \sqrt{\lambda}\mathbf{z}; \quad \mathbf{z} \sim \mathcal{N}(\mathbf{0}, \mathbf{I})
\mathcal{L}(\theta) = \mathbb{E}_{\lambda, (\mathbf{x}_0, \mathbf{x}_1), \mathbf{z}} \left[ \left\| b_\theta(\mathbf{x}_\lambda, \mathbf{x}_0, \lambda) - \left( \mathbf{x}_1 - \mathbf{x}_0 - \epsilon \sqrt{\lambda}\mathbf{z} \right) \right\|^2 \right]

1. The Continuous SDE: \mathrm{d}\mathbf{x}_\lambda = b_{\theta}(\mathbf{x}_{\lambda}, \mathbf{x}_0, \lambda) \mathrm{d}\lambda + \epsilon (1 - \lambda) \mathrm{d}\mathbf{w}_\lambda.
2. The Discrete Update Step: \mathbf{x}_{\lambda+ \Delta \lambda} = \mathbf{x}_\lambda + \underbrace{b_{\theta}(\mathbf{x}_i, \mathbf{x}_0, \lambda_i)\Delta\lambda}_{\text{Deterministic Step}} + \underbrace{\epsilon (1 - \lambda)\sqrt{\Delta\lambda}\mathbf{z}_\lambda}_{\text{Noise Injection}}
We can change the noise schedule at inference time without retraining the network. \mathrm{d}\mathbf{x} = \underbrace{\left[ b_{\theta} + \frac{g_\lambda^2 - \gamma_\lambda^2}{2} \nabla_{\mathbf{x}} \log p_\lambda(\mathbf{x}|\mathbf{x}_0) \right]}_{\text{corrected drift }\tilde{b}} \mathrm{d}\lambda + g_{\lambda} \mathrm{d}\mathbf{w}
Allows for two sampling modes:
Evaluated across 5 tasks of varying complexity (Lift, Can, Square, Transport, Tool Hang).
Temporal Policy matches state of the art success rates

Single integration step performance 



Recall: \mathbf{x}_\lambda = (1-\lambda)\mathbf{x}_0 + \lambda\mathbf{x}_1 + \epsilon(1-\lambda)\mathbf{w}_\lambda


Impact:
Limitations:
\mathrm{d}\mathbf{x}_t = \left[ \mathbf{f}(\mathbf{x}_t, t) - \frac{1}{2}g(t)^2 \nabla_{\mathbf{x}} \log p_t(\mathbf{x}_t) \right] \mathrm{d}t
\frac{\partial p_t(x)}{\partial t} = -\nabla_x \cdot (f(x,t) p_t(x)) + \frac{1}{2} g(t)^2 \Delta p_t(x)