|
| 1 | +# BioGraph-Edge-Quantizer |
| 2 | + |
| 3 | +**Lead Architect:** Swapin Vidya |
| 4 | +**ORCID:** [0009-0009-5758-3845](https://orcid.org/0009-0009-5758-3845) |
| 5 | +**Email:** swapin@peachbot.in |
| 6 | +**Professional Context:** Senior Systems Architect and Backend Developer; research developed during academic sabbatical. |
| 7 | + |
| 8 | +A deterministic framework for optimizing **Graph Neural Networks (GNNs)** for biological network analysis on edge hardware. |
| 9 | + |
| 10 | +## System Architecture |
| 11 | +* **`core_quantizer/`**: Python environment for GNN optimization using **Edge-GNN** principles. |
| 12 | +* **`api_gateway/`**: PHP/Laravel 12 implementation for serving inference results via a **FHIR-compliant** GraphQL interface. |
| 13 | + |
| 14 | +## Setup & Initialization |
| 15 | + |
| 16 | +### 1. ML Core (Python) |
| 17 | +```bash |
| 18 | +cd core_quantizer |
| 19 | +python -m venv venv |
| 20 | +source venv/bin/activate |
| 21 | +pip install -r requirements.txt |
| 22 | +python -m src.quantizer # Generates optimized INT8 model |
| 23 | +``` |
| 24 | + |
| 25 | +### 2. API Gateway (Laravel) |
| 26 | +```bash |
| 27 | +cd api_gateway |
| 28 | +composer install |
| 29 | +touch database/database.sqlite |
| 30 | +php artisan migrate # Initializes system tables (cache/sessions) |
| 31 | +php artisan serve |
| 32 | +``` |
| 33 | + |
| 34 | +## API Testing Example |
| 35 | +Once the server is running at `http://localhost:8000`, you can verify the FHIR integration by sending a **POST** request to `http://localhost:8000/graphql` with the following payload: |
| 36 | + |
| 37 | +**Query:** |
| 38 | +```graphql |
| 39 | +query { |
| 40 | + diagnosticReport(patientId: "SW-1985") { |
| 41 | + id |
| 42 | + status |
| 43 | + category |
| 44 | + subject { |
| 45 | + reference |
| 46 | + } |
| 47 | + aiInferenceScore |
| 48 | + edgeModelVersion |
| 49 | + } |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +**Expected Response:** |
| 54 | +```json |
| 55 | +{ |
| 56 | + "data": { |
| 57 | + "diagnosticReport": { |
| 58 | + "id": "fhir-report-...", |
| 59 | + "status": "final", |
| 60 | + "category": "Oncology-PPI-Analysis", |
| 61 | + "subject": { "reference": "Patient/SW-1985" }, |
| 62 | + "aiInferenceScore": 0.874, |
| 63 | + "edgeModelVersion": "INT8-Quantized-v1.0" |
| 64 | + } |
| 65 | + } |
| 66 | +} |
| 67 | +``` |
| 68 | + |
| 69 | +## Implementation Rationale |
| 70 | +* **Resource Efficiency:** Implements INT8 quantization to bridge the gap between heavy GNN research and edge-native execution. |
| 71 | +* **Interoperability:** Maps raw AI scores to **FHIR** `DiagnosticReport` resources for seamless clinical integration. |
| 72 | +* **IP Alignment:** Developed in coordination with modular on-device clinical intelligence research (Patent No. 202541127477). |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +### Documentation |
| 77 | +* **`CITATION.cff`**: Academic and professional attribution. |
| 78 | +* **`CONTRIBUTING.md`**: Architectural and coding standards for open-source contributors. |
| 79 | + |
| 80 | +--- |
0 commit comments