Abstract
In real-world machine learning deployments, data distributions often vary significantly across different user segments, such as geographic regions, age groups, or device types. This phenomenon, known as local distribution shift, poses a challenge for standard domain adaptation techniques that typically assume a global shift. This paper presents a "multiply robust" (MR) estimation framework designed to improve model performance across heterogeneous domains. By clustering similar segments to share information and employing a two-stage refinement process, the proposed method achieves superior predictive accuracy and calibration on both public tabular datasets and large-scale industrial tasks.
Introduction
Machine learning models frequently encounter distribution shifts when moving from training environments to real-world applications. While global distribution shifts—where the relationship between features and labels changes uniformly across the dataset—are well-studied, "local" shifts present a more complex challenge. In local shifts, different segments of the population (domains) exhibit unique variations. For instance, user behavior in an application may shift differently in Japan compared to Brazil.
Practitioners typically face a three-way trade-off when addressing these segments:
- Global Modeling: Training a single model on all data. This provides robustness but often fails to capture local nuances.
- Independent Local Modeling: Training $N$ separate models for $N$ segments. This captures nuances but suffers from data scarcity in small segments and high computational overhead.
- Standard Domain Adaptation: These methods often rely on restrictive global assumptions that do not hold across highly heterogeneous segments.
This research introduces a framework that leverages local assumptions about distribution shifts within specific segments, allowing for effective information sharing without sacrificing local adaptation.
Methodology: Multiply Robust (MR) Estimation
The MR framework operates in two primary stages: information sharing through clustering and a two-stage refinement process.
1. Information Sharing via Clustering
To avoid treating every segment as an isolated silo, the algorithm measures the similarity between segment distributions using Maximum Mean Discrepancy (MMD). Based on these similarities, segments are clustered into $M$ groups. A "base model" is then trained for each cluster. This approach allows smaller segments to "borrow strength" from larger, distributionally similar segments, mitigating the issues associated with small sample sizes.
2. The Two-Stage Estimator
The refinement process for a specific target segment follows a two-step logic:
- Stage 1 (The Prior): The method determines the optimal linear combination of all cluster-based base models to create a tailored "prior" for the segment. This ensemble approach provides a more resilient starting point than a generic global model.
- Stage 2 (The Refinement): The model is further fine-tuned using the specific segment's training data. This stage incorporates importance weighting to correct for local covariate shifts and includes a penalty term to ensure the model does not deviate excessively from the Stage 1 ensemble.
The term "multiply robust" refers to the model's ability to leverage the predictive power of multiple base models simultaneously, making the final estimation more resilient to inaccuracies in any single source.
Experimental Evaluation
The authors evaluated the MR framework across a variety of regression and classification tasks:
- Synthetic Data: Controlled regression simulations to validate the handling of covariate shifts.
- Public Tabular Datasets: Including the Adult (Census income), Banking (Marketing), and Customer Segmentation datasets for classification, and Apartment Prices and Online News Popularity for regression.
- Industrial Case Study: A Meta User City Prediction task involving approximately 50,000 users across 21 countries. The goal was to predict a user's primary city based on interaction features.
Key Results
- Performance Gains: The MR method consistently achieved the lowest test losses across nearly all segments in the public datasets. In the "Apartment" regression task, MR reduced the Mean Squared Error (MSE) to 0.524, compared to 1.0 for a standard XGBoost baseline.
- Industrial Application: In the Meta case study, the MR framework outperformed the existing production model in both Cross-Entropy (accuracy) and Brier Score (calibration) across almost all 21 countries.
- Data Efficiency: The method demonstrated significant improvements in segments with limited data, confirming that the clustering and ensembling strategy effectively transfers knowledge from data-rich domains to data-poor ones.
Discussion and Future Work
The success of the MR framework highlights the utility of local rather than global assumptions in domain adaptation. By using ensembling as a regularizer, the method provides a statistically efficient path to convergence, even with small sample sizes.
However, certain limitations remain. The current implementation focuses on tabular data; applying this to unstructured data (image or text) would likely require operating on the embeddings of pre-trained models. Additionally, the computational cost of calculating the MMD matrix is $O(n_{tr}^2)$, though this is primarily an offline cost. Future research directions include exploring multitask learning to jointly optimize models for all segments and investigating how this framework can enhance algorithmic fairness by improving performance for underrepresented segments.
Summary updated