{"note":{"id":"nte_82v2tt8v7p","attempt_id":"att_yqcndmm7rd","author_user_id":"usr_lk2ek7qqq2","body_md":"---\ntitle: Composition, batch and outlier passes — key results before writing the document\nkind: finding\ntags: [ocx25, audit-dataset, composition, batch-effect, outliers]\nbuilds_on: [nte_7tu2t88f7b]\nmodel: claude-opus-5-5\n---\nScripts in /home/user/work/ajb_xsg0w0boyn/code (audit_lib.py, repro.py, comp.py, batch.py). They use pandas 3.0.6, scipy 1.17.1 and scikit-learn 1.9.1.\n- **The XRF `*_formula` strings are the per-element `*_mean` columns renormalised over the target's own elements.** This held for all 1,384 formula rows to within 0.01. The renormalisation hides non-target signal. The clearest case is `vsp7_241025_Zn-1.0_pp0_rep1`, whose formula reads `Zn-1.0`, but its means are Cu 0.947 / Zn 0.053 on the wafer and Cu 0.904 / Zn 0.096 on the GDE. That points to the wrong film or a mislabel. Other cases: vsp3 Au-1.0 has 20.8% Cu on the GDE, vsp5 Pd-1.0 has 12.6% Ag on the GDE, and uoft6 Au-0.833-Cd-0.167 rep1 has 38% non-target signal (22% Cu).\n- uoft XRF quantifies a fixed element panel. Non-target signal has a median of 4.8%, and some means are slightly negative. 8 uoft5 rows are substrate-dominated (Si 0.86–0.999, plus O, Fe, Cr, Co, Pb). vsp reports only the elements it detects. Pt has no XRF column.\n- Target vs XRF (half-L1, renormalised to target elements): median distance 0.12 for vsp (wafer and GDE) and 0.053 for uoft. vsp shows systematic per-element bias. Zn (+0.14), Mn (+0.17), Mo (+0.22), Sn (+0.16) and In (+0.11) come out enriched. Pd (−0.12), Nb (−0.15) and W (−0.14) come out depleted.\n- Dashboard: it uses the GDE formula whenever both GDE and wafer exist (227/227 cases). For the 160 samples with no XRF it copies `xrf composition` from a sibling rep (156) or from the target (4), without flagging this. `uoft6_240624_Au-0.833-Cd-0.167_pp0_rep2` gets rep1's XRF even though it has its own.\n- Batch effect beyond composition: I ran a nested OLS within each element system printed in ≥2 batches. Au-Cd (uoft5/6/8) fe_co@100 p=2.8e-6. Au-Cu (uoft4/uoft9/vsp3) fe_co@100 p=1.5e-12. Au-Pd (uoft4/7/8/9) HER V p=3e-4. Same-composition cross-source comparison (20 compositions, vsp − uoft): V@100 −0.10 V (p=0.04), FE_CO +10.5 pts (p=0.03), FE_H2 −10.3 pts (p=0.012). In the model-residual-by-batch test, batch is largely confounded with element system.\n- Outliers: robust z against the 5 nearest same-source targets in composition space. Most flagged targets have tight replicates, so they look like chemistry rather than measurement error. One example is vsp Au-0.167-Ga-0.667-Pd-0.167, HER 2.30 V against neighbours at 3.00 V, 3 reps, SD 0.07.\n","source":"mcp","created_at":"2026-10-14T04:35:04Z","updated_at":"2026-10-14T04:35:04Z","kind":"working"},"header":{"title":"Composition, batch and outlier passes — key results before writing the document","kind":"finding","tags":["ocx25","audit-dataset","composition","batch-effect","outliers"],"builds_on":["nte_7tu2t88f7b"],"model":"claude-opus-5-5","has_header":true,"extra":[]},"body_md_without_header":"Scripts in /home/user/work/ajb_xsg0w0boyn/code (audit_lib.py, repro.py, comp.py, batch.py). They use pandas 3.0.6, scipy 1.17.1 and scikit-learn 1.9.1.\n- **The XRF `*_formula` strings are the per-element `*_mean` columns renormalised over the target's own elements.** This held for all 1,384 formula rows to within 0.01. The renormalisation hides non-target signal. The clearest case is `vsp7_241025_Zn-1.0_pp0_rep1`, whose formula reads `Zn-1.0`, but its means are Cu 0.947 / Zn 0.053 on the wafer and Cu 0.904 / Zn 0.096 on the GDE. That points to the wrong film or a mislabel. Other cases: vsp3 Au-1.0 has 20.8% Cu on the GDE, vsp5 Pd-1.0 has 12.6% Ag on the GDE, and uoft6 Au-0.833-Cd-0.167 rep1 has 38% non-target signal (22% Cu).\n- uoft XRF quantifies a fixed element panel. Non-target signal has a median of 4.8%, and some means are slightly negative. 8 uoft5 rows are substrate-dominated (Si 0.86–0.999, plus O, Fe, Cr, Co, Pb). vsp reports only the elements it detects. Pt has no XRF column.\n- Target vs XRF (half-L1, renormalised to target elements): median distance 0.12 for vsp (wafer and GDE) and 0.053 for uoft. vsp shows systematic per-element bias. Zn (+0.14), Mn (+0.17), Mo (+0.22), Sn (+0.16) and In (+0.11) come out enriched. Pd (−0.12), Nb (−0.15) and W (−0.14) come out depleted.\n- Dashboard: it uses the GDE formula whenever both GDE and wafer exist (227/227 cases). For the 160 samples with no XRF it copies `xrf composition` from a sibling rep (156) or from the target (4), without flagging this. `uoft6_240624_Au-0.833-Cd-0.167_pp0_rep2` gets rep1's XRF even though it has its own.\n- Batch effect beyond composition: I ran a nested OLS within each element system printed in ≥2 batches. Au-Cd (uoft5/6/8) fe_co@100 p=2.8e-6. Au-Cu (uoft4/uoft9/vsp3) fe_co@100 p=1.5e-12. Au-Pd (uoft4/7/8/9) HER V p=3e-4. Same-composition cross-source comparison (20 compositions, vsp − uoft): V@100 −0.10 V (p=0.04), FE_CO +10.5 pts (p=0.03), FE_H2 −10.3 pts (p=0.012). In the model-residual-by-batch test, batch is largely confounded with element system.\n- Outliers: robust z against the 5 nearest same-source targets in composition space. Most flagged targets have tight replicates, so they look like chemistry rather than measurement error. One example is vsp Au-0.167-Ga-0.667-Pd-0.167, HER 2.30 V against neighbours at 3.00 V, 3 reps, SD 0.07.\n","attempt":{"id":"att_yqcndmm7rd","outcome":"completed","ended_at":"2026-10-14T04:43:09Z","problem_id":"prb_mvd7d4v047","problem_slug":"audit-dataset","problem_revision_id":"prv_pcn9gsqe4x","author_handle":"jordan"}}