Source-linked AI summary
Attributing Preprocessing Invariance in Spectral Foundation Models
Dongjun Wei, Hongyi Wu, Yinuo Zou
TL;DR
Cross-preprocessing transfer is often read as learned invariance, although normalization may impose it before encoding. This paper tests normalization alone against a Raman foundation model and finds no measurable transfer or robustness gain from the encoder beyond normalization.
Problem
Cross-preprocessing transfer can over-attribute invariance to learning when deterministic normalization already removes the evaluated transformations.
Method
The paper characterizes transformations removed by normalization and compares the model against its normalization alone using the same evaluation.
Results
Normalization alone matches the Raman model on six datasets, differing by 1.5 points in its favor in mean cross-preprocessing accuracy, while training still improves the encoder over random initialization.
Takeaways & Limitations
Transfer across transformations exactly removed by normalization is not evidence of learned invariance, so evaluations should report normalization alone and residual encoder gains.
Takeaways & Limitations
The shared-probe regime across instruments remains untested because the six evaluation datasets have disjoint label spaces.
Abstract
from arXiv · showhide
Preprocessing invariance is an appealing goal for spectral foundation models: a frozen model should remain useful when laboratories preprocess spectra differently. It is usually measured by training a classifier under one preprocessing pipeline and testing it under another, with preserved accuracy read as evidence of learning. We revisit that reading, using a Raman foundation model as a case study. Such models normalize their inputs before any learned parameter is applied. If that normalization maps two differently preprocessed spectra to the same vector, the encoder receives identical inputs, so the invariance cannot be attributed to learning. For a normalization that uses each spectrum's own statistics, this happens exactly when one spectrum is a positive multiple of the other plus a constant. Several standard preprocessing operations take that form. The encoder should therefore be measured against the normalization alone, which has no learned parameters. On six Raman evaluation datasets, the model does not measurably outperform its own normalization. It improves on raw spectra, but so does the normalization alone. Training does improve the encoder over random initialization, and a controlled experiment shows that it learns to ignore a transformation only when that transformation reaches it. A numerical test settles which transformations a given normalization removes. Across released systems in five modalities, most normalizations already remove transformations of that form, and several of those systems claim that invariance as learned. Replicating the comparison on two of them shows no gain either.
1 Introduction
Preprocessing-invariance evaluations can over-attribute robustness to learned encoders when input normalization already removes the tested transformations. This paper therefore compares the model with normalization alone and finds no measurable cross-preprocessing gain beyond it in the Raman case study.
- Motivation: Laboratory-specific preprocessing makes invariance a central goal for frozen spectral foundation models, especially for widely used Raman spectra.Raman spectra support applications including diagnosis, microbiology, forensics, materials science, and environmental analysis.
- Mechanism: A normalization using each spectrum’s own statistics maps two spectra identically if and only if one is a positive multiple of the other plus a constant.Standard normal variate, area normalization, and multiplicative scatter correction with positive fitted slope have this form.
- Evaluation principle: The proposed evaluation isolates encoder contributions by comparing the trained model against its normalization alone as the frozen representation.The normalization has no learned encoder parameters, so matching performance indicates no added invariance from the encoder.
- Results: 1.5 points: across six Raman evaluation datasets, mean cross-preprocessing accuracy differs in the normalization’s favor, so the model shows no measurable gain beyond normalization.The comparison is performed separately on each dataset.
- Mechanism and limitations: Training improves the encoder over random initialization, but it learns invariance to gain and offset only when those transformations reach the encoder after normalization.The trained encoder also brings spectra from two derivative pipelines about three times closer together in feature space than the untrained encoder.
2 Related Work
Related work spans established spectrum-wise preprocessing, methods for reducing dependence on handcrafted pipelines, and studies asking whether preprocessing invariance is learned or already supplied by normalization. This paper focuses on the attribution problem, especially for view-based self-supervision.
- Spectral preprocessing: Spectrum-wise normalization is long established in chemometrics, including standard normal variate, robust normal variate, and multiplicative scatter correction.These methods use spectrum-specific statistics or remove offset and scale relative to a reference.
- Reducing dependence on preprocessing: Prior methods reduce preprocessing dependence through near-raw convolutional models, preprocessing augmentation, or learned preprocessing, with mixed results.View-based self-supervision instead trains on differently preprocessed copies of the same input.
- Invariance supplied or acquired: This paper asks whether observed preprocessing invariance was acquired at all, emphasizing that normalization-induced agreement cannot be attributed to learning.The attribution issue is sharpest for view-based objectives when normalization maps differently preprocessed spectra to the same vector.
3 Attributing Preprocessing Invariance
This section isolates preprocessing invariance by comparing the trained encoder with the model’s deterministic normalization, then characterizes exactly which transformations that normalization removes. For ideal affine-equivariant normalizations, identical normalized spectra are precisely related by a positive scaling and offset, while deployed implementations require numerical verification because stabilizers and clipping alter this behavior.
- Attribution setup: RNV is the model’s deterministic first operation, so comparing the full model f with normalization R isolates whether the encoder contributes preprocessing robustness.This attribution comparison is made within each dataset on its native spectral axis because RNV alone cannot provide a shared cross-dataset probe.
- Transformation characterization: For affine-equivariant statistics, normalized spectra are identical if and only if one input equals the other times a positive scalar plus a constant offset.The result applies to normalizations defined as (x − m(x)1)/s(x) when m and s transform equivariantly under y = ax + b1, with a > 0.
- Transformation characterization: Pointwise transformations are removed exactly when they act as T(x) = α(x)x + β(x)1 with α(x) > 0; fixed transformations reduce to positive affine maps.Multiplicative scatter correction fits this class only when its fitted slope is positive, whereas derivatives, baseline removal, smoothing, and per-channel gain can change normalized profiles.
- Normalization scope: RNV, z-scoring, and min-max normalization satisfy the theorem, while L2 normalization removes positive scaling but not offsets.Standard normal variate and positive-divisor area normalization also apply a positive affine map to each input.
- Deployed normalization: The deployed R requires numerical rather than exact assumptions because its stabilizer can break affine identity and clipping can create collisions beyond positive affine equivalence.These effects motivate reporting residuals for the implemented operator rather than relying solely on the ideal-normalization theorem.
- Numerical test: A transformation is numerically counted as removed when the largest normalized deviation across spectra and channels, divided by representation standard deviation, is below 10^-3.Scaling by representation spread prevents large input dynamic range from masking meaningful deviations.
4 Evaluation and Analysis
Across six Raman datasets, RFM does not measurably outperform its own learning-free normalization for cross-preprocessing transfer, although the trained encoder improves over its untrained counterpart. The normalization alone explains the improvement over raw spectra, and numerical tests confirm which transformations it removes.
- Removed transformations: Raw spectra and scatter-corrected spectra become identical after ideal normalization for every spectrum in four datasets and about 94% in the other two.Area normalization satisfies the same condition for all 3,291 evaluation spectra, and two of twelve earlier off-diagonal cells are likewise collapsed.
- Numerical validation: The numerical test separates removed from surviving transformations, with maximum deviation 3.4×10−5 for removed cases and minimum deviation 5.37 for surviving cases.The partition is identical for thresholds between 10−4 and 10−1 and agrees across all forty normalization–transformation combinations on 4,998 ECG time series.
- Main finding: Normalization alone reaches 52.0 off-diagonal balanced accuracy versus 50.5 for RFM, with a paired difference of −1.5 points and 95% interval [−4.6, +3.3].Normalization is also higher on-diagonal, at 94.0 versus 90.9; RFM therefore does not reliably outperform its normalization.
- Limitations: The comparison requires about 8.1 points for 80% power at two-sided level 0.05, so effects smaller than that are not ruled out.The paired standard deviation across six datasets is 5.7 points; detecting smaller effects requires more evaluation datasets rather than more spectra.
- Attribution of invariance: Normalization alone improves over raw spectra by +8.9 points, while adding the encoder changes performance by −1.5 points, yielding a net +7.4-point improvement.The removed cells are near ceiling and nearly identical, at 94.7 versus 94.4, consistent with invariance supplied by normalization.
- Training controls: The trained encoder improves over its untrained architecture by +5.4 points, ahead on five of six datasets and positive on all ten draws.Its paired t interval is [+0.3, +10.4], but it does not beat a same-width random projection, with a difference of −3.2.
5 Conclusion · A Experimental Details
The conclusion argues that cross-preprocessing transfer can reflect deterministic normalization rather than learned invariance, and recommends measuring normalization alone before crediting the encoder. The study finds no measurable transfer gain beyond normalization for the Raman model, while noting limited power and broader validation risks.
- 5 Conclusion: High cross-preprocessing transfer is not by itself evidence of learned invariance, because normalization can impose it before any learned parameter is applied.With location subtraction and scale division, identical normalized representations occur exactly for inputs related by a positive affine map.
- 5 Conclusion: Normalization alone matches RFM on within-dataset cross-preprocessing transfer, including its improvement over raw spectra.After excluding cells removed by ideal normalization, the difference remains −1.5 points.
- 5 Conclusion: Training still affects representations: it improves the encoder over random initialization and brings surviving transformations closer in representation space.The conclusion distinguishes these effects from any observed gain in transfer or robustness beyond normalization.
- 5 Conclusion: The authors encourage the field to report what a model’s normalization already supplies before attributing robustness to its encoder.These recommendations apply to models whose first operation is a fixed normalization.
- 5 Conclusion: The paper recommends identifying fixed preprocessing operations, testing which transformations they remove, reporting residuals for approximate removal, and comparing against normalization alone.It also recommends running the numerical test before training to determine whether an augmentation transformation reaches the encoder.
- 5 Conclusion: The main comparison has 80 percent power for a difference of about 8.1 points, so smaller effects are not ruled out.The evidence is based on six evaluation datasets, some intervals remain wide, and two released systems show the same behavior.
- 5 Conclusion: The work uses public de-identified spectral datasets, but overstated robustness could encourage deployment across laboratories without appropriate revalidation.Code, results, the numerical test, and figure scripts are released for independent verification.
A.1 Datasets · A.2 Preprocessing pipelines · A.3 Representations and probing protocol
The study evaluates six diverse Raman datasets using native acquisition axes and compares raw, normalized, PCA, random-projection, and other preprocessed representations under a fixed transfer-probing protocol. The protocol prevents target-side adaptation while testing robustness to preprocessing and relaxes key design choices in appendices.
- A.1 Datasets: Six public Raman classification datasets are subsampled to at most 300 spectra per class, with classes containing fewer than ten spectra removed.Four datasets come from RamanBench, while two were curated from original public releases.
- A.1 Datasets: The datasets differ by more than threefold in channel count and fivefold in spectral coverage, so spectra remain on native, unshared acquisition axes.RFM uses native-channel patches and mean patch wavenumbers as positional inputs; other representations use the same native channels.
- A.2 Preprocessing pipelines: All preprocessing is applied to raw intensities before representation computation, including identity, released rolling-minimum baseline processing, central first differences, asymmetric least squares, and MSC.The rolling-minimum operation is reproduced exactly as released, while the derivative and asymmetric least-squares settings are specified explicitly.
- A.2 Preprocessing pipelines: MSC fits x ≈ b + m ref with an intercept and returns (x − b)/m, using the dataset-wide mean spectrum as reference and per-spectrum coefficients.Because the reference includes held-out spectra, MSC transfer results are transductive in the primary protocol.
- A.3 Representations and probing protocol: The normalization representation is the model’s first operation, computed from each spectrum across channels with zero learned parameters; PCA is fitted once on raw spectra without labels.PCA uses a fixed random state, is capped by channel and sample counts, and applies the same basis to every pipeline.
- A.3 Representations and probing protocol: Probing uses shared five-fold stratified splits, three seeds, source-fitted standardization, and multinomial logistic regression with inverse regularization strength one.The same fold partition is used across pipeline pairs within each seed, and each source probe is fitted once per fold.
- A.3 Representations and probing protocol: Target standardization is never refitted, no primary-protocol hyperparameter is tuned, and an RBF-kernel SVM provides an alternative probe under identical pipelines and folds.Appendix H repeats comparisons with source-only penalty selection.
- A.3 Representations and probing protocol: Appendices separately relax fixed probe penalties, spectrum-level folds, and other primary-protocol choices that could favor one representation over another.The paper notes repeated measurements within some datasets and tests alternative experimental-unit definitions.
B Ideal Versus Deployed Normalization · C Audit of Released Preprocessing Code
The numerical audit distinguishes ideal normalization from deployed behavior, confirming theoretical sign-boundary effects while exposing small numerical tails. The code audit finds that many released systems already supply positive-affine invariance, including cases presented as learned claims.
- B Ideal Versus Deployed Normalization: Negative-slope scatter correction has residuals six to nine orders of magnitude larger than the other three transformations, matching the theoretical sign boundary.This comparison uses the deployed normalization over all six evaluation datasets.
- B Ideal Versus Deployed Normalization: For three transformations removed exactly by ideal normalization, typical spectra agree to machine precision, but 0.2%–0.5% exceed 10−3 and the maximum is about 3×10−3.Taking the sample maximum places all three slightly above the numerical-test threshold.
- B Ideal Versus Deployed Normalization: Area normalization’s positivity condition holds for all 3,291 spectra, with a minimum divisor of 7.6×10−3.Standard normal variate normalization is excluded theoretically, while scatter-correction exclusion rules agree within 0.1 points.
- B Ideal Versus Deployed Normalization: Across eight transformations and two modalities, the largest removed-set deviation is 3.4 × 10−5 and the smallest surviving-set deviation is 5.37.The partition remains unchanged for thresholds from 10−4 to 10−1; below 10−4, scale and affine transformations leave the removed set.
- B Ideal Versus Deployed Normalization: The numerical test gives identical verdicts on all forty normalization–transformation combinations for Raman spectra and 4,998 ECG heartbeat time series.The converse also holds numerically: implied positive affine coefficients reconstruct affine and positive-slope scatter-corrected spectra with relative error near 10−16, unlike negative-slope scatter correction and derivatives.
- C Audit of Released Preprocessing Code: The audit covers eighteen configurations from seventeen systems across five modalities, with twelve supplying positive-affine invariance and four carrying matching claims.A permitting verdict means normalization supplies the claimed invariance, so published evidence does not isolate a learned contribution; supplying-only means no matching claim was identified.
- C Audit of Released Preprocessing Code: Audit verdicts are based on the normalization first, followed by any matching augmentation or robustness claim and caveats, with evidence located in public code or papers.The second audit column records whether a matching affine augmentation or robustness claim was found.
- C Audit of Released Preprocessing Code: Two unresolved rows are conservatively classified as supplying only, while rerunning the normalization remains independent of repository state despite potentially drifting line numbers.Readers should expect to find the same code evidence, not necessarily identical file and line references.
D Replication on Two Released Systems
Replication on DSCF and HuBERT-ECG shows that normalization, not encoder learning, accounts for preprocessing robustness, while transfer performance can diverge from robustness. The shared robustness pattern across three models is therefore not specific to RFM.
- Protocol: The unchanged protocol compares each model with its own normalization and each normalization with raw signals using balanced accuracy.DSCF inputs were interpolated to 512 samples, while HuBERT-ECG received twelve leads of five seconds.
- Results: Normalization improves on raw signals by +8.9, +8.9, and +4.4 points for RFM, DSCF, and HuBERT-ECG, respectively.Every interval excludes zero.
- Robustness: No encoder is measurably more robust than its normalization: retention changes are +0.2, −1.8, and −19.2 points for RFM, DSCF, and HuBERT-ECG.The corresponding intervals are [−2.9, +4.6], [−6.8, +2.7], and [−23.6, −15.8].
- Transfer versus robustness: HuBERT-ECG is +10.8 points better than its normalization at the task but −19.2 points worse at surviving preprocessing changes.Both intervals exclude zero, separating transfer from robustness.
- Interpretation: The shared robustness result across RFM, DSCF, and HuBERT-ECG is not a property of RFM because two systems are released and one is not spectral.DSCF has 397 million parameters and HuBERT-ECG has 30.5 million parameters.
- Training contribution: A randomly initialized DSCF encoder reaches +0.9 points of retention over normalization, while training shifts this by −2.7, so training adds nothing measurable.The intervals are [−2.4, +4.4] for random initialization and [−7.1, +1.6] for training.
E Dimensionality and Probe Regularization · F Per-Dataset and Probe-Class Breakdowns · G Chance-Level Rescaling
PCA width changes performance without producing a stable invariance effect, while probe regularization does not explain the width gap. Across dataset- and probe-level breakdowns, chance-rescaled results preserve the same ordering: normalization outperforms raw spectra, whereas RFM does not outperform normalization.
- E Dimensionality and Probe Regularization: At 320 dimensions, the remaining-cell comparison is +5.9, versus +7.5 when all off-diagonal cells are included.The difference comes from removed cells where both representations reach ceiling.
- E Dimensionality and Probe Regularization: Increasing PCA width reduces both on-diagonal and off-diagonal performance, with at least as large a decrease on the diagonal.The widening gap therefore does not behave like a stable invariance effect.
- E Dimensionality and Probe Regularization: Across inverse regularization strengths, off-diagonal accuracy changes by at most 2.6 points at 128 dimensions and 1.2 at 1024.The width gap stays close to 10 points, suggesting it is not driven by the probe penalty.
- E Dimensionality and Probe Regularization: Across ten draws, the random projection scores 50.6 ± 0.5 and the untrained encoder 42.0 ± 0.3, with neither comparison changing sign against the trained model.The initially examined draw was the random projection’s most favorable draw and would have overstated its effect.
- F Per-Dataset and Probe-Class Breakdowns: Table 12 reports off-diagonal accuracy separately for each dataset, while Table 13 repeats the three headline contrasts under linear and radial-basis SVM probes.These analyses expose whether aggregate results depend on a particular dataset or probe family.
- G Chance-Level Rescaling: Because datasets contain two to twelve classes, chance balanced accuracy ranges from 50 to 8.3 percent, making unscaled absolute means cross-scale aggregates.Within-dataset contrasts remain paired at the same chance level.
- G Chance-Level Rescaling: On chance-rescaled scores, normalization reaches 31.2, RFM 30.0, and raw spectra 19.6; normalization exceeds raw spectra by +11.6 points.RFM differs from normalization by −1.3 points, with interval [−7.1, +7.4], and the ordering matches the unscaled results.
H Source-Only Selection of the Probe Penalty
Source-only penalty selection was non-degenerate but did not materially change the comparison: every representation moved by at most 0.3 points, and the original ordering remained unchanged. The check supports the main result while leaving probe-family choice as a limitation.
- Method: Penalty selection used source-only three-fold inner cross-validation separately for each representation, then applied the refitted probe untouched to every target pipeline.The grid was {0.01, 0.1, 1, 10}; target pipelines and held-out spectra were excluded from selection.
- Selection behavior: Different representations selected different operating points, with normalization choosing the weakest penalty more than a third of the time while RFM spread choices more evenly.Thus, tuning had a non-degenerate choice and could favor either side of the comparison.
- Results: Every representation moved by at most 0.3 points, and penalty selection left the ordering unchanged.The primary fixed-penalty comparison was therefore not materially altered by source-only tuning.
- Results: Normalization still exceeded raw spectra by +8.8 with an interval of [+4.6, +13.7] and was ahead on all six datasets.RFM remained behind its own normalization by −1.2 with an interval of [−4.4, +3.2] and ahead on one of six datasets.
- Limitations: The check varied the penalty within one probe family, so it does not exclude another classifier favoring the encoder.The passage identifies radial-basis replication in Appendix F as the only evidence offered on probe-family choice.
I The Experimental Unit and Grouped Cross-Validation
Grouped cross-validation reveals that spectrum-level accuracies are optimistic because replicate spectra from the same physical unit can cross the split. However, grouping lowers raw, normalization, and RFM performance by nearly equal amounts, preserving the comparison between RFM and its normalization while limiting interpretation of absolute accuracies.
- The Experimental Unit: Replicate leakage matters because spectra from one physical unit can appear on both sides of a split, making accuracy measure recall of that unit rather than generalization to a new one.This can inflate representations unequally, so the experimental unit must be considered explicitly.
- Grouped Cross-Validation: Only serum retains unit metadata; the other five datasets require a conservative proxy that clusters spectra with correlation at least 0.999.The serum metadata yields 60 groups over 370 spectra, while the proxy over-groups similar distinct samples and withholds more training data than true grouping.
- Grouped Cross-Validation: 11.6 points, 10.9, and 8.5: grouping lowers off-diagonal accuracy for raw spectra, normalization, and RFM, respectively, on serum with recorded units.Under the proxy across five datasets with detectable structure, the corresponding falls are 3.3, 2.6, and 2.5.
- Grouped Cross-Validation: +5.1 points and +1.0: on serum, normalization exceeds raw spectra and RFM exceeds normalization under recorded-unit grouping.Serum is one of the datasets on which raw spectra and normalization are closest, and one dataset carries no interval.
- Grouped Cross-Validation: The RFM-versus-normalization comparison holds across spectrum-level evaluation, grouped serum evaluation, and the proxy on five datasets with detectable replicate structure.Because grouping inflates all representations in nearly equal measure, it does not disturb this shared-protocol comparison.
- Grouped Cross-Validation: Absolute accuracies should be read as cross-preprocessing transfer under this protocol, not as performance estimates on specimens the representations have never seen.Grouping lowers absolute accuracies by between 2.5 and 11.6 points, and three datasets could only be addressed by proxy because identifiers were not released.
J Inductive Refit of the Data-Dependent Steps
Refitting the data-dependent scatter-correction reference and PCA basis within each training fold does not change the main conclusion. PCA controls improve, while normalization and RFM remain unchanged to one decimal.
- Protocol: The scatter-correction reference and PCA basis are label-free but transductive because held-out spectra contribute to statistics used to transform them.The reference is shared across representations, and the PCA basis is shared across PCA-based pipelines, so neither can favor one representation.
- Inductive refit: Within each fold, both statistics are fitted on training spectra only, frozen, and applied unchanged to held-out spectra.Other preprocessing steps, including normalization and the listed baselines and derivatives, require no refitting.
- Results: PCA-based representations show the largest changes and both improve, indicating the transductive basis slightly hurt PCA controls rather than helping them.Normalization and RFM are unchanged to one decimal in the inductive experiment.
- Results: +9.0 points with an interval of [+4.7, +13.8] is normalization over raw spectra, ahead on all six datasets.This contrast is unchanged after inductive refitting.
- Results: −1.5 with an interval of [−4.6, +3.2] is RFM over its normalization, ahead on one of six datasets.Restricted to the remaining cells, the difference is −1.7, while measured as retention it is +0.2.
K Representation Similarity · L Code and Reproduction
Representation similarity tracks apparent transfer imperfectly because deterministic normalization can create both by collapsing inputs before encoding, so the metric cannot identify learned invariance. The package provides extensive scripts, artifacts, and traceable outputs for reproducing the analyses, with only the Appendix D replication requiring downloads.
- K Representation Similarity: Normalization followed by PCA had the highest representation similarity, 0.747, but normalization alone achieved the best off-diagonal transfer, 52.0 versus 43.0.Mean linear centered kernel alignment was 0.729 for normalization and 0.686 for RFM.
- K Representation Similarity: A deterministic normalization can raise representation similarity and apparent transfer by collapsing inputs before the encoder.Thus, similarity alone cannot separate invariance supplied by normalization from invariance acquired by the encoder.
- K Representation Similarity: The metric is not generally rejected; the narrower limitation is that it cannot attribute preprocessing invariance between normalization and encoder learning.The passage notes that the metric’s limitations and sensitivity to design choices are already known.
- L Code and Reproduction: The package includes six datasets, the pretrained checkpoint, code, result files, and console output for every run.RFM’s normalization and weights can be inspected and rerun from the package.
- L Code and Reproduction: Every number and figure outside Appendix D is reproducible in about an hour on a laptop without a GPU, external path, download, or configuration.The Appendix D replication alone requires downloading released weights and PTB-XL recordings.
- L Code and Reproduction: Separate scripts reproduce transfer grids, numerical tests, normalization comparisons, untrained controls, injection-point interventions, sensitivity analyses, and model checks.Additional scripts reproduce the alternative probe, source-only penalty selection, inductive refit, pretraining analysis, audit, contrasts, and figures.
- L Code and Reproduction: Each script-generated textual number is written to a same-named result file, enabling value tracing without rerunning experiments.Shared code is separated from experiment scripts, with dedicated modules for encoders, normalization, preprocessing, transfer, and bootstrap procedures.