Context That Cannot Overwrite the Sensor: Auditable Generative Super-Resolution for Surgical Hyperspectral Imaging

Hyperspectral cameras record a full reflectance spectrum, a chemical fingerprint, at every pixel. In surgery this gives a direct, contact-free readout of tissue oxygenation, blood content and water. The cost is spatial sharpness. Splitting light into a hundred narrow bands leaves few photons per band, so pixels must be large. Learned super-resolution, meaning models that reconstruct fine spatial detail from a coarse image, could recover capillaries and tissue margins. The most capable of these models are generative: diffusion models, which produce images by gradually denoising random noise. They are also the ones that invent detail. Medicine adds a second temptation, which is to condition the generator on clinical context (organ identity, report text, patient records), as text-guided tumor synthesis does for CT. Doing that for hyperspectral data creates a specific danger. The generator can learn to paint the spectrum the context predicts rather than the spectrum the sensor measured. Its output may still look convincing enough to fool experts, who already cannot tell synthetic scans from real ones in several modalities.

We propose a conditional diffusion super-resolver for surgical hyperspectral cubes in which clinical context is structurally confined. A projection step forces every output, when re-blurred and downsampled by the camera's measured degradation, to reproduce the observed low-resolution cube. Context and learned priors can therefore fill in only what the sensor never measured. We pair the model with an audit that existing work lacks, built from three parts. The first is a context-swap test that measures how far the output moves when the context is changed. The second checks whether physiological indices computed from the spectra survive super-resolution. The third is a blinded surgeon study that scores realism and truthfulness as separate questions. We expect these two scores to come apart.

Core Claim

The claim has two halves. First, at large upsampling factors on real-optics tissue data, a context-conditioned diffusion model with a hard measurement-consistency projection can match strong learned regressors on fidelity metrics. It should also recover more fine structure, and it should be immune by construction to context-driven drift in the measured spectral content. Second, the same model without the projection will score as more realistic in expert reader studies while being less faithful to ground-truth physiology. If that holds, "expert-level realism" is the wrong acceptance criterion for clinical spectral super-resolution, and the context-swap audit is the right one.

Write the camera as $y = A x + n$. Here $x$ is the high-resolution cube, $A$ is the measured per-band blur-and-downsample operator, $n$ is sensor noise and $y$ is the observed coarse cube. Each denoising step's estimate $z$, produced under context $c$, is replaced by

$$\hat{x} = A^{+} y + (I - A^{+} A)\, z(c),$$

