fix: controller.py benchmark regression fixes
Browse files
tensegrity/broca/controller.py
CHANGED
|
@@ -419,10 +419,13 @@ class CognitiveController:
|
|
| 419 |
|
| 420 |
# Linguistic confidence modulates the whole vector
|
| 421 |
features *= parsed.confidence_linguistic
|
| 422 |
-
|
| 423 |
-
# Negation
|
| 424 |
-
|
| 425 |
-
|
|
|
|
|
|
|
|
|
|
| 426 |
|
| 427 |
return features
|
| 428 |
|
|
|
|
| 419 |
|
| 420 |
# Linguistic confidence modulates the whole vector
|
| 421 |
features *= parsed.confidence_linguistic
|
| 422 |
+
|
| 423 |
+
# NOTE: Global negation flip removed. Negation is already handled
|
| 424 |
+
# per-relation inside _apply_relation_evidence() via the `negated`
|
| 425 |
+
# flag on each RelationMention. The blanket sign flip was causing
|
| 426 |
+
# catastrophic regressions on tasks with passages containing negation
|
| 427 |
+
# words (BoolQ: −23%) because unrelated negation in the passage would
|
| 428 |
+
# flip evidence for/against all hypotheses indiscriminately.
|
| 429 |
|
| 430 |
return features
|
| 431 |
|