Update on QERRA-v2: Adding a 3rd layer (THRIVE) for social and ecological action choices in robotics

Hi everyone, :slightly_smiling_face:

A quick update on my previous post about QERRA-v2.

Over the last few weeks, I’ve been working on the third layer of the system — QERRA-THRIVE —and I’ve pushed the initial implementation to v2.0.0.

The reason I built this is simple: preventing collisions (Layer 2) and catching serious moral violations like coercion or deception (Layer 1) keeps a robot safe and lawful, but it doesn’t solve daily friction. In practice, a robot can be 100% collision-free and still get rejected by people—by forcing an exhausting pace on a coworker, barging into rooms without pausing, auto-recording in private spaces, or taking shortcuts across park flowerbeds and frightening pets.

This third layer is strictly an action ranker, not a safety brake. It only evaluates candidates that have already cleared physical safety and moral filtering.

What is in this first version (12 Vectors across two suites):

Suite A: Human-Centered (9 vectors)

  • transparent_disclosure: Penalizes overclaiming capabilities.
  • balanced_pacing: Adapts to human speed instead of rigidly refusing to slow down.
  • stated_preference_respect: Respects explicit user boundaries and requests.
  • sovereign_independence: Penalizes taking over tasks when a human wants to do them.
  • constructive_empathy: Acknowledges strain without dismissive language.
  • unbiased_perception: Neutral fairness without stereotyping.
  • spatial_discretion: Enforces pauses at doorway thresholds and respects quiet spaces.
  • observational_consent: Requires permission before streaming or storing personal data.
  • proactive_clarity: Warns people before taking unexpected actions.

Suite B: Ecological & Sustainable (3 vectors)

  • flora_boundary_protection: Prefers paved paths over driving across lawns or flowerbeds.
  • animal_startle_avoidance: Slows down, dims sound, and gives wide clearance around pets, guide dogs, and wildlife.
  • minimal_disturbance_footprint: Keeps noise and light low in quiet or sensitive zones.

Technical setup & implementation:

  • Runs locally on CPU: Evaluates candidate choices using a shared sentence-transformer model (all-MiniLM-L6-v2) with cached anchor tensors (<25ms execution time, no GPU or cloud calls required).
  • Hybrid approach: Pure cosine similarity struggled with negations and subtle phrasing, so I added regex penalties, negation guards, and exception rules (e.g. allowing entry into flowerbeds if the robot was explicitly ordered to prune roses).
  • Emergency override: If physical distress is detected, an emergency boost bypasses ecological constraints so human aid is never delayed to save grass.
  • Abstention: If none of the options score well enough, it outputs a recommendation to ask a human.

Current state & limitations (there is still a lot of work to do):
This is an early working attempt, not a finished product. The live API and logic work deterministically, scores are explainable, and the full pipeline runs end-to-end. However, regex patterns catch known phrasing well, but brand-new phrasing can still slip past. Candidate text generation upstream from ROS 2 planners also still needs refinement and testing.

PUBLIC API : QERRA-v2 Classical - Swagger UI

REPO : GitHub - marunigno-ship-it/QERRA-v2-classical: Classical explainable ethical evaluation engine for AI systems and humanoid robots — SEMEV-12 framework, 12 vectors, fully auditable. · GitHub

If anyone wants to test the endpoints, share thoughts, or point out blind spots, feedback and critiques are very welcome.