Deep generative LDA

Yunqi Cai, Dong WangarXiv 2020

Abstract

Linear discriminant analysis (LDA) is a popular tool for classification and dimension reduction. Limited by its linear form and the underlying Gaussian assumption, however, LDA is not applicable in situations where the data distribution is complex. Recently, we proposed a discriminative normalization flow (DNF) model. In this study, we reinterpret DNF as a deep generative LDA model, and study its properties in representing complex data. We conducted a simulation experiment and a speaker recognition experiment. The results show that DNF and its subspace version are much more powerful than the conventional LDA in modeling complex data and retrieving low-dimensional representations.

Introduction

Since its introduction in 1936, Linear Discriminant Analysis (LDA) has remained a cornerstone of statistical classification and dimensionality reduction. Its elegance lies in its simplicity: finding a linear projection that maximizes class separability. However, this simplicity comes at a cost. LDA relies on the rigid assumption that all classes are distributed as Gaussians with a shared covariance matrix. In modern domains like speech processing or computer vision, data is frequently non-Gaussian, heteroscedastic, and non-linearly separable, rendering traditional LDA suboptimal.

While deep neural networks (DNNs) offer the flexibility to handle such complexity, they often lack the "generative" properties of LDA—the ability to explicitly model the data's probability density. This paper presents Deep Generative LDA, a framework that leverages Normalization Flows to modernize LDA, maintaining its mathematical rigor while dramatically expanding its representational power.

The Deep Generative LDA Framework

The core innovation involves reinterpreting the Discriminative Normalization Flow (DNF) as a nonlinear generalization of LDA. Normalization Flows (NF) are a class of deep generative models that use a sequence of invertible transformations to map a complex data distribution (observation space $X$) to a simple, tractable distribution (latent space $Z$), typically a standard Gaussian.

Comparison between traditional LDA (linear matrix) and DNF (invertible neural network) for mapping latent space Z to observation space X.

In this framework, traditional LDA is viewed as a special, restricted case of a Normalization Flow where the transformation $f$ is a simple linear matrix. By replacing this matrix with a deep invertible neural network (such as MAF or Real-NVP), we create a "Deep LDA." This model can warp complex, "messy" data into a latent space where classes are perfectly separated as homogeneous Gaussians.

Nonlinear Dimension Reduction: Subspace DNF

To achieve dimension reduction—a primary use case for LDA—the authors introduce Subspace DNF. In the latent space $Z$, dimensions are partitioned into two distinct sets:

  1. Class-dependent dimensions: These dimensions capture the variance between class means.
  2. Residual dimensions: These dimensions share a common mean across all classes, effectively capturing class-independent "noise" or nuisance variables (e.g., channel effects in audio).

By training the model via Maximum Likelihood, the network learns a nonlinear projection that concentrates all class-discriminative information into the low-dimensional subspace, while the residual space captures the remaining data structure. The invertible nature of DNF ensures that no information is lost during this process, unlike standard DNN-based compression.

Experimental Results

The model was evaluated through both synthetic simulations and real-world speaker recognition tasks.

Simulation Success

In a controlled experiment, a 3D dataset consisting of four Gaussian clusters was subjected to complex nonlinear warping. Standard LDA failed to recover the original clusters because it could not "undo" the nonlinear transformation. In contrast, Subspace DNF (DNF-S) successfully learned the inverse mapping, recovering the original latent distribution almost perfectly.

Visualization of the DNF model's ability to recover latent cluster structures from complex, warped observation data.

Speaker Recognition

The model's practical utility was tested on large-scale speaker recognition datasets, including VoxCeleb, SITW (Speakers in the Wild), and CNCeleb. Using x-vector embeddings as input, DNF-S was compared against the standard LDA baseline.

  • In-Domain Performance: On the SITW dataset, DNF-S reduced the Equal Error Rate (EER) from 5.30% to 3.53%, a significant improvement over the 3.96% achieved by standard LDA.
  • Generalization: On the challenging out-of-domain CNCeleb dataset, DNF-S maintained its lead with an EER of 11.66% versus LDA's 12.28%.

Visualizations using t-SNE further confirmed that DNF-S more effectively purged class information from the residual space, ensuring that the extracted features were more purely representative of the speaker's identity rather than channel noise.

Conclusion and Future Directions

Deep Generative LDA represents a significant step forward in combining the interpretability of classical statistics with the power of deep learning. By treating the transformation as a learnable, invertible flow, the model provides a robust mechanism for nonlinear dimension reduction that remains generative.

Future work will address the computational overhead associated with training deep flows and explore more efficient architectures to optimize the dimensionality of the latent subspace. The sensitivity of performance to specific flow architectures also suggests a need for more automated model selection strategies in complex data scenarios.

Summary updated

BibTeX
@misc{cai2020deep,
  author = {Yunqi Cai and Dong Wang},
  title = {{Deep generative LDA}},
  year = {2020},
  eprint = {2010.16138},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.16138},
}
Figure