Counting Real Bits: Patient-Level Information Audits for Raman Biopsy Classifiers

Raman spectroscopy shines a laser on tissue and reads out a "chemical fingerprint": narrow peaks produced by vibrating molecular bonds. It does not consume the sample, which makes it attractive for biopsies too small to survive many destructive tests. The difficulty is that biological tissue also fluoresces. It glows broadly and far more strongly than the Raman signal, so every spectrum is mostly a smooth background with faint peaks sitting on top. The clinical datasets are also tiny in the unit that matters, which is patients. Under these conditions a classifier can reach high accuracy by learning the fluorescence background, or by learning which patient a spectrum came from, and neither shortcut is guaranteed to carry over to the next patient or the next instrument.

We propose an information audit that runs before any classifier is trusted. For a small cohort, it estimates how many bits about the diagnosis sit in the Raman peaks, how many sit in the fluorescence background, and how many are shared, all after correcting for the upward bias that information estimates suffer when samples are few. The key design choice is that the correction treats the patient, not the spectrum, as the unit of chance. The audit should settle a live disagreement in the literature about whether to feed networks raw or background-corrected spectra. It should also predict how badly a model will degrade when the background shifts, something ordinary cross-validation on one cohort cannot see.

Core Claim

Mutual information measures how much knowing one variable reduces uncertainty about another. Simple "plug-in" estimates of it are biased upward at small sample sizes. The joint space of two variables is sparser than either alone, so chance co-occurrences look like dependence. Mandros et al. call this dependency-by-chance and remove it by subtracting the mutual information expected under a label-permutation null. Steck handles the same cardinality bias with a z-score-like standardization.

Our claim has two parts. First, in Raman biopsy data the relevant chance structure is at the patient level. The colorectal dataset of Cao et al. has 20,424 spectra but only 26 patients, and spectra from one patient share both background and chemistry. An estimator that treats spectra as independent will report large, spurious information. Second, once the correction is done at the patient level and the spectrum is split into background and peak parts, the corrected numbers can be used for decisions. They tell a practitioner whether a peak-only model has enough signal to be worth training, and whether a raw-spectrum model's accuracy is resting on fluorescence.

The corrected estimator is

$$\hat I_{0}(Y;X) = \hat I(Y;X) - \mathbb{E}_{\pi}\big[\hat I(Y_{\pi};X)\big].$$

Here $Y$ is the diagnostic label (or a continuous composition target), $X$ is a low-dimensional summary of the spectrum, $\hat I$ is a nearest-neighbor mutual information estimator, and $\pi$ ranges over permutations that reassign labels between patients while keeping each patient's spectra together. The expectation is taken by Monte Carlo, because the analytic hypergeometric null of Mandros et al. exists only for discrete variables.

Conditional versions of the same estimator give the quantities we care about. $\hat I_0(Y; R \mid B)$ is the information in the peak residual $R$ beyond the background $B$, and $\hat I_0(Y; B \mid R)$ is the information in the background beyond the peaks.

What Prior Work Supplies and Leaves Open

The method comes from the estimation literature. Gao, Oh and Viswanath show that fixed k-nearest-neighbor estimators have bias shrinking only as $O(N^{-1/d})$, where $d$ is the dimension. Their bias-improved variant (BI-KSG) cuts bias by nearly an order of magnitude at $N=100$. We use BI-KSG, and their rate is the reason we compress each spectrum to a handful of dimensions rather than feeding 1,608 channels.

The Gaussian partial information decomposition paper splits information into unique, redundant and synergistic parts. It shows an analytic bias correction staying stable at 100 samples in 384 dimensions. We use its Gaussian estimator as a second estimator for somewhat higher-dimensional summaries. Its Gaussian assumption is clearly violated by non-negative, peaky spectra, so we treat it as a cross-check rather than ground truth.

Nowozin supplies a constraint. A correction that adds the same constant to every candidate (Miller–Madow) does not change rankings. Our patient-level null matters precisely because it changes by feature: backgrounds are more patient-specific than peaks, so they receive larger corrections.

The motivation comes from the Raman literature, which disagrees with itself. Li, Schmidt and Alstrøm find that contrastive networks do better on raw spectra than on background-corrected ones. Zhou et al. find that augmenting uncorrected spectra amplifies fluorescence noise with 39 samples. Zaki et al. rely on a denoising autoencoder and find, through clustered explanations, prediction contexts driven by the confounders dopamine and epinephrine.

These positions can all be true at once if the background carries label information in some datasets and not in others. None of these papers measures that. Nor do the scarce-tissue classifiers of Wu et al. and Cao et al., which use GAN augmentation and Grad-CAM heatmaps respectively.

