TL;DR
Generating structured paths with discrete diffusion models often results in invalid trajectories that break graph connectivity constraints. DDPS (Discrete Diffusion Posterior Sampling) solves this by introducing PALM, a representation that guarantees generated samples are 100% valid paths by construction, alongside an efficient gradient-based guidance method to steer paths toward high-reward edges without retraining.
What Problem Does This Paper Address?
Diffusion models are widely used for continuous generative tasks like image and video synthesis, but extending them to discrete, structurally constrained domains—such as path planning in logistics, robotics, and security patrolling—remains difficult.
In a layered graph (a directed acyclic graph partitioned into sequential stages where edges only connect adjacent layers), a valid trajectory must be an unbroken path from the source layer to the final layer. Existing graph diffusion baselines treat paths as general subgraphs (relaxing adjacency matrices to continuous values) or generate raw sequences of node IDs. These approaches fail to guarantee connectivity: they frequently produce disjoint edges or impossible steps, and applying standard classifier guidance exacerbates the problem, causing the rate of valid paths to collapse completely.
Methods
The authors tackle path generation through two main innovations:
- PALM (Padded Adjacency-List Matrix): Instead of generating full adjacency matrices, PALM records a single outgoing edge per vertex as a one-hot vector (padded to the maximum out-degree). Starting at the root node in layer 1 and tracing the chosen outgoing edge layer-by-layer guarantees a valid path to the final layer. The mapping from PALM to paths is many-to-one and onto, guaranteeing 100% validity by construction.
- Diffusion Framework (D3PM Adaptation): Built upon discrete denoising diffusion probabilistic models (D3PM), the model applies transition matrices tailored to each vertex's out-degree. During training, losses are computed exclusively on vertices lying on the ground-truth path.
- Guidance via Expected Reward Posterior Sampling: Standard classifier guidance relies on continuous score gradients ($\nabla_x \log p(y|x)$), which do not exist in discrete state spaces. DDPS computes the expected total reward $\bar{R}(z)$ under the model's predicted categorical logits $z$ using dynamic programming. The gradient $\nabla_z \bar{R}(z)$ is then used to shift sampling logits at each reverse diffusion step, steering generation toward preferred edges without retraining.
[ Diffusion Model ] ──► Logits z
│
┌─────────────────────────────┴─────────────────────────────┐
▼ ▼
Expected Reward R(z) (via DP) Reverse Step xt-1
│ │
▼ ▼
Gradient ∇z R(z) ──────── Guidance Scale λ ─────────────► Guided Posterior
│
▼
Valid Path (PALM)
Datasets
The authors evaluated their approach on three layered graph setups:
- Toy: A synthetic layered graph generated by pruning 50% of the edges from a fully connected 11-layer graph (41 vertices, all unique paths used).
- Heights: A medium-scale graph derived from real-world city maps representing security patrol networks, featuring 12 layers, 423 vertices, and ~120,000 sampled paths.
- Ridge: A large-scale city map graph containing 13 layers, 4,293 vertices, and ~347,000 sampled paths.
Key Insights and Ideas
- Representation beats post-processing: Rather than relying on the diffusion model to implicitly "learn" validity or using expensive heuristic post-processing (like beam search), constraining the underlying data representation (PALM) guarantees structural validity a priori.
- Continuous relaxations are brittle under guidance: While continuous graph diffusion models like SwinGNN can mimic paths well unconditionally, steering them with guidance gradients breaks their delicate approximations, causing valid path generation rates to drop to zero.
- The guidance "sweet spot": Increasing guidance scale $\lambda$ raises the reward, but tracking distributional metrics (e.g., Total Variation, KL divergence) reveals an optimal point ($\lambda \approx 100$). At this point, the sampler achieves near-maximum reward while adhering closely to the underlying target distribution.
Key Results
- Generation Validity Rate (VR): In unconditional generation, DDPS achieves 100% validity. SwinGNN achieves 99.7%, while the baseline EDP-GNN achieves 0%. Under conditional reward guidance, SwinGNN’s validity quickly degrades to 0% as guidance scale increases, whereas DDPS retains 100% valid paths across all guidance scales.
- Reward Improvement: Across four reward sparsity regimes (ranging from common targets to rare targets occurring in fewer than 1-in-10-million random paths), DDPS successfully scales average rewards up to theoretical maximums as guidance scales increase.
- Distributional Adherence: Evaluating metrics including Fréchet Layered Graph Distance (FLGD) and Layer Imitation Scores (IS-L) demonstrated that DDPS preserves the target conditional distribution until guidance scales become excessively strong.
Limitations and Future Work
- Layered Graph Dependency: The PALM formulation relies strictly on layered, directed acyclic graphs starting from a single node; extending this formulation to cyclic or arbitrary graph topologies remains an open question.
- Additive Reward Assumption: The guidance mechanism evaluates rewards that decompose across edges; non-Markovian or complex trajectory-level rewards were not explored.
- Future Directions: The authors plan to generalize the framework to broader combinatorial generation problems beyond paths, as well as incorporate more elaborate multi-objective constraints.
Summary updated