# How the Architecture Works

> From *Sovereign Clinical AI Edge Infrastructure* — Draft Specification v0.2.0 (RFC). Canonical URL: https://www.ainativemedical.org/sections/architecture/

The AI-Native Medical separates ownership and responsibility across three distinct parties, none with access to what belongs to another.

### The Sovereign Edge Pipeline

The AI-Native Medical Office Building processes ambient clinical reality through an integrated hardware and protocol pipeline sited entirely inside the property. Sensor data flows from exam-room devices into local GPU memory and never crosses a public WAN boundary. Each stage is a discrete, inspectable layer of the sovereign enclave.

| Pipeline Layer | Integrated Hardware & Protocol | Core Functional Mechanic |
| --- | --- | --- |
| 1. Ambient Spatial Sensing | Shure MXA920 ceiling array + Casambi BLE mesh (48 kHz/24-bit, AES67/Dante, PTP sync) | Dynamic beamforming isolates speaker audio; BLE Angle-of-Arrival tracks provider and patient position in real time. |
| 2. Telecom Ingestion | Asterisk PBX + ARI interface (bidirectional RTP stream forking) | Ingests uncompressed audio directly into processing memory without touching persistent storage disks. |
| 3. Ephemeral In-Memory Pipeline | Linux tmpfs RAM disk (/dev/shm) | Processes raw audio frames entirely in volatile RAM; buffers are released on session termination — minimizing persistent raw encounter media. Generated artifacts are persisted downstream. |
| 4. Local Speech Recognition | Streaming Whisper ASR (LocalAgreement policy) on local GPU cores | Converts multi-speaker clinical dialogue into streaming text at sub-3-second latency with zero cloud egress. |
| 5. Deterministic Reasoning | Memgraph C++ in-memory database (native C++, no JVM) | Traverses local patient records and medical ontologies for sub-millisecond GraphRAG contextual queries. |
| 6. Sovereign Compute Enclave | NVIDIA L40S bare-metal GPU cluster (Ada Lovelace, 48 GB GDDR6, FP8 Transformer Engine) | Executes MONAI imaging triage, high-frame-rate AR guidance, and clinical LLM synthesis. |
| 7. Execution & Policy Layer | Model Context Protocol (MCP) server over JSON-RPC/REST, fronted by a Policy & Authorization Engine (OPA, mTLS, fine-grained RBAC) | Exposes room acoustic profiles, spatial channels, and compute endpoints to clinical AI agents, with every tool call authorized deterministically before execution. An optional llm.txt file provides human- and agent-readable discovery only. |

Featuring 48 GB of GDDR6 memory, 864 GB/s memory bandwidth, 18,176 CUDA cores, and 568 fourth-generation Tensor Cores running the FP8 Transformer Engine, a single L40S node delivers up to 1,466 TFLOPS of FP8 inference compute. Operating over a local dark-fiber or enterprise 10GbE LAN, sensor data flows directly from exam-room devices to local GPU memory without crossing a public WAN boundary.

### The Glass-to-Photon Latency Budget

GPU locality is a necessary condition for interactive clinical guidance, not a sufficient one. Proximity removes wide-area transit from the path; it does not remove sensor integration time, codec and color-space conversion, scheduling jitter, or display scan-out. A specification that claims an interactive latency figure is therefore obligated to state where every millisecond is spent, and to require that the figure be measured at the display rather than inferred from the inference kernel.

The budget below allocates the end-to-end path from photons entering the sensor to photons leaving the display panel. Each line is independently measurable, which makes the total falsifiable on a specific deployment instead of aspirational across all of them.

$$L_{\text{total}} = L_{\text{capture}} + L_{\text{transport}} + L_{\text{inference}} + L_{\text{render}}$$

$$L_{\text{total}} = 3\,\text{ms} + 1\,\text{ms} + 5\,\text{ms} + 4\,\text{ms} = 13\,\text{ms}$$

| Budget Stage | Allocation | Dominant Contributor | Measurement Method |
| --- | --- | --- | --- |
| Sensor capture & exposure | 3 ms | Rolling-shutter readout, sensor integration time, MIPI serialization | Hardware timestamp at frame-ready interrupt against an external strobe reference |
| Local transport & ingestion | 1 ms | 10GbE/dark-fiber transit, PTP-synchronized AES67 framing, DMA into GPU memory | PTP-correlated packet capture at both endpoints |
| FP8 inference execution | 5 ms | L40S Tensor Core kernel execution, batch assembly, memory-bandwidth pressure | CUDA event instrumentation at kernel entry and exit, reported at p99 rather than mean |
| Render, encode & scan-out | 4 ms | Overlay composition, display pipeline latency, panel refresh interval | High-frame-rate photodiode capture of the panel against the source strobe |
| Total budgeted path | 13 ms | Sum of allocations, exclusive of scheduling-jitter headroom | End-to-end glass-to-photon measurement, verified per site |

