{"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/tgl-a-general-framework-for-temporal-gnn","title":"TGL: A General Framework for Temporal GNN Training on Billion-Scale Graphs","arxiv_id":"2203.14883","date":"2022-03-28","proceeding":null,"authors":["Hongkuan Zhou","Da Zheng","Israt Nisa","Vasileios Ioannidis","Xiang Song","George Karypis"],"abstract":"Many real world graphs contain time domain information. Temporal Graph Neural Networks capture temporal information as well as structural and contextual information in the generated dynamic node embeddings. Researchers have shown that these embeddings achieve state-of-the-art performance in many different tasks. In this work, we propose TGL, a unified framework for large-scale offline Temporal Graph Neural Network training where users can compose various Temporal Graph Neural Networks with simple configuration files. TGL comprises five main components, a temporal sampler, a mailbox, a node memory module, a memory updater, and a message passing engine. We design a Temporal-CSR data structure and a parallel sampler to efficiently sample temporal neighbors to formtraining mini-batches. We propose a novel random chunk scheduling technique that mitigates the problem of obsolete node memory when training with a large batch size. To address the limitations of current TGNNs only being evaluated on small-scale datasets, we introduce two large-scale real-world datasets with 0.2 and 1.3 billion temporal edges. We evaluate the performance of TGL on four small-scale datasets with a single GPU and the two large datasets with multiple GPUs for both link prediction and node classification tasks. We compare TGL with the open-sourced code of five methods and show that TGL achieves similar or better accuracy with an average of 13x speedup. Our temporal parallel sampler achieves an average of 173x speedup on a multi-core CPU compared with the baselines. On a 4-GPU machine, TGL can train one epoch of more than one billion temporal edges within 1-10 hours. To the best of our knowledge, this is the first work that proposes a general framework for large-scale Temporal Graph Neural Networks training on multiple GPUs.","url_abs":"https://arxiv.org/abs/2203.14883v2","url_pdf":"https://arxiv.org/pdf/2203.14883v2.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":"tgl-a-general-framework-for-temporal-gnn","repo_url":"https://github.com/amazon-research/tgl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"tgl-a-general-framework-for-temporal-gnn","repo_url":"https://github.com/facebookresearch/taser-tgnn","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":null,"task_name":"CPU"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"node-classification","task_name":"Node Classification"},{"task_slug":"scheduling","task_name":"Scheduling"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2203.14883","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.14883"}},"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/amazon-research/tgl","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/taser-tgnn","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"unverified":4},"by_repo_kind":{"official":{"samples":3,"ran":2,"repositories":1},"listed":{"samples":3,"ran":0,"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":3,"samples":[{"code_sha256_prefix":"30b343adb02308b6","entry":"load_graph","repo":"amazon-research/tgl","repo_kind":"official","path":"utils.py","file_url":"https://github.com/amazon-research/tgl/blob/HEAD/utils.py","link_basis":"harvester_set","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":"30b343adb02308b6"}},{"code_sha256_prefix":"d8d0029e25bbd770","entry":"parse_config","repo":"amazon-research/tgl","repo_kind":"official","path":"utils.py","file_url":"https://github.com/amazon-research/tgl/blob/HEAD/utils.py","link_basis":"harvester_set","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":"d8d0029e25bbd770"}},{"code_sha256_prefix":"4fdd9bf7a4fd55d5","entry":"load_data","repo":"facebookresearch/taser-tgnn","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/facebookresearch/taser-tgnn/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"4fdd9bf7a4fd55d5"}},{"code_sha256_prefix":"5e7b890ce395b0ab","entry":"load_feat","repo":"amazon-research/tgl","repo_kind":"official","path":"utils.py","file_url":"https://github.com/amazon-research/tgl/blob/HEAD/utils.py","link_basis":"harvester_set","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":"5e7b890ce395b0ab"}},{"code_sha256_prefix":"3d437dfbe108e9a2","entry":"sample_with_pad","repo":"facebookresearch/taser-tgnn","repo_kind":"listed","path":"src/temporal_sampling/src/temporal_sampling/searchsorted.py","file_url":"https://github.com/facebookresearch/taser-tgnn/blob/HEAD/src/temporal_sampling/src/temporal_sampling/searchsorted.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"3d437dfbe108e9a2"}},{"code_sha256_prefix":"ed948538eedf8b41","entry":"select_device","repo":"facebookresearch/taser-tgnn","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/facebookresearch/taser-tgnn/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"ed948538eedf8b41"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}