Within-Patient Spectral Change as a Small-Cohort Hyperspectral Biomarker

Hyperspectral cameras record, for every pixel of a patient's skin, a full reflectance curve across about a hundred narrow wavelength bands. The shape of that curve is set by blood oxygenation, blood volume, and tissue water. A single photograph like this can separate septic from non-septic patients surprisingly well. The trouble is that the same curve also encodes things that have nothing to do with the disease: skin pigment, age, hemoglobin level, fluid given, even the camera's software version. In cohorts of a few dozen patients, a classifier can separate groups using those factors alone. This proposal asks a simple question. Can we use the change in a patient's own spectrum between visits, fitted in the logarithmic domain against known light-absorption curves, as the biomarker? Most static nuisance factors should then cancel by construction. If they do, the resulting trajectory features should generalize from much smaller cohorts than absolute spectra.

The idea in two sentences: subtract each patient's earlier log-spectrum from their later one, and fit the difference with a small basis made of the known absorption shapes of oxy- and deoxyhemoglobin and water, plus a few learned shapes. Test whether these few change coordinates keep their predictive value under the confounder-shifted and cross-subject splits where absolute-spectrum models fail, and whether they need fewer patients to do so.

Core Claim

Our main claim is empirical and falsifiable. In small longitudinal hyperspectral cohorts, change features built from the physics of light absorption are more transportable than absolute spectra, the four vendor-derived tissue indices, or unconstrained learned trajectory embeddings. "More transportable" means the features lose less accuracy when training and test data differ in age, software version, or subject identity, and their learning curves flatten at a smaller number of patients.

The mechanism comes from the modified Beer–Lambert law, the standard approximation that attenuated light grows linearly with absorber concentration. Define the attenuation change for subject $s$ at wavelength $\lambda$ between reference time $t_0$ and time $t$ as $\Delta A_s(\lambda,t) = -\log R_s(\lambda,t) + \log R_s(\lambda,t_0)$, where $R$ is measured reflectance. We model it as

$$ \Delta A_s(\lambda,t) \approx \sum_{k} \varepsilon_k(\lambda)\,\ell(\lambda)\,\Delta c_{s,k}(t) \;+\; a_s(t) + b_s(t)\lambda \;+\; U(\lambda)\,z_s(t) \;+\; \text{noise}. $$

Here $\varepsilon_k$ is the tabulated absorption spectrum of chromophore $k$ (oxyhemoglobin, deoxyhemoglobin, water). $\ell$ is an assumed wavelength-dependent path length. $\Delta c_{s,k}$ is the concentration change we want. The offset $a_s$ and slope $b_s$ absorb illumination and distance changes. $U$ is a low-rank residual basis learned across subjects, with $z_s$ its per-subject coefficients.

Melanin, fat thickness, and baseline scattering enter both log-spectra almost identically, so they drop out of $\Delta A$ to first order. The same holds for anything else that is fixed within a patient but varies between patients. The prediction targets are the handful of coordinates $(\Delta c, z)$, not a hundred bands.

We state the cancellation plainly as an approximation. It fails when path length itself changes a lot, for example when blood volume shifts sharply. One experiment below measures how badly.

Where This Sits in Prior Work

Three findings motivate the proposal.

The first is from Machine learning-based analysis of hyperspectral images for automated sepsis diagnosis. It reached over 98% accuracy with linear discriminant analysis on median hand spectra from 75 subjects, then showed that age imbalance, hemoglobin, fluids, vasopressor dose, and a mid-study software update all shifted the baseline spectra. The same paper found that the first measurement alone performed as well as all 72 hours of data. We read that as evidence that the longitudinal signal was never isolated, not that it is absent.

The second is from AI-powered skin spectral imaging enables instant sepsis diagnosis and outcome prediction in critically ill patients. It scaled the approach to 508 ICU patients with a ResNet and nested cross-validation. It remained single-center and used a single scan per patient.

The third is from Insights from an autism imaging biomarker challenge: promises and threats to biomarker discovery. Across 146 algorithms, internal cross-validation was optimistic, external AUC fell from about 0.80 to 0.72, and accuracy was still climbing with sample size at 2,117 subjects. That is the regime we are trying to escape.

