{"id":20307908,"url":"https://github.com/benedekrozemberczki/sine","last_synced_at":"2025-10-13T01:19:19.784Z","repository":{"id":102016695,"uuid":"164440658","full_name":"benedekrozemberczki/SINE","owner":"benedekrozemberczki","description":"A PyTorch Implementation of \"SINE: Scalable Incomplete Network Embedding\" (ICDM 2018).","archived":false,"fork":false,"pushed_at":"2023-03-18T12:12:44.000Z","size":2614,"stargazers_count":71,"open_issues_count":0,"forks_count":18,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-22T04:24:52.932Z","etag":null,"topics":["aane","asne","deep-learning","deepwalk","dimensionality-reduction","gensim","graph-embedding","grarep","machine-learning","network-embedding","networkx","node-embedding","node2vec","pytorch","sklearn","tadw","tensorflow","torch","unsupervised-learning","walklets"],"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,"governance":null},"funding":{"github":["benedekrozemberczki"]}},"created_at":"2019-01-07T13:59:56.000Z","updated_at":"2024-04-06T22:18:51.000Z","dependencies_parsed_at":"2023-10-20T18:21:42.396Z","dependency_job_id":null,"html_url":"https://github.com/benedekrozemberczki/SINE","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/benedekrozemberczki%2FSINE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedekrozemberczki%2FSINE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedekrozemberczki%2FSINE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benedekrozemberczki%2FSINE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benedekrozemberczki","download_url":"https://codeload.github.com/benedekrozemberczki/SINE/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","deep-learning","deepwalk","dimensionality-reduction","gensim","graph-embedding","grarep","machine-learning","network-embedding","networkx","node-embedding","node2vec","pytorch","sklearn","tadw","tensorflow","torch","unsupervised-learning","walklets"],"created_at":"2024-11-14T17:19:36.713Z","updated_at":"2025-10-13T01:19:19.729Z","avatar_url":"https://github.com/benedekrozemberczki.png","language":"Python","funding_links":["https://github.com/sponsors/benedekrozemberczki"],"categories":[],"sub_categories":[],"readme":"Scalable Incomplete Network Embedding \n============================\n\n[![Arxiv](https://img.shields.io/badge/ArXiv-1904.05003-orange.svg?color=blue)](https://arxiv.org/pdf/1904.05003.pdf) [![codebeat badge](https://codebeat.co/badges/c01c7c97-d873-4ba6-ac5c-21147aae5f74)](https://codebeat.co/projects/github-com-benedekrozemberczki-sine-master) [![repo size](https://img.shields.io/github/repo-size/benedekrozemberczki/SINE.svg)](https://github.com/benedekrozemberczki/SINE/archive/master.zip) [![benedekrozemberczki](https://img.shields.io/twitter/follow/benrozemberczki?style=social\u0026logo=twitter)](https://twitter.com/intent/follow?screen_name=benrozemberczki) \n\n\nA **PyTorch**  implementation of **Scalable Incomplete Network Embedding (ICDM 2018)**.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src =\"sine.jpg\" ,width=720/\u003e\u003c/div\u003e\n\n--------------------------------\n\t\n### Abstract\n\u003cp align=\"justify\"\u003e\nAttributed network embedding aims to learn low-dimensional vector representations for nodes in a network, where each node contains rich attributes/features describing node content. Because network topology structure and node attributes often exhibit high correlation, incorporating node attribute proximity into network embedding is beneficial for learning good vector representations. In reality, large-scale networks often have incomplete/missing node content or linkages, yet existing attributed network embedding algorithms all operate under the assumption that networks are complete. Thus, their performance is vulnerable to missing data and suffers from poor scalability. In this paper, we propose a Scalable Incomplete Network Embedding (SINE) algorithm for learning node representations from incomplete graphs. SINE formulates a probabilistic learning framework that separately models pairs of node-context and node-attribute relationships. Different from existing attributed network embedding algorithms, SINE provides greater flexibility to make the best of useful information and mitigate negative effects of missing information on representation learning. A stochastic gradient descent based online algorithm is derived to learn node representations, allowing SINE to scale up to large-scale networks with high learning efficiency. We evaluate the effectiveness and efficiency of SINE through extensive experiments on real-world networks. Experimental results confirm that SINE outperforms state-of-the-art baselines in various tasks, including node classification, node clustering, and link prediction, under settings with missing links and node attributes. SINE is also shown to be scalable and efficient on large-scale networks with millions of nodes/edges and high-dimensional node features.\u003c/p\u003e\n\nThis repository provides an implementation of SINE as described in the paper:\n\n\u003e SINE: Scalable Incomplete Network Embedding.\n\u003e Daokun Zhang, Jie Yin, Xingquan Zhu, Chengqi Zhang.\n\u003e ICDM, 2018.\n\u003e [[Paper]](https://arxiv.org/pdf/1810.06768.pdf)\n\n\nThe SINE model is available in [[Karate Club]](https://github.com/benedekrozemberczki/karateclub) framework.\n\nThe original C implementation is available [[here]](https://github.com/daokunzhang/SINE).\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\ntorch             1.1.0.\ntorchvision       0.3.0\n```\n### Datasets\n\u003cp align=\"justify\"\u003e\nThe code takes an input graph in a csv file. Every row indicates an edge between two nodes separated by a comma. The first row is a header. Nodes should be indexed starting with 0. Sample graphs for the `Twitch Brasilians` and `Wikipedia Chameleons` are included in the  `input/` directory. \u003c/p\u003e\n\u003cp align=\"justify\"\u003e\nThe feature matrix can be stored two ways as a **sparse binary** one. For simplicity, it is a JSON. Nodes are keys of the json and features are the values. For each node feature column ids are stored as elements of a list. The feature matrix is structured as:\u003c/p\u003e\n\n```javascript\n{ 0: [0, 1, 38, 1968, 2000, 52727],\n  1: [10000, 20, 3],\n  2: [],\n  ...\n  n: [2018, 10000]}\n```\n\n### Options\n\u003cp align=\"justify\"\u003e\nLearning of the embedding is handled by the `src/main.py` script which provides the following command line arguments.\u003c/p\u003e\n\n#### Input and output options\n\n```\n  --edge-path    STR     Input graph path.           Default is `input/chameleon_edges.csv`.\n  --feature-path STR     Input Features path.        Default is `input/chameleon_features.json`.\n  --output-path  STR     Embedding path.             Default is `output/chameleon_sine.csv`.\n```\n\n#### Model options\n\n```\n  --dimensions              INT       Number of embeding dimensions.         Default is 128.\n  --budget                  INT       Sampling budget.                       Default is 10^5.\n  --noise-samples           INT       Number of noise samples.               Default is 5.\n  --batch-size              INT       Number of source nodes per batch.      Default is 32.\n  --walk-length             INT       Truncated random walk length.          Default is 80.  \n  --number-of-walks         INT       Number of walks per source node.       Default is 10.\n  --window-size             INT       Skip-gram window size.                 Default is 5.\n  --learning-rate           FLOAT     Learning rate value.                   Default is 0.001.\n```\n\n### Examples\n\u003cp align=\"justify\"\u003e\nThe following commands learn a graph embedding and write the embedding to disk. The node representations are ordered by the ID.\u003c/p\u003e\n\u003cp align=\"justify\"\u003e\nCreating a SINE embedding of the default dataset with the default hyperparameter settings. Saving the embedding at the default path.\u003c/p\u003e\n\n```\npython src/main.py\n```\n\u003cp align=\"center\"\u003e\n\u003cimg style=\"float: center;\" src=\"sine_run_example.jpg\"\u003e\n\u003c/p\u003e\n\nCreating a SINE embedding of the default dataset with 256 dimensions.\n```\npython src/main.py --dimensions 256\n```\nCreating a SINE embedding of the default dataset with a low sampling budget.\n```\npython src/main.py --budget 1000\n```\nCreating an embedding of an other dense structured dataset the `Twitch Brasilians`. Saving the output in a custom folder.\n```\npython src/main.py --edge-path input/ptbr_edges.csv --feature-path input/ptbr_features.json --output-path output/ptbr_sine.csv\n```\n--------------------------------------------------------------------------------\n\n**License**\n\n- [GNU](https://github.com/benedekrozemberczki/SINE/blob/master/LICENSE)\n\n--------------------------------------------------------------------------------\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedekrozemberczki%2Fsine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenedekrozemberczki%2Fsine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenedekrozemberczki%2Fsine/lists"}