fcdimitr / fglt

Fast Graphlet Transform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FGlT
Fast Graphlet Transform

DOI GitHub license GitHub issues ci_build tests

Summary

This package is associated with the article

Dimitris Floros, Nikos Pitsianis and Xiaobai Sun, "Fast Graphlet Transform of Sparse Graphs", IEEE High Performance Extreme Computing Conference, 2020.

If you use this package, please cite this paper.

We provide FGlT, a C/C++ multi-threading library, for Fast Graphlet Transform of large, sparse, undirected networks/graphs. The graphlets in dictionary Σ16, shown in Figure 1, are used as encoding elements to capture topological connectivity quantitatively and transform a graph G=(V,E) into a |V| x 16 array of graphlet frequencies at all vertices. The 16-element vector at each vertex represents the frequencies of induced subgraphs, incident at the vertex, of the graphlet patterns. The transformed data array serves multiple types of network analysis: statistical or/and topological measures, comparison, classification, modeling, feature embedding and dynamic variation, among others. The library FGlT is distinguished in the following key aspects. (1) It is based on the fast, sparse and exact transform formulas which are of the lowest time and space complexities among known algorithms, and, at the same time, in ready form for globally streamlined computation in matrix-vector operations. (2) It leverages prevalent multi-core processors, with multi-threaded programming in Cilk, and uses sparse graph computation techniques to deliver high-performance network analysis to individual laptops or desktop computers. (3) It has Python, Julia, and MATLAB interfaces for easy integration with, and extension of, existing network analysis software.

Getting started

System environment

The FGlT library has been tested under Ubuntu 18.04 and macOS Catalina v10.15.6. The prerequisites is a C++ compiler and the Meson package with Ninja support. If the specified compiler supports Cilk, (e.g., the OpenCilk clang compiler, GNU g++-7, Intel icpc versions prior to 2019, or Cilk Plus/LLVM clang), the compiled program will run in parallel.

Prerequisites

You can install meson and ninja issuing

pip install meson
pip install ninja

Installation

After installing meson and ninja, you can build FGlT in a build directory:

meson build
meson compile -C build

To specify the C++ compiler, set the CXX environment variable when configuring the build directory. For example, to use the OpenCilk compiler, installed under /usr/pkg/opencilk, you can issue the command:

env CXX=/usr/pkg/opencilk/bin/clang++ meson build

If you wish to install system-wide the header files, libraries, and the fglt executable, issue (after building FGlT):

meson install -C build

Note: Depending on your setup, you might need sudo privileges for this operation. To change the default installation prefix, specify the -Dprefix=/path/to/install/dir option when configuring the build directory.

To generate the documentation (assuming doxygen is installed on your machine):

cd docs
make
open html/index.html

Testing

To test whether installation was successful, issue

ninja test

under build directory.

Usage demo

The FGlT executable is named fglt. Usage:

fglt <filename>

where <filename> is the path to a sparse matrix stored in symmetric, coordinate, MatrixMarket format. The graphlet frequencies are exported in the file freq_net.csv, within the working directory. For example,

fglt ../testdata/s12.mtx
less freq_net.csv

Python 3

In order to run the fglt() C++ function we will need the scipy library:

pip install scipy

A Python demo script is provided under the python directory, which can be invoked by:

python demo.py

and showcases the use of FGlT on a couple of test graphs.

Julia

You can use FGlT with Julia with the FGLT.jl package. Further instructions and demo scripts are available within.

MATLAB

To build the MATLAB interface to FGlT, issue

fgltmake

in MATLAB command window, under MATLAB directory.

A MATLAB demo script is provided under MATLAB:

demo.m

which showcases the use of FGlT on a couple of test graphs.

License and community guidelines

The FGlT library is licensed under the GNU general public license v3.0. To contribute to FGlT or report any problem, follow our contribution guidelines and code of conduct.

Contributors

Design and development:
Dimitris Floros1, Nikos Pitsianis1,2, Xiaobai Sun2

Development of Julia and Python wrappers:
Jason Barmparesos1, Konstantinos Kitsios1

We also thank the following, for helpful comments and bug fixes:
George Bisbas

1 Department of Electrical and Computer Engineering, Aristotle University of Thessaloniki, Thessaloniki 54124, Greece
2 Department of Computer Science, Duke University, Durham, NC 27708, USA

About

Fast Graphlet Transform

License:GNU General Public License v3.0


Languages

Language:C++ 45.8%Language:MATLAB 18.7%Language:Meson 10.6%Language:TeX 8.8%Language:Python 8.1%Language:Julia 8.0%