Label Alignment Regularization for Distribution Shift

Ehsan Imani, Guojun Zhang, Runjia Li, Jun Luo, Pascal Poupart, Philip H. S. Torr, Yangchen Pan

TL;DR

Most unsupervised domain adaptation (UDA) methods try to force feature representations from source and target domains to look identical, which breaks down when label distributions shift. This paper introduces Label Alignment Regularization (LAR), a method that instead adapts the classifier by utilizing the empirical phenomenon that labels naturally align with the top singular vectors of the data matrix. By projecting the classifier onto the target domain's top principal components without requiring small joint risk, LAR avoids negative transfer and excels in severe class-imbalance settings.

What Problem Does This Paper Address?

Standard UDA relies on learning domain-invariant representations (e.g., via adversarial training like DANN). However, foundational theoretical bounds dictate that invariant representations only work if the optimal joint risk across both domains is small.

When label distributions shift significantly (such as extreme class imbalance between source and target), forcing representation invariance often maps positive source points to negative target points. In such cases, domain-adversarial methods catastrophically fail because the invariant representation assumption is violated. The authors address how to transfer knowledge to an unlabeled target domain when joint error is high and representation matching falls apart.

Methods

Rather than regularizing intermediate representations, the authors regularize the classifier weights $w$.

  1. Label Alignment Property (LAP): In standard linear regression ($\min_w \|\Phi w - y\|^2$), the label vector $y$ typically lies mostly in the span of the top $k$ left singular vectors of data matrix $\Phi$. The objective implicitly penalizes $w$ along the bottom singular vectors: $$\min_w \sum_{i=1}^k (\sigma_i w_i^V - y_i^U)^2 + \sum_{i=k+1}^d \sigma_i^2 (w_i^V)^2$$
  2. Transferring LAP to the Target Domain: Target labels $\tilde{y}$ are unknown, but the target feature matrix $\tilde{\Phi}$'s singular vectors $\tilde{v}_i$ can be computed via unsupervised SVD.
  3. Implicit Regularization Removal & Alignment: The standard source regression implicitly regularizes $w$ against source singular vectors. The authors explicitly subtract this source regularizer and replace it with a regularizer that penalizes projections onto the target domain's trailing singular vectors: $$\min_w \|\Phi w - y\|^2 - \sum_{i=k+1}^d \sigma_i^2 (w_i^V)^2 + \lambda \sum_{i=\tilde{k}+1}^d \tilde{\sigma}_i^2 (w_i^{\tilde{V}})^2$$
  4. Theoretical Projection: The authors prove that when $k = \tilde{k}$, the optimal regularized weight vector $\hat{w}^*$ is projected onto $\text{span}(\tilde{v}_1, \dots, \tilde{v}_k)$ and is completely independent of the regularizer scale $\lambda$. Under rank-1 alignment, it recovers the exact direction of the optimal target classifier.

Datasets

  • Synthetic 2D Rotated Gaussian: Used to theoretically and empirically verify the projection behavior under rotational shift.
  • Empirical LAP Verification Tasks:
  • UCI CT Scan, Million Song Year, UCI Bike Sharing (regression).
  • MNIST, USPS, CIFAR-10, CIFAR-100, STL-10, AG News, and XED (classification using raw features or pre-trained neural representations from ResNet-18/BERT).
  • MNIST $\leftrightarrow$ USPS Benchmark: All 45 binary pairs between digits 0–9, tested in balanced setups and artificially subsampled source distributions (ratios $0.3$, $0.2$, and $0.1$). Also evaluated in a multi-class setup.
  • XED Multilingual Sentiment Dataset: 9 cross-lingual sentence classification pairs transferring from English to Finnish, Bulgarian, Breton, Chinese, Danish, German, Spanish, French, Hebrew, and Hungarian using BERT embeddings.

Key Insights and Ideas

  • Implicit Regularization Can Hurt Transfer: Standard least-squares inherently pulls weights toward the source domain's top principal components. Leaving this implicit regularizer active hinders alignment with the target components; explicitly subtracting it enables much faster and better target adaptation.
  • Classifier Adaptation vs. Representation Alignment: Rather than pushing feature representations into an overlapping distribution, shifting the decision boundary to match the dominant geometric variance of the target space circumvents the need for the common (and restrictive) "low joint error" assumption.
  • Robustness Under Severe Imbalance: In tests where source classes were subsampled by 90% (ratio $0.1$), DANN's target accuracy collapsed because its discriminator achieved invariance by mixing opposite classes. LAR remained resilient because singular vectors of the target domain are determined independently of label frequency.

Key Results

  • Imbalanced MNIST-USPS: Under heavy source subsampling (0.1 ratio), DANN drops to 47.27% accuracy (worse than no adaptation at 53.58%). In contrast, LAR maintains 82.71% target accuracy. In the multi-class 0.1 subsampled setting, LAR achieves 47.49% vs. DANN's 32.01%.
  • Cross-Lingual Sentiment (XED):
  • LAR achieves the highest average $F_1$ score (58.55%) across the 9 language transfer pairs, outperforming standard source training (MSE: 48.09%, CE: 46.83%), Adversarial-Refine (48.88%), CDAN (36.33%), $f$-DAL (49.86%), and class-weighted methods like IWDAN (52.56%).
  • On English-to-Chinese (en $\rightarrow$ cn), where domain-adversarial methods struggle (CDAN: 21.93%, $f$-DAL: 15.04%), LAR achieves 65.10% $F_1$.

Limitations and Future Work

  • Hyperparameter Selection: The method currently relies on a small labeled validation set in the target domain to tune $k, \tilde{k}$, and $\lambda$. The authors highlight the need for an entirely unsupervised hyperparameter selection strategy.
  • Multi-Class Complexity: While the paper provides a one-versus-all extension for multi-class classification with promising preliminary results, tuning hyperparameters independently per class can become computationally expensive.
  • Hybrid Approaches: The authors suggest that combining LAR (classifier adaptation) with representation-learning approaches could yield models robust to both covariate shift and label shift simultaneously.

Summary updated

BibTeX
@article{imani2024label,
  author = {Ehsan Imani and Guojun Zhang and Runjia Li and Jun Luo and Pascal Poupart and Philip H. S. Torr and Yangchen Pan},
  title = {{Label Alignment Regularization for Distribution Shift}},
  journal = {J. Mach. Learn. Res.},
  year = {2024},
  url = {https://openreview.net/forum?id=zjc1NwxwZh},
}
Figure