STDDN: A Physics-Guided Deep Learning Framework for Crowd Simulation
Authors: Zijin Liu, Xu Geng, Wenshuai Xu, Xiang Zhao, Yan Xia, You Song
Organizations: School of Computer Science and Engineering, Beihang University, China · Beijing Digital Native Digital City Research Center, Beijing, China · School of Software, Beihang University, China
Accurate crowd simulation is crucial for public safety management, emergency evacuation planning, and intelligent transportation systems. However, existing methods, which typically model crowds as a collection of independent individual trajectories, are limited in their ability to capture macroscopic physical laws. This microscopic approach often leads to error accumulation and compromises simulation stability. Furthermore, deep learning-driven methods tend to suffer from low inference efficiency and high computational overhead, making them impractical for large-scale, efficient simulations. To address these challenges, we propose the Spatio-Temporal Decoupled Differential Equation Network (STDDN), a novel framework that guides microscopic trajectory prediction with macroscopic physics. We innovatively introduce the continuity equation from fluid dynamics as a strong physical constraint. A Neural Ordinary Differential Equation (Neural ODE) is employed to model the macroscopic density evolution driven by individual movements, thereby physically regularizing the microscopic trajectory prediction model. We design a density-velocity coupled dynamic graph learning module to formulate the derivative of the density field within the Neural ODE, effectively mitigating error accumulation. We also propose a differentiable density mapping module to eliminate discontinuous gradients caused by discretization and introduce a cross-grid detection module to accurately model the impact of individual cross-grid movements on local density changes. The proposed STDDN method has demonstrated significantly superior simulation performance compared to state-of-the-art methods on long-term tasks across four real-world datasets, as well as a major reduction in inference latency.
Figures & tables
Figure 1: Overview of the STDDN framework, consisting of a microscopic trajectory prediction network (bottom left), a neural ODE-based macroscopic density evolution module (top left), and the DVCG module (right), which connects microscopic trajectories with macroscopic density and velocity fields. The DVCG module includes three components—DDM, CGD, and NE—combined in a dynamic Graph Neural Network (GNN) to model density evolution. These components build the inflow term Gin(Φ,t,ρt) and outflow term Gout(Φ,t,ρt) , which are combined via Eq. 4 to form the derivatives of the density field. Colored arrows show velocity vectors at different time steps.
Model
GC
UCY
MAE ↓
OT ↓
#Pars ↓
Latency ↓
MAE ↓
OT ↓
#Pars ↓
Latency ↓
CA
2.7080
5.4990
-
-
8.3360
79.4200
-
-
SFM
1.2590
2.1140
-
-
2.5390
6.5710
-
-
STGCNN
8.1608
15.8372
7.56K
8.0539
7.5121
18.7721
7.56K
8.0539
PECNet
2.0669
4.3054
2.10M
51.3781
3.7694
16.1412
1.23M
49.5681
MID
8.4257
35.1797
3.52M
245.7762
8.2915
47.8711
2.47M
276.8964
Table 1: Overall performance comparison on GC and UCY datasets. The bold and underlined font show the best and the second best result respectively. Performance averaged over 5 runs.
Model
ETH
HOTEL
MAE ↓
OT ↓
#Pars ↓
Latency ↓
MAE ↓
OT ↓
#Pars ↓
Latency ↓
CA
0.7211
2.5318
-
-
0.5328
0.3102
-
-
SFM
0.6933
1.1903
-
-
0.4977
0.2371
-
-
STGCNN
3.8711
15.3766
7.56K
8.0539
5.6711
7.3851
7.56K
8.0539
PECNet
0.6533
0.9712
2.10M
48.3381
0.4592
0.2380
1.93M
31.8613
MID
4.1823
16.8301
3.79M
73.6639
4.3867
23.7882
2.86M
60.6521
Table 2: Overall performance comparison on ETH and HOTEL datasets. The bold and underlined font show the best and the second best result respectively. Performance averaged over 5 runs.
GC
UCY
MAE
OT
MAE
OT
w/o ODE
1.3784
2.4956
2.4867
6.0586
w/o Cross-net
0.9784
1.4732
1.8926
4.9532
w/o NN loss
1.2387
2.3466
1.9327
4.2514
w/o NE
0.8921
1.3881
1.7917
3.7131
Trans
0.8901
1.3611
1.7833
3.7055
Table 3: Ablation study on different parts of model design.
Figure 5
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Sym.
Domain
Descriptions
K
R
Number of pedestrian
N
R
Number of nodes
ρt
RN
Density of nodes at time t
mt
Rk
cross-grid masks of K pedestrianat at time t
A
{0,1}N×N
Dynamic adjacency matrix
W
RN×N
Learnable weight matrix
Appendix
Table 4: List of major symbols and descriptions.
Figure 4: The detailed of next trajectory prediction model.
Statistics
GC
UCY
ETH
HOTEL
ZARA1
ZARA2
Average duration of a trajectory( s )
11.02
13.25
6.10
6.72
13.92
19.06
Average pedestrian per minute ( min−1 )
203
132
49
35
44
36
Pedestrian density ( m−2 )
0.094
0.058
0.016
0.012
0.149
0.241
Average speed ( m⋅s−1 )
1.155
1.072
2.293
1.038
1.071
0.793
Std of the average speed ( m⋅s−1 )
0.565
0.646
0.807
0.695
0.134
0.349
simulate time steps
725
651
5776
9006
4481
5231
Appendix
Table 5: The basic statistics of the datasets.
Model
GC
UCY
MMD ↓
DTW ↓
GFLOPs ↓
FPS ↑
MMD ↓
DTW ↓
GFLOPs ↓
FPS ↑
CA
0.0620
-
-
-
2.0220
-
-
-
SFM
0.0150
-
-
-
0.1209
-
-
-
STGCNN
0.5296
5.1438
0.0002
124.163
0.5149
5.1695
0.0002
124.163
PECNet
0.0397
0.7431
3.4704
18.9913
0.1504
2.0986
2.7134
19.0032
MID
0.3737
4.2773
0.4537
3.7826
0.4384
4.7109
0.3871
4.7312
Appendix
Table 6: Additional performance comparison on GC and UCY datasets. The bold and underlined font show the best and the second best result respectively. Performance averaged over 5 runs.
Model
ETH
HOTEL
MMD ↓
DTW ↓
GFLOPs ↓
FPS ↑
MMD ↓
DTW ↓
GFLOPs ↓
FPS ↑
CA
0.4329
-
-
-
0.3548
-
-
-
SFM
0.3788
-
-
-
0.2301
-
-
-
STGCNN
3.9678
1.5622
0.0002
124.163
0.7418
3.7811
0.0002
124.163
PECNet
0.3573
0.3571
3.4704
19.9936
0.2219
0.2415
3.1927
30.3817
MID
3.7518
1.9512
0.5618
11.7528
0.6957
3.4641
0.4914
17.3411
Appendix
Table 7: Additional performance comparison on ETH and HOTEL datasets. The bold and underlined font show the best and the second best result respectively. Performance averaged over 5 runs.
Model
GC
UCY
FDE ↓
#Colli ↓
DEA ↓
FDE ↓
#Colli ↓
DEA ↓
CA
4.937
638
0.0290
13.9788
4602
0.0266
SFM
2.1031
1368
0.0280
3.4871
554
0.0267
STGCNN
15.3913
> 9999
0.1867
10.4219
> 9999
0.3123
PECNet
3.8124
1593
0.0612
5.9714
1474
0.0296
MID
13.8824
> 9999
0.1323
13.9821
> 9999
0.2134
Appendix
Table 8: Additional performance comparison on GC and UCY datasets. The bold and underlined font show the best and the second best result respectively. Performance averaged over 5 runs.
Model
ETH
HOTEL
FDE ↓
#Colli ↓
DEA ↓
FDE ↓
#Colli ↓
DEA ↓
CA
1.2343
738
0.0184
0.9641
714
0.0326
SFM
1.1489
682
0.0184
0.8731
630
0.0328
STGCNN
5.9631
2410
0.1323
8.7814
2031
0.1322
PECNet
0.9412
780
0.0156
0.8104
1508
0.0320
MID
6.0431
3814
0.1321
7.9873
1873
0.1211
Appendix
Table 9: Additional performance comparison on ETH and HOTEL datasets. The bold and underlined font show the best and the second best result respectively. Performance averaged over 5 runs.
Model
ZARA1
ZARA2
FDE ↓
MAE ↓
#Colli ↓
DEA ↓
FDE ↓
MAE ↓
#Colli ↓
DEA ↓
CA
2.0341
1.2814
262
0.0178
1.9432
1.0311
4031
0.0093
SFM
1.9857
1.1446
262
0.0171
2.9841
1.7120
3146
0.0087
STGCNN
6.9871
3.7361
2085
0.1341
8.7638
4.1324
7113
0.2141
PECNet
1.5314
0.9848
244
0.0162
3.9436
2.0405
4656
0.0192
MID
7.9981
4.0312
3013
0.1492
9.9743
5.4327
6016
0.1934
Appendix
Table 10: Additional performance comparison on ZARA1 and ZARA2 datasets. The bold and underlined font show the best and the second best result respectively. Performance averaged over 5 runs.
Model
GC
UCY
Training time
Memory
Batch size
Training time
Memory
Batch size
PCS
1h
2G
32
1h
2G
16
SPDiff
5h
7G
32
3h
6G
32
Ours
8h
26G
16
5h
22G
4
Appendix
Table 11: Computational cost compared to other methods on GC and UCY datasets.
Figure 5: Visualization of predicted trajectories on the GC, UCY, ETH, and HOTEL datasets. Each column represents a different dataset, showcasing various scenarios. Observed trajectories are shown in , ground truth in , STDDN in , SPDiff in , NSP in , and PCS in .
Figure 6: Accumulated density prediction error comparison on the GC dataset.
Figure 7: Accumulated density prediction error comparison on the UCY dataset.
Figure 8: Sensitivity analysis on the UCY dataset for grid size, ODE time steps τ , loss balancing coefficients ( λ1 and λ2 ), and node embedding dimension, using MAE as the evaluation metric.
Figure 9: Sensitivity analysis on the ETH dataset for grid size, ODE time steps τ , loss balancing coefficients ( λ1 and λ2 ), and node embedding dimension, using MAE as the evaluation metric.
Figure 10: Sensitivity analysis on the HOTEL dataset for grid size, ODE time steps τ , loss balancing coefficients ( λ1 and λ2 ), and node embedding dimension, using MAE as the evaluation metric.
Modeling realistic pedestrian trajectories requires accounting for both social interactions and environmental context, yet most existing approaches largely emphasize social dynamics. We propose EnvSocial-Diff: a diffusion-based crowd simulation model informed by social physics and augmented with environmental conditioning and individual--group interaction. Our structured environmental conditioning module explicitly encodes obstacles, objects of interest, and lighting levels, providing interpretable signals that capture scene constraints and attractors. In parallel, the individual--group interaction module goes beyond individual-level modeling by capturing both fine-grained interpersonal relations and group-level conformity through a graph-based design. Experiments on multiple benchmark datasets demonstrate that EnvSocial-Diff outperforms the latest state-of-the-art methods, underscoring the importance of explicit environmental conditioning and multi-level social interaction for realistic crowd simulation. Code is here: https://github.com/zqyq/EnvSocial-Diff.
Bingxue Zhao, Qi Zhang, Hui Huang
VCC, College of Computer Science and Software Engineering, Shenzhen University
Crowd trajectory prediction plays a crucial role in public safety and management, where it can help prevent disasters such as stampedes. Recent works address the problem by predicting individual trajectories and considering surrounding objects based on manually annotated data. However, these approaches tend to overlook dense crowd scenarios, where the challenges of automation become more pronounced due to the massiveness, noisiness, and inaccuracy of the tracking outputs, resulting in high computational costs. To address these challenges, we propose and extensively evaluate a novel cluster-based approach that groups individuals based on similar attributes over time, enabling faster execution through accurate group summarisation. Our plug-and-play method can be combined with existing trajectory predictors by using our output centroid in place of their pedestrian input. We evaluate our proposed method on several challenging dense crowd scenes. We demonstrated that our approach leads to faster processing and lower memory usage when compared with state-of-the-art methods, while maintaining the accuracy
Antonius Bima Murti Wijaya, Paul Henderson, Marwa Mahmoud
University of Glasgow, Glasgow G12 8QQ, United Kingdom
Large-scale crowd management requires pedestrian simulations that are both computationally efficient and compatible with feedback-based control. However, most open-source tools are either microscopic or not designed for network-scale closed-loop evaluation. This paper presents PedNStream (Pedestrian Network Flow Simulation), an open-source, Python-native simulator for macroscopic pedestrian network loading based on the Link Transmission Model (LTM). The framework extends LTM-based pedestrian models by incorporating stochastic link dynamics that capture diffusion and activity-induced variability, and replaces dynamic user equilibrium route choice with a utility-based formulation suited to uncertain, intervention-driven settings. PedNStream is implemented as a modular framework with built-in controller interfaces for interventions such as gating, flow separation, and route guidance. We evaluate the framework in a staged manner. Synthetic scenarios verify key mechanisms, including queue formation, spillback, congestion dissipation, and adaptive rerouting. Real-network experiments assess large-scale behavior and consistency with observed pedestrian counts. A closed-loop case study demonstrates controller integration, and a runtime analysis quantifies scalability. These results establish PedNStream as an efficient and practical testbed for large-scale pedestrian network simulation and control.
Weiming Mai, Dorine Duives, Serge Hoogendoorn
Department of Transportation and Planning, Delft University of Technology, Delft, Netherlands