FA-14076 / Numerical aggregation / Open access
Multiset overlap similarity: The denominator adds both frequencies, double-counting shared mass. · case 01
The reduction disagrees with its explicit aggregation oracle.
ROOT CAUSE
The denominator adds both frequencies, double-counting shared mass.
VERIFIED REPAIR
Preserve the multiset overlap similarity contract at the identified reduction decision.
Unsuccessful approach: Symmetric difference mass excludes the overlap instead of counting its union.
Case contract
Return multiset Jaccard similarity: sum of per-label minimum frequencies divided by sum of per-label maximum frequencies, as exact Fraction string. Both empty returns "1". Integer labels are nominal.
Why this case matters
Exact bounded examples isolate a reduction defect without floating-point or external-service effects.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
ca,cb=Counter(a),Counter(b)
keys=set(ca)|set(cb)
intersection=sum(min(ca[k],cb[k]) for k in keys)
union=sum(ca[k]+cb[k] for k in keys)
return str(Fraction(intersection,union)) if union else "1"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 1, 1, 2], [1, 2, 2])), '2/5')
check('regression 2', solve(*([], [])), '1')
check('regression 3', solve(*([1, 2], [])), '0')
check('regression 4', solve(*([2, 2], [2, 2])), '1')
check('regression 5', solve(*([-1, 0, 0], [0, 1])), '1/4')
check('regression 6', solve(*([3, 3, 4], [3, 3, 3, 4, 4])), '3/5')
check('regression 7', solve(*([0], [1])), '0')
check("variable overlap mass",solve([0]*N,[0]*(N+1)),str(Fraction(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 |
|---|---|---|---|
| regression 1 | 2/7 | 2/5 | Failed |
| regression 2 | 1 | 1 | Passed |
| regression 3 | 0 | 0 | Passed |
| regression 4 | 1/2 | 1 | Failed |
| regression 5 | 1/5 | 1/4 | Failed |
| regression 6 | 3/8 | 3/5 | Failed |
| regression 7 | 0 | 0 | Passed |
| variable overlap mass | 1/3 | 1/2 | Failed |
SHA-256 / e04e7345667653dec0f5f5d56028bc6d893454708db3523b763a8ca4499d3269
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
ca,cb=Counter(a),Counter(b)
keys=set(ca)|set(cb)
intersection=sum(min(ca[k],cb[k]) for k in keys)
union=sum(abs(ca[k]-cb[k]) for k in keys)
return str(Fraction(intersection,union)) if union else "1"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 1, 1, 2], [1, 2, 2])), '2/5')
check('regression 2', solve(*([], [])), '1')
check('regression 3', solve(*([1, 2], [])), '0')
check('regression 4', solve(*([2, 2], [2, 2])), '1')
check('regression 5', solve(*([-1, 0, 0], [0, 1])), '1/4')
check('regression 6', solve(*([3, 3, 4], [3, 3, 3, 4, 4])), '3/5')
check('regression 7', solve(*([0], [1])), '0')
check("variable overlap mass",solve([0]*N,[0]*(N+1)),str(Fraction(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 |
|---|---|---|---|
| regression 1 | 2/3 | 2/5 | Failed |
| regression 2 | 1 | 1 | Passed |
| regression 3 | 0 | 0 | Passed |
| regression 4 | 1 | 1 | Passed |
| regression 5 | 1/3 | 1/4 | Failed |
| regression 6 | 3/2 | 3/5 | Failed |
| regression 7 | 0 | 0 | Passed |
| variable overlap mass | 1 | 1/2 | Failed |
SHA-256 / bad0ba31d2bacf9dddb4e74b99b0d34c6e4b4bd9d2520ae11d26cb3286e9186f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
ca,cb=Counter(a),Counter(b)
keys=set(ca)|set(cb)
intersection=sum(min(ca[k],cb[k]) for k in keys)
union=sum(max(ca[k],cb[k]) for k in keys)
return str(Fraction(intersection,union)) if union else "1"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 1, 1, 2], [1, 2, 2])), '2/5')
check('regression 2', solve(*([], [])), '1')
check('regression 3', solve(*([1, 2], [])), '0')
check('regression 4', solve(*([2, 2], [2, 2])), '1')
check('regression 5', solve(*([-1, 0, 0], [0, 1])), '1/4')
check('regression 6', solve(*([3, 3, 4], [3, 3, 3, 4, 4])), '3/5')
check('regression 7', solve(*([0], [1])), '0')
check("variable overlap mass",solve([0]*N,[0]*(N+1)),str(Fraction(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 |
|---|---|---|---|
| regression 1 | 2/5 | 2/5 | Passed |
| regression 2 | 1 | 1 | Passed |
| regression 3 | 0 | 0 | Passed |
| regression 4 | 1 | 1 | Passed |
| regression 5 | 1/4 | 1/4 | Passed |
| regression 6 | 3/5 | 3/5 | Passed |
| regression 7 | 0 | 0 | Passed |
| variable overlap mass | 1/2 | 1/2 | Passed |
SHA-256 / 3b051b777280386b7ee69a79a8c64dcf88848d0b2840a6fbc9eeaf9db68094be
Verification & scope
Small offline integer/rational inputs only; no performance, statistical inference, or production-library conformance 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-29T14:39:13.377937+00:00.
Case digest / c777dd9adb7f4f72a5a8367f07262be60ea6bdaa8fd0c6d83d8950951a5b725d