Regularized Discriminative Alignment for Deep Representations under Label Shift

Hengchao Shi, Boen Jiang, Guanhua Fang, Wen Yu, Ming ZhengICML 2026

TL;DR

Regularized Discriminative Alignment for Label Shift (RDALS) is a new framework that tackles label shift—where the frequency of classes changes between training and testing—by aligning distributions in a discriminative latent space. By combining pre-trained deep representations with Linear Discriminant Analysis (LDA) and regularized optimization, RDALS achieves state-of-the-art accuracy and robustness, even in data-scarce environments or under extreme distribution shifts.

What Problem Does This Paper Address?

In machine learning, we often assume that training and test data come from the same distribution. In the real world, this is rarely true. One common type of mismatch is label shift (or prior probability shift). Imagine training a model to detect diseases where 5% of your training samples are positive, but in a real-world outbreak, 50% are positive. While the "look" of the disease ($P(x|y)$) might stay the same, the "prevalence" ($P(y)$) has shifted.

Existing methods for correcting this shift usually rely on two things:

  1. Strict Pixel-Level Invariance: They assume the raw input distribution for a class is identical across domains. This is fragile; a simple change in lighting or sensor noise can break it.
  2. High-Quality Classifiers: Many methods require perfectly calibrated source classifiers, which are hard to train when data is limited.

RDALS aims to bridge these gaps by moving the problem from the messy raw input space to a stable, semantically rich latent space.

Methods

The RDALS framework operates in four distinct stages:

  1. Nonlinear Feature Extraction: Instead of raw pixels, the authors use a frozen, pre-trained backbone (like ResNet or ViT) to extract latent features ($z$). The core hypothesis is that while pixels might change due to noise, the semantic meaning in the latent space remains more invariant.
  2. LDA Projection (The "Secret Sauce"): High-dimensional latent features often contain "nuisance" information. The authors use Linear Discriminant Analysis (LDA) to project these features into a compact subspace. They provide a rigorous proof that LDA is the optimal choice here because it maximizes the separability between classes, which in turn maximizes the numerical stability of the linear system used to estimate weights.
  3. Moment-Matching Linear System: They construct a linear system based on the law of total expectation to link the source and target domains.
  4. Regularized SOCP Solver: To solve for the target label distribution, they avoid simple matrix inversion (which is prone to noise). Instead, they use Second-Order Cone Programming (SOCP). This allows them to enforce a "simplex constraint" (ensuring probabilities are non-negative and sum to 1) and add $\ell_2$ regularization to prevent overfitting to sampling noise.

Datasets

The authors evaluated RDALS on several standard and challenging benchmarks:

  • MNIST, CIFAR-10, and CIFAR-100: Used for standard label shift evaluations.
  • CIFAR-10-C: A corrupted version of CIFAR-10 used to test robustness against input-level perturbations (noise, blur, etc.).
  • PACS: A real-world dataset containing four domains (Art, Cartoon, Sketch, Photo). This was used to test "style shifts" where the conditional invariance assumption is naturally weakened.

Key Insights and Ideas

  • Latent Invariance > Pixel Invariance: The paper argues that the standard label shift assumption is too strict for raw data. By assuming Latent Conditional Invariance, they allow for domain-specific variations (like sensor artifacts) as long as the high-level features remain consistent.
  • LDA as a Stability Optimizer: While LDA is a classic tool for classification, this paper repurposes it for distribution alignment. They show that maximizing the ratio of between-class to within-class variance directly translates to a better-conditioned linear system for weight estimation.
  • Calibration-Free Robustness: Unlike Maximum Likelihood methods (like MLLS), RDALS doesn't require a calibrated classifier. This makes it a "plug-and-play" solution that works well even when you don't have enough data to fine-tune a source model perfectly.

Key Results

  • Superior Accuracy: RDALS consistently outperformed state-of-the-art baselines (BBSL, RLLS, MLLS, CPMCN) across all datasets. On the complex CIFAR-100 benchmark, it reduced the Mean Squared Error (MSE) of weight estimation by nearly 50% compared to the next best method.
  • Robustness to Noise: In experiments where Gaussian noise was injected into target features, RDALS remained stable, while other methods saw significant performance degradation.
  • Efficiency: The method is computationally efficient, running approximately 2x faster than competitive baselines like CPMCN because it avoids expensive calibration steps.
  • Data-Scarce Performance: RDALS showed remarkable stability in regimes with very few target samples ($N=1000$), where other moment-matching methods often produce unstable or negative weight estimates.

Limitations and Future Work

  • Frozen Backbone Dependency: The method relies on the quality of the pre-trained feature extractor. If the backbone fails to capture relevant semantic features for a specific task, the LDA projection might not be as effective.
  • Linear Assumption: The alignment relies on a linear projection. While effective for deep latent spaces, exploring non-linear discriminative alignment could be a future direction.
  • Test-Time Adaptation: The authors suggest that extending this framework to more relaxed "test-time adaptation" settings—where the model adapts to a single stream of data—is a promising next step.

Summary updated

BibTeX
@inproceedings{shi2026regularized,
  author = {Hengchao Shi and Boen Jiang and Guanhua Fang and Wen Yu and Ming Zheng},
  title = {{Regularized Discriminative Alignment for Deep Representations under Label Shift}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=5m6GcVcqDO},
}
Figure