Fusing Urban Structure and Semantics: A Conditional Diffusion Model for Cross-City OD Matrix Generation

arXiv cs.LG / 5/5/2026

📰 NewsDeveloper Stack & InfrastructureModels & Research

Key Points

  • The paper introduces SEDAN, a Structure-Enhanced Diffusion (conditional diffusion) model aimed at generating cross-city commuting OD (origin-destination) matrices that generalize better than prior approaches.
  • Cities are represented as attributed graphs where regions are nodes with demographic and point-of-interest features, commuting flows become weighted edges, and both adjacency and distance matrices encode spatial structure.
  • SEDAN fuses semantic and spatial information by using graph-transformer-based node interactions for latent travel demand while injecting adjacency as an attention guidance signal and distance as the diffusion conditioning to reflect proximity and travel impedance.
  • Experiments on real U.S. OD datasets show a 7.38% RMSE improvement over the prior state-of-the-art baseline WEDAN, with robustness across different urban scenarios and structural patterns.
  • The authors provide code for SEDAN, enabling others to reproduce and extend the proposed cross-city OD matrix generation method.

Abstract

Accurate modeling of commuting flows is important for urban governance, traffic planning, and resource allocation. However, the combined influence of individual intentions, geographic constraints, and social dynamics leads to considerable heterogeneity in commuting patterns, making it difficult to develop generation models that generalize across cities. To address this issue, we propose SEDAN, a Structure-Enhanced Diffusion model conditioned on Attributed Nodes for generalizable OD matrix generation. SEDAN models a city as an attributed graph. Each region is treated as a node with demographic and point-of-interest features, and commuting flows are modeled as weighted edges. Adjacency and distance matrices are incorporated to characterize spatial structure. Based on this representation, we design a fusion mechanism within SEDAN to jointly model semantic information and spatial information. Regional semantic attributes are used to model latent travel demand through graph-transformer-based node interactions, while spatial structure is injected into the generation process as explicit constraints. The adjacency matrix guides attention weights to strengthen interactions between neighboring regions. Meanwhile, the distance matrix serves as a diffusion condition to capture spatial proximity and travel impedance. The fusion of urban semantics and spatial constraints enables SEDAN to generate OD matrices that are both behaviorally plausible and geographically coherent. Experiments on real-world OD datasets from U.S. cities show that SEDAN achieves a 7.38\% improvement in RMSE over the state-of-the-art baseline, WEDAN. It also remains robust across heterogeneous urban scenarios and varying structural patterns. Our work provides an effective and generalizable solution for commuting OD matrix generation. The code is available at https://anonymous.4open.science/r/SEDAN.