where $A^{+}$ is a regularized pseudo-inverse. The first term is fixed by the measurement. Context can only influence the second, which is the part of the image the sensor cannot see. Because real data is noisy, the deployed version relaxes this to a noise-weighted soft consistency, so measured content can still drift slightly. The audit therefore measures the measured-space change under a context swap, $\lVert A(\hat{x}(c) - \hat{x}(c')) \rVert$, separately from the unmeasured-space change. Under exact projection this quantity is zero. Under soft projection it is bounded by the noise level.

Grounding in Prior Work

Three findings motivate the design. A True Hyperspectral Image Super-Resolution Dataset captured real paired low- and high-resolution industrial scenes by swapping lenses. Models trained on bicubic-downsampled data scored 32–33 dB PSNR, below plain bicubic interpolation at 33.5 dB, while models trained on real optical pairs reached about 35.5 dB. We take from this that $A$ must be measured, not assumed. Synthetic Data Pretraining for Hyperspectral Image Super-Resolution showed that pretraining on 20,000 RGB images converted to spectra gives up to +2 dB and reorders model rankings. That work used only synthetic degradation and natural scenes, so we reuse its pretraining but pair it with measured degradation. Min et al. observed that synthetic images can look more realistic than real ones because they omit noise and artifacts. In hyperspectral imaging those "artifacts" can be the physiological signal itself, which is why we refuse to treat realism as truth.

Two lines of work supply the method. HSR-Diff reached 44.33 dB on CAVE at 32× with a conditional diffusion transformer. It needs a registered high-resolution multispectral image and never touches tissue. DMGASR runs diffusion in the compressed space of a band-grouping autoencoder, cutting inference from 23.01 s to 6.17 s. We adopt its latent design for tractability. Both rely on synthetic degradation, and neither has any mechanism stopping conditioning from altering measured content.

Two papers set constraints. Semantic Hyperspectral Image Synthesis for Cross-Modality Knowledge Transfer in Surgical Data Science generated 100-band porcine organ cubes from segmentation masks with an 8-channel latent autoencoder. This improved segmentation Dice by up to 35% relative in out-of-distribution scenes, but the autoencoder blurred fine structures. That paper is the closest existing work. It generates at native resolution from masks, whereas we super-resolve real measurements under context. Its blur finding is also why our projection is applied in pixel space after decoding, so the measured content does not pass through the lossy autoencoder. Text-Driven Tumor Synthesis conditions 3D CT diffusion on report text and fooled radiologists up to 45% of the time. It shows how much context can steer a generator, which is exactly what we want to bound.

For the context side, Impact of metadata in multimodal classification of bone tumours is the motivating evidence that context carries real information: accuracy rose from 62.8% to 69.7% with age and site. That information is also what makes unconstrained conditioning risky, since a generator can learn the same shortcut.

Research Program

The work has four parts.

The first is measuring the degradation. We will build a small paired ex vivo porcine tissue set using a dual-lens pushbroom setup modeled on the Lens Dataset protocol. From it we estimate per-band point-spread functions and noise statistics, which together form $A$ and the noise model. We will also validate the whole pipeline on the Lens Dataset itself.

The second is training. HeiPorSPECTRAL (100 bands, 500–1000 nm, 20 organs, 11 pigs) serves as the high-resolution source. Low-resolution inputs come from the measured operator, not bicubic downsampling. We test at 4× and 8×. We expect the advantage of conditioning to appear mainly at 8×, where the unmeasured part of the image is large.

The third is the generator, which runs diffusion in a band-grouped latent space with pixel-space projection. Its context is organ-identity text, a semantic mask and acquisition metadata. The porcine data has no patient records, so this stage tests the mechanism. The audit is written so it applies unchanged to record or text context on human data later. We state this limitation openly rather than simulating records.

The fourth is the audit:

  • Context-swap test. Give the model the wrong organ text or mask, and measure the change in measured and unmeasured content.
  • Physiological readout preservation. Compute standard spectral indices for oxygenation, hemoglobin and water from the super-resolved cube and from ground truth, and compare them, especially near fine structures.
  • Reader study. Board-certified surgeons view color renderings and per-pixel spectra. They answer two questions: which image is real, and which of two reconstructions matches the reference physiology.

Baselines

The do-nothing reference is bicubic interpolation of each band, evaluated through the same index and audit pipeline. On the Lens Dataset it is reported at 33.5 dB PSNR (A True Hyperspectral Image Super-Resolution Dataset).

The strongest regression competitor is MCNet, a mixed 2D/3D convolutional network reported at 39.026 dB PSNR and SAM 3.292 on CAVE at 4× (SAM, the spectral angle mapper, measures how far a reconstructed spectrum's shape deviates from the true one). We give it every advantage short of generation: pretraining as in Synthetic Data Pretraining for Hyperspectral Image Super-Resolution, the same measured degradation, the same HeiPorSPECTRAL splits by pig, and a matched GPU-hour and hyperparameter-search budget. This baseline is the real threat on PSNR. Regressors tend to win average-error metrics by predicting blurry means.

The strongest generative competitor is DMGASR, which outperformed MCNet by 0.5–0.8 dB on aerial and natural scenes. We retrain it on identical data and degradation. Because HSR-Diff needs a high-resolution multispectral input that HeiPorSPECTRAL lacks, we include its spatial-spectral denoiser only as an architecture variant inside our single-image setting.

For the real-optics reference, real-trained models on the Lens Dataset reach about 35.5 dB. For super-resolution on HeiPorSPECTRAL, no reported result was found on Lacuna, so all numbers there are new.

Three ablations isolate the key ingredient. The first removes the context while keeping the projection. The second keeps the context but removes the projection; this is the TextoMorph-style recipe, and the comparison it directly answers is whether the projection matters. The third swaps measured degradation for bicubic degradation. Beating the field means four things at once. On fidelity, we must be within 0.3 dB of the tuned MCNet in PSNR and SAM. On fine structures, index error must be lower in vessel and margin regions, with edge masks derived from annotations. On robustness, measured-space drift under context swap must stay at the noise floor, while the no-projection ablation drifts measurably. On truthfulness, surgeons must prefer our output significantly more often.

Why not just…?

Why not just fine-tune a convolutional super-resolver on realistic degradation and skip generation and context entirely? This may well tie on average PSNR, and we treat it as the default to beat. The evidence against it as a full answer is indirect: regression averages away high-frequency structure, and the 0.5–0.8 dB gap DMGASR reports over MCNet suggests generative priors help. Our edge-region index error at 8× decides the question. If MCNet matches us there, we report that context-conditioned generation is unnecessary for this task.

Why not skip super-resolution and give the coarse cube plus context directly to the segmentation or diagnosis model? For automated labels this may suffice, and we test it. A segmenter trained on low-resolution input plus mask and organ context is compared against the same segmenter trained on our output, with Dice measured on held-out pigs. Super-resolution earns its place only if it improves fine-structure Dice or serves surgeon visualization. The reader study measures the latter. If neither shows a gain, that is a negative result worth publishing.

Why not just condition a diffusion model on context the usual way, as text-driven synthesis does? That is our no-projection ablation. The context-swap test and the reader study are designed to show its failure mode: high judged realism alongside measured-spectrum drift toward whatever the context implies. If it shows no drift, the projection is unnecessary overhead and we would drop it.

Why not pretrain on RGB-derived synthetic spectra with bicubic degradation, which already gives +2 dB? Ulrichsen et al. show that bicubic-trained models fall below interpolation on real optics. Our degradation ablation reproduces that test on tissue.

Decisive Checks

The project succeeds or fails on three results. Each result's failure condition is stated so that it would change the conclusion.

On the Lens Dataset, the projected model trained with measured degradation must reach or exceed the roughly 35.5 dB reported for real-trained models. It must also keep measured-space drift under a context swap at the noise floor. Failing either means the mechanism does not transfer to real optics.

On HeiPorSPECTRAL at 8×, it must reduce error in oxygenation, hemoglobin and water indices along vessels and margins compared with tuned MCNet and DMGASR, at matched compute. If no such reduction appears, generation is not justified for this task.

In the surgeon study, the no-projection ablation should win on "looks real" and lose on "matches reference physiology." If that dissociation does not appear, expert indistinguishability is an adequate criterion after all, and we would say so.