{"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/arxiv-2601-22454","title":"Temporal Graph Pattern Machine","arxiv_id":"2601.22454","date":"2026-01-30","proceeding":null,"authors":["Yijun Ma","Zehong Wang","Weixiang Sun","Yanfang Ye"],"abstract":"Temporal graph learning is pivotal for deciphering dynamic systems, where the core challenge lies in explicitly modeling the underlying evolving patterns that govern network transformation. However, prevailing methods are predominantly task-centric and rely on restrictive assumptions -- such as short-term dependency modeling, static neighborhood semantics, and retrospective time usage. These constraints hinder the discovery of transferable temporal evolution mechanisms. To address this, we propose the Temporal Graph Pattern Machine (TGPM), a foundation framework that shifts the focus toward directly learning generalized evolving patterns. TGPM conceptualizes each interaction as an interaction patch synthesized via temporally-biased random walks, thereby capturing multi-scale structural semantics and long-range dependencies that extend beyond immediate neighborhoods. These patches are processed by a Transformer-based backbone designed to capture global temporal regularities while adapting to context-specific interaction dynamics. To further empower the model, we introduce a suite of self-supervised pre-training tasks -- specifically masked token modeling and next-time prediction -- to explicitly encode the fundamental laws of network evolution. Extensive experiments on temporal link prediction and temporal node classification show that TGPM consistently ranks among the top-performing methods, demonstrating exceptional cross-domain transferability. Our code has been released in https://github.com/antman9914/TGPM.","url_abs":"https://arxiv.org/abs/2601.22454","url_pdf":"https://arxiv.org/pdf/2601.22454","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2601.22454","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2601.22454"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/antman9914/TGPM","reach":null}],"summary":{"ran":2,"ran_fixture":2,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":6,"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":6,"samples":[{"code_sha256_prefix":"c86852e83ad4a2f7","entry":"PatternEncoder","repo":"antman9914/TGPM","repo_kind":"found_in_text","path":"models/TGPM.py","file_url":"https://github.com/antman9914/TGPM/blob/HEAD/models/TGPM.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":"c86852e83ad4a2f7"}},{"code_sha256_prefix":"ce75113bf201cd67","entry":"TimeEncoder","repo":"antman9914/TGPM","repo_kind":"found_in_text","path":"models/TGPM.py","file_url":"https://github.com/antman9914/TGPM/blob/HEAD/models/TGPM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce75113bf201cd67"}},{"code_sha256_prefix":"fc265009d4a405e5","entry":"mask_feature","repo":"antman9914/TGPM","repo_kind":"found_in_text","path":"models/TGPM.py","file_url":"https://github.com/antman9914/TGPM/blob/HEAD/models/TGPM.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc265009d4a405e5"}},{"code_sha256_prefix":"171d7c6256c24187","entry":"mask_patterns","repo":"antman9914/TGPM","repo_kind":"found_in_text","path":"models/TGPM.py","file_url":"https://github.com/antman9914/TGPM/blob/HEAD/models/TGPM.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"171d7c6256c24187"}},{"code_sha256_prefix":"31d6ae1dd1a169bb","entry":"BaseModel","repo":"antman9914/TGPM","repo_kind":"found_in_text","path":"models/TGPM.py","file_url":"https://github.com/antman9914/TGPM/blob/HEAD/models/TGPM.py","link_basis":"first_harvest_node","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":"31d6ae1dd1a169bb"}},{"code_sha256_prefix":"8663fdfe90abf4fc","entry":"PretrainModel","repo":"antman9914/TGPM","repo_kind":"found_in_text","path":"models/TGPM.py","file_url":"https://github.com/antman9914/TGPM/blob/HEAD/models/TGPM.py","link_basis":"first_harvest_node","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":"8663fdfe90abf4fc"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}