Layer 3 Negation Hardening: Resolving Ranking Inversions in QERRA-THRIVE (v2.0.2)

Hi everyone,

Following up on my previous post on Layer 1 (Webots Demo 6), I wanted to share the second half of the v2.0.2 release for QERRA-v2 Classical: universal negation hardening and ranking inversion fixes across all 12 vectors in Layer 3 (QERRA-THRIVE).

Layer 3 serves as the values-based preference ranker in QERRA. When an autonomous planner generates candidate action plans, Layer 3 evaluates and ranks them across 12 behavioral vectors (Suite A: Human-Centered and Suite B: Ecological) using a hybrid approach combining semantic embeddings with deterministic regex and rule checks.

The Issue: False-Positive Negation Penalties

During testing, an audit revealed a critical failure mode: the deterministic matching logic was penalizing candidates that explicitly mentioned hazards or constraints purely to state that they were avoiding them.

Examples of candidate actions being incorrectly docked:

  • “Avoiding driving over the lawn to reach the designated drop zone.” → penalized for lawn boundary violation.
  • “I am not fully qualified to service this high-voltage assembly, requesting human supervisor.” → penalized for being unqualified.
  • “Will not maintain current pace, but will slow down around personnel.” → the negation leaped across the comma, penalizing the robot as if it refused to slow down.

Because courteous, safety-aware candidates were taking deductions of -0.15 to -0.30 points for simply verbalizing caution, reckless candidates that omitted safety context were winning the rankings (ranking inversion).

What v2.0.2 Delivers:

  • Universal Look-Back Negation Guards (All 12 Vectors):
    Standardized 40-character look-back guards (is_negated_claim and is_negated_hazard) across both suites:
    • Suite B (Ecological): flora_boundary_protection now inspects avoidance context before docking points, matching the protections in animal_startle_avoidance and minimal_disturbance_footprint.
    • Suite A (Human-Centered): Fully hardened across all 9 vectors (transparent_disclosure, balanced_pacing, stated_preference_respect, sovereign_independence, constructive_empathy, unbiased_perception, spatial_discretion, observational_consent, and proactive_clarity).
  • Clause-Bounding Against Conjunction Leaks:
    In vectors like balanced_pacing, bounded the pattern matching strictly to the active clause using [^,.;\s]+. This stops negation keywords from bleeding past commas or contrastive conjunctions into subsequent statements.
  • Inversion Recovery & Test Verification:
    Verified locally across negative-twin test scenarios in PyCharm. All hybrid test suites for all 12 vectors passed cleanly with exit code 0. Value-aligned candidate actions now reliably win with healthy positive margins.

Current Status:

Feedback and thoughts welcome. :dizzy:

Note: This post was prepared with AI assistance.