Skip to main content

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

Project description

OrbitSI using NetworkX for Python

License: GPL v3 DOI Python Version C++ PyPI version

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 Gd that are isomorphic to a pattern/query graph Gp. 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://hpdc-gitlab.eeecs.qub.ac.uk/sitauhidi/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 Gd that are isomorphic to a smaller query/pattern graph Gp.

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:


License

This project is licensed under the Apache License 2.0.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

orbitsi-0.1.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (261.9 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

orbitsi-0.1.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (261.6 kB view details)

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

orbitsi-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (261.5 kB view details)

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

orbitsi-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (261.3 kB view details)

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

orbitsi-0.1.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (258.1 kB view details)

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

orbitsi-0.1.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (255.0 kB view details)

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

orbitsi-0.1.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (255.0 kB view details)

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

orbitsi-0.1.2-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (254.0 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.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b522ee131754b8932fafcd8f6c3bdb54fe539bb0768f95321439e71cad28d441
MD5 4af9fb5f4ad89af1b6f994a80e75bac2
BLAKE2b-256 8b8e887d34e86abde03fc3ef8ae02517ed89b4ab8e87b1675e6a45b2992f55ff

See more details on using hashes here.

File details

Details for the file orbitsi-0.1.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f07c7f6f52087c4b3e040b45e3114736a75b6c570b4284858b8aa5ebc9dcdd16
MD5 a44e4b1f2f66d27087a0833a23da088b
BLAKE2b-256 f935a7100d2040f2f9cf019c0c3314d0080e9aad3c71e27b601f4250655da5ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a334c0a5e88c2cd27ffb6f5ead5c80fa23b3331fbb8a07aa4d017da9e5c417d
MD5 2a2f8f4286cc2c1959d624a30f71b1ac
BLAKE2b-256 857dbc64c452a46627901ab7cd4db4832c014acd7888d4cfc9e4d7cb33d44196

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 49b767244357cf2fabcd91bb37bc456d4519213fae5a6ab90c36fcc815393f59
MD5 274d2f0174fd91f7522e633df1dc00e8
BLAKE2b-256 8b141f090930b5aba858be90f218b11c8f40ba4684daf4954b77b73a6e45b17f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f6d0f9aebc638a57cb949a67091d6443fded1559950efb26845d4ab001651a6a
MD5 90b71f96172acaadfc31d1e1b2d18316
BLAKE2b-256 423d84db9f07d0daa78cf157a31616e5638335a84005404c4e2ed16d6673ee5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3752155d568acbf3d0fd4793bca78a8a6795e02702386050317ed93e03082f4c
MD5 290e39718d123ab4859193ca2f00c33a
BLAKE2b-256 ddbd013a66d06016ba7a79e87445b9ca84796e862d7c67196bf2263e6e38783c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7ef91aba452d06832c156c82bef443840a0de1436be66e7ec6b68a1522427c5a
MD5 b8f6180fd0070e414615c98e45fce722
BLAKE2b-256 750c46a07481a093878ecd36ec0bc7c81d961957aed2eac8ac27630be973d664

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbitsi-0.1.2-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ab23102587ac1dc3a1e2800268f412c94dd1f600eddb886a93ed7339fa15463e
MD5 e0e8bebbe40ad03bdae4b104214be5eb
BLAKE2b-256 5fa9a5a033a3480fb90b0cf2001ef8c417d8ab52f9e8d7e1665894c2e6489aac

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