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

Self-Aligning Computational Spectrometers via Calibration Autofocus

Small, cheap spectrometers save space by letting software do the optics. A phone clip-on, a coded-mask spectrometer, or a filter-array chip records a deliberately blurred or scrambled image of the light. An algorithm then inverts a stored calibration, the "system matrix" that says how each wavelength lands on the sensor, to recover a sharp spectrum. The weakness is that this calibration is measured once, in the lab. Afterwards the plastic clip flexes, the sensor warms up, or the grating tilts by a fraction of a degree. The stored matrix is then quietly wrong, and the inversion degrades. Radar engineers faced the same problem decades ago with synthetic aperture radar (SAR), where platform motion and steering angle smear and tilt the recorded signal. They solved it with autofocus: estimate a handful of distortion parameters from the data itself, correct for them, then form the image.

We propose to bring that discipline to miniature spectrometers. The method treats calibration drift as a low-dimensional geometric "migration" of the system matrix: a shift, a stretch of the dispersion, a shear between detector rows, and a widening of the blur. It estimates these few parameters blindly from each measurement, using the instrument's own built-in redundancy, and warps the stored matrix before inversion. The claim is specific about what is and is not recoverable without a reference. Parameters that change the shape of the measurement, or that break consistency between redundant channels, can be estimated from ordinary measurements. A global wavelength offset cannot, because a shifted instrument and a shifted source look identical. That offset needs one physical fiducial. The result is a design rule as well as an algorithm: build a little redundancy into the hardware, and the device can recalibrate itself in the field.

What prior work does and leaves open

The motivating evidence comes from miniature instruments that already fail this way. The smartphone computational slit of Enhanced Smartphone Spectroscopy via High-throughput Computational Slit replaces the narrow slit with a 105 µm fiber and deconvolves the blur. This improves resolution from more than 25 nm to about 10 nm and resolves the Hg doublet at 404.66/407.76 nm. Its authors note that flexing or shifting of the 3D-printed mount invalidates the deconvolution kernel. The Multiple order coded aperture spectrometer folds three diffraction orders onto adjacent detector rows, inverts them with Richardson–Lucy expectation-maximization, and reports 0.25 nm sampling over 350–800 nm. It also shows spurious "ghost" peaks beside narrow lines, which the authors attribute to the reconstruction algorithm. The palm-sized spectrometer in Ultra-portable, wireless smartphone spectrometer for rapid, non-destructive testing of fruit ripeness uses a factory 5th-order polynomial pixel-to-wavelength map with no adaptation to temperature or shock. All three assume the calibration is static. We relax exactly that assumption.

The closest bridge between the two directions is Multimodal multiplex Raman spectroscopy optimized for in vivo chemometrics. It remaps pixels to wavenumber for eight excitation lasers, using an acetaminophen standard measured offline, then shift-and-sums the channels. This cut ethanol prediction error from 39.1 to 9.2 mmol/L. That paper shows coordinate alignment across redundant channels pays off. Its alignment, however, comes from a reference chemical, not from the data. Our proposal differs in two ways: the alignment is estimated blindly from each measurement, and it is applied to the calibration matrix rather than to the reconstructed spectrum.

Three radar papers supply the method. Modified Auto-Focusing Algorithm for High Squint Diving SAR Imaging Based on the Back-Projection Algorithm with Spectrum Alignment and Truncation aligns spectrum centers and truncates out-of-band energy using only the data. It improves a target's peak-sidelobe ratio from about −2.7 dB to −13.16 dB at roughly 2.8% extra computation. This is evidence that a cheap, data-driven alignment step before the main inversion can dominate final quality. Azimuth Multichannel Reconstruction Based on Advanced Hyperbolic Range Equation removes spectrum tilt before combining channels and re-applies it afterwards. This is the template for our "warp the matrix, invert, report in canonical coordinates" step. Generalized Dechirp-Keystone Transform for Radar High-Speed Maneuvering Target Detection and Localization first separates coupled distortions and then corrects each one. Its transform matches maximum-likelihood noise performance, while a simpler variant loses about 13 dB. That result constrains our design: estimating coupled drift parameters jointly but naively is expected to be worse than separating them.

