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

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.

Metadata

Release files for orbitsi 0.1.0

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.0
File Size Uploaded Provenance Actions
orbitsi-0.1.0.tar.gz 81.2 kB Without provenance Details for orbitsi-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for orbitsi 0.1.0
File Actions
orbitsi-0.1.0-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.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for orbitsi-0.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for orbitsi-0.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for orbitsi-0.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for orbitsi-0.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
orbitsi-0.1.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for orbitsi-0.1.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Total release size: 1.7 MB

Release files / orbitsi-0.1.0.tar.gz

Download URL orbitsi-0.1.0.tar.gz
Size 81.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2a0ef2ad8a9893ae13ebe91e0378a53ad3373f6c77932831a6d7b1ec4dc319b3
BLAKE2b-256 checksum
How to use checksums
4a42e593f9c466ef3ba7ce92e76d0efac0e72c08b53dd0184ef985bed76ade78
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.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.0-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
a67ed0cf55b91f7f6652c8000175a0b03e06026804e505301953df79da78c4b6
BLAKE2b-256 checksum
How to use checksums
0e78ca469174c384fd64d83aab276c4a843734291674d0dfb4844c2544ee62c8
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.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.0-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
f982809d9da6896ca15496874d7292dbfc432e5cfcfd0e92ba4d7e67bac5eaaa
BLAKE2b-256 checksum
How to use checksums
51a0761019030f432dae348373528a1a6a37e3222974e31d88d548f3f3e1a128
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.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.0-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
b12b4649e191fcd1de2b9664a6ca2e1d58f6ac376555cf28fc1a21259a6c4112
BLAKE2b-256 checksum
How to use checksums
4db19747af974629e3a7ae8cd0c86c66353646145a7365318297f9f6f7abc8b2
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.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.0-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
ce66f7b6c8ffe547aa6fdff10801ca80d868c9bde46029ef7ee74b7e9b609924
BLAKE2b-256 checksum
How to use checksums
9862aa50f7025bdd84b07669cee342463466d23fa9caa4077659fe979107100f
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.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.0-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
8be5f78974f51941b51b0855a9449ee36eae9713570eef2848a66418183800dd
BLAKE2b-256 checksum
How to use checksums
7512da9850e18e3cbf906c4375fc2f4e3fd1312d7f0da4e73bbb37bd76e99363
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.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL orbitsi-0.1.0-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
eb6097d441aeb1b60895a595a6cdc2d18eb1256676baab1b99824d691f165871
BLAKE2b-256 checksum
How to use checksums
8e52278e1905bd282c8dabef1209e526e13f2088de6feb85d631260dabc72ab1
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.0

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