{"id":20828862,"url":"https://github.com/timothewt/advancedgraphclustering","last_synced_at":"2025-06-14T19:05:12.282Z","repository":{"id":238012842,"uuid":"774617943","full_name":"timothewt/AdvancedGraphClustering","owner":"timothewt","description":"Advanced Graph Clustering method documentation and implementation (From Spectral Clustering to Deep Graph Clustering)","archived":false,"fork":false,"pushed_at":"2024-06-01T18:35:21.000Z","size":39026,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-06T13:26:38.940Z","etag":null,"topics":["arga","clustering","deep-graph-clustering","dgae","gae","graph","graph-clustering","graph-convolutional-networks","graph-neural-networks","louvain-algorithm","markov-clustering","mvgrl","spectral-clustering","stochastic-block-model","unsupervised-learning"],"latest_commit_sha":null,"homepage":"https://timothewt.github.io/AdvancedGraphClustering/","language":"Jupyter Notebook","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/timothewt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-19T21:38:37.000Z","updated_at":"2024-08-07T08:19:24.000Z","dependencies_parsed_at":"2024-05-07T10:55:39.104Z","dependency_job_id":"0983f493-5ae0-4015-a050-9a022d8a59db","html_url":"https://github.com/timothewt/AdvancedGraphClustering","commit_stats":null,"previous_names":["timothewt/ds50_graph_clustering","timothewt/graph_clustering","timothewt/advanced_graph_clustering","timothewt/advancedgraphclustering"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothewt%2FAdvancedGraphClustering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothewt%2FAdvancedGraphClustering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothewt%2FAdvancedGraphClustering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothewt%2FAdvancedGraphClustering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timothewt","download_url":"https://codeload.github.com/timothewt/AdvancedGraphClustering/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252955146,"owners_count":21831054,"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":["arga","clustering","deep-graph-clustering","dgae","gae","graph","graph-clustering","graph-convolutional-networks","graph-neural-networks","louvain-algorithm","markov-clustering","mvgrl","spectral-clustering","stochastic-block-model","unsupervised-learning"],"created_at":"2024-11-17T23:18:37.760Z","updated_at":"2025-05-07T21:21:40.965Z","avatar_url":"https://github.com/timothewt.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Graph Clustering \n\nThis project focuses on the study and implementation of various graph clustering techniques, covering traditional techniques such as Spectral Clustering and Leiden Method, as well as deep graph clustering methods like Graph Autoencoders. The project aims to provide a comprehensive overview of graph clustering algorithms and their applications in network analysis.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Implemented Techniques](#implemented-techniques)\n- [License](#license)\n\n## Introduction\n\nGraph clustering is an essential task in network analysis, aimed at partitioning a graph into meaningful groups or clusters. This project explores and implements several prominent graph clustering algorithms to analyze and understand complex networks.\n\n## Installation\n\nTo use this project, follow these steps:\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/your-username/graph-clustering.git\n```\n\n2. Install the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\nTo run the implemented clustering techniques, execute the respective scripts provided in the project. Detailed usage instructions for each technique can be found in their corresponding documentation on the GitHub page.\u003cbr/\u003e\nThe code can also be used as a library by importing the algorithms from the `src/` directory.\n\nExample usage:\n\n```bash\ncd src/\npy main.py --algo gae --dataset cora --num_clusters 7 --use_pretrained\n```\n\nUse the `--help` flag to see the available options for the script (hyperparameters vary based on the clustering technique):\n\n```bash\npy main.py --help\n```\n\nNote: For Deep Graph Clustering techniques, the hyperparameters are only relevant when a pre-trained model is not used.\n\n## Implemented Techniques\n- Traditional Clustering Techniques:\n  - Spectral Clustering [1]\n  - Stochastic Block Models [2] (using PySBM from [9])\n  - Markov Clustering Algorithm [3]\n  - Louvain Algorithm [4]\n  - Leiden Algorithm [5]\n- Deep Graph Clustering:\n  - Graph Autoencoder (GAE) [6]\n  - Adversarially Regularized Graph Autoencoder (ARGA) [7]\n  - Multi-view Graph Representation Learning (MVGRL) [8]\n\n## Datasets\n\nThe project uses several benchmark datasets for evaluating the clustering techniques.\nThe datasets are available in the `data/` directory and include the following:\n\n| Dataset    | Nodes | Edges | Features | Classes | Description      |\n|------------|-------|-------|----------|---------|------------------|\n| Cora       | 2708  | 5429  | 1433     | 7       | Citation network |\n| Citeseer   | 3327  | 4732  | 3703     | 6       | Citation network |\n| UAT        | 1190  | 13599 | 239      | 4       | Aviation Data    |\n| Karateclub | 34    | 78    | 34       | 4       | Social network   |\n\n## References\n[1] Ulrike von Luxburg. A tutorial on spectral clustering. (arXiv:0711.0189), November 2007. doi:\n10.48550/arXiv.0711.0189. URL http://arxiv.org/\nabs/0711.0189. arXiv:0711.0189 [cs].\n\n[2] Clement Lee and Darren J. Wilkinson. A review of stochastic block models and extensions for graph clustering. Applied Network Science, 4(11):1–50, December 2019. ISSN 2364-8228. doi: 10.1007/s41109-019-0232-2.\n\n[3] Stijn Van Dongen. Graph clustering via a discrete\nuncoupling process. SIAM Journal on Matrix Analysis\nand Applications, 30(1):121–141, January 2008. ISSN\n0895-4798. doi: 10.1137/040608635.\n\n[4] Vincent D. Blondel, Jean-Loup Guillaume, Renaud\nLambiotte, and Etienne Lefebvre. Fast unfolding of\ncommunities in large networks. Journal of Statistical\nMechanics: Theory and Experiment, 2008(10):P10008,\nOctober 2008. ISSN 1742-5468. doi: 10.1088/1742-\n5468/2008/10/P10008. arXiv:0803.0476 [cond-mat,\nphysics:physics].\n\n[5] V. A. Traag, L. Waltman, and N. J. van Eck. From louvain to leiden: guaranteeing well-connected communities. Scientific Reports, 9(1):5233, March 2019. ISSN 2045-2322. Doi: 10.1038/s41598-019-41695-z.\n\n[6] Thomas N. Kipf and Max Welling. Variational graph\nauto-encoders. (arXiv:1611.07308), November 2016. doi:\n10.48550/arXiv.1611.07308. URL http://arxiv.org/\nabs/1611.07308. arXiv:1611.07308 [cs, stat].\n\n[7] Shirui Pan, Ruiqi Hu, Guodong Long, Jing Jiang, Lina Yao, and Chengqi Zhang.\nAdversarially regularized graph autoencoder for graph embedding.\n(arXiv:1802.04407), January 2019.\ndoi: 10.48550/ arXiv.1802.04407.\nURL http://arxiv.org/abs/ 1802.04407.\narXiv:1802.04407 [cs, stat].\n\n[8] Kaveh Hassani and Amir Hosein Khasahmadi.\nContrastive multi-view representation learning on graphs.\n(arXiv:2006.05582), June 2020. doi: 10.48550/arXiv.2006.05582.\nURL http://arxiv.org/abs/2006.05582. arXiv:2006.05582 [cs, stat].\n\n[9] Funke T, Becker T (2019) Stochastic block models: A comparison of variants and inference methods. PLoS ONE 14(4): e0215296. https://doi.org/10.1371/journal.pone.0215296\n\n## License\nThis project is licensed under the MIT License. Please cite the repository if you use the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothewt%2Fadvancedgraphclustering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothewt%2Fadvancedgraphclustering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothewt%2Fadvancedgraphclustering/lists"}