Choosing the Latent Dimension That Keeps Fault Alarms Honest

Machine health monitors usually work in three steps. An encoder compresses vibration or sensor data into a few numbers, called the latent representation. The monitor then measures how far those numbers have moved from their healthy values and raises an alarm when the distance passes a threshold. Real fault data is scarce, so the threshold and the size of the latent representation are tuned by hand on whatever data exists. Nobody can say how often the monitor will raise a false alarm over months of continuous operation.

This proposal has one main claim. The latent dimension should be chosen by checking whether the latent signal is "Markov enough", meaning its next value depends only on its current value and not on older history. That condition decides whether a sequential test can promise, with a proof, at most a $\delta$ probability of ever raising a false alarm. Once the condition holds, adding more dimensions only slows detection. If this is right, the latent dimension changes from a grid-searched setting into a quantity that can be checked using healthy data alone, which is the only data most plants actually have.

Core Claim

Time-uniform confidence sequences are intervals or spheres that remain valid no matter when one looks or stops. Time-Uniform Confidence Spheres for Means of Random Vectors builds them for random vectors using nonnegative supermartingales, which are running products that do not grow on average, together with Ville's inequality. The guarantee needs the observed vectors to form a martingale difference sequence: each vector must have zero mean given the past. Under sub-Gaussian tails the sphere's radius depends only on the trace and operator norm of the covariance, not on the dimension. That paper works with synthetic vectors.

Raw latent features from a machine that wears down continuously are strongly autocorrelated, so they violate this requirement. The fix proposed here is to monitor innovations rather than raw features. Innovations are the one-step-ahead prediction errors of a small model of latent dynamics fitted to healthy runs. Let $z_t \in \mathbb{R}^d$ be the latent vector at window $t$. Let $\hat z_t = g(z_{t-1})$ be the prediction of a one-step dynamics model $g$. Define the innovation $r_t = z_t - \hat z_t$ and the running sum $S_t=\sum_{s\le t} r_s$. The healthy null hypothesis is

$$ H_0:\ \mathbb{E}[r_t \mid \mathcal{F}_{t-1}] = 0 \ \text{ for all } t, $$

where $\mathcal{F}_{t-1}$ is everything observed up to window $t-1$. Under $H_0$, the sphere construction gives an alarm rule: alarm when $\|S_t\|$ leaves its confidence sphere. With probability at least $1-\delta$ this rule never fires on a healthy machine, at any horizon.

Whether $H_0$ holds depends on $d$, and two prior results predict how.

When $d$ is too small, compression destroys the Markov property. An Analysis of Model-Based Reinforcement Learning From Abstracted Observations proves that, for tabular state abstraction, the abstract transitions become history-dependent and leave a bias that never vanishes. Separately, Learning Reduced-Order Dynamics with Singularity via Latent-Augmented Neural Ordinary Differential Equations shows that projected trajectories cross in reduced phase space. At a crossing, a single state has conflicting velocities, so no one-step model $g$ can make $r_t$ unpredictable from history. In both cases the innovations keep a predictable component, and the false-alarm guarantee silently fails.

When $d$ is too large, the problems are different. The encoder starts memorizing sensor noise (Fengze Liu et al., Xavier‐Andoni Tibau et al.). The trace of the innovation covariance $\Sigma$ grows. If the innovations are heavier-tailed than Gaussian, which is plausible for impulsive vibration, the sub-$\psi$ version of the sphere radius grows explicitly with $d$.

A heuristic follows from setting the confidence radius, which grows like $\sqrt{t}$ up to logarithmic terms, equal to the drift $t\|\Delta\|$ that a fault adds to $S_t$:

$$ \text{delay} \;\approx\; \frac{\mathrm{tr}(\Sigma) + \|\Sigma\|_{op}\log(1/\delta)}{\|\Delta\|^2}. $$

