Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GemsLab/MultiLENS
Framework for latent network summarization: bridging network embedding and summarization
https://github.com/GemsLab/MultiLENS
feature-propagation graph-summarization heterogeneous-network histograms network-embedding relational-operators
Last synced: about 7 hours ago
JSON representation
Framework for latent network summarization: bridging network embedding and summarization
- Host: GitHub
- URL: https://github.com/GemsLab/MultiLENS
- Owner: GemsLab
- Created: 2019-05-12T18:42:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-20T05:35:57.000Z (about 5 years ago)
- Last Synced: 2024-08-02T13:21:45.208Z (3 months ago)
- Topics: feature-propagation, graph-summarization, heterogeneous-network, histograms, network-embedding, relational-operators
- Language: Python
- Homepage: https://gemslab.github.io/papers/jin-2019-latent.pdf
- Size: 601 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MultiLENS
**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.
*Link*: https://gemslab.github.io/papers/jin-2019-latent.pdf
**Citation (bibtex)**:
```
@inproceedings{DBLP:conf/kdd/JinRKKRK19,
author = {Di Jin and
Ryan A. Rossi and
Eunyee Koh and
Sungchul Kim and
Anup Rao and
Danai Koutra},
title = {Latent Network Summarization: Bridging Network Embedding and Summarization},
booktitle = {Proceedings of the 25th {ACM} {SIGKDD} International Conference on
Knowledge Discovery {\&} Data Mining, {KDD} 2019, London, UK,
August 4-8, 2019},
year = {2019},
}
```# Code
## Inputs:
MultiLENS takes two files as input, the graph file and the category file.
### Input graph file
The input graph file can be either static or temporal edge list in the following format separated by tab:
```
(optional)
```
MultiLENS 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 <#node - 1>. A toy static graph is under "/graph/" directory.### Input category file
The 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:
```
```
if the node IDs are grouped by the type, where `````` and `````` are the starting and ending node ids in type ``````
For example,
```
0 0 279629
1 279630 283182
```
means node 0, 1, ... 279629 are in type 0, node 279630, 279631, ... 283182 are in type 1.But if the node IDs are not grouped by the types, this implementation also supports the following format separated by tab:
```
```
which is just the 1-1 mapping. The code accepts either format.## Usage
The complete command to run MultiLENS is as follows.
```
python main.py --input --cat --output --dim
--L <#level> --base --operators
```- input, the input graph file stated under the "Graph Input" section above. Default value: '../graph/test.tsv'
- cat, the input category file stated under the "Graph Input" section above. Default value: '../graph/test_cat.tsv'
- output, the ouput file path of the embeddings. Default value: '../emb/test_emb.txt'
- dim, the dimension of the embeddings. Default value: 128
- L, the maximum subgraph order. Default value: 2
- base, the base constant of logarithm binning. Default value: 4
- 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']## Output
In 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.## Inductive learning task
This 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:```
python main_inducitve.py --input --cat --summary --output
--dim --L <#level> --base --operators
```In addition to the identical arguments shown above, MultiLENS takes ```summary``` as the input:
- summary, the input latent graph summary file derived on the (same/different) graph. Default value: './latent_summary.pkl'
- output. Default value: './emb/test_emb_ind.txt'One 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.
# Question & troubleshooting
If you encounter any problems running the code, pls feel free to contact Di Jin ([email protected])