Computational spectrometers shrink a lab instrument onto a chip. They do this by measuring a few hundred scrambled, overlapping filter responses and then computing the spectrum, rather than physically spreading light across a detector. The computation is underdetermined: many different spectra produce the same readings. A neural network fills in the missing part from what it learned in training, and it gives no signal of how much of the output is guessed. Error bars could be attached, but then the usual problem with uncertainty estimation appears. Nobody has ground-truth labels for how uncertain a prediction should be, so any error bar can only be judged with a reference instrument in the lab. In the field, after the device has drifted, no such reference exists.
This note proposes a way out that only a physical measuring device allows. We deliberately reserve a small set of the spectrometer's own filters as witness channels: real optical channels that the reconstruction never sees. Any predicted distribution over spectra implies a predicted distribution over what each witness filter should read. The witness filter then actually reads something. That reading is an observed, per-measurement target for scoring the uncertainty, with no reference spectrometer and no human labels. The central idea is that redundant hardware turns a hidden quantity, the spectrometer's uncertainty, into something that can be measured at test time. This changes what a compact spectrometer should be designed to measure.
Core Claim
Write the device as $y = Ax + n$. Here $x$ is the incident spectrum with $N$ wavelength bins, $A$ is the $M \times N$ matrix of filter transmission curves with $M \ll N$, and $n$ is sensor noise. Split the filters into a reconstruction set $A_r$ and a witness set $A_w$. A probabilistic reconstructor sees only $y_r = A_r x + n_r$ and outputs a distribution $q(x \mid y_r)$. It is scored by the proper scoring rule
$$S = -\log \int p\left(y_w \mid A_w x\right)\, q(x \mid y_r)\, dx ,$$
where $y_w$ are the actual witness readings and $p(y_w \mid A_w x)$ is the known sensor noise model. Two properties make this score useful. First, it is computed per measurement, from data the device collects anyway. Second, wherever the witness filters have components outside the span of $A_r$, they directly probe the reconstructor's null space. The null space is the set of spectral directions the reconstruction filters cannot see at all, so it is exactly where hallucinated features live. A cheaper alternative check, data consistency, measures how well the reconstruction re-predicts $y_r$, and it is blind there by construction. Our claim is twofold. Witness scores track true calibration, meaning the calibration measured against a reference spectrometer, closely enough to replace it for model selection and for detecting drift. And spending a few percent of the filters as witnesses costs little reconstruction accuracy compared with what it buys in verifiable uncertainty.
The method has a stated limit. Witnesses certify calibration only along the directions they span. A model could be well calibrated along those directions and miscalibrated in directions orthogonal to every witness. The research program therefore treats witness selection as a design variable, and it checks the gap against reference-spectrometer ground truth instead of assuming it away.
How This Relates to Prior Work
The motivating gap appears in three reconstruction lines in the file. MST++ is a transformer that recovers 31 bands from RGB images and won the NTIRE 2022 challenge. It is purely deterministic, and the challenge's "out-of-scope" studio-lit test showed that every leading model degraded with no way of flagging it. The GeSe-InSe single-device spectrometer maps 101 bias-voltage photocurrents to a spectrum with an MLP and gives no confidence bands, even though 2D materials drift with temperature and oxidation. The plasmonic nanoparticles-in-cavity microfilter array has over 1,000 distinct filters. That redundancy is exactly what makes witness channels cheap, yet the device reports only point reconstructions, and the authors note accuracy losses on noisier smartphone sensors.
Two papers supply method and also mark the boundary of novelty. Modeling Mask Uncertainty treats the coded-aperture mask as a random variable to make reconstruction robust to miscalibration. Its uncertainty sits on the input hardware, and its outputs remain point estimates. Our uncertainty is on the output spectrum, and it is validated by hardware readings. Range-Null decomposition for MRI constrains a network to update only the null-space component, $x = A^\dagger y + (I - A^\dagger A)\mathcal{H}_\theta(x)$, which guarantees data consistency. We reuse this split: deterministic range component plus sampled null-space completion is one of our reconstructors. That paper leaves null-space uncertainty unquantified, and witnesses are the tool for checking it.
On the uncertainty side, Valdenegro-Toro documents that vision benchmarks lack uncertainty ground truth, which motivates this work. ModelNet40-E builds ground truth by simulating sensor physics with known noise parameters. Our simulated experiments follow that recipe, but witnesses carry the idea onto real hardware, where the simulator's parameters are unknown. Pignet et al. prove that some label-based metrics are maximized by the true misclassification probability. Our score is the regression analogue in spirit, but it is defined on observed physical projections rather than on correctness labels. Bench et al. found that local calibration (expected normalized calibration error) exposed regression failures that global metrics hid, and that all methods degraded under domain shift. That finding constrains our evaluation: we must report local calibration, not just a global average.
Research Program
The work has three parts.
The first part builds probabilistic reconstructors that output samples of $x$. We use three families:
- a deep ensemble of MST++-style networks;
- MC-dropout versions of the same networks;
- a range-null reconstructor whose null-space completion comes from a conditional generator (a network that samples plausible spectra consistent with $y_r$), with range-space uncertainty propagated analytically from the known noise model.
The second part studies witness design. This means how many filters to reserve, out of $M$, and which ones. We compare random witnesses, witnesses chosen to have the largest component outside the span of $A_r$, and witnesses chosen where the population-average posterior variance is largest. Selection uses only training data, so the witness scores at test time stay unbiased. Random witnesses have a clean interpretation: averaged over random projections, the score estimates calibration of the full predictive covariance weighted by the projection distribution. We test whether targeted witnesses close the orthogonal-direction gap better than random ones.
The third part turns witness scores into operations. Witness residuals feed online conformal recalibration, which inflates or shrinks intervals using observed witness errors and needs no labeled spectra. The same residuals drive a drift and out-of-distribution alarm.
Baselines
The naive reference point is the deterministic reconstructor with no uncertainty, which is MST++ retrained on our filter configurations. Its anchor is the file's reported ARAD_1K test numbers: MRAE 0.1131 and RMSE 0.02308 from the NTIRE 2022 report, and PSNR 34.32 dB from MST++. These are for RGB input. For filter-array configurations we report our own retrained numbers. Beating it here means matching its accuracy within 0.5 dB PSNR while adding verifiable intervals.
The strongest existing uncertainty competitor is a deep ensemble with post-hoc recalibration fitted on a held-out labeled set, meaning spectra measured by a reference instrument. Bench et al. found ensembles with temperature scaling or isotonic regression among the best-calibrated methods. Their best classification figure was ECE 0.048 for MC dropout plus isotonic regression on photoplethysmography, a different domain, so it is not directly comparable. We found no reported result on Lacuna for calibrated uncertainty in spectral reconstruction on ARAD_1K, KAIST, or any filter-array device.
All methods get the same training spectra, the same total filter count, the same backbone, and an equal hyperparameter search budget. Labeled recalibration gets a calibration set drawn from the pre-drift device, which is what a practitioner would realistically have. Witness recalibration counts as beating it if, after drift, it achieves lower local calibration error (expected normalized calibration error) and interval coverage closer to nominal.
For robustness under hardware miscalibration we include GST, which reports 33.02 dB PSNR under many-to-many mask miscalibration on KAIST, as the accuracy-robustness reference.
The ablation that isolates the key ingredient compares witnesses against the data-consistency residual $\|y_r - A_r\hat{x}\|$ used as the uncertainty and drift signal, with the reconstructor held fixed. A second ablation folds the witness filters back into reconstruction, giving an accuracy upper bound that measures what reserving them costs.
Why not just…?
Why not just calibrate against a reference spectrometer? In the lab this is the gold standard, and we use it as the referee for every claim. It fails in deployment. The devices this targets are smartphone, 2D-material, and deep-sea instruments that drift after calibration, and Modeling Mask Uncertainty shows reconstruction fidelity collapses under small hardware changes (TSA-Net fell to 21.42 dB under many-to-many miscalibration). A recalibration set collected before drift is the wrong distribution afterward. The decisive comparison is the drift experiment below.
Why not just use the measurement residual as the uncertainty? The residual only sees errors in directions the reconstruction filters already measure. For a range-null reconstructor it is zero by construction, and a hallucinated peak in the null space leaves it unchanged. This is a real threat only if, for the actual filter curves, most reconstruction error falls in the range of $A_r$. The residual ablation measures exactly that. If the residual matches witnesses at detecting drift, we would report that the null space is not where errors live for this hardware and narrow the claim.
Why not just use split conformal prediction on validation spectra? Conformal coverage requires the test data to be exchangeable with the labeled calibration data, and drift breaks that. Witnesses are complementary rather than competing: they supply post-drift labels for conformal recalibration along the witness projections. The open question is whether coverage along witness directions carries over to coverage of the full spectrum. We measure that directly against reference spectra.
Proposed Experiments
The simulation study uses ARAD_1K hyperspectral cubes (31 bands, 400–700 nm) as the source of spectra. These cubes pass through simulated filter-array spectrometers with $M$ between 64 and 1,024 multi-peaked transmission curves, shaped like the cavity filters in the microfilter array paper, plus shot and read noise. The cubes also pass through KAIST scenes under the CASSI mask forward model. Because the true spectra are known, we can compute reference calibration exactly.
The first decisive check is whether witness scores rank methods and checkpoints the same way true local calibration does. We measure this with Spearman correlation across roughly 50 model variants, including deliberately over- and under-dispersed ones. If the correlation is high for targeted witnesses and low for the residual, the core claim holds.
The second check introduces controlled drift: filter peak shifts that mimic temperature effects, gain changes, and the many-to-many mask perturbation protocol from GST. We also include an illumination shift modeled on NTIRE's out-of-scope studio set. We report drift-detection AUROC for witness residuals versus data-consistency residuals versus ensemble variance, plus post-drift coverage after witness-based versus pre-drift labeled recalibration.
The third check traces the design trade-off. We plot reconstruction RMSE and certification power against witness fraction, from 1% to 20%. The goal is to find whether a few percent of witnesses costs under 0.5 dB while catching most drift.
Finally, we run a hardware validation on a filter-array CMOS spectrometer with a benchtop reference, using LED and laser sources and metameric pairs. We heat the device to induce real drift and test whether the witness-certified intervals still cover the reference spectrum at the nominal rate.
The proposal fails if any of three things happen. Witness scores could disagree with reference calibration. The residual could do equally well. Or calibration along witness directions could leave large miscalibration in the orthogonal directions that no feasible witness set covers.
References
- MST++: Multi-stage Spectral-wise Transformer for Efficient Spectral Reconstruction
- NTIRE 2022 Spectral Recovery Challenge and Data Set
- Nonlinear self-calibrated spectrometer with single GeSe-InSe heterojunction device
- Miniature computational spectrometer with a plasmonic nanoparticles-in-cavity microfilter array
- Modeling Mask Uncertainty in Hyperspectral Image Reconstruction
- Null Space Matters: Range-Null Decomposition for Consistent Multi-Contrast MRI Reconstruction
- I Find Your Lack of Uncertainty in Computer Vision Disturbing
- ModelNet40-E: An Uncertainty-Aware Benchmark for Point Cloud Classification
- Legitimate ground-truth-free metrics for deep uncertainty classification scoring
- A systematic evaluation of uncertainty quantification techniques in deep learning: a case study in photoplethysmography signal analysis