{"id":19336634,"url":"https://github.com/kimmeen/neural-temporal-walks","last_synced_at":"2025-04-23T01:30:51.335Z","repository":{"id":60258537,"uuid":"538270729","full_name":"KimMeen/Neural-Temporal-Walks","owner":"KimMeen","description":"[NeurIPS 2022] The official PyTorch implementation of \"Neural Temporal Walks: Motif-Aware Representation Learning on Continuous-Time Dynamic Graphs\"","archived":false,"fork":false,"pushed_at":"2022-11-23T02:35:21.000Z","size":177,"stargazers_count":53,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T06:12:10.958Z","etag":null,"topics":["dynamic-graph-embedding","dynamic-graphs","graph-neural-networks","graph-representation-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KimMeen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-18T23:42:53.000Z","updated_at":"2024-12-07T02:22:48.000Z","dependencies_parsed_at":"2022-09-27T09:40:24.076Z","dependency_job_id":null,"html_url":"https://github.com/KimMeen/Neural-Temporal-Walks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimMeen%2FNeural-Temporal-Walks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimMeen%2FNeural-Temporal-Walks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimMeen%2FNeural-Temporal-Walks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KimMeen%2FNeural-Temporal-Walks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KimMeen","download_url":"https://codeload.github.com/KimMeen/Neural-Temporal-Walks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250352183,"owners_count":21416454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynamic-graph-embedding","dynamic-graphs","graph-neural-networks","graph-representation-learning"],"created_at":"2024-11-10T03:11:51.188Z","updated_at":"2025-04-23T01:30:50.957Z","avatar_url":"https://github.com/KimMeen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Temporal Walks: Motif-Aware Representation Learning on Continuous-Time Dynamic Graphs\n\n[![PDF link](https://img.shields.io/static/v1?label=PDF\u0026message=Preprint\u0026color=blue\u0026logo=pdf)](https://mingjin.dev/assets/pdf/neurips-22-jin.pdf)\n[![Video link](https://img.shields.io/static/v1?label=Video\u0026message=YouTube\u0026color=red\u0026logo=youtube)](https://www.youtube.com/watch?v=oUy6eSdOhms)\n\n## Introduction\n**[NIPS 2022]** The official PyTorch implementation of \"[Neural Temporal Walks: Motif-Aware Representation Learning on Continuous-Time Dynamic Graphs](https://mingjin.dev/assets/pdf/neurips-22-jin.pdf)\"\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./assets/thumbnail.png\" width=\"600\"\u003e\n\u003c/p\u003e\n\n## Authors\n[Ming Jin](https://mingjin.dev/), [Yuan-Fang Li](https://users.monash.edu.au/~yli/), [Shirui Pan](https://shiruipan.github.io/)\n\n## Requirements\n- matplotlib==3.3.4\n- numba==0.54.1\n- numpy==1.19.2\n- pandas==1.2.2\n- scikit_learn==1.1.1\n- torch==1.7.1\n- torchdiffeq==0.2.2\n- tqdm==4.59.0\n\nTo install all dependencies:\n```\npip install -r requirements.txt\n```\n\n## Dataset and preprocessing\n\n### Option 1. Use our preprocessed datasets\n\n- Click [here](https://drive.google.com/uc?export=download\u0026id=1jao1WgVt6VKfDA4KNPfxqlH0CeBNNL6Y) to download our preprocessed datasets.\n- Unzip the downloaded file\n- Place all dataset files under the ./data directory\n\n### Option 2. Preprocess datasets by yourself\n\n- Please refer to our paper to download the raw datasets\n- Put the dataset files under the ./data directory\n- Use the provided scripts to preprocess the raw dataset ```.csv``` files. For example:\n  - For the CollegeMsg dataset, you can run our script directly to preprocess it: ```python collegemsg.py```\n  - For the Taobao dataset, you need to execute ```taobao_preprocessing.ipynb``` first before running ```python taobao.py```\n\n## Model training\n\nHere we provide three examples. Firstly, enter the directory with training scripts:\n\n```cd scripts/```\n\nTo train on the CollegeMsg dastaset:\n- Inductive: ```bash collegemsg_inductive.sh```\n- Transductive: ```bash collegemsg_transductive.sh```\n\n\nTo train on the Enron dastaset:\n- Inductive: ```bash enron_inductive.sh```\n- Transductive: ```bash enron_transductive.sh```\n\nTo train on the Taobao dastaset:\n- Inductive: ```bash taobao_inductive.sh```\n- Transductive: ```bash taobao_transductive.sh```\n\n## Detailed usage\n\nPlease refer to the function ```get_args()``` in ```util.py``` for the detailed description of each hyperparameter.\n\n\n## Acknowledgement\nOur implementation adapts the code of [TGAT](https://github.com/StatsDLMathsRecomSys/Inductive-representation-learning-on-temporal-graphs) and [CAWs](https://github.com/snap-stanford/CAW) as the code base and extensively adapts it to our purpose. We thank the authors for sharing their code.\n\n## Cite us\nIf you find this research useful, please cite our paper:\n```\n@inproceedings{\njin2022neural,\ntitle={Neural Temporal Walks: Motif-Aware Representation Learning on Continuous-Time Dynamic Graphs},\nauthor={Ming Jin and Yuan-Fang Li and Shirui Pan},\nbooktitle={Thirty-Sixth Conference on Neural Information Processing Systems},\nyear={2022}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimmeen%2Fneural-temporal-walks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkimmeen%2Fneural-temporal-walks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkimmeen%2Fneural-temporal-walks/lists"}