arXiv:2612.04394v1 Announce Type: new Abstract: Neural attention and gating code can train and preserve tensor shapes while silently ignoring a mask, option, branch, or gradient path. We present GateCheck, executable semantic contracts for component dynamics, forward effect, gradient connectivity, batch independence, protected-input invariance, and declared-option influence. GateBench-v2 contains 63 semantic-mutant configurations and 33 valid controls evaluated through 17,280 executions. The full suite detects every controlled mutant and flags no controls (exact 95% intervals: recall 0.943-1.00; specificity 0.894-1.00), whereas runtime/shape checks detect 9.5%. Matched PyTorch and JAX implementations yield identical decisions for five definitions. A public-patch pilot contributes five buggy/fixed micro-replay pairs: every buggy replay violates its prespecified contract and every fixed replay passes, although these reductions are not full historical environments and the exact interval is wide (0.478-1.00). Retrospective verification by two external engineers identifies nine unanimous inclusion candidates in a frozen 35-change pool; four remain unexecuted. A patient-grouped brain-tumor study proves that singleton softmax creates an identity gate with zero parameter gradient. Repairs restore mechanism but do not establish a clean Dice benefit on 35 held-out patients. GateCheck supports pre-training software-integrity checks; passing contracts does not establish model quality or universal defect detection.
Finished reading? Continue to the original source above — or join the discussion below.