Core Claim

Let $y$ be the raw sensor measurement, $x$ the unknown spectrum, and $A_0$ the factory system matrix. We model drift as $y = A(\theta)x + n$. Here $A(\theta)$ is $A_0$ resampled under a warp with parameters $\theta$: a global offset $\delta$, a dispersion stretch $s$, an inter-row shear $\kappa$, and a blur-width change $\sigma$. The term $n$ is noise. Each measurement is reconstructed by

$$ \hat{x},\hat{\theta} = \arg\min_{x \ge 0,\ \theta} \; \|y - A(\theta)x\|^2 + \lambda R(x) + \mu \sum_{i<j} \|x_i(\theta) - x_j(\theta)\|^2 , $$

In this objective, $R$ is a sparsity-plus-smoothness penalty of the hybrid kind used in Miniature computational spectrometer with a plasmonic nanoparticles-in-cavity microfilter array. The vectors $x_i$ are spectra reconstructed separately from redundant channel $i$ (a diffraction order, or an excitation wavelength). The last term penalizes disagreement between channels. The weights $\lambda$ and $\mu$ balance the terms.

The identifiability statement is the substantive part. The parameters $s$, $\kappa$ and $\sigma$ change the structure of $y$, or make redundant channels disagree, so they can be estimated without any reference. The offset $\delta$ is confounded with a shift of $x$ and needs one fiducial. Candidates are the zero-order spot, the position of the coded-mask pattern on the detector (which does not depend on wavelength), or a laser line in Raman use.

We also make a falsifiable secondary claim. Part of the ghost-peak artifact in multi-order coded-aperture spectrometers comes from uncorrected inter-order shear, not from expectation-maximization itself.

Research Program

We build two drift testbeds and one estimator.

The first testbed reproduces the high-throughput computational slit clip-on. It is a single channel, so it tests the shape parameters together with a zero-order fiducial.

The second reproduces a three-order coded-aperture spectrometer. Its redundant orders provide the cross-channel consistency term.

Both are mounted in a thermal chamber covering roughly 10–45 °C and on a micrometer stage that applies controlled tilt and translation of the dispersive element. We also include repeated mount–unmount cycles, which mimic real clip-on use. At every drift condition we take a fresh full HgAr calibration, which gives the ground truth $\theta$ and an oracle matrix.

The estimator alternates two steps. One is a coarse grid search over $\theta$ scored by an autofocus sharpness criterion. The other is a gradient refinement of the objective above, reusing the regularized solver for $x$. Because $\theta$ has only about four dimensions, the added cost should be small, as in the radar case. We will measure that cost on phone-class hardware rather than assume it.

Analysis has three parts. We fit how each physical perturbation projects onto $\theta$, which tests whether four parameters are enough. We check identifiability by recovering known injected warps on simulated data. We compare estimated $\hat\theta$ against the oracle-calibration $\theta$.

Baselines

The naive reference is the factory matrix $A_0$ used unchanged under drift. This is what Enhanced Smartphone Spectroscopy via High-throughput Computational Slit and the coded-aperture paper effectively do. It sets the floor and shows how large the problem is.

The upper bound is oracle recalibration: a fresh HgAr calibration at each condition, inverted with the same solver. At the reference condition this should reproduce the published numbers. These are about 10 nm FWHM with the doublet resolved for the computational slit (Enhanced Smartphone Spectroscopy via High-throughput Computational Slit) and 0.25 nm sampling for the coded aperture (Multiple order coded aperture spectrometer). We found no reported result on Lacuna for any computational miniature spectrometer evaluated under controlled thermal or mechanical drift. The drifted numbers will therefore be new measurements on our testbeds.

