MacBrains LabsINDEPENDENT SILICON RESEARCH
Index / Research / LFM S2 parity
N/002 / NUMERICAL VALIDATION

One graph passed.
The probe diverged.

The instrument used to observe a graph can change the graph. A diagnostic output tap may be a compiler intervention, not a passive sensor.

ARTIFACT / LFM S2REFERENCE / FP16 FIXTUREPLACEMENT / 743 OF 743METHOD / NATIVE SWIFT

01. Sealed production run

The sealed LFM block-pair S2 artifact had two declared outputs and an input fixture with shape [1,2,2048]. The native runner loaded it under .cpuOnly and .cpuAndNeuralEngine, rejected non-finite values, and compared both outputs against the same pinned FP16 fixture.

MLComputePlan assigned 743/743 compute operations to ANE in the production graph. Both outputs met the established ANE tolerance: cosine similarity ≥ 0.999 and relative L2 ≤ 0.03.

Outputcos(ANE, fixture)relative L2Verdict
lfm_h_after_liv0.9998862200.017295585PASS
lfm_h_after_gqa0.9997610050.027863104PASS

02. Debug variant: a different compiled artifact

Recompiling with LFM_PARITY_DEBUG=1 introduced 46 output taps instead of two. All 46 outputs passed the CPU-versus-fixture gate, but only 34/46 passed the ANE gate. The first reported ANE-gate failure was liv_14_mlp_output.

Diagnostic outputANE cosineANE relative L2
liv_14_mlp_output0.9979367670.064227031
gqa_15_head_merge0.0989214681.342520581

It would be incorrect to treat that diagnostic result as a failing production model. Additional outputs change the graph's compiled interface and can alter graph partitioning or transformations. We retain the negative diagnostic result but bind it to its own model package and compiled identity.

03. The native parity ladder

The runner reads the binary FP16 fixture directly, reconstructs logical tensor order from MLMultiArray strides, normalizes documented output layout permutations, and checks for NaN/Inf before computing max absolute error, mean absolute error, cosine similarity and relative L2.

production:
    outputs = 2
    assigned_ANE_compute_ops = 743 / 743
    parity_ANE = PASS / PASS

diagnostic:
    outputs = 46
    CPU_parity = 46 / 46
    ANE_parity = 34 / 46
    verdict = ANE_ONLY_DIVERGENCE

these are DIFFERENT compiled artifacts

04. Reproducibility boundary

The receipt pins SHA-256 identities for source, runner, fixture tree, emitted model package, compiled graph and report. The sealed production model.mlmodel SHA-256 is 3935a7b804d4a9a852faa7fe2ce0457cc2e23789547d22fd3cbe840efe5fd429.

EXPERIMENTAL TAKEAWAY

Numerical parity is not a claim about every intermediate value. Compare the exact outputs of the exact compiled program you plan to execute. Use debug taps to localize divergence, not to reclassify another artifact.

Source receipt: ane-re/docs/receipts/LFM_S2_NATIVE_PARITY_2026-07-18.md. Referenced source artifacts are not public downloads.

RESEARCH CORRESPONDENCE / 00

Evidence first.
Then conclusions.

Model execution, numerical parity, hardware behavior, reproducible tests.

research@macbrainslabs.org ↗