Extended Likelihood Fits for Trace Gas Detection Under Sensor Drift

Chemical sensor arrays (electronic noses) are good at registering that something changed in the air, but bad at telling one gas from another. They are worse still once their response drifts over months of use. The usual fix is a classifier retrained on fresh labeled samples, which field deployments rarely have. Particle physicists face a structurally similar problem when searching for rare decays. A few signal events hide among many background events, the detector response is only approximately known, and the answer must come with an honest error bar. Their standard tool is the unbinned extended maximum likelihood fit: each event's measured features are scored against a probability model for every possible source, and the fit estimates how many events each source contributed. The total count is itself treated as a random, Poisson-distributed number.

We propose to treat a window of unlabeled e-nose measurements as a physics dataset. Each measurement is an event. Target gas, interfering gases, and clean air are the fitted components. Sensor drift enters as a small set of smooth, physically constrained "nuisance" parameters that deform the calibrated response model and are fitted from the same unlabeled window. The output is not a class label per sample. It is an estimated number of target-gas exposures in the window, a confidence interval, and a discovery significance with a controlled false-alarm rate. The core claim is that fitting drift on unlabeled data inside such a likelihood gives calibrated trace-detection statements where discriminative drift compensation cannot. If the drift model is adequate, those statements should also be more sensitive to a rare target than classifying samples and counting positives.

What Is and Is Not New

Unbinned likelihood fits recover information that hard cuts throw away. The CLEO search for τ → μγ (Update of the search for the neutrinoless decay τ → μ γ) fits the two-dimensional (ΔE, Δm) distribution instead of counting inside a box. It reaches 15.2% signal efficiency and a limit of 1.0×10⁻⁶ on 1.8 fitted events. The B⁺ → ωK⁺ analysis combines mass, energy, and an event-shape discriminant in one multivariable fit. The BASiL method in on/off gamma-ray measurements replaces cuts with per-event likelihoods and reports 15–20% better precision at 10% signal-to-noise. These papers supply the method.

Two instrument papers supply the idea of folding detector behavior into the likelihood. PandaX-II fits light and charge yields with detector-efficiency parameters, which is the model for our drift nuisance. The single-photon lidar work derives joint likelihoods that include dead time and pile-up, showing that nonideal sensor physics can live inside the likelihood rather than being corrected afterwards. None of these touch cross-reactive chemical sensors, and all assume a stationary or externally calibrated response.

On the sensor side, drift is handled discriminatively. The context+skill network uses a recurrent pathway over past batches and reaches 88.2% mean accuracy on the Vergara 36-month drift dataset. That compares with 86.9% for a plain network and 76.4% for an SVM ensemble. On the most drifted batch 10, its companion paper reports 0.764 versus 0.693. These results motivate our work: they show drift is severe. They also constrain it, because they set the accuracy bar and rely on labeled history. Online domain-adaptive extreme learning machines reduce but do not remove the need for labeled target samples, and output no uncertainty. Reviews of e-nose recognition and selectivity enhancement (Advancements and Strategies for Selectivity Enhancement in Chemiresistive Gas Sensors) name the lack of rigorous statistical signal extraction as an open problem.

We do not claim that a mixture model over sensor features is new. An extended likelihood with free component shapes is a Gaussian mixture with Poisson-distributed yields. The new part is threefold. First, drift is represented as a low-dimensional, time-smooth deformation of calibrated component densities and profiled from unlabeled data. Second, the analysis asks a rare-analyte discovery question with frequentist coverage. Third, we test directly whether this beats classify-and-count and discriminative drift adaptation on the question that matters in the field: is the target present in this window, and how often?

Core Model

Let a monitoring window contain $N$ measurements with feature vectors $x_i$. Component $j$ has calibrated density $P_j(x \mid \phi)$ and expected yield $\nu_j$, with $\nu=\sum_j \nu_j$. The components are target, each interferent, and clean-air baseline. Here $\phi$ are drift nuisance parameters and $t$ is time since calibration. The fit maximizes

$$\mathcal{L}(\nu,\phi)=\frac{\nu^{N}e^{-\nu}}{N!}\prod_{i=1}^{N}\sum_j \frac{\nu_j}{\nu}\,P_j\big(x_i \mid \phi\big)\;\cdot\;\pi(\phi \mid t).$$

