NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Post-Hoc Domain Adaptation via Guided Data Homogenization

Kurt Willis, Luis OalaarXiv 2021

TL;DR

This paper introduces "guided data homogenization," a novel post-hoc domain adaptation technique that modifies the data rather than the model to handle distribution shifts. This approach is crucial for deployed models where retraining or fine-tuning is not feasible due to safety or certification concerns, allowing models to adapt to new, unseen scenarios without any changes to their architecture or parameters.

What Problem Does This Paper Address?

Deep learning models often suffer performance degradation when deployed in environments where the data distribution differs from the training data. While transfer learning and domain adaptation techniques exist, they typically require access to source data or involve modifying the deployed model itself. This is problematic for safety-critical applications where models are certified based on their original parameters, and retraining or fine-tuning could invalidate these certifications. The paper addresses the challenge of adapting deployed models to new data distributions after they have been deployed, without altering the model's core functionality.

Methods

The core of the proposed method is "guided data homogenization." Instead of adapting the model to the new data, the authors propose to adapt the data to the model's learned representation. This is achieved by learning a transformation function, denoted by $\rho$, that modifies the target domain data ($B$) into a "homogenized" version ($\rho(B)$). This transformation is guided by the implicit knowledge of the original training data distribution captured within the deployed model.

Specifically, the method leverages statistics (mean and variance) from the feature maps of a pre-trained neural network. The transformation $\rho$ is optimized to minimize the dissimilarity between the statistics of the homogenized target data and the statistics of the original source data, as observed through a chosen feature map $\phi$. This optimization is performed using backpropagation, effectively learning a data transformation that makes the target data appear more like the source data to the model's internal representations. The loss function used for optimization is a statistics-loss, combining the difference in means and variances of the feature maps: $L_\rho(A, B) = ||\mu(\phi(A)) – \mu(\phi(B))||_2^2 + ||\sigma^2(\phi(A)) – \sigma^2(\phi(B))||_2^2$.

Datasets

The experiments were conducted on two standard image recognition datasets:

  • MNIST: A dataset of handwritten digits.
  • CIFAR-10: A dataset of small color images in 10 classes.

The target datasets ($B$) were created by applying a controlled perturbation to a subset of the original data. The paper also mentions experiments in both supervised and unsupervised settings for the target domain.

Key Insights and Ideas

  • Shifting the Adaptation Burden: The most significant insight is the paradigm shift from adapting the model to adapting the data. This elegantly sidesteps the issue of modifying deployed, certified models.
  • Implicit Knowledge in Feature Statistics: The paper demonstrates that the statistics (mean and variance) of feature maps within a trained neural network encode valuable information about the original data distribution, which can be leveraged for adaptation.
  • Post-Hoc Applicability: The method is designed for post-hoc application, meaning it can be applied to an already trained and deployed model without any retraining or modification. This is a critical advantage for real-world applications with strict deployment constraints.
  • Data Homogenization as Deconvolution: The authors draw an analogy between data homogenization and deconvolution or deblurring, suggesting that the learned transformation $\rho$ acts as an inverse to an unknown perturbation $\delta$ that corrupted the original data.

Key Results

The paper presents results on both CIFAR-10 and MNIST datasets.

  • CIFAR-10 (Supervised): The "NN ALL" method, which uses all hidden states of the neural network as feature maps, achieved the best performance. It significantly improved the accuracy on the homogenized data set from 26.2% (original distorted data) to 88.2% (validation accuracy) and 99.3% (accuracy on homogenized data). The PSNR and SSIM metrics also showed substantial improvements, indicating better reconstruction quality.
  • MNIST (Supervised): Similar to CIFAR-10, the "NN ALL" method performed very well, achieving high accuracy (98.1% validation accuracy) and excellent PSNR and SSIM scores, indicating effective homogenization.
  • Unsupervised Setting: The method also showed promising results in the unsupervised setting, where no labels are available for the target domain, demonstrating its flexibility.
  • Qualitative Results: Visualizations (Figures 2-5) show that the homogenized images are significantly clearer and more visually similar to the ground truth images compared to the distorted images, especially for the "NN ALL" method.

Limitations and Future Work

  • Dependence on Feature Map Choice: The effectiveness of the method is stated to depend on the chosen feature mapping $\phi$. While using all hidden states ("NN ALL") performed best, exploring other feature extraction strategies could be beneficial.
  • Assumption of Perturbation: The method assumes that the target data is a corrupted version of the source data, and the learned transformation $\rho$ aims to reverse this corruption. If the distribution shift is more complex or fundamentally different, the effectiveness might be limited.
  • Future Work: The authors suggest further exploration of the connection between implicit model knowledge and post-hoc model adaptation as an intriguing avenue for future research. This could involve investigating how different model architectures or training procedures influence the learned feature statistics and their utility for homogenization.

Summary updated

BibTeX
@misc{willis2021post,
  author = {Kurt Willis and Luis Oala},
  title = {{Post-Hoc Domain Adaptation via Guided Data Homogenization}},
  year = {2021},
  eprint = {2104.03624},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.03624},
}
Figure