DOI: 10.3390/s26134136 ISSN: 1424-8220

Decentralized Tele-Rehabilitation via Edge AI-Oracle Architecture for Spatiotemporal Pain Assessment

Nataliya Bilous, Danylo Ostapchenko, Iryna Ahekian, Marcus Frohme

Remote tele-rehabilitation requires objective pain assessment, but existing approaches fail in two distinct ways. Self-report scales such as the Visual Analog Scale and the Numeric Pain Rating Scale are easy to falsify, opening a special case of the Oracle problem in blockchain-based insurance. Cloud-based computer vision handles falsification but transmits raw biometric video off the patient’s device, violating privacy requirements. A decentralized Edge AI-Oracle architecture is proposed that combines MediaPipe Face Mesh landmark extraction with a recurrent classifier mapping Action-Unit feature sequences to a learned pain score aligned with the Prkachin and Solomon Pain Intensity scale. The recurrent cell is selected empirically across short-context (T = 2) and long-context (T = 120 frames at 24 fps) regimes, with a two-layer Long Short-Term Memory (LSTM) network adopted for deployment. Inference and Elliptic Curve Digital Signature Algorithm (ECDSA) signing run inside an ARM TrustZone Trusted Execution Environment (TEE). Biometric logs are stored off-chain on the InterPlanetary File System (IPFS). Smart contracts anchor results on-chain and open a 24 h optimistic verification window for an off-chain Watchtower auditor. On SynPAIN the LSTM reaches F1 = 0.683 on T = 120 video (leave-one-stratum-out), with a directional but non-significant advantage over Gated Recurrent Unit (GRU) (Wilcoxon p = 0.167). Cross-dataset validation on BioVid Heat Pain Database Part A (87 subjects, 174 paired observations, leave-one-subject-out) yields F1 = 0.519 for LSTM and 0.499 for GRU (Wilcoxon p = 0.549). A processor-only TEE surrogate benchmark estimates 1.96 ms (FP32) and 0.45 ms (INT8) inference latency at T = 120 with a 0.34 MB footprint and 707 µs ECDSA signing latency, leaving the INT8 inference latency more than an order of magnitude below the 33 ms per-frame budget. The dual-layer storage reduces gas costs by a factor of 23.4 (160,261 vs. 3,744,872 gas), corresponding to an illustrative mainnet cost of approximately 0.53 USD per submission at 1 gwei, rising to roughly 16 USD at a busier 30 gwei, and falling to approximately 0.005 USD on Arbitrum One (April 2026 reference parameters), so that continuous monitoring is economically practical on Layer-2. An adaptive-adversary analysis of the Watchtower shows that gross score tampering is detected at every usable operating threshold, whereas a rational adversary who inflates by less than the dispute threshold, or who shapes the injected score to fall just inside it, evades detection. Because the false-positive rate reaches zero only for δ≳0.15, the protocol bounds rather than eliminates patient-side fraud and motivates a zero-knowledge proof-of-inference successor. The framework is architecturally and economically feasible as a cryptographically verifiable, privacy-preserving tele-rehabilitation substrate aligned with General Data Protection Regulation (GDPR) and Health Insurance Portability and Accountability Act (HIPAA) requirements through the Zero-Video Transmission principle, while remaining economically viable under post-Dencun mainnet and Layer-2 conditions. Recognition accuracy on real-world data and robustness to small-magnitude tampering remain limitations that the interchangeable recognition and audit components must improve before clinical deployment.

More from our Archive