Thirteen milliseconds sits inside the approximately 15-millisecond threshold above which overlay misregistration becomes perceptible during instrument manipulation, but it does so with only two milliseconds of margin. That margin is the operative engineering constraint: a deployment that adds a display with 8 milliseconds of internal processing, batches inference requests across concurrent rooms, or permits a non-real-time kernel to preempt the inference thread will exceed the budget regardless of how close the GPU sits to the patient. Conformance requires measurement at p99 under clinical load, not a best-case figure captured on an idle node.

### The Tripartite Ownership Model

The governance architecture rests on a clear separation of ownership and responsibility across three parties, each with a distinct role and none with access to what belongs to the other two. This structure is what establishes a defensible regulatory firewall between physical real estate, compute hardware custody, and clinical intelligence operations.

The Landlord provisions the physical environment: the hardened subterranean or utility shell, the STC-55 acoustic isolation, the 208V/415V three-phase power envelope, the Direct-to-Chip liquid-cooling manifolds, and the dark-fiber pathways. The Landlord builds and maintains the enclave. The Landlord does not touch the tenant's compute or clinical data.

The Tenant — the medical practice — owns the compute hardware outright under a Bring Your Own Silicon (BYOS) framework. Physical custody and legal title to the NVIDIA L40S cluster running inference workloads belong to the practice, installed in the practice's dedicated space, accessible only to the practice. There is no shared compute pool and no subprocessor present inside the hardware envelope.

The Software Integrator deploys and operates the intelligence stack — the MCP server, the ephemeral ingestion pipeline, the Whisper and MONAI and Memgraph runtimes — binding the tenant's compute to the physical sensors and keeping the stack current. The Software Integrator operates at the software layer only. It does not hold, transmit, or access the tenant's PHI or clinical outputs.

The result: no shared infrastructure anywhere in the stack, no third-party access to clinical inference, and data sovereignty that is the logical consequence of who owns what — not a policy position.

### Physical Sovereignty

Deploying high-density GPU nodes in a Medical Office Building requires an overhaul of the traditional Intermediate Distribution Frame closet, which is engineered for low-density switches and small UPS units and is mechanically unsuited to the power, heat, and acoustic load of a sovereign compute enclave. Systems architects instead build a dedicated subterranean or utility node.

The enclave is constructed with double-stud wall assemblies, resilient channels, and sound-dampening insulation engineered to an STC-55 acoustic isolation rating, preventing operational noise from entering adjacent clinical areas and preventing clinical conversation from leaving. Acoustic isolation is treated as a security control, not a comfort amenity, and it is specified against measurable criteria rather than asserted absolutes: STC-55 assemblies are engineered to achieve a Privacy Index greater than 95% and an Articulation Index below 0.05 under ASTM E1130 field testing for confidential speech privacy. Those figures describe the intelligibility available to a listener at the boundary under defined test conditions; they are a quantified confidentiality threshold, not a claim that audio is physically unrecoverable by an instrumented adversary. Cooling is addressed with Direct-to-Chip liquid cooling — cold plates attached directly to the GPU and CPU processors circulating a closed-loop coolant — which eliminates high-decibel chassis fans, holds stable junction temperatures, and lets high-density nodes run reliably in compact utility spaces.

### Ambient Clinical Intelligence

Every clinical AI deployment built on structured inputs — typed EHR notes, post-visit summaries, dictated letters — operates on a degraded version of the encounter. Physicians spend up to two hours on EHR documentation for every hour of direct patient engagement, and the gap between what happened in the room and what got charted afterward is where clinical reasoning goes undocumented and billing codes get missed.

The AI-Native Medical Office Building eliminates that gap. Exam rooms feature ceiling-mounted Shure MXA920 acoustic arrays whose steerable beams isolate speaker voices while filtering HVAC and hallway noise. Uncompressed audio routes into an ephemeral /dev/shm RAM directory on the local GPU node, where a streaming Whisper model transcribes multi-speaker dialogue at sub-3-second latency. A local Memgraph C++ GraphRAG engine links spoken terms to the clinic's local EHR records and generates structured SOAP notes with suggested ICD-10 and CPT codes before the patient leaves the suite. Because audio frames process entirely within volatile RAM and purge on session end, raw voice recordings are never written to disk or transmitted externally.

This is not surveillance. It is the practice's own intelligence system, operating on the practice's own data, in the practice's own sovereign enclave, for the practice's own clinical and administrative benefit.

### Taxonomy of Medical Practices & AI-Native Workloads

The sovereign edge pipeline specializes to the workload of each practice type. Primary care runs ambient transcription and GraphRAG synthesis; ambulatory surgery runs AR overlay against a published glass-to-photon budget; radiology runs local volumetric DICOM triage via MONAI; orthopedics runs markerless kinematic gait analysis; and dermatology runs multi-spectral image alignment. Each targets a distinct latency threshold and clinical outcome, and each keeps its highest-sensitivity data — voice, DICOM volumes, facial imagery — inside the building.

