FA-97851 / Dataset split isolation / Open access
Dataset split: class representation is uneven across group partitions · case 01
class representation is uneven across group partitions.
ROOT CAUSE
Groups are selected by key order without comparing label counts on the two sides.
THE FAILURE
Groups are selected by key order without comparing label counts on the two sides.
Unsuccessful approach: Sorting groups by only their first label helps pure groups but ignores mixed-label contribution and does not balance the resulting counts.
Case contract
Each group maps to a list of labels. Return group IDs assigned to train by greedy least-filled label bins; groups stay whole, ties by ID.
Why this case matters
This toy split allocator makes membership rules explicit for reproducible evaluation fixtures.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(groups):
return sorted(groups)[:(len(groups)+1)//2]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mixed group stays intact',solve({'a':['x','y'],'b':['x'],'c':['y']}),['a'])
check('empty',solve({}),[])
check('singleton',solve({'g':['z']}),['g'])
check('lexical tie',solve({'b':['q'],'a':['q']}),['a'])
check('minority label',solve({'a':['m','m','r'],'b':['m'],'c':['r'],'d':['r']}),['a','d'])
check('empty labels',solve({'a':[],'b':[]}),['a','b'])
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 |
|---|---|---|---|
| mixed group stays intact | ['a', 'b'] | ['a'] | Failed |
| empty | [] | [] | Passed |
| singleton | ['g'] | ['g'] | Passed |
| lexical tie | ['a'] | ['a'] | Passed |
| minority label | ['a', 'b'] | ['a', 'd'] | Failed |
| empty labels | ['a'] | ['a', 'b'] | Failed |
SHA-256 / 63cc4b04f4dc8d6327655024d7595420ebd1b6e66b87c5ab9ddd4fd42525d469
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(groups):
return sorted(groups,key=lambda g:groups[g][0] if groups[g] else '')[:(len(groups)+1)//2]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mixed group stays intact',solve({'a':['x','y'],'b':['x'],'c':['y']}),['a'])
check('empty',solve({}),[])
check('singleton',solve({'g':['z']}),['g'])
check('lexical tie',solve({'b':['q'],'a':['q']}),['a'])
check('minority label',solve({'a':['m','m','r'],'b':['m'],'c':['r'],'d':['r']}),['a','d'])
check('empty labels',solve({'a':[],'b':[]}),['a','b'])
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 |
|---|---|---|---|
| mixed group stays intact | ['a', 'b'] | ['a'] | Failed |
| empty | [] | [] | Passed |
| singleton | ['g'] | ['g'] | Passed |
| lexical tie | ['b'] | ['a'] | Failed |
| minority label | ['a', 'b'] | ['a', 'd'] | Failed |
| empty labels | ['a'] | ['a', 'b'] | Failed |
SHA-256 / 1b86b42745a32f16694343681625bc9e983008aae4c349e4adb1e0e8c6d6836f
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 small in-memory records with self-contained contracts; no claim is made about production sampling quality. 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:06.688947+00:00.
Case digest / c89b8d52249a74b030fd9282f8b14eb929c74ee6059042c6d3560041f053ae73