Skip to main content

OrbitSI: An Orbit-based Algorithm for the Subgraph Isomorphism Search Problem

Project description

OrbitSI using NetworkX for Python

Python Version C++ License: GPL v3

OrbitSI is a NetworkX-based Python package that efficiently solves the subgraph isomorphism enumeration problem, i.e., finding all subgraphs in a large data graph $G_d$ that are isomorphic to a pattern/query graph $G_p$. It also supports fast vertex orbit counting, which summarises the local structural roles of vertices within a network.

OrbitSI combines orbit-based filtering and ordering to prune and order candidate node mappings, significantly reducing the search space during subgraph matching. It integrates two state-of-the-art orbit counting engines — EVOKE and ORCA — via optimised C++ bindings using pybind11, and builds the search pipeline using networkx.

The package includes a command-line interface (CLI), usable library, and testing utilities. It is installable via pip, tested on synthetic and real-world benchmark datasets, and fully open source under the Apache 2.0 license.


Wiki


Installation

Install from PyPi:

pip install orbitsi

Install from source

  1. Clone the repository:
git clone https://github.com/yourusername/OrbitSI-nx.git
cd orbitsi-nx
  1. Build and install:
pip install .

Requires Python 3.8+, NumPy, NetworkX, and a C++17 compiler (e.g., g++ or clang++).


Command-Line Interface (CLI) Usage

Once installed, the orbitsi CLI tool allows you to perform:

  1. Subgraph Isomorphism Search
  2. Node Orbit Counting

To confirm installation:

orbitsi --help

Subgraph Isomorphism Search

Find all subgraphs in a large graph $G_d$ that are isomorphic to a smaller query/pattern graph $G_p$.

Command:
orbitsi search --data <path_to_data_graph> --pattern <path_to_pattern_graph> [--orbit-counter evoke|orca] [--graphlet-size 4|5]
Arguments:
  • --data: Path to the data graph file (required)
  • --pattern: Path to the pattern/query graph file (required)
  • --orbit-counter: Orbit counting backend, either evoke (default) or orca
  • --graphlet-size: Graphlet size to use for orbit counting (4 or 5, default: 4)
Example:
orbitsi search --data datasets/data_graph/HPRD.graph --pattern datasets/query_graph/query1.graph --orbit-counter evoke --graphlet-size 4

Orbit Counting for a Graph

Compute node orbit vectors for a given graph using either the EVOKE or ORCA backend.

Command:
orbitsi count-orbits --graph <path_to_graph> [--orbit-counter evoke|orca] [--graphlet-size 4|5] [--induced]
Arguments:
  • --graph: Path to the graph file (required)
  • --orbit-counter: Orbit counting backend, either evoke (default) or orca
  • --graphlet-size: Size of graphlets to consider (4 or 5)
  • --induced: Flag to compute induced orbit counts (optional; default is non-induced)
Example:
orbitsi count-orbits --graph datasets/data_graph/HPRD.graph --orbit-counter orca --graphlet-size 5 --induced

Graph File Format

All graphs should be in .graph format:

t N M
v 0 1 2
v 1 2 1
...
e 0 1
e 1 2
...
  • t N M: number of nodes N and edges M
  • v ID Label Degree: vertex ID, label (label is required), degree (optional)
  • e u v: edge between vertex u and v

Testing

A complete suite of unit and integration tests is provided in the tests/ directory. This includes:

  • Benchmark-based validation for subgraph isomorphism
  • Cross-validation of orbit counting with external tools

To get started, see tests/README.md for detailed setup and usage instructions.


Citation

If you use OrbitSI for subgraph isomorphism search, please cite:

Tauhidi, Syed Ibtisam, Arindam Karmakar, Thai Son Mai, and Hans Vandierendonck. "OrbitSI: An Orbit-based Algorithm for the Subgraph Isomorphism Search Problem." In 2024 IEEE International Conference on Knowledge Graph (ICKG), pp. 360-369. IEEE, 2024. https://doi.org/10.1109/ICKG63256.2024.00052