Here $\Delta$ is the mean shift a fault induces in the innovations. The prediction is therefore a threshold followed by a slope. Below some dimension $d^\star$ the false-alarm guarantee is broken. Above $d^\star$, delay grows with $\mathrm{tr}(\Sigma)/\|\Delta\|^2$. The proposal is to pick $d^\star$, the smallest dimension at which the healthy innovations pass a test of the martingale-difference condition.

Research Program

The first component is an estimator of how much history dependence remains in the innovations; call it the history gain. On held-out healthy runs, fit a richer predictor of $r_t$ from the past $K$ latent vectors, for example a small recurrent network. Measure the fraction of innovation variance it explains beyond what a shuffled-history control explains. A history gain consistent with zero is the operational test of $H_0$. The history gain plays the role of the bias term $\eta_T$ from the abstraction paper, but for continuous neural latents rather than tabular states.

The second component is the monitor itself. It applies the confidence-sphere construction from Time-Uniform Confidence Spheres for Means of Random Vectors, assembled along the four-step recipe of A Unified Recipe for Deriving (Time-Uniform) PAC-Bayes Bounds, to the innovations. We will use the sub-Gaussian version when a tail diagnostic on healthy innovations supports it, and the sub-$\psi$ version otherwise.

The third component is a small theorem, which is the theoretical contribution. Suppose the conditional mean of $r_t$ is bounded by $\eta$ under healthy operation. Then the probability of a false alarm within horizon $T$ is at most $\delta$ plus a term governed by $\eta T$ relative to the confidence radius. This shows how far the guarantee degrades, and over what horizon, when $d<d^\star$.

The fourth component tests whether the type of added dimension matters. We will compare lifting dimensions in the latent-augmented style of LA-NODE, where extra latent coordinates evolve under their own dynamics, against simply widening the encoder bottleneck. Theorem 1 of the LA-NODE paper ties the minimum number of added dimensions to the rank of the conflicting velocities at a crossing. That suggests targeted augmentation reaches $d^\star$ at a smaller $\mathrm{tr}(\Sigma)$ than widening, and therefore detects faults faster.

Data scarcity shapes the whole design. Every quantity the method needs comes from healthy data only: the encoder, $g$, the history gain, $\Sigma$, and the tail diagnostic. Labeled faults are used only for evaluation.

Baselines

The do-nothing reference is the common practice of training an autoencoder on healthy data and flagging any window whose reconstruction error exceeds the 99th percentile of healthy windows. Its value here is to show how quickly its false alarms accumulate over long healthy horizons.

The closest existing method is the latent Mahalanobis monitor of Mahalanobis-Guided Latent OOD Detection for Hybrid RL-ES Control in Time-Varying Systems. It trains a VAE on healthy data, computes the Mahalanobis distance of each new latent vector, and switches at an empirically calibrated threshold. That paper reports healthy distances between 2 and 4 and drift distances of 5 to 6 at $L_{dim}=3$, with $L_{dim}=2$ breaking the Gaussian assumption. It reports no false-alarm rate or detection delay. We will run it with the same encoder, the same healthy calibration data, and its threshold set to match our method's empirical false-alarm rate on a calibration split. Beating it means a shorter detection delay at equal empirical false alarms, plus a false-alarm rate that stays below $\delta$ on long test horizons where the calibrated threshold drifts above it.

The strongest classical sequential competitor is a CUSUM change detector run on the same innovations, with its threshold chosen by simulation from healthy runs to match the false-alarm level. CUSUM, the cumulative-sum test, tracks the log-likelihood ratio and resets at zero.

For representation quality, the frozen DINO-trained ViT encoder of A Wavelet Transform and self-supervised learning-based framework for bearing fault diagnosis with limited labeled data serves as an alternative feature source; its embedding is projected to dimension $d$ by PCA. That paper reports 95.27% accuracy on CWRU and 89.33% on XJTU-SY with 1% labels, using KNN classification. These are classification accuracies, not detection results. No reported result was found on Lacuna for anytime false-alarm control or detection delay on CWRU, XJTU-SY, or LiU-ICE. For LiU-ICE, A fault diagnosis benchmark of technical systems with incomplete data — six solutions reports true detection rates "often exceeding 80-90%" for known faults. We will report true detection rate at matched false-alarm levels so the comparison is direct.

