Domain Generalization by Functional Regression

Markus Holzleitner, Sergei V. Pereverzyev, Werner Zellinger

TL;DR

This paper recasts the challenge of Domain Generalization (DG) as a problem of functional regression, learning an operator that maps input distributions to their corresponding predictive functions. By doing so, the authors provide the first finite-sample error bounds for this setting and introduce a flexible algorithm that allows different domains to use different specialized kernels.

What Problem Does This Paper Address?

In machine learning, we usually assume our training data and test data come from the same distribution (i.i.d.). However, in the real world—like medical data from different hospitals—distributions vary across "domains." Domain Generalization aims to learn from several source domains so the model can perform well on a completely new, unseen target domain using only unlabeled samples from that target.

Existing approaches, like Marginal Transfer Learning (MTL), often struggle with two things:

  1. Rigidity: They typically force every domain to live in the same pre-defined mathematical space (RKHS), which might not suit the unique characteristics of different datasets.
  2. Theoretical Gaps: While we know these methods work eventually as data goes to infinity, we haven't had clear "finite-sample bounds"—mathematical guarantees of how much error to expect given a specific amount of data.

Methods

The authors propose a "function-to-function" regression approach. Instead of learning a single static predictor, they learn a linear operator $G$.

The Two-Step Algorithm:

  1. Local Learning (Domain-Specific): For each source domain, the algorithm performs ridge regression to find the best local predictor ($f_P$). Crucially, this allows researchers to choose different kernels (e.g., Gaussian for one domain, periodic for another) based on the data's nature.
  2. Global Operator Learning: The algorithm then learns a linear operator $G$ that maps the Kernel Mean Embedding (a mathematical representation of the input distribution) to the local predictors found in step one.

By treating the relationship between "how data is distributed" and "how to predict labels" as a regression problem itself, the model can "look" at the unlabeled samples of a new target domain and immediately estimate the best predictive function for it.

Datasets

The paper focuses on a rigorous theoretical derivation supported by a controlled numerical experiment:

  • Synthetic Data: The authors generated $N=100$ source domains, each containing $n=100$ samples.
  • Distributions: These were truncated Normal distributions where the means and variances shifted across domains to simulate real-world variability.
  • Task: Predicting a complex target function (a mix of sine waves and parabolas) under varying noise conditions.

Key Insights and Ideas

  • DG as Operator Learning: The core "aha moment" is realizing that Domain Generalization isn't just about finding a robust feature space; it's about learning the mapping from distributions to functions.
  • Kernel Flexibility: Unlike previous methods that required a "universal" kernel, this framework allows for domain-specific RKHS choices. This means you can use expert knowledge to pick the right model for each source domain without breaking the global generalization logic.
  • First-of-its-Kind Bounds: The paper provides the first quantified convergence rates for this specific DG setting. It proves that as you increase both the number of domains ($N$) and the number of samples per domain ($n$), the error decreases at a predictable rate.

Key Results

  • Theoretical Guarantee: The authors derived a finite-sample error bound (Theorem 6) that shows the "idealized risk" of their model converges to the best possible risk as data scales.
  • Numerical Superiority: In their experiments, the proposed functional regression approach achieved a test error of 0.0029.
  • This significantly outperformed simple pooling (combining all data into one big set), which had an error of 0.0042.
  • It also beat standard Marginal Transfer Learning implementations, which also hovered around 0.0042.
  • Visual Success: The model's predictions on new target distributions (shown in Figure 1d) closely tracked the true regression functions, even when those functions varied significantly from the source data.

Limitations and Future Work

  • Linearity Assumption: The current framework assumes a linear operator $G$. While powerful, many real-world relationships between distributions and predictors might be non-linear, requiring future extensions into non-linear operator learning.
  • The Curse of Dimensionality: The authors note that estimating certain norms (like the $L^2$ norm) requires discretizing the input space. As the number of input features grows, this becomes computationally expensive—a classic "curse of dimensionality."
  • Smoothness: The current bounds do not yet fully account for the "smoothness" of the operator's slope, which could potentially lead to even tighter error guarantees in future research.

Summary updated

BibTeX
@inproceedings{holzleitner2024domain,
  author = {Markus Holzleitner and Sergei V. Pereverzyev and Werner Zellinger},
  title = {{Domain Generalization by Functional Regression}},
  booktitle = {Numerical},
  year = {2024},
  doi = {10.1080/01630563.2024.2320663},
}
Figure