If you only use the orbit counting modules (ORCAOrbitCounter, EVOKEOrbitCounter), cite:

  • EVOKE: Noujan Pashanasangi and C. Seshadhri. "Efficiently counting vertex orbits of all 5-vertex subgraphs, by EVOKE.", WSDM 2020: Proceedings of the 13th International Conference on Web Search and Data Mining, pp. 447–455. https://doi.org/10.1145/3336191.3371773

  • ORCA: Tomaž Hočevar and Janez Demšar. "A combinatorial approach to graphlet counting." Bioinformatics, 30(4): 559–565, 2014. https://doi.org/10.1093/bioinformatics/btt717


Acknowledgement

This work was supported by the Kelvin Living Lab [grant number EP/Z531054/1]; and the Ministry of Education, Government of India through the collaboration between Queen's University Belfast and Tezpur University.


License

This project is licensed under the GNU General Public License v3.0 (GPLv3).
See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orbitsi-0.1.0.tar.gz (81.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

orbitsi-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (269.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

orbitsi-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (269.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

orbitsi-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (266.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

orbitsi-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (263.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

orbitsi-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (263.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

orbitsi-0.1.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (261.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file orbitsi-0.1.0.tar.gz.

File metadata

  • Download URL: orbitsi-0.1.0.tar.gz
  • Upload date:
  • Size: 81.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for orbitsi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a0ef2ad8a9893ae13ebe91e0378a53ad3373f6c77932831a6d7b1ec4dc319b3
MD5 568d25975fa4a4fceb8166e8e168b251
BLAKE2b-256 4a42e593f9c466ef3ba7ce92e76d0efac0e72c08b53dd0184ef985bed76ade78

See more details on using hashes here.

File details

Details for the file orbitsi-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a67ed0cf55b91f7f6652c8000175a0b03e06026804e505301953df79da78c4b6
MD5 9fd9edeaeed55ba35ee0de0a8e4be2c3
BLAKE2b-256 0e78ca469174c384fd64d83aab276c4a843734291674d0dfb4844c2544ee62c8

See more details on using hashes here.

File details

Details for the file orbitsi-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f982809d9da6896ca15496874d7292dbfc432e5cfcfd0e92ba4d7e67bac5eaaa
MD5 87dd62cfb2d9cc64b37bcf88a41aedd4
BLAKE2b-256 51a0761019030f432dae348373528a1a6a37e3222974e31d88d548f3f3e1a128

See more details on using hashes here.

File details

Details for the file orbitsi-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b12b4649e191fcd1de2b9664a6ca2e1d58f6ac376555cf28fc1a21259a6c4112
MD5 fe0554d9913328978207377c2c719134
BLAKE2b-256 4db19747af974629e3a7ae8cd0c86c66353646145a7365318297f9f6f7abc8b2

See more details on using hashes here.

File details

Details for the file orbitsi-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ce66f7b6c8ffe547aa6fdff10801ca80d868c9bde46029ef7ee74b7e9b609924
MD5 df292f33146182f392309c581e93635d
BLAKE2b-256 9862aa50f7025bdd84b07669cee342463466d23fa9caa4077659fe979107100f

See more details on using hashes here.

File details

Details for the file orbitsi-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8be5f78974f51941b51b0855a9449ee36eae9713570eef2848a66418183800dd
MD5 a818002a922a69f09693b5a24b0a879d
BLAKE2b-256 7512da9850e18e3cbf906c4375fc2f4e3fd1312d7f0da4e73bbb37bd76e99363

See more details on using hashes here.

File details

Details for the file orbitsi-0.1.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb6097d441aeb1b60895a595a6cdc2d18eb1256676baab1b99824d691f165871
MD5 d0599fd05a2bc06d3cde814f439570be
BLAKE2b-256 8e52278e1905bd282c8dabef1209e526e13f2088de6feb85d631260dabc72ab1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page