{"id":13678290,"url":"https://github.com/GemsLab/MultiLENS","last_synced_at":"2025-04-29T12:34:35.933Z","repository":{"id":129459168,"uuid":"186291295","full_name":"GemsLab/MultiLENS","owner":"GemsLab","description":"Framework for latent network summarization: bridging network embedding and summarization","archived":false,"fork":false,"pushed_at":"2019-09-20T05:35:57.000Z","size":615,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-02T13:21:45.208Z","etag":null,"topics":["feature-propagation","graph-summarization","heterogeneous-network","histograms","network-embedding","relational-operators"],"latest_commit_sha":null,"homepage":"https://gemslab.github.io/papers/jin-2019-latent.pdf","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/GemsLab.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":"2019-05-12T18:42:06.000Z","updated_at":"2022-08-08T11:26:07.000Z","dependencies_parsed_at":"2023-07-31T19:18:04.499Z","dependency_job_id":null,"html_url":"https://github.com/GemsLab/MultiLENS","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/GemsLab%2FMultiLENS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemsLab%2FMultiLENS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemsLab%2FMultiLENS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemsLab%2FMultiLENS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GemsLab","download_url":"https://codeload.github.com/GemsLab/MultiLENS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224173715,"owners_count":17268163,"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":["feature-propagation","graph-summarization","heterogeneous-network","histograms","network-embedding","relational-operators"],"created_at":"2024-08-02T13:00:52.025Z","updated_at":"2024-11-11T20:31:18.039Z","avatar_url":"https://github.com/GemsLab.png","language":"Python","readme":"# MultiLENS\n\n\n**Paper**: Di Jin, Ryan A. Rossi, Eunyee Koh, Sungchul Kim, Anup Rao, Danai Koutra. Latent Network Summarization: Bridging Network Embedding and Summarization. ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2019.\n\n*Link*: https://gemslab.github.io/papers/jin-2019-latent.pdf \n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/GemsLab/MultiLENS/master/overview.png\" width=\"550\"  alt=\"Overview of MultiLENS\"\u003e\n\u003c/p\u003e\n\n\n**Citation (bibtex)**:\n```\n@inproceedings{DBLP:conf/kdd/JinRKKRK19,\n  author    = {Di Jin and\n               Ryan A. Rossi and\n               Eunyee Koh and\n               Sungchul Kim and \n               Anup Rao and\n               Danai Koutra},\n  title     = {Latent Network Summarization: Bridging Network Embedding and Summarization},\n  booktitle = {Proceedings of the 25th {ACM} {SIGKDD} International Conference on\n               Knowledge Discovery {\\\u0026} Data Mining, {KDD} 2019, London, UK,\n               August 4-8, 2019},\n  year      = {2019},\n  }\n```\n\n# Code\n\n## Inputs:\n\nMultiLENS takes two files as input, the graph file and the category file.\n\n### Input graph file\nThe input graph file can be either static or temporal edge list in the following format separated by tab:\n```\n\u003csrc\u003e \u003cdst\u003e \u003cweight\u003e \u003ctimestamp\u003e (optional)\n```\nMultiLENS will automatically determine if the input graph is static or temporal. The edge list is assumed to be re-ordered consecutively from 0, i.e., the minimum node ID is 0, and the maximum node ID is \u003c#node - 1\u003e. A toy static graph is under \"/graph/\" directory.\n\n### Input category file\nThe category file is a mapping between the node ID and its type (e.g., IP, cookie, web agent) with the following format separated by tab:\n```\n\u003ccategory\u003e \u003cid_initial\u003e \u003cid_ending\u003e\n```\nif the node IDs are grouped by the type, where ```\u003cid_initial\u003e``` and ```\u003cid_ending\u003e``` are the starting and ending node ids in type ```\u003ccategory\u003e```\nFor example,\n```\n0 0 279629\n1 279630  283182\n```\nmeans node 0, 1, ... 279629 are in type 0, node 279630, 279631, ... 283182 are in type 1.\n\nBut if the node IDs are not grouped by the types, this implementation also supports the following format separated by tab:\n```\n\u003ccategory\u003e \u003cnode_id\u003e\n```\nwhich is just the 1-1 mapping. The code accepts either format.\n\n## Usage\n\nThe complete command to run MultiLENS is as follows.\n\n```\npython main.py --input \u003cgraph_file_path\u003e --cat \u003ccategory_file_path\u003e --output \u003cembedding_file_path\u003e --dim \u003cembedding_dimension\u003e \n  --L \u003c#level\u003e --base \u003cconstant of logarithm binning\u003e --operators \u003crelational_operators_to_use\u003e\n```\n\n- input, the input graph file stated under the \"Graph Input\" section above. Default value: '../graph/test.tsv'\n- cat, the input category file stated under the \"Graph Input\" section above. Default value: '../graph/test_cat.tsv'\n- output, the ouput file path of the embeddings. Default value: '../emb/test_emb.txt'\n- dim, the dimension of the embeddings. Default value: 128\n- L, the maximum subgraph order. Default value: 2\n- base, the base constant of logarithm binning. Default value: 4\n- operators, a list of relational operators to use. Use the command such as ```--operators 'mean','sum'``` to specify which operators to use. Default value: ['mean', 'var', 'sum', 'max', 'min', 'L1', 'L2']\n\n## Output\nIn addition to embedding file indicated in the path ```output```, MultiLENS also outputs \"latent_summary.pkl\", which is the latent graph summary file that can be used for inductive learning tasks.\n\n## Inductive learning task\nThis repo also provides the python script to perform inductive learnings, i.e., deriving node embeddings from the latent summary on the fly. The commands to run it is as follows: \n\n```\npython main_inducitve.py --input \u003cgraph_file_path\u003e --cat \u003ccategory_file_path\u003e --summary \u003clatent_summary_file\u003e --output \u003cembedding_file_path\u003e \n  --dim \u003cembedding_dimension\u003e --L \u003c#level\u003e --base \u003cconstant of logarithm binning\u003e --operators \u003crelational_operators_to_use\u003e\n```\n\nIn addition to the identical arguments shown above, MultiLENS takes ```summary``` as the input:\n\n- summary, the input latent graph summary file derived on the (same/different) graph. Default value: './latent_summary.pkl'\n- output. Default value: './emb/test_emb_ind.txt'\n\nOne may also set the variable \"check_difference\" in \"main_inducitve.py\" to compute the sum of node-wise distances (Frobenius norm) to measure graph difference. \n\n\n# Question \u0026 troubleshooting\n\nIf you encounter any problems running the code, pls feel free to contact Di Jin (dijin@umich.edu)\n\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGemsLab%2FMultiLENS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGemsLab%2FMultiLENS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGemsLab%2FMultiLENS/lists"}