# Wine Domain Transfer v0.1 — fixed pre-fit/pre-test protocol

Identity work:wine-domain-transfer:v1. Research question: with equal row/update budgets, how do two small source-domain regression models compare on fixed red and white wine holdouts? Not an isolated causal covariate-shift experiment, general wine-taste model, chemistry intervention, health/safety or quality certification.

## Primary source and known data

UCI186 Wine Quality, DOI10.24432/C56S3T, Cortez/Cerdeira/Almeida/Matos/Reis2009, original exact red1599/white4898 CSVs and names, CC BY4.0. UCI summary4898 describes white only; all6497 included.11 numeric physicochemical inputs in original CSV order, no invented units. Target source sensory quality0..10; original names describes median of at least3 expert evaluations. Original names/metadata read, full2009 paper unavailable/not reproduced. All original values/quality distribution/duplicates already audited before this protocol; not historically blind. No source model weights or pretrained initialization reused.

## Input-only grouping, membership and equal budgets

Decimal-normalize each of11 original numeric tokens (finite; zero->0, no exponent, trim trailing fractional zeroes), join with commas. SHA256 ASCII prefix `wine-domain-transfer-v1:` +key, whole hexadecimal integer modulo10:0..5 fit pool,6..7 validation pool,8..9 test. Same input tuple across BOTH colors shares initialrole. Key excludes quality/color, so duplicates including2 cross-color groups never cross initial fit/validation/test roles. Exact feature identity is not a producer/subject ID or proof of independent cases. All6497 records/1179 duplicate excess rows retained in inventory, no target-aware relabel/dedup.

Actual5318groups, no conflicting-quality groups. Red pools923fit/335validation/341test; white2939/977/982. Fit budget N=minsourcefit=923 and validation budget V=minsourceval=335. For each domain independently sort each pool by SHA256(`wine-domain-`+initialrole+`:`+domain:zero-padded-sourceordinal), stableID tie; take firstN/V. Final training/validation IDs sorted original order for arrays. Tests NEVER downsample. White2016 unusedfit/642unusedvalidation remain explicit. Same group can be partially sampled within its initialrole; equal ROW budget is not equal unique groups or effective sample size.

Fixed default source example is lowest red test ordinal `red:0002`, chosen before any current-model test prediction. Keep it even if a failure. No error-based selection, no resplitting/sampling after first result. Sourceordinal0-based, ID red/white:4digit.

## Actual fits and checkpoint selection

Two domain-only pools red/white, three seeds17/41/73 each:6 actual fits, each11→24tanh→1linear,313 parameters. Per seed identical initial arrays shared across domains (three unique initial sets, six training trajectories). W1 normal/sqrt11, b1zero, W2normalstd.05,b2zero. Train-only feature mean/populationstd, zero std->1; train-only targetmean/populationstd, zero->1. Each domain has its own normalizer, identical across that domain's three seeds; no validation/test statistics in normalization.

Each fit100epochs, batch64 inclusive last partial:15updates/epoch,1500updates/fit,92300rowvisits/fit. Whole study600epochs/9000updates/553800visits. Same epoch-order generator seed5000+epoch and923-row permutation across models. Standardized MSE +.0001/2 times squared W1/W2, no bias penalty; Adam learningrate.003, betas.9/.999,epsilon1e-8,bias corrections. Float64NumPy2.5.4, CPU, one BLAS thread. No LR/width/seed/epoch-budget search or rerun selection.

Each model selects earliest strictly lowest own-domain335-row validation MAE in raw quality score across all100epoch checkpoints. Red models see red validation only; white models white only. This is source-domain checkpoint selection, not red-target validation for white model or zero-shot unknown-data claim. Report complete100epoch train/ownval traces/selectedval predictions and actualupdates. Save all six initial/selected arrays, membership, normalizers, traces, metadata/bundle/catalog. PRETEST binds all code/source/model/catalog/selection artifacts before any current-model test prediction.

## One frozen evaluation

A separately hash-frozen evaluator evaluates all six selected models on BOTH domains' complete1323test rows (341red/982white); no test-label tuning. Two analytic train-target means, one per sourcepool, are baselines, not neural fits or extra trained seeds. Total7938neural +2646mean=10584testprediction rows, all retained, no clipping/rounding of continuous outputs even outside0..10. Metrics MAEprimary, RMSEsecondary, signedbias, maxabsoluteerror; by targetdomain/model and sourcequality0..10 with zero-support null, all192metric groups. Record everyprediction/error/worstrow, not selected wins.

Compare in-domain vs cross-domain selected models within seed and testrow.3969pairedrows reuse same1323cases across seeds; both directions and all negative/equal cases retained. Delta=abs(cross error)−abs(in-domain error), so negative means in-domain model worse. Seedmetric arithmetic means are descriptive, not ensembles, CIs, significance tests or3969independentcases. Domain means/qualitybalance/feature support/sourceval selection/duplicate sampling all differ; equalrows/updates do not isolate a causal shift or prove OOD detection. No future vintage/geography/wine generalization or individual confidence guarantee.

## Product and independent verification

Free static local demo, native JS exact six forward models, no external API/font/storage. Select fixed source record or enter11 source-scale values with labeled mode; strict finite/nonblank fields or exact-schema numericJSON, source-global marginal ranges and fit marginal flags clearly not joint support. Never reshow stale source provenance after failed/changedJSON. Source feature-key match can return multiple source records/roles; it is byte/numeric consistency not measurement authentication. No extrapolated engineering/tasting/health advice. Selected seed highlighted but all6point outputs and2means retained.

Native JSON report: all11 raw parsed features with exactorder/scalemap, all6output/selectedepochs/train-only normalizers/fitgroup flags/means, source/model/catalog hashes and source attribution/method limits. No calibrated uncertainty or percent probability. Browser in-memory edits lost on refresh, download deliberate. Fullsourcecasekey and all source matches reported when genuine match, custominputs explicitlyunmatched. Original data/derivedweights/results/figuresCC BY4.0; originalcodeApache2. Source authors/DOI and known-data limitations visible.

Beforefit, independent finite-difference gradient/explicitAdam on tiny synthetic arrays. Afterfit/eval, independent scalar every6-model forward for allvalidation/testcontexts, independently recomputed fullmembership/metrics/pairedfailures/normalization, JS allcases, malformedmodel/catalog/inputs andactualnativevalid/invalid submissions/twocompletefiledownloads/375390/keyboard/console. Scientific plots Agg fulltraces/alltesterrors. Independent existing total owner review fresh6fit/eval/oracle/realUI on copy required; exactcandidate frozen; no localPASS->cloud/publication/adoption claim. Today no uploads/publicresources; later originaldailyHF workflow only afteracceptance.