The densities $P_j$ are learned once on a labeled calibration batch. We use per-sensor Gaussian mixtures in a reduced feature space as the default, with a normalizing-flow variant as a misspecification check. The drift enters as a per-sensor gain and baseline offset applied to the features. Metal-oxide aging mostly rescales and shifts responses, so this is a physically plausible deformation. The prior $\pi(\phi \mid t)$ ties those parameters to their values in the previous window through a random walk. That prior is the only place temporal context enters, and it needs no labels.

Discovery uses the one-sided profile likelihood ratio for the target yield $\nu_s$, bounded at zero:

$$q_0=-2\ln\frac{\max_{\phi,\nu_{b}}\mathcal{L}(\nu_s=0,\nu_b,\phi)}{\max_{\nu_s\ge 0,\phi,\nu_b}\mathcal{L}(\nu_s,\nu_b,\phi)}.$$

Asymptotically $\sqrt{q_0}$ is the significance, a result that comes from Wilks-type behavior of likelihood ratios. Because asymptotics are doubtful at a handful of target events, all significances and intervals will be calibrated with pseudo-experiments. These are resampled from held-out real measurements, not generated from the fitted model.

Research Program

We first build the calibration stage. It learns component densities from batch 1 of the Vergara dataset, or batches 1–2 as a variant, using its six gases and 128 features. We then build the fitting stage. It runs on sliding windows of later batches with every label hidden, profiling drift and yields.

To create a trace-detection task, we choose one gas as the target, repeated for each of the six gases in turn. In each later batch we subsample so the target makes up a controlled fraction of the window, from zero up to about 5%. The remaining gases serve as interferents at their natural proportions. This turns the drift benchmark into a rare-signal search with known ground truth.

Three analyses follow. First, calibration: across many pseudo-windows, do the 90% intervals on target yield cover the truth about 90% of the time in every batch, including batch 10? When the target is absent, does the false-discovery rate at a fixed $q_0$ threshold match its nominal value? Second, sensitivity: what is the smallest target fraction that gives a median 3σ discovery, compared with baselines at the same false-alarm rate? Third, as a secondary result for comparability, we assign each event its most probable component after the fit and report per-sample accuracy against the published numbers.

The QCM nano-nose data serve a different purpose. That set has 108 points, with 3–12 calibration points per analyte. It tests whether parametric component densities survive very small calibration sets, where that paper finds neural networks fail and linear SVD succeeds. There we fit concentration as a shape parameter and compare against its reported Gaussian process regression result. The QCM set has no drift and no natural event stream, so it tests only the calibration stage.

Baselines

The naive reference is classify-and-count. An SVM or small network is trained on batch 1 and applied unchanged to later windows. The number of samples labeled "target" is reported, with a Poisson interval on that count. This is what a deployed e-nose effectively does today. A stronger naive variant, adjusted classify-and-count, corrects the count using the batch-1 confusion matrix. It will be run on identical windows with the same features. If it matches our sensitivity and coverage, the likelihood machinery is not earning its cost.

The strongest existing method on this dataset is the context+skill network. It reports 88.2% mean accuracy across test batches and 0.764 on batch 10 (companion paper). It is the strongest competitor because it is the best published drift handler on Vergara. It will be run twice. The first run is its published protocol with labeled history, where we compare accuracy only and treat 88.2% and 0.764 as the numbers to approach. The second run is label-restricted: context comes from unlabeled feature sequences only, so it sees exactly what our fit sees. On the trace task, its predicted-target counts become a count-based estimate. Beating it means lower false-discovery rate at matched discovery power and nominal coverage in the label-restricted setting. It does not require exceeding 88.2% accuracy, which we do not claim.

ODAELM is included as the online domain-adaptation competitor. It gets the same small labeled-sample budget per batch that its active-sampling scheme requests. No per-batch accuracy numbers were found on Lacuna for ODAELM, so we will reproduce it rather than quote it.

The key ablations remove one ingredient at a time. The first is our fit with drift parameters frozen at calibration values, which isolates the drift nuisance. The second is a free per-window Gaussian mixture refit, which isolates the physical constraint on drift. The third is a template fit on a one-dimensional classifier score, in the style of the discriminant-then-fit approach in EXO-200; this isolates the value of fitting the full feature space. A fourth run fixes $N$, dropping the Poisson term; we expect it to matter only when the reported quantity is an absolute exposure rate rather than a fraction.

