{"id":13481273,"url":"https://github.com/leftthomas/DGCNN","last_synced_at":"2025-03-27T11:32:10.886Z","repository":{"id":100211835,"uuid":"117973724","full_name":"leftthomas/DGCNN","owner":"leftthomas","description":"A PyTorch implementation of DGCNN based on AAAI 2018 paper \"An End-to-End Deep Learning Architecture for Graph Classification\"","archived":false,"fork":false,"pushed_at":"2023-08-10T05:36:10.000Z","size":38381,"stargazers_count":60,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-01T17:25:42.463Z","etag":null,"topics":["gcn","gnn","graph","graph-classification","graph-convolutional-networks","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leftthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-18T11:24:39.000Z","updated_at":"2024-07-23T17:17:32.000Z","dependencies_parsed_at":"2024-01-17T16:08:23.146Z","dependency_job_id":"1c63a248-382b-4124-bf84-7e855284eb0e","html_url":"https://github.com/leftthomas/DGCNN","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/leftthomas%2FDGCNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leftthomas%2FDGCNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leftthomas%2FDGCNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leftthomas%2FDGCNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leftthomas","download_url":"https://codeload.github.com/leftthomas/DGCNN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222239551,"owners_count":16953974,"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":["gcn","gnn","graph","graph-classification","graph-convolutional-networks","pytorch"],"created_at":"2024-07-31T17:00:50.362Z","updated_at":"2024-10-30T14:31:26.602Z","avatar_url":"https://github.com/leftthomas.png","language":"Python","readme":"# DGCNN\nA PyTorch implementation of DGCNN based on AAAI 2018 paper \n[An End-to-End Deep Learning Architecture for Graph Classification](https://www.cse.wustl.edu/~muhan/papers/AAAI_2018_DGCNN.pdf).\n\n## Requirements\n- [Anaconda](https://www.anaconda.com/download/)\n- [PyTorch](https://pytorch.org)\n```\nconda install pytorch torchvision -c pytorch\n```\n- PyTorchNet\n```\npip install git+https://github.com/pytorch/tnt.git@master\n```\n- [PyTorch Geometric](https://rusty1s.github.io/pytorch_geometric/build/html/index.html)\n```\npip install torch-scatter\npip install torch-sparse\npip install torch-cluster\npip install torch-spline-conv (optional)\npip install torch-geometric\n```\n\n## Datasets\nThe datasets are collected from [graph kernel datasets](https://ls11-www.cs.tu-dortmund.de/staff/morris/graphkerneldatasets).\nThe code will download and extract them into `data` directory automatically. The `10fold_idx` files are collected from \n[pytorch_DGCNN](https://github.com/muhanzhang/pytorch_DGCNN).\n\n## Usage\n### Train Model\n```\npython -m visdom.server -logging_level WARNING \u0026 python train.py --data_type PTC_MR --num_epochs 200\noptional arguments:\n--data_type                   dataset type [default value is 'DD'](choices:['DD', 'PTC_MR', 'NCI1', 'PROTEINS', 'IMDB-BINARY', 'IMDB-MULTI', 'MUTAG', 'COLLAB'])\n--batch_size                  train batch size [default value is 50]\n--num_epochs                  train epochs number [default value is 100]\n```\nVisdom now can be accessed by going to `127.0.0.1:8097/env/$data_type` in your browser, `$data_type` means the dataset type which you are training.\n\n## Benchmarks\nDefault PyTorch Adam optimizer hyper-parameters were used without learning rate scheduling. \nThe model was trained with 100 epochs and batch size of 50 on a NVIDIA GTX 1070 GPU. \n\nHere is tiny difference between this code and official paper. **X** is defined as a concatenated matrix of vertex labels、\nvertex attributes and normalized node degrees.\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eDataset\u003c/th\u003e\n      \u003cth\u003eMUTAG\u003c/th\u003e\n      \u003cth\u003ePTC\u003c/th\u003e\n      \u003cth\u003eNCI1\u003c/th\u003e\n      \u003cth\u003ePROTEINS\u003c/th\u003e\n      \u003cth\u003eD\u0026D\u003c/th\u003e\n      \u003cth\u003eCOLLAB\u003c/th\u003e\n      \u003cth\u003eIMDB-B\u003c/th\u003e\n      \u003cth\u003eIMDB-M\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003eNum. of Graphs\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e188\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e344\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e4,110\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1,113\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1,178\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e5,000\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1,000\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1,500\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003eNum. of Classes\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e2\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e2\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e2\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e2\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e2\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e3\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e2\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e3\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003eNode Attr. (Dim.)\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e8\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e19\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e38\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e5\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e90\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003eNum. of Parameters\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e52,035\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e52,387\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e52,995\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e51,939\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e54,659\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e51,940\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e51,811\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e51,940\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003eDGCNN (official)\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e85.83±1.66\u003c/b\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e58.59±2.47\u003c/b\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e74.44±0.47\u003c/b\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e75.54±0.94\u003c/b\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e79.37±0.94\u003c/b\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e73.76±0.49\u003c/b\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e70.03±0.86\u003c/b\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003cb\u003e47.83±0.85\u003c/b\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003eDGCNN (ours)\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e81.67±9.64\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e59.12±11.27\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e75.72±3.13\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e72.88±3.38\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e68.80±5.37\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e70.52±2.00\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e71.50±4.48\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e46.47±5.22\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003eTraining Time\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e4.48s\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e6.77s\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e61.04s\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e21.15s\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e64.71s\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e202.65s\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e15.55s\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e21.90s\u003c/td\u003e\n    \u003c/tr\u003e \n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Results\nThe train loss、accuracy, test loss、accuracy are showed on visdom.\n\n### MUTAG\n![result](results/mutag.png)\n### PTC\n![result](results/ptc.png)\n### NCI1\n![result](results/nci1.png)\n### PROTEINS\n![result](results/proteins.png)\n### D\u0026D\n![result](results/dd.png)\n### COLLAB\n![result](results/collab.png)\n### IMDB-B\n![result](results/imdbb.png)\n### IMDB-M\n![result](results/imdbm.png)","funding_links":[],"categories":["Deep Learning"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleftthomas%2FDGCNN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleftthomas%2FDGCNN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleftthomas%2FDGCNN/lists"}