Causal Transfer Random Forest: Combining Logged Data and Randomized Experiments for Robust Prediction.

Murat Bayir, Denis X Charles, Emre KicimanWSDM 2020 · DOI

Abstract

It is often critical for prediction models to be robust to distributional shifts between training and testing data. From a causal perspective, the challenge is to distinguish the stable causal relationships from the unstable spurious correlations across shifts. We describe a causal transfer random forest (CTRF) that combines existing training data with a small amount of data from a randomized experiment to train a model which is robust to the feature shifts and therefore transfers to a new targeting distribution. Theoretically, we justify the robustness of the approach against feature shifts with the knowledge from causal learning. Empirically, we evaluate the CTRF using both synthetic data experiments and real-world experiments in the Bing Ads platform, including a click prediction task and in the context of an end-to-end counterfactual optimization system. The proposed CTRF produces robust predictions and outperforms most baseline methods compared in the presence of feature shifts.

Introduction

In modern production environments like Bing Ads, machine learning models are the backbone of decision-making. However, these models often face a fundamental challenge: they are trained on "logged data" (L-data) generated under a specific historical policy, but must remain accurate when that policy changes. Standard ensemble methods often fail under these distributional shifts because they latch onto spurious correlations that do not hold true in a new environment.

Presented at WSDM '21, the Causal Transfer Random Forest (CTRF) provides a practical solution. By integrating a small amount of gold-standard randomized experimental data (R-data) with massive amounts of biased logged data, CTRF builds models that are inherently robust to feature shifts.

The Challenge: Spurious Correlations

Most machine learning models operate under the $i.i.d.$ assumption—that training and testing data share the same distribution. In reality, production systems are dynamic. A common pitfall is the confusion between a direct cause and a correlate.

Causal relationships between ad relevance (x), position (z), and clicks (y). The dashed line represents the policy-driven correlation that can shift.

As illustrated in the causal graph above, an ad system might historically place high-relevance ads ($x$) at the top of the page ($z$). A standard model might learn that "top position" causes "clicks" ($y$). If the layout policy changes—moving lower-quality ads to the top—the model’s predictions will fail. The correlation between position and quality has shifted, revealing that the model relied on an unstable correlate rather than the stable causal relationship between relevance and clicks.

The CTRF Method

The authors propose a two-stage learning approach based on the "honesty principle" found in causal trees. The goal is to disentangle the stable causal structure from the high-precision but biased observations in logged data.

The two-stage CTRF training process: (Top) Structure learning using randomized R-data to ensure causal stability. (Bottom) Leaf calibration using pooled R-data and L-data for statistical precision.

1. Structure Learning (The "Causal" Part)

The tree structure—specifically the decision splits—is built using only the randomized data (R-data). Because R-data is generated from experiments where variables like ad position are randomized, it breaks the spurious correlations found in mainstream traffic. This ensures the model's "skeleton" relies on stable, causal features that remain invariant across different environments.

2. Leaf Calibration (The "Transfer" Part)

Once the structure is fixed, the leaf nodes are populated (calibrated) using a pooled dataset of both R-data and the massive L-data. This allows the model to benefit from the high statistical precision of large-scale data (reducing variance) without letting the biases of that data corrupt the decision boundaries (reducing bias).

Empirical Evaluation and Results

The paper evaluates CTRF across synthetic simulations and real-world Bing Ads traffic:

  • Synthetic Auction Stress Test: In simulations where ad position was a purely spurious factor, CTRF maintained significantly lower cumulative prediction bias than standard Random Forests or GBDTs as the distributional shift became more extreme.
  • Real-World Click Prediction: On Bing Ads "exploration traffic" (which involves radical layout changes), CTRF achieved an AUC of 0.9285. This performance was nearly identical to an "Oracle" model (0.9287) trained directly on the shifted test data. Notably, it reduced cumulative bias from 3.87% in standard RFs to 2.90%.
  • Marketplace Optimization: In a case study involving shopping ads, CTRF reduced the error in predicting "Click Yield Delta" from 58.06% to 22.58%, proving its utility for reliable offline policy evaluation.

Conclusion

CTRF demonstrates that we do not need to choose between the purity of small-scale experimental data and the scale of biased logged data. By using R-data to define the model's causal structure and L-data to calibrate its values, CTRF creates a robust bridge for transferring knowledge across different system policies. While it requires a "seed" of randomized data, the resulting gains in stability make it a powerful tool for high-stakes production environments.

Summary updated

BibTeX
@inproceedings{bayir2020causal,
  author = {Murat Bayir and Denis X Charles and Emre Kiciman},
  title = {{Causal Transfer Random Forest: Combining Logged Data and Randomized Experiments for Robust Prediction.}},
  booktitle = {WSDM},
  year = {2020},
  doi = {10.1145/3437963.3441722},
}
Figure