Two findings point the other way and suggest escape is possible. HeiPorSPECTRAL found that inter-subject variation accounted for only 2.3% of spectral variance across 20 porcine organs. This hints that physically constrained spectral features need far fewer subjects. Semantic Segmentation of Surgical Hyperspectral Images Under Geometric Domain Shifts showed that deep models trained on 33 pigs lean on spatial context rather than spectra, losing about 45% Dice under geometric shift. Forcing reliance on spectra recovered much of that loss. This constrains our design: we deliberately work with region-level spectra rather than full-image convolutional models, so the context shortcut is not available.

Two methods supply the "subject as own control" idea, which we adapt rather than adopt. Longitudinal self-supervised learning aligns within-subject MRI difference vectors with one learned direction. It reached 87.0% balanced accuracy on ADNI versus 84.7% for SimCLR. Longitudinal Variational Autoencoder puts a Gaussian-process prior in latent space to separate population trends from patient effects. Both learn their difference space from data at hundreds of subjects. Neither has been applied to spectra. We replace most of the learned space with known absorption physics, because our cohorts are 20 to 75 subjects.

Three longitudinal hyperspectral studies supply data and targets, but none models change as a trajectory feature. The pancreatic surgery pilot followed 25 patients over 10 time points. It found that the tissue water index tracks blood loss and syndecan-1 and that the hemoglobin index tracks blood hemoglobin (r = 0.83), but that none of the indices correlate with SOFA. The porcine hemorrhagic shock study imaged ear skin and renal cortex in 22 animals. It found that skin tracked kidney oxygenation and that tissue water tracked infused fluid (r = 0.61 skin, 0.64 kidney). The in-vitro wound study clustered each day's image independently. All three analyze per-time-point indices or clusters.

Research Program

We would build one small, auditable pipeline and test it on three existing longitudinal cohorts. The pipeline takes TIVITA cubes spanning 500 to 1000 nm and extracts region-of-interest spectra (palm and fingertip in humans, ear skin in pigs). It works in log reflectance instead of the usual L1 normalization. An L1-normalized difference does not cancel multiplicative nuisance factors, whereas a log-domain difference turns them into additive terms that the offset and slope absorb.

For each pair of visits, the pipeline fits the equation above by constrained least squares. The residual basis $U$ is learned with rank chosen by leave-subject-out cross-validation, capped at three. The result is a short trajectory of five to eight coordinates per subject. Downstream prediction uses only these coordinates, with ridge regression or logistic regression and a random-slope mixed-effects model over time.

We add one controlled perturbation study. Using HeiPorSPECTRAL spectra, we apply synthetic melanin absorption at several concentrations and synthetic changes in path length. This measures how much each feature family's predictions move as a function of nuisance strength. It tests the cancellation claim directly, which matters because every existing human cohort is light-skinned.

Finally, for each feature family, we fit learning curves by repeatedly subsampling subjects at n = 5, 10, 15, and up to the full cohort. This addresses the open sample-size question raised by the autism challenge's non-plateauing curves.

Baselines

The naive reference points are two. The first predicts no change, meaning the clinical state at time $t$ equals the state at $t_0$. The second is a model using the routine clinical trajectory alone: lactate, pH, and noradrenaline dose, the variables the ICU sepsis study found most useful. Hyperspectral change features must add information beyond these to matter clinically.

The strongest existing hyperspectral method is the absolute-spectrum classifier. On the 75-subject cohort that is the linear discriminant analysis of the automated sepsis diagnosis paper, which reported over 98% accuracy across 500,000 bootstrap splits and about 0.98 from the first measurement alone. We also run a ResNet14d-style snapshot model following the ICU sepsis study, which reported AUROC 0.80 from palm images alone and 0.94 when combined with clinical variables within 10 hours. Those numbers come from a 508-patient cohort and a diagnosis task, so they are context rather than a head-to-head target.

We rerun these baselines on our cohorts and splits. Every method uses the same subjects, the same nested leave-subject-out protocol, and the same hyperparameter budget of 50 configurations. That budget matters because optimism from tuning is one of the failure modes we are measuring. "Beating" the absolute-spectrum model means losing significantly less performance from the random split to the confounder-shifted split, by more than the bootstrap 95% interval of the difference. We would not claim a win on in-distribution accuracy, where confounded models will likely look better.