serrsBayes supplies the physical decomposition: peaks as a sum of line shapes and baseline as a penalized spline. It gives posterior uncertainty for one spectrum but says nothing about what the components reveal about a diagnosis across patients.

The application regime comes from tissue scarcity. Campanella et al. show that computational triage from H&E slides can spare up to 43% of rapid molecular tests. Their performance falls from AUC 0.90 on primary tumors to 0.75 on metastases, a reminder that models learned on one tissue context can lean on features that do not transfer.

A non-destructive Raman triage step for needle biopsies would be valuable. It can only be justified clinically if we know what it is responding to, and with few patients that knowledge has to come from bias-corrected statistics.

Research Program

The audit has three stages.

Decomposition. Each spectrum is split into a background part and a peak part in two independent ways, so that conclusions do not depend on one decomposition. The first is a fast penalized-spline fit. The second, run on a subsample, is the serrsBayes Bayesian fit, used to check that the fast split agrees with it. The background is summarized by a few spline coefficients.

Summaries. The peak residual is summarized in two ways. One uses integrated intensities at a small set of physically assigned bands, such as the phenylalanine, lipid and amide bands in the 600–1700 cm⁻¹ window. The other uses principal components learned only on training patients. Each summary is kept to at most about eight dimensions, so that BI-KSG bias is controlled.

Estimation and output. Unconditional and conditional informations are computed with the patient-level null above, which also yields a Steck-style z-score for each quantity. Repeating the computation on nested subsets of patients produces a learning curve of corrected information against patient count. This curve is a direct planning tool for scarce-tissue studies: it shows whether recruiting ten more patients is likely to reveal peak information that is currently indistinguishable from chance.

The audit's output is a short report containing bits in the peaks, bits in the background, the shared part, and each quantity's null distribution. From these it gives a recommendation among three options. It recommends a peak-only model if $\hat I_0(Y;R\mid B)$ is clearly positive and $\hat I_0(Y;B\mid R)$ is not. It flags a background shortcut if the reverse holds. It reports insufficient patients if neither exceeds its null.

We will release the audit code. We will also state the assumptions under which the permutation null is exact, namely patient-level exchangeability, which is violated when labels are assigned within patients (as with paired tumor and normal tissue). For paired designs we permute labels within each patient instead and report how this changes the correction.

Data and Ground Truth

Semi-synthetic tests with known truth. The central validation needs data where we know how much information is where. We take real spectra and use their decomposed peaks and backgrounds as building blocks. We then recombine them with controlled, label-dependent shifts in background slope or amplitude, and with patient random effects. Replicating these draws hundreds of times gives a known answer against which to score estimator bias and correct recommendations.

Real cohorts. We run the audit on the four datasets described in the file, subject to data access; none is stated as public, so we will request them from the authors.

The skin cancer set of Wu et al. has 149 samples and 1,608 channels. Its clinical question is whether GAN-augmented accuracy rests on peaks. The colorectal set of Cao et al. has 20,424 spectra from 26 patients and is the clearest test of spectrum-level versus patient-level correction. The fish composition set of Zhou et al. has 39 samples and continuous targets. It exercises the continuous version of the audit and has a known answer to one question: 1064 nm excitation, which reduces fluorescence, beat FT-Raman despite having fewer channels.

The urine SERS set of Zaki et al. comes closest to ground truth for confounding. The interfering molecules are known and were spiked at controlled concentrations. The audit should attribute part of the serotonin information to spectral regions that also track dopamine and epinephrine.

Baselines

Naive reference. The do-nothing reference is plug-in nearest-neighbor mutual information computed as if spectra were independent, with no correction. It represents how an analyst would naively quantify "which bands matter." We expect it to report large information everywhere in the colorectal set. Beating it means the corrected audit's estimates fall within the known truth on semi-synthetic data, where the naive estimate does not.

Strongest estimator competitor. The strongest competitor on the estimation question is BI-KSG from Gao et al. with an ordinary spectrum-level permutation null. It is the best-analyzed low-bias continuous estimator in the file. It differs from our proposal only in the unit of permutation, so comparing against it is the ablation that isolates our key ingredient. Both use identical decompositions, summaries, $k$, and number of permutations.

Gao et al. report bias nearly an order of magnitude below KSG at $N=100$ on synthetic Gaussians. No reported result was found on Lacuna for any information estimator on Raman spectra. Beating this baseline means lower absolute error against the known semi-synthetic truth when patient effects are present, and correct refusal to report information in patient-effect-only simulations, where the spectrum-level null should fail.

