Skip to content

XGraph-Team/XFlow

Repository files navigation

PyPI Testing Status Docs Status Contributing

XFlow Homepage | XFlow Paper | Documentation | Paper Collection

XFlow is a library built upon Python to easily write and train method for a wide range of applications related to graph flow problems. XFlow is organized task-wise, which provide datasets benchmarks, baselines and auxiliary implementation.

Update: FlowGPT: a custom GPT for graph dynamics analysis.

Installation

pip install xflow-net

Example

Open In Colab

import xflow

from xflow.dataset.nx import BA, connSW
from xflow.dataset.pyg import Cora
from xflow.diffusion import SI, IC, LT
from xflow.util import run

# graphs to test
fn = lambda: connSW(n=1000, beta=0.1)
fn.__name__ = 'connSW'
gs = [Cora, fn, BA]

# Diffusion models to test
df = [SI, IC, LT]

# Configurations of IM experiments
from xflow.method.im import pi as im_pi, degree as im_degree, sigma as im_sigma, celfpp as im_celfpp, greedy as im_greedy
me = [im_pi]
rt = run (
    graph = gs, diffusion = df,
    method = me, eval = 'im', epoch = 10, 
    budget = 10, 
    output = [ 'animation', 'csv', 'fig'])

See more examples in folder examples

Benchmark Task

Influence Maximization

Blocking Maximization

Source Localization

Experimental Configurations

How to Cite

We acknowledge the importance of good software to support research, and we note that research becomes more valuable when it is communicated effectively. To To demonstrate the value of XFlow, we ask that you cite XFlow in your work.

@article{zhang2023xflow,
  title={XFlow: Benchmarking Flow Behaviors over Graphs},
  author={Zhang, Zijian and Zhang, Zonghan and Chen, Zhiqian},
  journal={arXiv preprint arXiv:2308.03819},
  year={2023}
}

Contact

Feel free to email us if you wish your work to be listed in this repo. If you notice anything unexpected, please open an issue and let us know. If you have any questions or are missing a specific feature, feel free to discuss them with us. We are motivated to constantly make XFlow even better.