{"abstract":"Population standardization uses held-out rows while fitting.","category":"Feature preprocessing fit scope","checks":7,"contract":"Fit population mean and population standard deviation on nonempty train; transform values as z scores rounded to six decimals. A zero fitted deviation maps values to zero.","contract_signature":"train, values","evaluation_group":"w3-feature-preprocessing-fit-scope-population-standardization","failed_approach":"Filtering rows after computing the statistic still leaves held-out influence.","family":"w3-feature-preprocessing-fit-scope-population-standardization-fit-leakage","id":"FA-100361","implementations":{"attempt":{"sha256":"34202b595e34f6b57aa2159f9783debc0baa588d503a318ed4a0708021d4dea3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, values):\n    v=train+values; m=sum(v)/len(v); s=(sum((x-m)**2 for x in v)/len(v))**0.5; return [round((x-m)/s,6) if s else 0 for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na=[N,N+2]; check('population scale',solve([0,2],[1,3]),[0,2])\ncheck('heldout does not change center',solve([0,2],[2]),[1])\ncheck('center at mean',solve(a,[N+1]),[0])\ncheck('constant training',solve([N,N],[N+3]),[0])\ncheck('singleton training',solve([N],[N]),[0])\ncheck('empty transform',solve([0,2],[]),[])\ncheck('asymmetric',solve([0,4],[2]),[0])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"53d634d7a83500b0226214e4d45d4f4f5a274c06913fc0b9a9b76ee0bf148fa0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(train, values):\n    if not values: return []\n    m=sum(values)/len(values); s=(sum((x-m)**2 for x in values)/len(values))**0.5; return [round((x-m)/s,6) if s else 0 for x in values]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na=[N,N+2]; check('population scale',solve([0,2],[1,3]),[0,2])\ncheck('heldout does not change center',solve([0,2],[2]),[1])\ncheck('center at mean',solve(a,[N+1]),[0])\ncheck('constant training',solve([N,N],[N+3]),[0])\ncheck('singleton training',solve([N],[N]),[0])\ncheck('empty transform',solve([0,2],[]),[])\ncheck('asymmetric',solve([0,4],[2]),[0])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Toy scalar standardizer; it uses population variance and defines constant-feature output as zero. 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-feature-preprocessing-fit-scope-population-standardization-fit-leakage","generated_at":"2026-09-30T16:48:34.907773+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small deterministic preprocessing contract makes the fit boundary and transform behavior directly inspectable.","root_cause":"Fitting reads values outside the designated training rows.","sha256":"f5488ec9ffb4edbcb3a32daedf4bf98281cc0727da46d3f144548f681d358959","title":"Population standardization uses held-out rows while fitting · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":28.204,"exit_code":1,"observations":[{"actual":[-0.447214,1.341641],"check":"population scale","expected":[0,2],"passed":false},{"actual":[0.707107],"check":"heldout does not change center","expected":[1],"passed":false},{"actual":[0.0],"check":"center at mean","expected":[0],"passed":true},{"actual":[1.414214],"check":"constant training","expected":[0],"passed":false},{"actual":[0],"check":"singleton training","expected":[0],"passed":true},{"actual":[],"check":"empty transform","expected":[],"passed":true},{"actual":[0.0],"check":"asymmetric","expected":[0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"population scale\", \"actual\": [-0.447214, 1.341641], \"expected\": [0, 2], \"passed\": false}, {\"check\": \"heldout does not change center\", \"actual\": [0.707107], \"expected\": [1], \"passed\": false}, {\"check\": \"center at mean\", \"actual\": [0.0], \"expected\": [0], \"passed\": true}, {\"check\": \"constant training\", \"actual\": [1.414214], \"expected\": [0], \"passed\": false}, {\"check\": \"singleton training\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"empty transform\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"asymmetric\", \"actual\": [0.0], \"expected\": [0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.615,"exit_code":1,"observations":[{"actual":[-1.0,1.0],"check":"population scale","expected":[0,2],"passed":false},{"actual":[0],"check":"heldout does not change center","expected":[1],"passed":false},{"actual":[0],"check":"center at mean","expected":[0],"passed":true},{"actual":[0],"check":"constant training","expected":[0],"passed":true},{"actual":[0],"check":"singleton training","expected":[0],"passed":true},{"actual":[],"check":"empty transform","expected":[],"passed":true},{"actual":[0],"check":"asymmetric","expected":[0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"population scale\", \"actual\": [-1.0, 1.0], \"expected\": [0, 2], \"passed\": false}, {\"check\": \"heldout does not change center\", \"actual\": [0], \"expected\": [1], \"passed\": false}, {\"check\": \"center at mean\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"constant training\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"singleton training\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"empty transform\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"asymmetric\", \"actual\": [0], \"expected\": [0], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}