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.
1. Predict the hidden wavelengths
● 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?
Solid line: clean query · dashed line: transformed view
Reversing values while keeping wavelength metadata fixed changes spectral meaning. This is an intentionally invalid positive view, not a recommended augmentation.
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
| nm | Mask | Target | Ridge | Positive view |
|---|---|---|---|---|
| 450 | Visible | 0.216593 | 0.216593 | 0.216593 |
| 500 | Hidden | 0.235273 | 0.227440 | 0.235273 |
| 550 | Visible | 0.240897 | 0.240897 | 0.240897 |
| 600 | Hidden | 0.258998 | 0.256930 | 0.258998 |
| 650 | Visible | 0.291512 | 0.291512 | 0.291512 |
| 700 | Hidden | 0.354026 | 0.354540 | 0.354026 |
| 750 | Visible | 0.413605 | 0.413605 | 0.413605 |
| 800 | Hidden | 0.435280 | 0.429673 | 0.435280 |
| 850 | Visible | 0.394864 | 0.394864 | 0.394864 |
| 900 | Hidden | 0.365010 | 0.364311 | 0.365010 |
| 950 | Visible | 0.422350 | 0.422350 | 0.422350 |
| 1000 | Hidden | 0.491642 | 0.476081 | 0.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.