Two ablations isolate the key ingredients. The first applies the same confidence sphere to raw latent vectors instead of innovations, which tests whether whitening the dependence matters. The second selects $d$ by validation fault accuracy, which requires labels, instead of by history gain. All methods share encoder architecture, healthy training data, and an equal hyperparameter search budget.

Why not just…?

Why not just set a conformal threshold on healthy windows? Split conformal calibration promises the false-alarm rate per window under exchangeability, meaning the windows could be shuffled without changing their joint distribution. Autocorrelated degradation streams break exchangeability. Even when it holds, a per-window rate of $\alpha$ means a false alarm is almost certain over a long horizon. A Bonferroni-corrected version needs a horizon fixed in advance and becomes extremely conservative as the horizon grows, which is the stepped looseness the confidence-spheres paper reports for union-bound and doubling-trick baselines. Our long-horizon healthy runs measure this directly.

Why not just run CUSUM on the Mahalanobis score? This is a real threat. CUSUM is close to optimal when the healthy and faulty distributions are known. With innovations as input and a simulation-calibrated threshold, it may match our delay. If it does, the contribution narrows to the innovation construction and the history-gain criterion for $d$. Those parts are what make any sequential rule valid, CUSUM included. We will therefore run CUSUM at every $d$. The prediction that would undercut the claim is CUSUM keeping its calibrated false-alarm rate below $d^\star$, where our theory says the dependence it ignores should break it.

Why not just grid-search $d$ on validation accuracy? Grid search needs labeled faults, which are exactly what is scarce. Accuracy on known faults also says nothing about false alarms. The LiU-ICE results show that models tuned on limited fault records overfit to known fault magnitudes. The second ablation measures whether label-free history-gain selection matches or beats label-based selection on both detection delay and false alarms.

Why not just make $d$ large, since the sphere radius is dimension-free? The dimension-free result needs sub-Gaussian innovations and a bounded $\mathrm{tr}(\Sigma)$. Wide bottlenecks memorize noise, which inflates the trace, and heavy tails reintroduce explicit dependence on $d$. The delay-versus-$d$ curve above $d^\star$ tests this directly.

Proposed Experiments

XJTU-SY run-to-failure bearings are the main testbed, because their degradation is continuous. False alarms are measured on the early healthy part of each run, with healthy duration varied to emulate scarcity. Delay is measured from a degradation onset set by an independent vibration criterion. CWRU supplies healthy recordings at four motor loads, which tests whether $d^\star$ chosen at one load still controls false alarms at another, a question related to the domain shift studied in A Transfer Learning Framework with a One-Dimensional Deep Subdomain Adaptation Network for Bearing Fault Diagnosis under Different Working Conditions. LiU-ICE supplies real multisensor dependence, benign ambient shifts that make fixed thresholds misfire, and sensor faults. Simulated IPMSM and DES trajectories with injected parameter faults provide known trajectory crossings, so $d^\star$ can be checked against the LA-NODE rank bound.

The primary metrics are the empirical probability of any false alarm per healthy run, compared against the nominal $\delta$; detection delay; and true detection rate at matched false alarms.

The decisive check is the predicted shape of the curves. Plot empirical false-alarm probability against $d$: it should exceed $\delta$ below the history-gain threshold and sit at or below $\delta$ above it. Plot delay against $d$: above $d^\star$ it should track $\mathrm{tr}(\Sigma)/\|\Delta\|^2$. Three outcomes would falsify the claim. First, CUSUM or the calibrated Mahalanobis threshold keeps nominal false-alarm control below $d^\star$. Second, raw-latent spheres prove as reliable as innovation spheres. Third, the dimension picked by history gain is no better than the one picked by validation accuracy.