Skip to main content

Simple scalar robustness score for networks: spectral gap − singular-value variance + clustering proxy (demo) / Ollivier–Ricci (full)

Project description

Graph Robustness Score C(G)

Try it live

One clean number that tells you how robust any network is.
Spectral gap − singular-value variance + real Ollivier–Ricci curvature

Live DemoPaper (Feb 19, 2026)Full package + experiments

Graph Robustness Score Demo

I offer paid network robustness audits (supply-chain, transaction graphs, biotech interaction networks, cyber attack surfaces).
First 3 clients this month get 30% off.


Why this score?

Most graph metrics only look at one thing (connectivity, clustering, or degree distribution).
C(G) combines three complementary views in a single interpretable number:

  • Spectral gap → how well the whole network is connected (big gap = harder to disconnect)
  • Singular-value variance → penalises “superstar” hubs (high variance = fragile to targeted attacks)
  • Ollivier–Ricci curvature → rewards strong local clustering and shortcuts (positive curvature = more robust locally)

Result: a simple scalar that highlights structurally robust motifs even inside random graphs.


Quick start

# 1. Download the full package
wget https://github.com/syedrazaaftab/graph-robustness-score/raw/main/computational-testbed.zip

# 2. One-click reproduction
python notebooks/exploratory.py

How to choose the weights (w₁, w₂, w₃)
Default (recommended for most cases): w₁ = w₂ = w₃ = 1
This balances global connectivity, uniformity, and local clustering.
Quick rules of thumb:
•  Supply-chain / infrastructure graphs  increase w₁
•  Social / influencer networks  increase w₂
•  Biological / molecular graphs  increase w₃
The full package includes a weight-sensitivity heatmap.

```bash
# Clone and install (works on any computer or Google Colab)
git clone https://github.com/syedrazaaftab/graph-robustness-score.git
cd graph-robustness-score
pip install -e .

# Test it!
from graph_robustness_score import compute_cg
import networkx as nx

G = nx.complete_graph(6)  # example graph
score = compute_cg(G)
print("C(G) =", score)

Paper
“Complexity Functionals on Sparse Random Graphs: Spectral Gap, Singular-Value Variance, and Ollivier–Ricci Curvature Contributions”
Syed Raza Aftab, February 19, 2026
Exact analytic decomposition, regular-graph results, finite-size scaling up to N=800.

Commercial use & consulting
I offer paid network robustness audits (5–7 business days turnaround):
•  Supply-chain resilience reports
•  Fraud / transaction graph analysis
•  Molecular / protein interaction robustness
•  Cybersecurity attack-surface scoring
First 3 clients this month get 30% off + free 30-min call.
Email: aftab011190@gmail.com
or book a free 15-min discovery call (Calendly link coming soon).

Made with ❤️ by Syed Raza Aftab
Independent Researcher, Princeton Meadows, New Jersey, USA
MIT License  Feel free to use the score in your own work (commercial or academic).
Just cite the paper or link back to this repo.

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

graph_robustness_score-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

graph_robustness_score-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graph_robustness_score-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for graph_robustness_score-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d07b72b2b12e9fa85c0d191df7c49974adc2585613750947ad08e1f063bdb25
MD5 e384677916d927de056772c337c5e32b
BLAKE2b-256 537e652477fa615653bd6aebd5f7ea1abd6ef7d21f1cc561d15c566de27671e1

See more details on using hashes here.

File details

Details for the file graph_robustness_score-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for graph_robustness_score-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51742a4e41d6794d9785876f7d4cf0416a06851d30d2e510862666f195481b2
MD5 56435232771a0578f25d431b1ee4ff46
BLAKE2b-256 90f46748f5bc8f945b860036aa73d9c7cfab12123365f7a763d7eeafd9404c5c

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