{"id":20307875,"url":"https://github.com/benedekrozemberczki/musae","last_synced_at":"2025-04-11T15:12:48.557Z","repository":{"id":41086483,"uuid":"181892075","full_name":"benedekrozemberczki/MUSAE","owner":"benedekrozemberczki","description":"The reference implementation of \"Multi-scale Attributed Node Embedding\".  (Journal of Complex Networks 2021)","archived":false,"fork":false,"pushed_at":"2022-09-19T18:34:40.000Z","size":20361,"stargazers_count":167,"open_issues_count":1,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T11:21:33.520Z","etag":null,"topics":["aane","asne","asonam","attributed-embedding","deep-learning","deepwalk","embedding","gemsec","gensim","graph-embedding","graph-neural-network","implicit-factorization","musae","network-analysis","network-embedding","node-embedding","node2vec","tadw","walklets","word2vec"],"latest_commit_sha":null,"homepage":"https://karateclub.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benedekrozemberczki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["benedekrozemberczki"]}},"created_at":"2019-04-17T12:57:59.000Z","updated_at":"2025-03-23T13:31:35.000Z","dependencies_parsed_at":"2023-01-18T10:17:04.428Z","dependency_job_id":null,"html_url":"https://github.com/benedekrozemberczki/MUSAE","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedekrozemberczki%2FMUSAE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedekrozemberczki%2FMUSAE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedekrozemberczki%2FMUSAE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedekrozemberczki%2FMUSAE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benedekrozemberczki","download_url":"https://codeload.github.com/benedekrozemberczki/MUSAE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429119,"owners_count":21101785,"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":["aane","asne","asonam","attributed-embedding","deep-learning","deepwalk","embedding","gemsec","gensim","graph-embedding","graph-neural-network","implicit-factorization","musae","network-analysis","network-embedding","node-embedding","node2vec","tadw","walklets","word2vec"],"created_at":"2024-11-14T17:19:26.427Z","updated_at":"2025-04-11T15:12:48.522Z","avatar_url":"https://github.com/benedekrozemberczki.png","language":"Python","funding_links":["https://github.com/sponsors/benedekrozemberczki"],"categories":[],"sub_categories":[],"readme":"MUSAE\n============\n[![Arxiv](https://img.shields.io/badge/ArXiv-1909.13021-orange.svg)](https://arxiv.org/abs/1909.13021) [![codebeat badge](https://codebeat.co/badges/5aef8ac3-08bf-44b9-94ec-929778ec3b94)](https://codebeat.co/projects/github-com-benedekrozemberczki-musae-master) [![repo size](https://img.shields.io/github/repo-size/benedekrozemberczki/MUSAE.svg)](https://github.com/benedekrozemberczki/MUSAE/archive/master.zip) [![benedekrozemberczki](https://img.shields.io/twitter/follow/benrozemberczki?style=social\u0026logo=twitter)](https://twitter.com/intent/follow?screen_name=benrozemberczki)\n\nThe reference implementation of **Multi-Scale Attributed Node Embedding. (Journal of Complex Networks 2021)**\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"800\" src=\"musae.jpg\"\u003e\n\u003c/p\u003e\n\n### Abstract\n\n\u003cp align=\"justify\"\u003e\nWe present network embedding algorithms that capture information about a node from the local distribution over node attributes around it, as observed over random walks following an approach similar to Skip-gram. Observations from neighborhoods of different sizes are either pooled (AE) or encoded distinctly in a multi-scale approach (MUSAE). Capturing attribute-neighborhood relationships over multiple scales is useful for a diverse range of applications, including latent feature identification across disconnected networks with similar attributes. We prove theoretically that matrices of node-feature pointwise mutual information are implicitly factorized by the embeddings. Experiments show that our algorithms are robust, computationally efficient and outperform comparable models on social, web and citation network datasets.\u003c/p\u003e\n\nThe second-order random walks sampling methods were taken from the reference implementation of [Node2Vec](https://github.com/aditya-grover/node2vec).\n\nThe datasets are also available on [SNAP](http://snap.stanford.edu/).\n\nThe model is now also available in the package [Karate Club](https://github.com/benedekrozemberczki/karateclub).\n\nThis repository provides the reference implementations for **MUSAE** and **AE** as described in the paper:\n\u003e Multi-Scale Attributed Node Embedding.\n\u003e [Benedek Rozemberczki](http://homepages.inf.ed.ac.uk/s1668259/), [Carl Allen](http://homepages.inf.ed.ac.uk/s1577741/), and [Rik Sarkar](https://homepages.inf.ed.ac.uk/rsarkar/).\n\u003e [Journal of Complex Networks 2021](https://arxiv.org/abs/1909.13021)\n\n\n### Table of Contents\n\n1. [Citing](#citing)  \n2. [Requirements](#requirements)\n3. [Datasets](#datasets)  \n4. [Logging](#logging)  \n5. [Options](#options) \n6. [Examples](#examples)\n\n### Citing\n\nIf you find MUSAE useful in your research, please consider citing the following paper:\n```bibtex\n\u003e@article{musae,\n          author = {Rozemberczki, Benedek and Allen, Carl and Sarkar, Rik},\n          title = {{Multi-Scale Attributed Node Embedding}},\n          journal = {Journal of Complex Networks},\n          volume = {9},\n          number = {2},\n          year = {2021},\n}\n```\n### Requirements\nThe codebase is implemented in Python 3.5.2. package versions used for development are just below.\n```\nnetworkx          2.4\ntqdm              4.28.1\nnumpy             1.15.4\npandas            0.23.4\ntexttable         1.5.0\nscipy             1.1.0\nargparse          1.1.0\ngensim            3.6.0\n```\n### Datasets\n\n### Logging\n\nThe models are defined in a way that parameter settings and runtimes are logged. Specifically we log the followings:\n\n```\n1. Hyperparameter settings.     We save each hyperparameter used in the experiment.\n2. Optimization runtime.        We measure the time needed for optimization - measured by seconds.\n3. Sampling runtime.            We measure the time needed for sampling - measured by seconds.\n```\n\n### Options\n\nLearning the embedding is handled by the `src/main.py` script which provides the following command line arguments.\n\n#### Input and output options\n\n```\n  --graph-input      STR   Input edge list csv.     Default is `input/edges/chameleon_edges.csv`.\n  --features-input   STR   Input features json.     Default is `input/features/chameleon_features.json`.\n  --output           STR   Embedding output path.   Default is `output/chameleon_embedding.csv`.\n  --log              STR   Log output path.         Default is `logs/chameleon.json`.\n```\n#### Random walk options\n\n```\n  --sampling      STR       Random walker order (first/second).              Default is `first`.\n  --P             FLOAT     Return hyperparameter for second-order walk.     Default is 1.0\n  --Q             FLOAT     In-out hyperparameter for second-order walk.     Default is 1.0.\n  --walk-number   INT       Walks per source node.                           Default is 5.\n  --walk-length   INT       Truncated random walk length.                    Default is 80.\n```\n\n#### Model options\n\n```\n  --model                 STR        Pooled or multi-scale model (AE/MUSAE).      Default is `musae`.\n  --base-model            STR        Use of Doc2Vec base model.                   Default is `null`.\n  --approximation-order   INT        Matrix powers approximated.                  Default is 3.\n  --dimensions            INT        Number of dimensions.                        Default is 32.\n  --down-sampling         FLOAT      Length of random walk per source.            Default is 0.001.\n  --exponent              FLOAT      Downsampling exponent of frequency.          Default is 0.75.\n  --alpha                 FLOAT      Initial learning rate.                       Default is 0.05.\n  --min-alpha             FLOAT      Final learning rate.                         Default is 0.025.\n  --min-count             INT        Minimal occurence of features.               Default is 1.\n  --negative-samples      INT        Number of negative samples per node.         Default is 5.\n  --workers               INT        Number of cores used for optimization.       Default is 4.\n  --epochs                INT        Gradient descent epochs.                     Default is 5.\n```\n\n### Examples\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"500\" src=\"musae.gif\"\u003e\n\u003c/p\u003e\n\nTraining a MUSAE model for a 10 epochs.\n```sh\n$ python src/main.py --epochs 10\n```\nChanging the dimension size.\n```sh\n$ python src/main.py --dimensions 32\n```\n------------------------------\n\n**License**\n\n- [GNU](https://github.com/benedekrozemberczki/MUSAE/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedekrozemberczki%2Fmusae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenedekrozemberczki%2Fmusae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedekrozemberczki%2Fmusae/lists"}