Why not just…?

Why not just fit a Gaussian mixture with expectation-maximization on each new batch? Mathematically this is our model without the drift constraint and without the inference layer. The risk is that a free refit lets a component slide onto an interferent, relabeling components or absorbing a rare target into the background. We expect this failure to be most visible exactly when the target is rare. The unconstrained-refit ablation tests this directly. If it matches the constrained fit on coverage and sensitivity, the honest conclusion is that the contribution is only the discovery statistics, and we will say so.

Why not just classify each sample and correct the count with a confusion matrix? This is the most serious threat, because adjusted counting is cheap and often works. Its weakness is that the confusion matrix is estimated at calibration time and goes stale under drift. It also discards the soft information in how target-like a sample is, the same information BASiL showed is worth 15–20% precision (BASiL). Our head-to-head comparison at matched false-alarm rates on drifted batches settles whether that gap exists here.

Why not just use a drift-adaptive classifier like context+skill? Its published accuracy is high, but it needs labeled history (context+skill) and returns no calibrated interval on how much target is present. The label-restricted rerun shows how much of its advantage survives without labels. The coverage test shows whether its counts can support a false-alarm guarantee at all.

Why not just engineer a more selective coating? Zeolite sieves separate hydrocarbons by molecular size (zeolite-modified SnO₂), but they cannot separate similarly sized molecules. Reviewed material strategies also suffer reproducibility and stability problems (selectivity review). Better materials sharpen the component densities and would make our fit stronger, so the two approaches are complementary rather than competing.

Decisive Checks

The proposal succeeds if three things hold on Vergara batches 3–10 with no labels after calibration. Our 90% intervals keep near-nominal coverage while the frozen-drift fit and adjusted counting lose coverage as drift grows. The null false-discovery rate stays at its nominal value. The minimum detectable target fraction at 3σ is clearly lower than adjusted classify-and-count at the same false-alarm rate.

The proposal fails informatively in either of two ways. Coverage may break even with drift profiling, which would mean the gain-and-offset drift model is misspecified; we then compare against the flow-based densities to see whether richer shapes repair it. Alternatively, the one-dimensional score template may match the full-feature fit, which would mean the value lies in drift profiling and inference, not in unbinned multivariate densities. Either outcome tells practitioners something concrete about whether physics-style likelihood fits belong in chemical sensing.

References

  1. Update of the search for the neutrinoless decay<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:mrow><mml:mover><mml:mrow><mml:mi>τ</mml:mi></mml:mrow><mml:mrow><mml:mo>→</mml:mo></mml:mrow></mml:mover></mml:mrow></mml:mrow><mml:mi>μ</mml:mi><mml:mi>γ</mml:mi></mml:math>
  2. Observation of<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="italic">B</mml:mi></mml:mrow><mml:mrow><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow><mml:mo>→</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="italic">ω</mml:mi><mml:mi mathvariant="italic">K</mml:mi></mml:mrow><mml:mrow><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math>and Search for Related<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mi mathvariant="italic">B</mml:mi></mml:math>Decays Modes
  3. Signal estimation in on/off measurements including event-by-event variables
  4. Determination of responses of liquid xenon to low energy electron and nuclear recoils using a PandaX-II detector *
  5. Free-running vs Synchronous: Single-Photon Lidar for High-flux 3D Imaging
  6. Using context to make gas classifiers robust to sensor drift
  7. Using Context to Adapt to Sensor Drift
  8. Online Sensor Drift Compensation for E-Nose Systems Using Domain Adaptation and Extreme Learning Machine
  9. Gas Recognition in E-Nose System: A Review
  10. Advancements and Strategies for Selectivity Enhancement in Chemiresistive Gas Sensors
  11. Data-driven modeling of nano-nose gas sensor arrays
  12. Search for Neutrinoless Double-<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:mi>β</mml:mi></mml:mrow></mml:math>Decay with the Complete EXO-200 Dataset
  13. Hydrocarbon detection with metal oxide semiconducting gas sensors modified by overlayer or admixture of zeolites Na-A, H-Y and H-ZSM-5