Interactive CPU lab · original synthetic spectra

Hide a spectrum. Inspect the learning signal.

A tiny ridge model really fits on 72 training curves. Separate validation and inspection queries reveal its errors. The second panel explains contrastive arithmetic without training an encoder. This is not a trained foundation model.

72 train: fit means, scales and weights24 validation: inspect reconstruction24 queries: explore, not a sealed test

1. Predict the hidden wavelengths

Only visible circles enter the predictor
Hidden-band reconstruction from visible wavelengthsSolid line is the complete synthetic target for inspection only. Circles are visible inputs. Crosses are hidden-band predictions. Background strips identify withheld wavelengths. Inspect the numeric table for exact values.0.00.20.40.60.84505506507508501000Synthetic reflectance-like valueWavelength (nm)

● Visible input · × Ridge prediction · solid line: target for inspection · shaded bands: hidden

Hidden-band MSE: training 1.514e-4 · validation 1.367e-4 · inspection query 5.666e-5. Validation mean-only baseline: 6.941e-3. Lower is better for this reconstruction task only.

Errors use only hidden channels and have squared signal units. Each mask setting fits a separate model; a lower query score after exploration is not final-test evidence.

2. What should count as a positive view?

Clean anchor and transformed positive view
Augmentation changes the signal presented as a positive viewSolid line is the clean synthetic query; dashed line is the augmented query. Wavelength order is intentionally reversed only in the invalid-view control. Inspect the numeric table for exact values.0.00.20.40.60.84505506507508501000Synthetic reflectance-like valueWavelength (nm)

Solid line: clean query · dashed line: transformed view

Positive
26.19%cos 1.0000
Negative 1
25.20%cos 0.9962
Negative 2
23.35%cos 0.9885
Negative 3
25.26%cos 0.9964

One-anchor contrastive loss: 1.339962. Positive share: 26.19%. These are loss terms, not task accuracy.

Bars are denominator softmax shares, not class probabilities or confidence. Raw unit-normalized spectra act as demo embeddings. Three negatives are fixed training curves. Positive gain leaves cosine similarity unchanged; no encoder learned this invariance. Jitter is a sine perturbation, not a calibrated sensor-noise model.

Inspect every wavelength and the numeric fixtures
Target values are visible here for teaching; hidden values are excluded from prediction inputs.
nmMaskTargetRidgePositive view
450Visible0.2165930.2165930.216593
500Hidden0.2352730.2274400.235273
550Visible0.2408970.2408970.240897
600Hidden0.2589980.2569300.258998
650Visible0.2915120.2915120.291512
700Hidden0.3540260.3545400.354026
750Visible0.4136050.4136050.413605
800Hidden0.4352800.4296730.435280
850Visible0.3948640.3948640.394864
900Hidden0.3650100.3643110.365010
950Visible0.4223500.4223500.422350
1000Hidden0.4916420.4760810.491642

Known answers: hidden-band MSE fixture = 0.04; three equal candidate logits give ln(3) = 1.098612289; similarities [1, 0, −1] at τ = 1 give loss 0.407605964. Tests are in the source download.

Download runnable CPU source · Download all synthetic spectra

Static defaults shown. JavaScript enables controls; the Python code runs independently.