| Practice Specialty | Primary AI Workload | Software & GPU Target | Latency Threshold | Key Clinical Outcome |
| --- | --- | --- | --- | --- |
| Primary Care & Internal Medicine | Ambient transcription & contextual GraphRAG synthesis | Streaming Whisper ASR + Memgraph C++ GraphRAG on L40S | < 3.0 s (streaming text) | Reduces documentation time up to 80%; auto-generates ICD-10/CPT codes. |
| Ambulatory Surgery & Urgent Care | Sub-millisecond heads-up AR visual overlay & triage | Real-time computer vision + AR render engine on L40S | < 10 ms (glass-to-glass) | Preserves sterile-field isolation; eliminates AR display lag; automates operative logging. |
| Diagnostic Radiology & Imaging | Local volumetric DICOM triage & screening | MONAI framework + FP8 tensor execution on bare-metal cluster | < 5.0 s (3D study triage) | Instantly flags emergent pathologies; eliminates WAN bandwidth charges. |
| Orthopedics & Sports Medicine | Markerless kinematic gait analysis & motion capture | High-frame-rate multi-stream skeletal pose estimation | < 15 ms (real-time render) | Instant 3D joint kinematic reports during routine office visits. |
| Medical Aesthetics & Dermatology | Multi-spectral image alignment & spatial feature mapping | Calibrated image segmentation & spatial registration models | < 1.0 s (image alignment) | Facial imagery retained solely within the tenant boundary; automated tracking of lesions and tissue volume. |

### The Four Principles

> **Zero Egress.** No inference payload, ambient telemetry, or PHI crosses the property's network boundary. The inference runs on tenant-owned GPUs inside the building. The output stays there.

> **The Room as the Interface.** The exam room is the primary data source. The encounter is captured at full fidelity through ceiling arrays and spatial mesh, not reconstructed from a typed note.

> **The Hardened Shell.** Acoustic and physical isolation engineered to STC-55 and verified by ASTM E1130 field measurement, with Direct-to-Chip liquid cooling. The shell makes sovereignty physically inspectable rather than merely asserted in policy — and the policy layer still has to exist.

> **Sovereign Compute.** Tenant-owned NVIDIA L40S silicon under a BYOS framework. No per-token billing, no third-party access, no subprocessor in the inference chain.

---

## Normative requirements for this section

### ANM-4.1 [MUST] [Class A, B]

Inference in a conforming deployment MUST execute on accelerator hardware physically located inside the declared demarcation boundary.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.1

### ANM-4.2 [MUST] [Class A, B]

The tenant MUST hold outright ownership of the accelerator hardware, the storage media, the inference data, and all model outputs produced within a conforming deployment.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.2

### ANM-4.3 [MUST NOT] [Class A, B]

A conforming deployment MUST NOT route any portion of an inference request to a model endpoint hosted outside its demarcation boundary, including for overflow capacity, fallback, quality comparison, or evaluation.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.3

### ANM-4.4 [MUST] [Class A, B, C]

A conforming deployment MUST be provisioned with power and thermal capacity sufficient to sustain its accelerator hardware at continuous full utilization rather than at intermittent or bursty load.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.4

### ANM-4.5 [MUST] [Class A, B]

A conforming deployment MUST provide backup power sufficient to bring inference hardware and storage to an orderly shutdown without loss of tenant data.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.5

### ANM-4.6 [SHOULD] [Class A, B]

Inference hardware in a conforming deployment SHOULD be sited to keep end-to-end response latency dominated by computation rather than by network transit.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.6

### ANM-4.7 [MUST] [Class C]

A Class C shell MUST document its available power capacity, thermal rejection capacity, floor loading, and cable pathway capacity in terms that permit a prospective tenant to size an enclave against them.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.7

### ANM-4.8 [MUST] [Class A, B]

A deployment claiming an interactive latency figure MUST publish a glass-to-photon latency budget that allocates the end-to-end path across sensor capture, local transport, inference execution, and render and scan-out, and MUST state the measured contribution of each stage rather than the inference time alone.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.8

### ANM-4.9 [MUST] [Class A, B]

Latency claims supporting augmented-reality or other interactive clinical guidance MUST be measured end to end at the display surface under representative clinical load, and MUST be reported at the 99th percentile rather than as a mean or best-case value.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.9

### ANM-4.10 [MUST NOT] [Class A, B, C]

An implementation MUST NOT characterize inference latency as sub-millisecond, instantaneous, or real-time when describing an end-to-end interactive path that includes sensor capture and display rendering.

Permalink: https://www.ainativemedical.org/conformance/#anm-4.10