The strongest practical competitor is a drift-augmented end-to-end network, in the spirit of the multilayer perceptron in Nonlinear Self-Calibrated Spectrometer with Single GeSe-InSe Heterojunction Device. It is trained on the calibration-condition data with synthetic warps of $A_0$ applied, and evaluated on real drifted data. To keep the comparison fair, it receives the same calibration sources, the same fiducial channel as an input, and a hyperparameter search budget matched in GPU-hours to our tuning of $\lambda$, $\mu$ and the grid. We found no reported result on Lacuna for a drift-augmented network on these instruments.

A second competitor is rigid registration. It cross-correlates the raw frame, or the mask image, against the stored calibration frame, and corrects translation only.

Two ablations isolate our ingredients. The first restricts $\theta$ to the offset $\delta$, which tests whether the shape parameters matter. The second removes the cross-channel term ($\mu = 0$), which tests whether redundancy is what makes blind estimation work.

We count the method as beating these baselines if it does three things on held-out drift conditions. It must close at least 80% of the gap between naive and oracle in line-center error and FWHM. It must keep the Hg doublet resolved where the naive pipeline loses it. It must beat the augmented network on drift magnitudes outside the network's augmentation range.

Why not just…?

Why not just recalibrate with a reference lamp whenever needed? In a lab, this is the right answer, and it is our oracle. The point of a phone or field spectrometer is that no HgAr lamp or acetaminophen standard travels with it. The multiplex Raman work needed exactly such an offline standard (Multimodal multiplex Raman spectroscopy optimized for in vivo chemometrics). Our method keeps one cheap built-in fiducial for the offset and removes everything else. If users will tolerate frequent lamp recalibration, the proposal's value shrinks to convenience. We say so plainly.

Why not just train a network on augmented drifted data? This is the real threat. With enough simulated warps, a network may match us inside its training range. The file's evidence against black-box models is indirect. The single-device network needed about $4\times10^6$ parameters and a large physical calibration set (Nonlinear Self-Calibrated Spectrometer with Single GeSe-InSe Heterojunction Device). Physics-constrained unmixing outperformed unconstrained models in Hyperspectral unmixing for Raman spectroscopy via physics-constrained autoencoders. The experiment that settles it is extrapolation: test both methods at drift magnitudes and spectral shapes beyond the augmentation range. If the network still wins there, we would adopt it with $\hat\theta$ as an input feature.

Why not just cross-correlate against a stored frame? That corrects translation only. The raw frame also depends on the unknown spectrum, so correlating against a frame of a different source is poorly posed for shear, stretch or blur change. The offset-only ablation measures what correction beyond translation buys. If the gain is negligible, the right conclusion is that a one-parameter fiducial shift suffices. That would be a cheaper and still useful result.

Proposed Experiments

The decisive checks are three.

First, a drift sweep. For both testbeds we report line-center error against HgAr and neon lines, FWHM, the dip depth between the 404.66/407.76 nm lines, and cosine similarity on broadband sources such as fluorescent lamps and LEDs, across temperature and tilt. All baselines above are included.

Second, a ghost-peak test on the coded-aperture testbed. We measure ghost amplitude relative to the main peak under four conditions: factory matrix, oracle matrix, and our estimate, each with Richardson–Lucy, plus our estimate with the regularized solver. If ghosts persist with the oracle matrix and Richardson–Lucy, the original attribution to the algorithm stands and our secondary claim is refuted. If ghosts shrink with corrected shear under the same solver, migration is implicated.

Third, an identifiability check. We hold the instrument fixed and shift the source by known amounts using a tunable filter, to confirm that without the fiducial the offset is indeed unrecoverable while $s$, $\kappa$ and $\sigma$ are recovered. This guards against the method appearing to work by absorbing source changes into calibration changes.

Finally, we report runtime on a phone processor against the factory pipeline, to test whether the overhead stays as small as the radar precedent suggests.