TL;DR
CoGuide introduces a novel framework for solving complex spatial inverse problems—such as reconstructing indoor floorplans from human walking trajectories—where the forward operator is non-differentiable and highly non-smooth. By mapping both the measurements and the underlying signals into a contrastively learned, smooth embedding space, CoGuide provides a stable surrogate likelihood to guide diffusion models without relying on brittle physical simulator gradients.
What Problem Does This Paper Address?
Diffusion models have revolutionized our ability to solve inverse problems (IPs)—reconstructing an unknown signal $x$ from a noisy measurement $y$. Typically, methods like Diffusion Posterior Sampling (DPS) rely on the gradient of a known, differentiable forward operator $A(x)$ to guide the denoising process toward consistency with the measurement.
However, a massive gap remains when dealing with spatial inverse problems, such as inferring a building's floorplan from a person's walking trajectory. Here, the forward operator $A(x)$ is a path-planning policy (like the A* algorithm). This operator is inherently non-differentiable and highly non-smooth: opening a tiny door or moving a wall by a single pixel can cause a massive, discontinuous jump in the planned path. Even recent differentiable path-planners yield highly sensitive Jacobians, causing traditional gradient-based diffusion guidance to completely diverge or produce severe artifacts.
Methods
Instead of forcing gradients through an unstable path-planner, the authors propose CoGuide (Contrastive Diffusion Guidance). The core idea is to bypass the physical operator during inference by projecting both the floorplans ($x$) and trajectories ($y$) into a shared, smooth embedding space $\mathcal{E}$ using two neural network encoders ($f_\phi$ and $g_\psi$).
Key components of the method include:
- Contrastive Learning as a Likelihood Surrogate: The embedding space is trained using a symmetric supervised InfoNCE loss combined with an alignment loss. The authors mathematically demonstrate that minimizing the distance between matching pairs in this space implicitly approximates the true log-likelihood score $\nabla_{x} \log p(y|x)$, providing a smooth and stable gradient for diffusion guidance.
- Adam with DDIM: Standard gradient descent under-integrates embedding gradients during short Denoising Diffusion Implicit Models (DDIM) sampling schedules. CoGuide replaces standard gradient steps with Adam updates inside the diffusion loop to better navigate the non-convex posterior landscape.
- Intersection Penalty: To enforce physical realism, the authors add a simple penalty term $\mathcal{L}_{\text{intersect}}$ during inference that penalizes trajectories overlapping with generated walls.
Datasets
The model was trained and evaluated on:
- HouseExpo: A large-scale dataset containing 35,126 2D floorplans. Trajectories were synthetically generated using the A* algorithm across three density levels: sparse (10% coverage), moderate (25%), and dense (40%).
- Real-World UWB Trajectories: To test real-world generalization, the authors collected actual human walking trajectories in two student apartments using Qorvo DWM3000 Ultra-Wideband (UWB) tracking modules.
- MAESTRO: Used in an appendix extension to demonstrate the framework's generalization to blind audio restoration.
Key Insights and Ideas
- The InfoNCE Gradient Trick: The most elegant insight is the mathematical proof showing that the gradient of the inner product in an optimized InfoNCE embedding space exactly recovers the true likelihood score gradient. This bridges contrastive representation learning and generative inverse solving.
- Smoothing Discontinuities: By shifting the guidance objective from pixel/coordinate space to a learned latent space, the discontinuous "all-or-nothing" nature of path-planning is smoothed out into continuous distances, stabilizing the diffusion model's reverse steps.
- Robustness to Distribution Shift: While pure Classifier-Free Guidance (CFG) overfits to the synthetic training distribution of paths, CoGuide's geometric embedding space generalizes significantly better to real-world human trajectories that deviate from perfect shortest-path algorithms.
Key Results
CoGuide was compared against six baselines, including DPS combined with state-of-the-art differentiable planners (Neural A*, TransPath, DiPPeR) and Classifier-Free Guidance (CFG).
- Quantitative Performance: In sparse trajectory regimes, CoGuide achieved an F1 score of 0.91 and an IoU of 0.84, substantially outperforming baseline inverse solvers (which hovered around 0.77 F1 and 0.64 IoU).
- Real-World Validation: When tested on noisy, real-world UWB apartment data, CoGuide successfully reconstructed major wall segments and room structures, whereas CFG generated spurious structures or missed critical walls entirely due to the distribution shift.
Limitations and Future Work
- Simplified Environments: The HouseExpo dataset assumes empty rooms. In reality, human paths are dictated not just by walls but also by furniture, which is not currently modeled.
- Resolution Constraints: Floorplans were downsampled to $64 \times 64$ pixels because classical path-planners scale poorly to high-resolution grids during dataset generation.
- Broader Horizons: The authors note that this approach opens the door to solving other generalized "blind" inverse problems where the forward operator is completely unknown or un-modelable, suggesting future applications in city map synthesis from vehicle GPS data or molecular structure estimation.
Summary updated