Test-time Adaptation for Regression by Subspace Alignment

Kazuki Adachi, Shin'ya Yamaguchi, Atsutoshi Kumagai, Tomoki Hamagami

TL;DR

This paper introduces Significant-subspace Alignment (SSA), a novel test-time adaptation (TTA) method for regression tasks. SSA addresses the limitations of existing TTA methods, which are often designed for classification, by focusing on aligning important feature subspaces and weighting their significance, leading to improved performance on various regression benchmarks.

What Problem Does This Paper Address?

Deep learning models have achieved remarkable success, but their performance often degrades when deployed in real-world scenarios where the test data distribution differs from the training data (domain shift). Test-time adaptation (TTA) aims to adapt a pre-trained model to an unknown target domain using only unlabeled test data. However, most existing TTA methods are tailored for classification tasks, assuming categorical outputs. Regression tasks, which output continuous scalar values, have been largely overlooked in TTA research. A key challenge is that regression models often learn features concentrated in a low-dimensional subspace, and many raw feature dimensions are irrelevant. Naively applying classification-centric TTA methods, particularly those relying on feature alignment, can be ineffective or even detrimental in regression due to this subspace property and the presence of noisy dimensions.

Methods

The paper proposes Significant-subspace Alignment (SSA), a TTA method specifically designed for regression. SSA builds upon the feature alignment paradigm but introduces two key innovations:

  1. Subspace Detection: Instead of aligning all features, SSA first identifies a low-dimensional subspace where the regression model's features are concentrated and most relevant to the output. This is achieved using Principal Component Analysis (PCA) on the source domain's features.
  2. Dimension Weighting: Within the detected subspace, SSA assigns weights to dimensions based on their significance to the model's output. This is done by considering the projection of the regressor's weight vector onto the subspace dimensions, prioritizing those that have a greater impact on the final scalar prediction.

Feature alignment is then performed within this significant subspace, guided by the dimension weights. This approach aims to mitigate the domain gap more effectively by focusing on the most informative parts of the feature space and downplaying irrelevant dimensions.

Datasets

The authors evaluated SSA on several real-world datasets:

  • SVHN-MNIST: Used for regression by treating digit labels as scalar values.
  • UTKFace: A face image dataset used for age prediction, with target domain corruption introduced (e.g., noise, blur).
  • Biwi Kinect: A dataset of person images used for head pose estimation (pitch, yaw, roll), with domain shift based on gender.
  • California Housing: A tabular dataset for predicting housing prices, with domain shift based on geographical location (coastal vs. non-coastal areas).

Key Insights and Ideas

  • Regression Features Live in a Subspace: A crucial observation is that regression models, unlike classification models, often learn features that are highly concentrated in a low-dimensional subspace. Many dimensions in the full feature space are redundant or noisy.
  • Naive Feature Alignment Fails for Regression: Directly applying feature alignment techniques designed for classification to regression can lead to suboptimal performance or even degradation. This is because these methods often treat all dimensions equally, including the irrelevant ones, and the KL divergence used in alignment can become unstable due to zero variances in irrelevant dimensions.
  • Subspace Alignment is Key: By identifying and aligning only the significant feature subspace, SSA effectively bridges the domain gap without being misled by irrelevant dimensions.
  • Dimension Weighting Enhances Alignment: Prioritizing dimensions within the subspace that have a greater impact on the regression output further refines the alignment process, leading to more robust adaptation.
  • SSA Makes Features More Gaussian-like: The paper also notes that subspace projection can make features more amenable to Gaussian-based alignment methods (like KL divergence) by reducing the impact of non-linearities like ReLU activations.

Key Results

  • Outperforms Baselines: SSA consistently outperformed various TTA baselines (including those adapted from classification) across multiple regression tasks, achieving higher R² scores.
  • Significant Improvement: For instance, on SVHN-MNIST, SSA achieved an R² score of 0.511, significantly higher than the Source (0.406) and other baselines. Similar improvements were observed on UTKFace, Biwi Kinect, and California Housing datasets.
  • Robustness: SSA demonstrated robustness to different types of domain shifts, including image corruptions and covariate shifts.
  • Ablation Studies: Subspace detection was shown to be critical for performance, with SSA variants lacking it performing worse than the Source model in some cases. Dimension weighting provided further, albeit smaller, gains.

Limitations and Future Work

  • Covariate Shift Assumption: SSA currently assumes a covariate shift, where the conditional distribution $p(y|x)$ remains unchanged. It does not directly address concept drift, where $p(y|x)$ itself changes.
  • Future Work: The authors suggest extending SSA to handle concept drift and exploring its application to broader tasks and settings. They also mention investigating the optimal number of subspace dimensions ($K$) and how it relates to the inherent dimensionality of the learned features.

Summary updated

BibTeX
@inproceedings{adachi2025test,
  author = {Kazuki Adachi and Shin'ya Yamaguchi and Atsutoshi Kumagai and Tomoki Hamagami},
  title = {{Test-time Adaptation for Regression by Subspace Alignment}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=SXtl7NRyE5},
}
Figure