---
title: Contingency-Aware Diffusion Planner (CoPlanner)
url: https://www.emergentmind.com/topics/contingency-aware-diffusion-planner-coplanner
type: topic
---

# Contingency-Aware Diffusion Planner (CoPlanner)

A contingency-aware diffusion planner (“CoPlanner” as described in [2509.17080]) is an integrated generative planning framework that jointly addresses multi-agent interactive trajectory generation and robust decision-making under scenario uncertainty. CoPlanner is designed to address critical limitations in existing generation-then-evaluation motion planning systems, particularly their tendency to adopt a single most likely outcome and their inability to retain fallback trajectories essential for safety in rare but critical scenarios. CoPlanner incorporates a pivot-conditioned diffusion mechanism to ensure consistent, validated immediate behavior, and evaluates candidate trajectories across a spectrum of plausible long-term outcomes using a multi-scenario scoring strategy. This elevates robustness against multi-modal future uncertainty and enables interaction-aware, socially consistent planning for autonomous driving in complex environments.

## 1. Pivot-Conditioned Diffusion Mechanism

At the heart of CoPlanner is the pivot-conditioned diffusion process that divides planning into two temporally coupled components:

- **Short-Term Shared “Pivot” Segment**: For all agents, the planner first generates a short-term segment (0 … t_b) that is validated to satisfy safety and traffic rule compliance. This segment forms an “anchor” for all downstream plans.
- **Branching Long-Term Futures**: Conditional on the selected validated pivot, CoPlanner stochastically generates a set of diverse, long-horizon branches for both the ego-agent and surrounding agents. These diverse futures capture the multi-modality of plausible scene evolutions beyond the immediate past.

Mathematically, the joint distribution over multi-agent trajectories Λ is factorized as:

$$
p(\Lambda \mid C) = p_\theta(S \mid C) \, p_\phi(B \mid S, C)
$$

where $S$ (the pivot) is the joint short-term segment, $B$ the set of long-term branches, and $C$ the conditioning context.

Sampling employs a temporal mask $m(t) = 1[t \leq t_b]$ during reverse diffusion. At each step:
- For $t \leq t_b$, the known anchor is re-noised (to preserve the pivot).
- For $t > t_b$, the normal denoising process is applied, allowing multimodal branching.

This technique ensures all candidates remain temporally anchored to a safety-validated, interaction-consistent short-term evolution, while retaining diversity over plausible long-term developments.

## 2. Contingency-Aware Multi-Scenario Scoring

To select robust plans, CoPlanner abandons single-hypothesis selection in favor of multi-scenario evaluation:

- For each candidate short-term anchor, multiple long-term branches are generated via the pivot-conditioned diffusion model.
- Each complete candidate plan is evaluated both on the shared segment and across all generated branches, using a composite score that captures safety, progress, comfort, and rule compliance.

Let $J(\tau^0 \mid \Lambda, C)$ be the cost for ego plan $\tau^0$ under long-term multi-agent realization $\Lambda$ and context $C$, decomposed as:

$$
J(\tau^0 \mid \Lambda, C) = J_{shared}(\tau^0_{0:t_b} \mid \Lambda, C) + J_{branch}(\tau^0_{t_b:T} \mid \Lambda, C)
$$

For each candidate, the risk-aggregated score across $N$ branches is:

$$
J_k(\tau^0) = J_{shared}(\cdot) + R(\{J_{branch}(\cdot)\}_n)
$$

where $R$ is a risk aggregator (e.g., equal-weight mean). The plan minimizing this overall score is selected as the robust, contingency-aware trajectory.

## 3. Technical Architecture and Diffusion Model

CoPlanner employs a joint generative model for multi-agent trajectories in a discrete-time, variance-preserving diffusion process. The model backbone is a diffusion transformer (DiT), which enables joint modeling of all dynamic agents (ego plus surroundings).

The training objective is an $x^{(0)}$-prediction loss under the VP schedule:

$$
L_\theta = \mathbb{E}_{x^{(0)}, h, x^{(h)}} \left\| \mu_\theta(x^{(h)}, h, C) - x^{(0)} \right\|_2^2
$$

Reverse diffusion is adapted to accept the pivot-masked temporal conditioning. The model ensures that the trajectory generation for all agents is coupled during the anchor segment and allowed to diversify beyond.

## 4. Integration of Prediction and Planning Under Interaction

Crucially, CoPlanner integrates multi-agent prediction and ego motion planning into a unified generative framework:
- All joint trajectories (ego + agents) are sampled together, ensuring social consistency (i.e., the planned ego action does not conflict with the simultaneously forecasted neighbor actions).
- The pivot segment validation guarantees that near-term execution is robust—no plan can “drift away” into unsafe or implausible behavior immediately after re-planning, a critical requirement in highly interactive, uncertain road scenes.
- The diverse branch generation preserves fallback options: if the realized future diverges from the likely prediction, the system can rely on pre-evaluated alternative continuations.

Unlike conventional decoupled architectures—where planning passively reacts to exogenous predictions—CoPlanner’s joint modeling and evaluation actively anticipates interactive evolution across the ensemble of sampled futures.

## 5. Empirical Performance on nuPlan and Safety Outcomes

CoPlanner was benchmarked in closed-loop (planning-in-the-loop) evaluations on the nuPlan driving dataset. Performance results highlight the utility of the contingency-aware, pivot-conditioned approach:

- On Val14 and Test14, as well as Test14-hard subsets, CoPlanner achieved higher overall scores across both non-reactive (log-replay) and reactive (IDM controller) settings than state-of-the-art baselines (Diffusion Planner, UrbanDriver, PDM).
- Notable improvements were observed in:
  - Fewer collisions and increased time-to-collision (TTC)
  - Greater trajectory smoothness and driver comfort metrics
  - Robust operation in challenging scenarios involving rare and adversarial behaviors (due to fallback-preserving branch structure)
- The two-stage sampling and risk-aggregated evaluation directly contributed to these robustness gains across both familiar and previously unseen test conditions.

## 6. Practical Implications and Extensions

CoPlanner’s architecture provides several practical advantages for safety-critical real-world deployment:
- **Preservation of fallback options**: The ensemble of plausible long-term continuations ensures that if traffic evolves unexpectedly, alternative, pre-validated strategies remain available.
- **Social consistency**: By jointly generating multi-agent scenarios, the system avoids common conflicts and unrealistic downstream plans introduced by exogenously predicted agent behavior.
- **Flexible risk aggregation**: The scoring framework supports diverse risk measures and could, with extension, incorporate distributional uncertainty, learned risk attitudes, or dynamically chosen scenario weights.
- **Compatibility with physical constraints**: The design can accommodate future improvements—such as incorporating feasibility-aware guidance, physics-informed priors, or adaptive branching-points (t_b)—to further align generated plans with vehicle dynamics and scene semantics.

Potential future directions include adaptively setting the short-term branching time per situation, learning scenario weights for better uncertainty calibration, and broader closed-loop evaluation with diverse and more adversarial reactive agent sets.

## 7. Mathematical Formulation Table

| Component                   | Mathematical Expression                                                                                   | Description                                   |
|-----------------------------|----------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| Short/Long Decomposition    | $p(\Lambda | C) = p_\theta(S | C) \, p_\phi(B | S, C)$                                                  | Joint future as anchor + branches             |
| Risk-Aggregated Cost        | $J_k(\tau^0) = J_{shared}(\cdot) + R(\{J_{branch}(\cdot)\}_n)$                                          | Selection over multi-scenario cost             |
| Diffusion Loss              | $L_\theta = \mathbb{E}_{x^{(0)}, h, x^{(h)}} \left\| \mu_\theta(x^{(h)}, h, C) - x^{(0)} \right\|_2^2$   | Model objective under VP schedule              |
| Pivot Masking               | $m(t) = 1[t \leq t_b]$                                                                                   | Time mask for anchor/branch split              |

These formalizations anchor CoPlanner’s technical contributions and establish its foundation as a contingency-aware, interaction-consistent, and robust framework for autonomous motion planning.

---

CoPlanner’s interactive, scenario-robust design represents a major advancement toward closing the gap between offline generative modeling and online, safety-critical execution in autonomous driving systems [2509.17080].

Source: https://www.emergentmind.com/topics/contingency-aware-diffusion-planner-coplanner