Skip to content

Latest commit

Β 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ RONOVA β€” Autonomous AI Assurance & Cryptographic Provenance Engine

Python FastAPI PyTorch ONNX Runtime React Vite License

RONOVA is an end-to-end, air-gapped AI assurance, security vetting, and cryptographic provenance platform designed for safety-critical machine learning deployments (Defense, Healthcare, Finance, and Enterprise Infrastructure).


🌟 Why RONOVA?

Modern machine learning supply chains are vulnerable to data poisoning, Trojan backdoors, adversarial perturbations, data leakage, and covert weight tampering.

RONOVA provides automated, deterministic pre-deployment validation, runtime anomaly detection, and tamper-evident audit trails with zero reliance on cloud verification.

                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚                RONOVA ASSURANCE PIPELINE               β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                              β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β–Ό                         β–Ό                          β–Ό                        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Dataset    β”‚       β”‚     STRIP       β”‚       β”‚ Image Sentinel  β”‚       β”‚  Distribution   β”‚
β”‚  Forensics   β”‚       β”‚ Trojan Detector β”‚       β”‚  Robustness     β”‚       β”‚ Drift Analysis  β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                        β”‚                         β”‚                         β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β–Ό
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚    Deterministic Safety Gate    β”‚  ◄── Multi-Profile Governance
               β”‚   (Defense / Health / Corp)     β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β–Ό
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚ Tamper-Evident Ledger (Ed25519) β”‚  ──► Signed QR Certificates
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Key Modules & Capabilities

1. πŸ” Dataset Forensics & Outlier Inspection

  • Embedding-Space Anomaly Detection: Employs an offline CNN feature extractor and calibrated Isolation Forest clustering to detect poisoned samples and mislabeled data.
  • Dimensionality Reduction (PCA 2D): Visualizes high-dimensional dataset clustering in an interactive coordinate scatter space.
  • Visual Outlier Thumbnails: Generates lightweight base64 thumbnail previews for flagged anomalous samples.
  • Exact & Near-Duplicate Analysis: Identifies data leakage and training contamination using perceptual hashing and vector similarity thresholds.

2. 🧬 STRIP Trojan & Backdoor Detection

  • Implements STRIP (Strong Perturbation Trojan Detection): Superimposes clean image overlays onto candidate test inputs and measures the Shannon entropy collapse across model output probability vectors.
  • Entropy Drop Isolation: Backdoored inputs maintain low prediction entropy regardless of noise overlays, cleanly exposing Trojan triggers without needing training data access.

3. 🎯 Image Sentinel & Adversarial Defense

  • Detects high-frequency adversarial gradient attacks (FGSM, PGD) and distribution corruption.
  • Measures prediction stability across varying noise scales ($\sigma \in [0.05, 0.20]$).
  • Provides visual pixel-level perturbation heatmaps and channel-wise variance maps.

4. πŸ“ˆ Statistical Distribution Drift Monitor

  • Detects inference data shift using Wasserstein Distance and Kolmogorov-Smirnov (KS) tests.
  • Computes feature-level drift scores to alert teams before downstream model accuracy degrades.

5. βš–οΈ Multi-Profile Safety Governance Gate

  • Configurable risk profiles:
    • πŸ›‘οΈ Defense / Tactical: Zero-tolerance strict gating (Rejection on any hard-gate indicator).
    • πŸ₯ Healthcare / Life Sciences: Stringent anomaly boundaries and drift limits.
    • 🏒 Enterprise / Standard: Balanced trade-off between throughput and assurance.
  • Explains all findings with deterministic rationale, limitation disclosures, and explicit evidence strength ratings.

6. πŸ” Cryptographic Audit Ledger & QR Verification

  • Every scan event is committed to a hash-chained audit log signed via Ed25519 asymmetric cryptography.
  • Produces portable, self-contained Security Verification Certificates with cryptographically signed payload QR codes.
  • Includes a standalone verification tool (verify_certificate.py) capable of proving certificate authenticity offline without network connectivity.

πŸ› οΈ System Architecture & Stack

