{"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/unitraj-universal-human-trajectory-modeling","title":"UniTraj: Learning a Universal Trajectory Foundation Model from Billion-Scale Worldwide Traces","arxiv_id":"2411.03859","date":"2024-11-06","proceeding":null,"authors":["Yuanshao Zhu","James Jianqiao Yu","Xiangyu Zhao","Xuetao Wei","Yuxuan Liang"],"abstract":"Human trajectory modeling is essential for deciphering movement patterns and supporting advanced applications across various domains. However, existing methods are often tailored to specific tasks and regions, resulting in limitations related to task specificity, regional dependency, and data quality sensitivity. Addressing these challenges requires a universal human trajectory foundation model capable of generalizing and scaling across diverse tasks and geographic contexts. To this end, we propose UniTraj, a Universal human Trajectory foundation model that is task-adaptive, region-independent, and highly generalizable. To further enhance performance, we construct WorldTrace, the first large-scale, high-quality, globally distributed dataset sourced from open web platforms, encompassing 2.45 million trajectories with billions of points across 70 countries. Through multiple resampling and masking strategies designed for pre-training, UniTraj effectively overcomes geographic and task constraints, adapting to heterogeneous data quality. Extensive experiments across multiple trajectory analysis tasks and real-world datasets demonstrate that UniTraj consistently outperforms existing approaches in terms of scalability and adaptability. These results underscore the potential of UniTraj as a versatile, robust solution for a wide range of trajectory analysis applications, with WorldTrace serving as an ideal but non-exclusive foundation for training.","url_abs":"https://arxiv.org/abs/2411.03859v2","url_pdf":"https://arxiv.org/pdf/2411.03859v2.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":[],"tasks":[{"task_slug":"specificity","task_name":"Specificity"},{"task_slug":"trajectory-modeling","task_name":"Trajectory Modeling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.03859","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.03859"}},"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/Yasoz/UniTraj","reach":null}],"summary":{"ran":6,"ran_honours":1,"ran_fixture":1,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":11,"ran":9,"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":"acc6f4c1919828fe","entry":"Attention","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"acc6f4c1919828fe"}},{"code_sha256_prefix":"c799a3c821a56052","entry":"Decoder","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c799a3c821a56052"}},{"code_sha256_prefix":"5ced885f98bd1af7","entry":"FeedForward","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5ced885f98bd1af7"}},{"code_sha256_prefix":"8f5ecb9d147751bc","entry":"PatchShuffle","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8f5ecb9d147751bc"}},{"code_sha256_prefix":"d49696560619a2d2","entry":"RotaryEmbedding","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d49696560619a2d2"}},{"code_sha256_prefix":"09168e5f10699b12","entry":"Transformer","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"09168e5f10699b12"}},{"code_sha256_prefix":"f5ebb4d229689494","entry":"random_indices","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f5ebb4d229689494"}},{"code_sha256_prefix":"8a42d08708be07cd","entry":"specified_mask_indices","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8a42d08708be07cd"}},{"code_sha256_prefix":"b7a33a4b8c09a70d","entry":"take_indices","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b7a33a4b8c09a70d"}},{"code_sha256_prefix":"d569d8224e634aba","entry":"Encoder","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d569d8224e634aba"}},{"code_sha256_prefix":"1c03b44f12d6ac9d","entry":"UniTraj","repo":"Yasoz/UniTraj","repo_kind":"found_in_text","path":"utils/unitraj.py","file_url":"https://github.com/Yasoz/UniTraj/blob/HEAD/utils/unitraj.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1c03b44f12d6ac9d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}