Skip to main content

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 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

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 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.

Metadata

Release files for orbitsi 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orbitsi 0.1.1
File Size Uploaded Provenance Actions
orbitsi-0.1.1.tar.gz 81.2 kB Without provenance Details for orbitsi-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for orbitsi 0.1.1
File Actions
orbitsi-0.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for orbitsi-0.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for orbitsi-0.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for orbitsi-0.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for orbitsi-0.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for orbitsi-0.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for orbitsi-0.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Total release size: 1.7 MB

Release files / orbitsi-0.1.1.tar.gz

Download URL orbitsi-0.1.1.tar.gz
Size 81.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cffe230d821ef95ca3e0fb1996455974e3e351765661ef30ae66a72989bc0f74
BLAKE2b-256 checksum
How to use checksums
3a2439463d231e85b35dcc014799f3c3d81be2945b575e1b7ca76fef61e3991b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / orbitsi-0.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 269.4 kB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bf526101fb20b1d6fc97ae062722e1999906a15cb6b84422ce4ce49447d91c9f
BLAKE2b-256 checksum
How to use checksums
be829005449908fb53bc26102a2faa080e70fe2315a6c5a34e9ca496d825d103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / orbitsi-0.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 269.3 kB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
47d531d3b4c71bdd222657d9aec435e8440427cfe2eb0407b6c35130d91abe6c
BLAKE2b-256 checksum
How to use checksums
3ed40184408122cf012898ad332c6907f447624b458b23f96bed0b0a0f4382fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / orbitsi-0.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 266.1 kB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
827912441fdefb986337cc38436466a17e957e6488dc66caf064f28841c8cc91
BLAKE2b-256 checksum
How to use checksums
0459d4d56c6d60fc97ff383b08ad42e18c97beb44f3e032c4fd3947a45f3a2c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / orbitsi-0.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 263.0 kB
Tags CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e1ddb21d6d57d048a39347875d4250724191d33bb0c216393a4b7d67c2d22d98
BLAKE2b-256 checksum
How to use checksums
0a383fd893d4460f60adf4dda7d0368fd2d5d9546441a27540e7ec29748a0e68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / orbitsi-0.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 263.0 kB
Tags CPython 3.9 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
45b45a7031f814309de7da62a685c60123260c2bc5aee02fe914e122882eb07a
BLAKE2b-256 checksum
How to use checksums
6ffa332c9b1e32d412e47cca6ffb62471e8710f80abc06f90fd8884a720f2f9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / orbitsi-0.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 261.9 kB
Tags CPython 3.8 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8d04dbd0e76be5b1084d570dd80dc057cc93a1819ef4bc6a4b9a5f59f2b2f907
BLAKE2b-256 checksum
How to use checksums
8aafbc3a35aeefa3f1a6301b0df673cb4c33441af11087d678296ba83012a0db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for orbitsi 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page