Layer Technologies Used
Core AI & Math PyTorch, ONNX Runtime, NumPy, Scikit-learn, SciPy
Backend API FastAPI, Uvicorn, Pydantic v2
Cryptography cryptography (Ed25519, SHA-256), qrcode, Pillow
Frontend UI React 18, Vite, Tailwind CSS, Lucide Icons, Recharts
Sandboxing Python Subprocess Workers, Resource-Capped Memory/CPU Execution

⚑ Quick Start Guide

Prerequisites

  • Python 3.10+
  • Node.js 18+ and npm

1. Clone & Set Up Backend

# Clone the repository
git clone https://github.com/developerHarish2007/Ronova.git
cd Ronova

# Create and activate virtual environment
python -m venv venv
# On Windows:
.\venv\Scripts\activate
# On Linux/macOS:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt   # or pip install fastapi uvicorn torch onnxruntime numpy scikit-learn pillow cryptography qrcode

2. Initialize Keys & Demo Artifacts

# Generate Ed25519 provenance root keys
python scripts/init_provenance_keys.py

# Create synthetic evaluation models and sample datasets
python scripts/train_models.py
python scripts/create_demo_datasets.py

3. Launch the Backend API

python -m uvicorn ronova.api.main:app --host 127.0.0.1 --port 8000 --reload

4. Launch the Frontend UI

cd frontend
npm install
npm run dev

πŸ§ͺ Testing & Verification

Run the automated test harnesses to validate individual modules:

# Test Dataset Forensics & Anomaly Isolation
python scripts/test_dataset_forensics.py

# Test Cryptographic Provenance & Ledger Chains
python scripts/test_provenance.py
python scripts/test_audit_ledger.py

# Test STRIP Backdoor Detection
python scripts/test_image_sentinel.py

# Run Complete End-to-End Regression Suite
python scripts/run_phase8_regression.py

πŸ“ Repository Structure

Ronova/
β”œβ”€β”€ ronova/
β”‚   β”œβ”€β”€ api/             # FastAPI REST endpoints & request handlers
β”‚   β”œβ”€β”€ core/            # Pydantic schemas, types, and finding data structures
β”‚   β”œβ”€β”€ dataset/         # Dataset anomaly clustering & duplicate detection
β”‚   β”œβ”€β”€ detectors/       # STRIP Trojan detection & Image Sentinel algorithms
β”‚   β”œβ”€β”€ engine/          # Assurance policy evaluation rules
β”‚   β”œβ”€β”€ operations/      # Statistical drift computation (KS-test / Wasserstein)
β”‚   β”œβ”€β”€ provenance/      # Ed25519 signature engine, ledger chain & certificates
β”‚   β”œβ”€β”€ safety/          # Verdict gating (Defense, Healthcare, Enterprise)
β”‚   └── sandbox/         # Sandboxed ONNX runtime execution runners
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/  # React cards (DatasetForensics, ImageSentinel, Drift, Provenance)
β”‚   β”‚   β”œβ”€β”€ App.jsx      # Main interactive assurance dashboard
β”‚   β”‚   └── index.css    # Tailwind styling and dark mode glassmorphism
β”‚   └── package.json
β”œβ”€β”€ data/                # Synthetic datasets for test replication
β”œβ”€β”€ models/              # Pre-compiled ONNX models (clean vs backdoored)
β”œβ”€β”€ scripts/             # End-to-end execution and regression scripts
β”œβ”€β”€ verify_certificate.py # Offline CLI tool for authenticating signed QR certificates
└── README.md

πŸ”’ Security & Air-Gap Compliance

  • 100% Offline Capability: Runs completely local without third-party cloud API dependencies.
  • Deterministic Cryptography: All security claims are backed by non-malleable Ed25519 digital signatures.
  • Memory-Safe Execution: ONNX model evaluations run within sandboxed runner environments with bounded memory allocation.

πŸ“„ License

This project is licensed under the MIT License.

About

Autonomous AI assurance & cryptographic provenance engine - Trojan backdoor detection (STRIP), dataset outlier forensics, adversarial robustness, and Ed25519-signed verification certificates for safety-critical ML.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages