OrbitSI using NetworkX for Python
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
- Clone the repository:
git clone https://hpdc-gitlab.eeecs.qub.ac.uk/sitauhidi/orbitsi-nx.git
cd orbitsi-nx
- 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:
- Subgraph Isomorphism Search
- 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, eitherevoke(default) ororca--graphlet-size: Graphlet size to use for orbit counting (4or5, 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, eitherevoke(default) ororca--graphlet-size: Size of graphlets to consider (4or5)--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 nodesNand edgesMv ID Label Degree: vertex ID, label (label is required), degree (optional)e u v: edge between vertexuandv
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:
- Kelvin Living Lab [grant number EP/Z531054/1]
- Ministry of Education, Government of India through the collaboration between Queen's University Belfast and Tezpur University.
License
This project is licensed under the Apache License 2.0.
See the LICENSE file for details.
Release files for orbitsi 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| orbitsi-0.1.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 free-threading | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details |
| orbitsi-0.1.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details |
| orbitsi-0.1.2-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 |
| orbitsi-0.1.2-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 |
| orbitsi-0.1.2-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 |
| orbitsi-0.1.2-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 |
| orbitsi-0.1.2-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 |
| orbitsi-0.1.2-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 |
Total release size: 2.1 MB
Release files / orbitsi-0.1.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 261.9 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b522ee131754b8932fafcd8f6c3bdb54fe539bb0768f95321439e71cad28d441
|
|
BLAKE2b-256 checksum How to use checksums |
8b8e887d34e86abde03fc3ef8ae02517ed89b4ab8e87b1675e6a45b2992f55ff
|
| 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.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 261.6 kB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f07c7f6f52087c4b3e040b45e3114736a75b6c570b4284858b8aa5ebc9dcdd16
|
|
BLAKE2b-256 checksum How to use checksums |
f935a7100d2040f2f9cf019c0c3314d0080e9aad3c71e27b601f4250655da5ea
|
| 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.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 261.5 kB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1a334c0a5e88c2cd27ffb6f5ead5c80fa23b3331fbb8a07aa4d017da9e5c417d
|
|
BLAKE2b-256 checksum How to use checksums |
857dbc64c452a46627901ab7cd4db4832c014acd7888d4cfc9e4d7cb33d44196
|
| 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.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 261.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 |
49b767244357cf2fabcd91bb37bc456d4519213fae5a6ab90c36fcc815393f59
|
|
BLAKE2b-256 checksum How to use checksums |
8b141f090930b5aba858be90f218b11c8f40ba4684daf4954b77b73a6e45b17f
|
| 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.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 258.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 |
f6d0f9aebc638a57cb949a67091d6443fded1559950efb26845d4ab001651a6a
|
|
BLAKE2b-256 checksum How to use checksums |
423d84db9f07d0daa78cf157a31616e5638335a84005404c4e2ed16d6673ee5d
|
| 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.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 255.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 |
3752155d568acbf3d0fd4793bca78a8a6795e02702386050317ed93e03082f4c
|
|
BLAKE2b-256 checksum How to use checksums |
ddbd013a66d06016ba7a79e87445b9ca84796e862d7c67196bf2263e6e38783c
|
| 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.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 255.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 |
7ef91aba452d06832c156c82bef443840a0de1436be66e7ec6b68a1522427c5a
|
|
BLAKE2b-256 checksum How to use checksums |
750c46a07481a093878ecd36ec0bc7c81d961957aed2eac8ac27630be973d664
|
| 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.2-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | orbitsi-0.1.2-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 254.0 kB |
| Tags | CPython 3.8 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ab23102587ac1dc3a1e2800268f412c94dd1f600eddb886a93ed7339fa15463e
|
|
BLAKE2b-256 checksum How to use checksums |
5fa9a5a033a3480fb90b0cf2001ef8c417d8ab52f9e8d7e1665894c2e6489aac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|