NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Separating Mask Error from Material Variability in Snapshot Spectral Imaging

A snapshot spectral camera captures a full hyperspectral cube, meaning many color bands per pixel, in one exposure. It does this by passing light through a patterned mask and a prism and summing everything onto a single 2D sensor. Recovering the cube from that one image is badly underdetermined, so reconstruction networks are trained in simulation with an idealized description of the optics. On real hardware the mask is blurred, shifted, and imperfectly etched, and the prism's shifts are not exact. Reconstruction quality then collapses. Current fixes either train networks to tolerate a distribution of mask errors or adapt the network's input to each device. Both treat the scene as an unstructured array.

This proposal starts from an observation those fixes do not exploit. In this camera, an error in how much light the mask lets through at a pixel is mathematically indistinguishable from the scene being brighter or darker at that pixel. Real materials do vary in brightness and spectrum from pixel to pixel, through shading, surface tilt, and composition. So whether a camera can calibrate itself from its own measurements depends on how the scene's within-material variation is modeled. If that variation is modeled too loosely, the mask error is absorbed into the scene. If it is modeled too rigidly, as a single fixed spectrum per material, real spectral variation is absorbed into a fictitious mask error. We propose a per-measurement self-calibration method that estimates a small number of physical camera parameters jointly with a scene written as materials that each carry a constrained, physically shaped family of spectra. We also propose an analysis that makes the identifiability question precise.

Core Claim

Write the cube as spectral slices $x_\lambda$, the nominal mask as $m$, and a per-pixel multiplicative mask error as $e$. Before the prism shear, every band at a pixel is multiplied by the same mask value. Therefore

$$ \big(m \odot (1+e)\big) \odot x_\lambda \;=\; m \odot \big((1+e) \odot x_\lambda\big) \quad \text{for every band } \lambda, $$

where $\odot$ is pixelwise multiplication. A mask amplitude error is exactly a per-pixel rescaling of the scene's spectrum. No amount of data or network capacity can separate the two from the measurement alone. They can only be separated through what the scene model allows.

We adopt a spectral-variability mixing model from the unmixing literature, reviewed in Spectral Variability in Hyperspectral Data Unmixing. Each pixel $j$ is

$$ x_j \;=\; \psi_j \sum_{i=1}^{P} a_{ij}\,\big(s_i + B_i c_{ij}\big), $$

where $a_{ij}$ are nonnegative abundances (how much of material $i$ is present at pixel $j$) and $s_i$ is a reference spectrum for material $i$. $B_i$ is a small basis of that material's variability directions, which we call its bundle, and $c_{ij}$ are pixel-level coefficients on those directions. $\psi_j$ is an illumination or shading factor. We constrain $\psi$ to be piecewise smooth, with sharp edges allowed only where the abundances change.

A real mask error has the mask's own dense, high-frequency binary texture. It therefore cannot hide inside a piecewise-smooth $\psi$. It also cannot hide inside the bundles, because $B_i$ changes spectral shape, not per-pixel gain. Our central claim has three parts. First, an edge-aware shading model plus per-material variability bundles makes mask amplitude, mask shift and blur, and per-band dispersion offsets identifiable from a single snapshot. Second, both looser models (a global low-rank spectral subspace with free per-pixel coefficients) and more rigid models (one fixed spectrum per material) give biased calibration on real data. Third, the calibration error grows with the scene's within-material variability in a predictable way.

Relation to Prior Work

Two papers motivate the problem by showing how large the hardware gap is.

Modeling Mask Uncertainty in Hyperspectral Image Reconstruction models the mask as nominal plus Gaussian noise. It trains a graph network to predict an uncertainty map, so the reconstruction becomes robust across miscalibrations. It does not estimate the actual operator of a given camera, and it treats the scene as unstructured. In the identity above, it learns to tolerate $e$ rather than resolve it.

