{"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/difftraj-generating-gps-trajectory-with-1","title":"DiffTraj: Generating GPS Trajectory with Diffusion Probabilistic Model","arxiv_id":"2304.11582","date":"2023-04-23","proceeding":"NeurIPS 2023 11","authors":["Yuanshao Zhu","Yongchao Ye","Shiyao Zhang","Xiangyu Zhao","James J. Q. Yu"],"abstract":"Pervasive integration of GPS-enabled devices and data acquisition technologies has led to an exponential increase in GPS trajectory data, fostering advancements in spatial-temporal data mining research. Nonetheless, GPS trajectories contain personal geolocation information, rendering serious privacy concerns when working with raw data. A promising approach to address this issue is trajectory generation, which involves replacing original data with generated, privacy-free alternatives. Despite the potential of trajectory generation, the complex nature of human behavior and its inherent stochastic characteristics pose challenges in generating high-quality trajectories. In this work, we propose a spatial-temporal diffusion probabilistic model for trajectory generation (DiffTraj). This model effectively combines the generative abilities of diffusion models with the spatial-temporal features derived from real trajectories. The core idea is to reconstruct and synthesize geographic trajectories from white noise through a reverse trajectory denoising process. Furthermore, we propose a Trajectory UNet (Traj-UNet) deep neural network to embed conditional information and accurately estimate noise levels during the reverse process. Experiments on two real-world datasets show that DiffTraj can be intuitively applied to generate high-fidelity trajectories while retaining the original distributions. Moreover, the generated results can support downstream trajectory analysis tasks and significantly outperform other methods in terms of geo-distribution evaluations.","url_abs":"https://arxiv.org/abs/2304.11582v2","url_pdf":"https://arxiv.org/pdf/2304.11582v2.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":"difftraj-generating-gps-trajectory-with-1","repo_url":"https://github.com/Yasoz/DiffTraj","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2304.11582","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.11582"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Yasoz/DiffTraj","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran_fixture":1,"ran":1,"unverified":6},"by_repo_kind":{"official":{"samples":10,"ran":4,"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":0,"samples":[{"code_sha256_prefix":"c3a6b977022957cb","entry":"Normalize","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/Traj_UNet.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/Traj_UNet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c3a6b977022957cb"}},{"code_sha256_prefix":"cb49209c125de1b4","entry":"get_timestep_embedding","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/module.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/module.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb49209c125de1b4"}},{"code_sha256_prefix":"b19cfb790c935cfa","entry":"make_beta_schedule","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/helper.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/helper.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b19cfb790c935cfa"}},{"code_sha256_prefix":"3137073275f8c21a","entry":"nonlinearity","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/Traj_UNet.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/Traj_UNet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3137073275f8c21a"}},{"code_sha256_prefix":"30e33c6c36337446","entry":"extract","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/helper.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/helper.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"30e33c6c36337446"}},{"code_sha256_prefix":"c6e806d22e50ae25","entry":"gather","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c6e806d22e50ae25"}},{"code_sha256_prefix":"9f886957d16d8c27","entry":"get_timestep_embedding","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/Traj_UNet.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/Traj_UNet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9f886957d16d8c27"}},{"code_sha256_prefix":"a37cdbfa6457284f","entry":"resample_trajectory","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a37cdbfa6457284f"}},{"code_sha256_prefix":"329c8696d9d543a5","entry":"sample_batch","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/helper.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/helper.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"329c8696d9d543a5"}},{"code_sha256_prefix":"008f54f956aac430","entry":"time_warping","repo":"Yasoz/DiffTraj","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/Yasoz/DiffTraj/blob/HEAD/utils/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"008f54f956aac430"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}