Metadata-Version: 2.4
Name: graph-robustness-score
Version: 0.1.0
Summary: Simple scalar robustness score for networks: spectral gap − singular-value variance + clustering proxy (demo) / Ollivier–Ricci (full)
Author-email: Syed Raza Aftab <syedrazaaftab@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/syedrazaaftab/graph-robustness-score
Project-URL: Repository, https://github.com/syedrazaaftab/graph-robustness-score
Project-URL: Demo, https://graph-robustness-score.streamlit.app
Keywords: graph-theory,robustness,network-science,finance,supply-chain
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: networkx>=3.0
Requires-Dist: numpy>=1.20
Requires-Dist: scipy>=1.7
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# Graph Robustness Score C(G)

[![Try it live](https://img.shields.io/badge/Try%20it%20live-FF4B4B?style=for-the-badge&logo=streamlit&logoColor=white)](https://graph-robustness-score.streamlit.app)

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

**Live Demo** • [Paper (Feb 19, 2026)](https://github.com/syedrazaaftab/graph-robustness-score/raw/main/Graph_Robustness_Paper.pdf) • [Full package + experiments](computational-testbed.zip)

![Graph Robustness Score Demo](https://github.com/syedrazaaftab/graph-robustness-score/raw/main/IMG_4838.jpeg)

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

```bash
# 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.