Strongest pipeline-selection competitor. On the practical question of which pipeline to trust, the strongest competitor is leave-patient-out cross-validation. The classifiers compared are the best published ones for each dataset.

On skin, the GAN-augmented CNN of Wu et al. reports accuracy 82.6%, AUC 0.945 and macro F1 0.807, against 77.2% for a plain CNN and 74.5% for an SVM. On colorectal, the ensemble 1D-ResNet of Cao et al. reports accuracy 98.5% and AUC 0.986 on a random 80/10/10 split; we will rerun it with patient-level splits. On fish composition, FishCNN of Zhou et al. reports $R^2_{CV}$ of 0.811 against 0.752 for LS-SVM/KNN. On urine SERS, Zaki et al. report serotonin MAE of 0.11 µM for their scale-adjusting CNN, 0.15 µM for CNN3PL, and 0.70 µM for PLSR.

Each model is retrained with the same patient splits and the same hyperparameter budget, on raw and on background-corrected inputs. Cross-validation "wins" pipeline selection if its preferred pipeline also wins on untouched test patients and under background shift. The audit beats it if its recommendation matches outcomes on held-out patients and under shift more often across semi-synthetic replicates. It also beats it on real data if the audit's attributions agree with the known confounders in the urine set and with the fluorescence contrast between the two excitation wavelengths in the fish set.

Attribution competitors. For attribution, we compare against Grad-CAM as used by Cao et al. and against sparse linear selection (L1-penalized logistic regression and partial least squares) on the same summaries. These succeed if their selected features match the known injected information as well as the audit's decomposition does.

Why not just…?

Why not just use leave-patient-out cross-validation to choose between raw and corrected spectra? This is the most serious alternative, and in datasets without distribution shift it may do as well as the audit. Its blind spot is structural. If the fluorescence background tracks the label in the training hospital, cross-validation within that hospital rewards the shortcut and cannot tell it will break when the probe, fiber, or tissue context changes.

The background-shift experiment below is designed to show exactly this. If cross-validation's choice survives the shift as often as the audit's does, we will report that the audit adds interpretability but not decisions.

Why not just use sparse regression or Grad-CAM to find the important bands? Both explain what one fitted model uses, and at 26 to 149 patients that model is itself overfit. Grad-CAM in Cao et al. produced broad heatmaps covering 450–1200 cm⁻¹ for tumor, which cannot distinguish a peak from the sloping background under it. L1 selection among collinear channels picks representatives somewhat arbitrarily. Neither produces a null distribution that says "this much information would appear by chance with 26 patients." The semi-synthetic attribution test will show whether they recover the injected truth.

Why not just remove fluorescence physically, with 1064 nm excitation or shifted-excitation hardware? Where that hardware is available it is the better fix. Zhou et al. saw longer-wavelength excitation outperform despite fewer channels, and McCain et al. separate fluorescence by shifting the laser. However, most existing clinical datasets were collected without such hardware, and fluorescence is reduced rather than eliminated. The audit is also how one would check whether the hardware helped, since it measures bits carried by the remaining background. The fish dataset provides the internal comparison.

Why not just swap backgrounds between spectra and see if a trained classifier's prediction changes? This intervention is cheap and we include it as a complementary check. It measures one model's reliance, not whether the peaks alone carry enough information to be worth building a model on, and it needs a trained model that is trustworthy in the first place. We report agreement between the swap test and the audit as evidence that both measure the same thing.

Decisive Experiments

Estimator accuracy. On semi-synthetic data built from real spectral components, with background-borne information swept from zero upward and patient effects swept in strength, the patient-level estimator should track the injected information. It should return near-zero where only patient effects exist. The spectrum-level BI-KSG baseline should over-report in those same settings. Failure of the patient-level estimator to control false positives when there are 20 to 30 patients would falsify the central claim.

Background shift. On each real cohort, we train raw and corrected models on the development patients. We then evaluate on test patients whose backgrounds have been replaced by backgrounds from other patients, or perturbed within the range seen across patients. The audit's background-unique information, estimated on development patients alone, should predict the size of the raw model's accuracy drop. Cross-validation accuracy on the development patients should not predict it.

Known confounders. On the urine SERS set, the audit should assign information about serotonin concentration to regions shared with dopamine and epinephrine. It should do so in proportion to their spiked levels, matching the confounded contexts Zaki et al. found through clustered explanations.

Patient-count planning. On the colorectal set, we subsample patients and trace corrected peak information against patient count. The number of patients at which it first clears its null tells future biopsy studies how many patients they must recruit before a Raman triage claim is supportable. We will report this count honestly even if it is larger than 26.