Cooperative Hardware-Prompt Learning for Snapshot Compressive Imaging adapts a frozen reconstruction network to each device through input prompts. It assumes hardware shift is an input-space problem. Prototype Clustered Diffusion Models for Versatile Inverse Problems argues the opposite: when the forward model is wrong, the likelihood itself must change. Our method sides with the second view, but corrects the likelihood with explicit, few-parameter physics rather than an external restoration network.

Three papers supply the reconstruction machinery we reuse or compare against. DAUHST, MiJUN, and HSRA are deep unfolding networks: iterative solvers unrolled into a fixed number of learned stages. All three assume the exact simulated operator. HSRA's analysis is especially relevant. It shows that back-projection spreads local measurement errors across wide regions and many bands, which is precisely what an uncorrected mask error does. We use a pretrained unfolding network only to initialize the scene, and as an optional learned refinement inside the calibration loop.

The closest prior use of material structure in compressive spectral reconstruction is PSR-SCI. It compresses the cube through unmixing into a three-channel abundance image refined by a diffusion model. It uses a single fixed spectrum per component and assumes the operator is exact. Under our analysis, that rigidity is what would bias calibration.

Classical low-rank priors such as Fu et al. correspond to our "too loose" condition. A global subspace with free coefficients includes arbitrary per-pixel gain.

Finally, the intra-class variance literature provides the representational idea of several prototypes, or a distribution, per class instead of one mean. This includes Multi-Proxy Wasserstein Classifier, TRIPS, and FedPTE. Most directly, it includes endmember bundles from Hyperspectral Image Unmixing With Endmember Bundles and Group Sparsity Inducing Mixed Norms. All of these work on fully observed data or features. We bring bundles into a compressive inverse problem, and their role is to make the camera identifiable rather than to improve classification.

Research Program

The first component is analytic. For a parameterized operator $A(\theta)$ we compute the local identifiability of $\theta$ under each candidate scene model. Here $\theta$ covers mask translation and rotation, a per-band mask blur kernel, per-band dispersion offsets, and a low-frequency-free mask amplitude field. The test is the rank and conditioning of the Jacobian of the measurement with respect to $(\theta, \text{scene parameters})$, evaluated at KAIST scenes. We expect the free-gain subspace model to show an exact null direction along mask amplitude, and the bundle-plus-smooth-shading model to remove it. The analysis also tells us which hardware errors are fundamentally unrecoverable. One example is a slowly varying mask gain, which no single-snapshot method can distinguish from slowly varying illumination. It tells us which errors are worth estimating.

The second component is the estimator. Given one real measurement, a pretrained unfolding network produces an initial cube. Materials, reference spectra, and bundles are extracted from it. Bundles are initialized by clustering spectra within each material and taking the leading principal directions of the deviations. The number of materials and bundle size are chosen by a marginal-likelihood split and merge rule in the spirit of FedPTE, applied to spectra rather than features. We then alternate two updates. One updates $\theta$ by gradient descent on measurement error through the differentiable forward model. The other updates the scene parameters under the shading total-variation penalty and nonnegativity. Optionally, a final unfolding pass is run with the calibrated operator $A(\hat\theta)$. Because $\theta$ has tens to a few hundred dimensions rather than one value per pixel, a single snapshot provides many measurements per unknown.

The third component is a controlled variability stress test. We re-render KAIST and CAVE cubes with synthetic spatially varying illumination and material-dependent spectral perturbations of graded strength. We then measure how calibration error and reconstruction error scale with that strength under each scene model.

Baselines

The naive reference point is a reconstruction network trained on the ideal mask and evaluated on miscalibrated measurements. Modeling Mask Uncertainty reports that TSA-Net falls from over 31 dB to 21.42 dB PSNR in its many-to-many miscalibration test on KAIST. We reproduce this protocol exactly so our numbers are comparable.