Four further comparisons compete directly with the key ingredient. The first is the four vendor indices (StO2, NIR perfusion index, hemoglobin index, water index) entered as deltas into the same mixed-effects model. The second is a plain spectral delta: the L1-normalized median spectrum at $t$ minus that at $t_0$, fed to ridge regression. The third and fourth are LSSL and L-VAE, each adapted to one-dimensional spectra and trained on the pooled cohorts.

Three ablations isolate what drives any gain. We fit the physics basis without the learned residual, the learned residual with no physics basis, and the full model on linear rather than log reflectance.

Why not just…?

Why not just track the four derived indices with a mixed-effects model? This is the most serious competitor, because the indices are already a physics-based compression. The automated sepsis paper reports that full spectra separated groups better than the four indices. However, it made that comparison on absolute values, where the extra separation may come from confounders. Our index-delta baseline settles the question. If index deltas match our change coordinates on the shifted splits, we will report that the vendor indices are sufficient when used differentially. That would be a useful and cheap clinical conclusion, and it would mean the added value of our basis is only interpretability.

Why not just subtract the admission spectrum and fit ridge regression? This captures most of the "own control" benefit with no modeling, so it is a real threat. Our argument against it rests on two things. On L1-normalized reflectance, subtraction does not remove multiplicative nuisance factors. And a 100-dimensional difference still gives ridge regression room to fit noise when n is below 50. The plain-delta baseline and the linear-domain ablation test both claims. If the plain delta ties us on the shifted splits and learning curves, we will drop the physics basis from the claim.

Why not just use an admission snapshot plus labs, which already reaches AUROC 0.94? That figure answers a different question: whether a patient is septic now. It says nothing about whether a patient is getting better or worse. It also came from a single center, where the smaller Heidelberg analysis showed snapshot accuracy can reflect cohort identity. We include snapshot-plus-labs for the trajectory targets. If it predicts next-visit deterioration as well as our change features, the longitudinal premise fails for these endpoints.

Why not just use LSSL or a longitudinal VAE directly? Both learned their difference spaces from 600 to 800 subjects or from synthetic data. LSSL assumes one linear direction of change, while the pancreatic and shock data show direction reversals, with oxygenation first rising after anesthesia and then falling. We run both at matched budget. Their learning curves against ours at n up to 75 are the direct test.

Proposed Experiments

We use three cohorts, all drawn from the file. Access requires collaboration with the Heidelberg groups, since only HeiPorSPECTRAL is described as public.

In the porcine hemorrhagic shock cohort (22 animals, three resuscitation arms), the target is change in renal cortex oxygenation, predicted from ear-skin spectral change with leave-animal-out evaluation. A second target is the resuscitation arm itself. This matters because under norepinephrine, blood pressure rose while tissue oxygenation fell, a direction that absolute blood pressure misses. No reported number for predicting kidney oxygenation change from skin change was found on Lacuna. The published result is a moderate-to-strong skin–kidney correlation, which is the reference we must at least match with calibrated prediction.

In the pancreatic surgery cohort (25 patients, 10 time points), the targets are within-patient changes in fluid balance and syndecan-1. The reference is the tissue water index association reported in the pilot. No reported predictive metric was found on Lacuna.

In the 75-subject sepsis and surgery cohort observed over 72 hours, we build the decisive confounder test with three splits. The first trains before the software update and tests after it. The second uses an age-matched subset. The third predicts nuisance variables themselves, namely software version and age group, from each feature family. A transportable biomarker should score near chance on nuisance prediction. It should also keep its accuracy for predicting between-visit change in vasoactive-inotropic score and lactate.

The decisive checks are three.

First, the change coordinates must lose less performance from random to shifted splits than the absolute-spectrum classifier does. The absolute-spectrum classifier should, by contrast, predict software version well above chance.

Second, the change coordinates' learning curves must reach within 0.02 AUROC of their full-cohort value at a clearly smaller n than the plain spectral delta or LSSL. That would be a first empirical answer to whether absorption physics bends the sample-size scaling seen in neuroimaging.

Third, in the synthetic melanin perturbation, predictions from change coordinates must stay stable at pigment strengths where absolute-spectrum predictions drift.

If all three hold, the result is a biomarker definition that small single-center studies can actually transport. If the first fails, we will have shown that within-patient change does not rescue hyperspectral biomarkers from cohort confounding. That too would be worth publishing.