QERRA-v2 Classical: Three-Layer Deterministic Safety & Ethical Execution Guard for Autonomous Robotics
Abstract
QERRA-v2 Classical is an open-source, experimental three-layer execution guard and research middleware for autonomous robots and AI systems. Built upon the SEMEV-12 framework, the QERRA-HSR physical safety companion, and the QERRA-THRIVE value-ranking architecture, it investigates explainable, deterministic alternatives to black-box neural networks. The system evaluates prospective robot actions through three strictly sequenced layers: 1. Layer 1 — Physical Reflex (QERRA-HSR v0.1):Zero-ML, pure Python threshold logic for physical safety. Monitored distress telemetry, human isolation, and environmental hazards command motor stops in under 1ms (measured at 0.0 ms software delay to velocity=0.0 in Webots R2025a simulation). Includes asymmetric hysteresis dwell stabilization (1.0s window) to prevent sensor jitter lockouts, and enforces human-in-the-loop recovery holds on non-interruptible tasks. 2. Layer 2 — Moral Filter (SEMEV-12 v1.9.1):12-dimensional semantic ethical engine evaluating prospective text instructions before actuation. Uses multi-anchor max-pooling across all 12 vectors (SentenceTransformers all-MiniLM-L6-v2), pronoun-neutral syntactic generalization, clause-bounded negation guards (stopping at sentence boundaries), and nuance resilience dampening for committed professionals facing environmental hardship. Demonstrates ethical refusal via physical head-shake gestures in simulation. 3. Layer 3 — Values Ranker (QERRA-THRIVE v2.0.0):12 behavior-ranking vectors across two symmetrical companion suites, evaluating only candidates that have passed Layers 1 and 2:- Suite A (Human-Centered Companion — 9 vectors): Transparent capability disclosure, balanced pacing accommodation, stated preference respect, sovereign human agency protection, constructive empathy, unbiased perception, spatial room discretion, observational/biometric recording consent, and proactive motion clarity.- Suite B (Ecological & Sustainable Companion — 3 vectors): Flora boundary protection, animal startle avoidance, and low-disturbance whisper operation (dimmed illumination and acoustic damping), featuring a +0.35 emergency medical override. Integration & Verification Details:- Non-blocking ROS 2 Action Server bridge (/qerra/evaluate) on ReentrantCallbackGroup with an 800ms fail-closed watchdog budget.- PyTrees Behavior Tree integration: QerraConditionNode (evaluates Layers 1 & 2) and QerraActionRankerNode (Layer 3 decision-point action selector).- Verified across 6 Webots R2025a simulation scenarios on a PAL Robotics TIAGo humanoid AMR (including compound triple-vector collapse reflex in an automotive high-voltage battery assembly bay).- 15 canonical regression test cases and 5/5 pipeline integration tests passing with exit code 0.- Reference FastAPI service exposing /analyze, /rank, and /evaluate_pipeline for research testing and evaluation. Research Boundaries & Honesty Statement:This is an open-source research and middleware tool developed by an independent researcher, not a certified commercial safety system. Physical safety reflexes are validated in physics simulation (Webots R2025a); real-world deployment on physical hardware requires integration with certified industrial hardware e-stops and safety relays. Original design, vector frameworks, and codebase developed independently by Marussa Metocharaki (Greece). Repository: https://github.com/marunigno-ship-it/QERRA-v2-classicalLicense: GNU Affero General Public License v3.0 (AGPL-3.0)Version: v2.0.2Release Date: 2026-10-03