{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/social-physics-informed-diffusion-model-for","title":"Social Physics Informed Diffusion Model for Crowd Simulation","arxiv_id":"2402.06680","date":"2024-02-08","proceeding":null,"authors":["Hongyi Chen","Jingtao Ding","Yong Li","Yue Wang","Xiao-Ping Zhang"],"abstract":"Crowd simulation holds crucial applications in various domains, such as urban planning, architectural design, and traffic arrangement. In recent years, physics-informed machine learning methods have achieved state-of-the-art performance in crowd simulation but fail to model the heterogeneity and multi-modality of human movement comprehensively. In this paper, we propose a social physics-informed diffusion model named SPDiff to mitigate the above gap. SPDiff takes both the interactive and historical information of crowds in the current timeframe to reverse the diffusion process, thereby generating the distribution of pedestrian movement in the subsequent timeframe. Inspired by the well-known social physics model, i.e., Social Force, regarding crowd dynamics, we design a crowd interaction module to guide the denoising process and further enhance this module with the equivariant properties of crowd interactions. To mitigate error accumulation in long-term simulations, we propose a multi-frame rollout training algorithm for diffusion modeling. Experiments conducted on two real-world datasets demonstrate the superior performance of SPDiff in terms of macroscopic and microscopic evaluation metrics. Code and appendix are available at https://github.com/tsinghua-fib-lab/SPDiff.","url_abs":"https://arxiv.org/abs/2402.06680v1","url_pdf":"https://arxiv.org/pdf/2402.06680v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"social-physics-informed-diffusion-model-for","repo_url":"https://github.com/tsinghua-fib-lab/spdiff","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"physics-informed-machine-learning","task_name":"Physics-informed machine learning"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.06680","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.06680"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/tsinghua-fib-lab/SPDiff","reach":{"status":"ok"}}],"summary":{"ran":12,"ran_draft_wrong":2,"unverified":2},"by_repo_kind":{"official":{"samples":16,"ran":14,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":16,"samples":[{"code_sha256_prefix":"094136346d83712e","entry":"angle_to_rotation_matrix","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"dataset/homography_warper.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/dataset/homography_warper.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"094136346d83712e"}},{"code_sha256_prefix":"4f9621071f0ed4e8","entry":"clear_nan","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/autoencoder.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/autoencoder.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4f9621071f0ed4e8"}},{"code_sha256_prefix":"d6c9e8ba93a85e0e","entry":"collate","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/trajectron.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/trajectron.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d6c9e8ba93a85e0e"}},{"code_sha256_prefix":"a96e009d7ca2c870","entry":"deg2rad","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"dataset/homography_warper.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/dataset/homography_warper.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a96e009d7ca2c870"}},{"code_sha256_prefix":"e992dfa7ba64b1e5","entry":"get_graph_features","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/vnn_models.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/vnn_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e992dfa7ba64b1e5"}},{"code_sha256_prefix":"5a0beb315ee2d6b3","entry":"get_model_device","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"utils/model_registrar.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/utils/model_registrar.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5a0beb315ee2d6b3"}},{"code_sha256_prefix":"0c2d063349b39fb3","entry":"get_relative_robot_traj","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/trajectron.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/trajectron.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0c2d063349b39fb3"}},{"code_sha256_prefix":"534a2d5685ceb894","entry":"get_rotation_matrix2d","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"dataset/homography_warper.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/dataset/homography_warper.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"534a2d5685ceb894"}},{"code_sha256_prefix":"86b9bb6734370ad6","entry":"index_sum","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/egnn.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/egnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"86b9bb6734370ad6"}},{"code_sha256_prefix":"93e49f2486b2b26d","entry":"linear","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/multi_attention_forward.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/multi_attention_forward.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"93e49f2486b2b26d"}},{"code_sha256_prefix":"19b639ea820e6dbc","entry":"mean_pool","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/vnns.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/vnns.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"19b639ea820e6dbc"}},{"code_sha256_prefix":"4a5f247d4b18ad03","entry":"multi_head_attention_forward","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/multi_attention_forward.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/multi_attention_forward.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a5f247d4b18ad03"}},{"code_sha256_prefix":"18974426ec3297c6","entry":"restore","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/trajectron.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/trajectron.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"18974426ec3297c6"}},{"code_sha256_prefix":"1d6e462a448df843","entry":"standard_normal_logprob","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/common.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/common.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1d6e462a448df843"}},{"code_sha256_prefix":"82816eb1edfdbd19","entry":"gaussian_entropy","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/common.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"82816eb1edfdbd19"}},{"code_sha256_prefix":"534f60a963b5e21b","entry":"reparameterize_gaussian","repo":"tsinghua-fib-lab/SPDiff","repo_kind":"official","path":"models/common.py","file_url":"https://github.com/tsinghua-fib-lab/SPDiff/blob/HEAD/models/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"534f60a963b5e21b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}