Nonstationary Linear Discriminant Analysis
- NSLDA is a family of methods that extends classical LDA to account for evolving class distributions through dynamic estimation techniques.
- The methodology employs state-space and exposure-indexed models to update class means, covariances, and discriminant directions over time.
- Empirical results highlight improved classification accuracy under drift, noise, and sparse data conditions compared to static LDA.
Nonstationary Linear Discriminant Analysis (NSLDA) denotes a class of discriminant methods in which the class-conditional distributions are allowed to evolve with time or another observed index variable, so the separating hyperplane is itself nonstationary. In the state-space formulation introduced in "A State-Space Approach to Nonstationary Discriminant Analysis" (Xie et al., 22 Aug 2025), NSLDA is the homoskedastic Gaussian special case of nonstationary discriminant analysis: class priors, class means, and the common covariance are indexed by time and estimated by smoothing, after which the usual LDA rule is applied at the target time. Closely related exposure-indexed formulations treat nonstationarity through a smoothly varying Bayes direction (Bao et al., 2022) or through a locally estimated discriminative subspace followed by LDA (Ouyang et al., 2024).
1. Formal statistical setting
The central departure from stationary LDA is that the class-conditional density is indexed by time or exposure. In the state-space NSLDA framework, the nonstationary Bayes classifier at time is defined through
with decision rule
Under a Gaussian model,
so the discriminant takes the standard quadratic form in the time-indexed parameters (Xie et al., 22 Aug 2025).
NSLDA is obtained by imposing a time-wise equal-covariance condition,
The classifier then remains linear at each time , even though the coefficients depend on . This preserves the algebraic structure of classical LDA while abandoning its stationarity assumption.
A related exposure-indexed formulation replaces time by an observed variable and assumes
The Bayes discriminant direction is then
0
which makes explicit that the optimal separating direction is a function of 1 rather than a fixed vector (Bao et al., 2022).
This formulation is intended for temporal distribution shift, where 2 changes with time. The state-space paper distinguishes this from covariate shift by emphasizing that the conditional class distributions themselves evolve, so the optimal boundary is time-dependent rather than merely requiring reweighting of a fixed rule (Xie et al., 22 Aug 2025).
2. State-space construction of NSLDA
In the linear-Gaussian state-space model, each class has a latent state 3 evolving as
4
where 5, 6, and 7. Here 8 is the latent class centroid or state at time 9, 0 is the dynamics matrix, 1 is process noise, and 2 is measurement noise (Xie et al., 22 Aug 2025).
These assumptions induce time-varying Gaussian observation moments,
3
and
4
Accordingly, nonstationarity is represented as latent dynamical drift in the class centroids and, more generally, in the class-conditional second moments.
A notable technical feature is that the model is adapted to multiple samples at the same time step. Rather than assuming a single observation per time, the paper introduces
5
so that each time point may contain several measurements from class 6. The resulting smoother performs one state prediction from 7 to 8 and then processes the 9 observations through sequential measurement updates at the same time index (Xie et al., 22 Aug 2025).
This differs materially from fitting independent time-slice LDAs. Independent slices ignore the dynamical prior and therefore do not borrow strength across neighboring times; the state-space construction was introduced precisely to use all historical data while retaining a time-specific rule.
3. Time-indexed discriminant rule
Under the equal-covariance assumption, the nonstationary discriminant at time 0 is
1
and the NSLDA classifier is
2
For two classes, the decision can be written in the familiar linear form
3
4
with decision rule: decide class 5 iff 6 (Xie et al., 22 Aug 2025).
This representation clarifies the meaning of NSLDA. The classifier is still a plug-in LDA rule, but the plug-in quantities are time-indexed and obtained from a dynamical model rather than from pooled sample averages. The boundary is linear conditionally on time, not globally linear over the full dataset.
In the exposure-indexed varying-coefficient formulation, the oracle rule is written as
7
where 8 and 9 is aligned with the Bayes direction up to a positive scalar factor:
0
The sign of the discriminant score is therefore preserved even though the target is estimated through a least-squares characterization rather than direct inversion of a local covariance matrix (Bao et al., 2022).
A closely related dynamic subspace formulation defines
1
and introduces the total covariance
2
The top eigenvectors of this matrix define a 3-dependent discriminative subspace, and ordinary LDA is then applied after projection (Ouyang et al., 2024).
4. Estimation procedures
For linear-Gaussian drift, NSLDA uses a modified Kalman smoother. Initialization is
4
The forward prediction step is
5
For each observation 6 at time 7, sequential measurement updates are applied:
8
9
After all samples at that time have been processed,
0
Backward smoothing then uses the Rauch–Tung–Striebel recursion
1
2
with the corresponding covariance update (Xie et al., 22 Aug 2025).
When system parameters are unknown, the same paper uses expectation-maximization. The E-step computes
3
using smoothed moments 4, 5, and 6. The M-step then admits closed-form updates such as
7
8
If 9 is also unknown,
0
The same framework also addresses missing or uncertain time labels through a GMM–Kalman approximation. Each time index is treated as a Gaussian mixture component with propagated moments
1
and each sample is assigned a hard time label by
2
For nonlinear or non-Gaussian drift, particle smoothing is used to estimate time-varying class centroids, yielding fully nonstationary discriminant rules (Xie et al., 22 Aug 2025).
5. Related nonstationary LDA formulations
Two recent lines of work are directly relevant to NSLDA even though they do not use that exact acronym.
The first is varying coefficient linear discriminant analysis (VCLDA), which models the Bayes direction as a smooth function of an exposure variable. Its estimation strategy is based on the least-squares population problem
3
where
4
Each coefficient function is approximated by a B-spline basis 5 through
6
In low dimension, the estimator has the closed form
7
while in high dimension it is replaced by the group-lasso-type program
8
The paper emphasizes that this is more computationally efficient than the dynamic linear programming rule because it avoids repeated pointwise optimization at each new 9 (Bao et al., 2022).
The second is dynamic supervised principal component analysis (DSPCA), which produces a nonstationary LDA-like rule by local kernel smoothing and supervised low-rank projection. For a target index 0, class-specific means are estimated by the Nadaraya–Watson estimator
1
with pooled covariance estimate
2
and total covariance
3
After spectral decomposition, the top 4 eigenvectors define a local discriminative subspace, and standard LDA is run on the projected data. A computational shortcut replaces direct eigendecomposition of the 5 matrix by an equivalent 6 matrix when 7 (Ouyang et al., 2024).
These approaches illuminate two distinct conceptions of nonstationarity. VCLDA estimates a smoothly varying discriminant direction directly; DSPCA estimates a smoothly varying discriminative subspace and then classifies within that subspace; the state-space NSLDA model estimates time-indexed class moments through latent dynamics and then plugs them into the LDA rule. All three are responses to the same failure mode of stationary LDA: pooled means and covariances become misspecified when class structure drifts.
6. Theory, empirical behavior, and limitations
The theoretical emphasis differs across formulations. In the state-space NSLDA paper, the primary contribution is a unified model-based framework with extensive simulations rather than a direct asymptotic classifier theorem (Xie et al., 22 Aug 2025). In the exposure-indexed literature, stronger formal guarantees are available. For VCLDA, the low-dimensional spline estimator satisfies
8
and with
9
the rate becomes
0
The excess misclassification risk satisfies
1
with corresponding 2 rates in both low- and high-dimensional regimes (Bao et al., 2022).
For DSPCA-based dynamic LDA, theory is built around the spiked covariance model
3
If
4
the discriminant direction lies in the span of the first 5 eigenvectors of 6. The estimated dynamic subspace obeys the uniform bound
7
and, under additional scaling assumptions,
8
where
9
These results justify nonstationary dimension reduction rather than direct estimation of a time-varying normal vector (Ouyang et al., 2024).
Empirically, the state-space NSLDA paper reports lower misclassification error than stationary LDA, QDA, and SVM baselines, together with robustness to noise, missing data, sparse time slices, and class imbalance; its advantage grows as drift increases, and the nonlinear version based on particle smoothing remains stable when naive LDA deteriorates under higher noise (Xie et al., 22 Aug 2025). The VCLDA paper reports that in dynamic settings classical LDA deteriorates sharply, often close to random guessing, whereas VCLDA consistently outperforms classical LDA and DLPD; on diffuse large B-cell lymphoma data using age as the exposure, the reported average misclassification rates were 0 for LPD excluding age, 1 for LPD including age as a covariate, 2 for DLPD with age as exposure, and 3 for VCLDA with age as exposure (Bao et al., 2022). The DSPCA paper reports that, in synthetic examples where class means and covariances vary with 4, DSPCALDA and especially DSPCAQDA often outperform static methods such as LPD, POTD, SVM, and KNN, and are competitive with or close to the oracle classifier; on breast-cancer datasets, dynamic methods generally outperform static ones when the index variable is informative (Ouyang et al., 2024).
The limitations are correspondingly model-specific. State-space NSLDA presumes a meaningful temporal index and relies on a linear-Gaussian model unless Kalman smoothing is replaced by particle smoothing (Xie et al., 22 Aug 2025). VCLDA assumes smooth coefficient functions, bounded covariance eigenvalues, and in the high-dimensional theory a common active set across 5 (Bao et al., 2022). DSPCA depends on tuning the bandwidth 6, the total-covariance weight 7, and the reduced dimension 8; its guarantees rely on smoothness and spiked covariance assumptions, and although it is computationally much cheaper than DLPD, it still requires kernel smoothing and eigendecomposition at each target 9 (Ouyang et al., 2024).
Taken together, these formulations establish NSLDA not as a single algorithm but as a family of time-aware or exposure-aware LDA procedures. What unifies them is the replacement of one global stationary discriminant rule by a collection of local or smoothed rules indexed by time or exposure, each designed to track drifting class distributions without collapsing all observations into a single pooled regime.