The strongest existing method for miscalibration is GST from that same paper, which reports 33.02 dB PSNR many-to-many and 30.60 dB one-to-many on KAIST. We run the released protocol with identical training data (CAVE), test scenes (KAIST), and mask perturbation distributions. Beating it means exceeding 33.02 dB in the many-to-many setting. It also means a larger margin when the test perturbations include dispersion offsets and mask shifts outside the training distribution, because self-calibration should not depend on the training perturbation distribution matching reality.

A second strong competitor is DAUHST trained with mask and dispersion randomization, which is the domain-randomization answer. It receives the same perturbation families our estimator models and the same training compute as GST.

For real device heterogeneity on SSHD, the competitor is FedHP. The file reports only its margin over federated averaging (0.35 to 0.5 dB PSNR), not an absolute value, so we rerun it on the same splits. We report it centrally as well as federated, since our method needs no training on the target device.

Three ablations isolate the key ingredient, holding the estimator, optimizer, iteration budget, and initialization fixed. The first is a global rank-$K$ subspace with free coefficients, with $K$ matched to the total bundle dimension. The second is a single fixed spectrum per material with no bundles and no shading, which is the PSR-SCI-style assumption. The third is a deep-prior-only scene in which the scene is the unfolding network's output and no material model is used.

Why not just…?

Why not just randomize masks and dispersion during training? Randomization teaches a network to average over plausible cameras, not to find the one in front of it. The TSA-Net collapse and GST's gains in Modeling Mask Uncertainty show that unstructured robustness is not enough even within the training distribution. This is still a fair competitor when the test errors lie inside the randomized range. Our out-of-range perturbation test is where we expect self-calibration to separate from randomization. If randomization matches us there too, the calibration story is weakened and we will say so.

Why not just use a higher-rank spectral subspace instead of material bundles? This is the most serious objection, because a rank-$K$ subspace can represent the same spectra. The identity in the Core Claim says this objection fails for a specific reason. Free per-pixel coefficients include per-pixel gain, so mask amplitude error becomes invisible. The equal-dimension subspace ablation and the Jacobian analysis test this directly. If the subspace model calibrates as well as bundles once the shading penalty is added to it, then the contribution is the shading constraint rather than the material structure, and we will report it that way.

Why not just self-calibrate through a pretrained deep reconstruction network, with no explicit scene model? A learned prior trained on CAVE may already reject mask-textured scenes, which would make explicit bundles unnecessary. This is a real threat. It is the deep-prior-only ablation, run with the same calibration loop. We expect it to break down mainly in the variability stress test and on real scenes whose materials lie outside CAVE's indoor objects. On those scenes the network's notion of a plausible scene has no physical grounding.

Why not just fine-tune on a few real captures? Real snapshot cameras provide no ground-truth cubes. Per-device fine-tuning is also exactly what FedHP found to drift across heterogeneous hardware. Our method uses no real training data, so it complements fine-tuning rather than competing with it.

Proposed Experiments

On simulated KAIST measurements, we report PSNR, SSIM, and spectral angle under the GST many-to-many and one-to-many protocols, along with an extended protocol adding dispersion offsets, mask translation, and per-band blur. Because $\theta$ is known in simulation, we also report calibration error. On SSHD, we report PSNR against FedHP and GST using each device's real fabricated mask. On real SD-CASSI captures, where no ground truth exists, we report reconstructions only qualitatively. We add two quantitative proxies: sensor-pixel holdout prediction error, and agreement with spectrometer readings at a few points where available. The file contains no quantitative real-hardware numbers from prior work, so these comparisons are rerun by us.

Three checks decide whether the claim holds. First, the Jacobian analysis must show the predicted null direction for free-gain models and its removal under bundles with smooth shading. Second, in the graded variability stress test, calibration error for the single-spectrum model must grow with variability while the bundle model stays flat. Third, the bundle model must beat the matched-dimension subspace ablation and the deep-prior-only ablation on calibration error, not just PSNR. If the third check fails, the paper becomes an identifiability analysis plus a shading-regularized calibrator. That is still useful, but it is a smaller claim than the one proposed here.