FA-100001 / Evaluation metric aggregation / Open access
Multilabel micro recall counts samples instead of labels · case 01
Multilabel micro recall counts samples instead of labels.
ROOT CAUSE
The numerator is the number of examples with any hit instead of matching label instances.
THE FAILURE
The numerator is the number of examples with any hit instead of matching label instances.
Unsuccessful approach: Using union size penalizes extra predictions and calculates Jaccard similarity instead.
Case contract
Return total true label instances divided by total actual label instances; empty actual label sets yield 0.
Why this case matters
A small explicit evaluation contract makes aggregation behavior reproducible across labeled examples.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(truth, pred):
hits=sum(bool(set(a)&set(b)) for a,b in zip(truth,pred)); total=sum(len(a) for a in truth); return hits/total if total else 0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multiple labels',solve([[1,2,3],[4]],[[1,2],[4]]),.75)
check('extra predicted ignored',solve([[1]],[[1,2]]),1)
check('missed all',solve([[1,2]], [[]]),0)
check('empty',solve([],[]),0)
check('no true labels',solve([[]],[ [1] ]),0)
check('duplicates do not inflate',solve([[N,N]],[[N]]),1)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| multiple labels | 0.5 | 0.75 | Failed |
| extra predicted ignored | 1.0 | 1 | Passed |
| missed all | 0.0 | 0 | Passed |
| empty | 0 | 0 | Passed |
| no true labels | 0 | 0 | Passed |
| duplicates do not inflate | 0.5 | 1 | Failed |
SHA-256 / 0849b27f0eba96a34a645a662faacf9ff16e4977ab3fe101a558587f429723ed
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(truth, pred):
hits=sum(len(set(a)&set(b)) for a,b in zip(truth,pred)); total=sum(len(set(a)|set(b)) for a,b in zip(truth,pred)); return hits/total if total else 0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multiple labels',solve([[1,2,3],[4]],[[1,2],[4]]),.75)
check('extra predicted ignored',solve([[1]],[[1,2]]),1)
check('missed all',solve([[1,2]], [[]]),0)
check('empty',solve([],[]),0)
check('no true labels',solve([[]],[ [1] ]),0)
check('duplicates do not inflate',solve([[N,N]],[[N]]),1)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| multiple labels | 0.75 | 0.75 | Passed |
| extra predicted ignored | 0.5 | 1 | Failed |
| missed all | 0.0 | 0 | Passed |
| empty | 0 | 0 | Passed |
| no true labels | 0.0 | 0 | Passed |
| duplicates do not inflate | 1.0 | 1 | Passed |
SHA-256 / e469fc79d2c9c9f48dd27116e6473da9d5c1c0511accb5ffb177e06beb55dee7
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Inputs are finite toy labels and scores; this defines no benchmark protocol, production metric library, or model quality claim. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:30.810285+00:00.
Case digest / aaad5df355f16e2023b5e7ee334f2cd907685311e6696a2abea4d3f91bf33935