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

Learning Deep Features in Instrumental Variable Regression

Liyuan Xu, Yutian Chen, Siddarth Srinivasan, Nando de Freitas, Arnaud Doucet, Arthur Gretton

TL;DR

Deep Feature Instrumental Variable (DFIV) regression bridges the gap between classical causal inference and modern deep learning. By combining the robust two-stage least squares (2SLS) framework with neural networks that adaptively learn nonlinear features, DFIV provides a stable and efficient way to estimate causal effects in complex, high-dimensional data where unmeasured confounding is present.

The Challenge of Confounding

In standard supervised learning, we look for correlations: if we see variable $A$, can we predict variable $B$? However, in causal inference, we want to know the effect of an intervention: if we intentionally change $A$, what happens to $B$?

This is notoriously difficult because of confounders—unobserved variables that influence both the "treatment" (the action we take) and the "outcome." For example, if we want to know how ticket prices affect sales, the "holiday season" is a confounder: it drives both higher prices and higher sales. Simply regressing sales on price would suggest that raising prices causes more sales, which is incorrect.

Causal graph illustrating Instrumental Variable (IV) regression.

Instrumental Variable (IV) regression solves this by using an "instrument" ($Z$)—a variable that affects the treatment ($X$) but only affects the outcome ($Y$) through that treatment. While classical IV methods are linear, real-world relationships are often highly nonlinear or involve high-dimensional data like images. Previous deep learning approaches to this problem either suffered from training instability (DeepGMM) or required computationally expensive and high-variance density estimation (DeepIV).

The DFIV Approach

The authors propose Deep Feature Instrumental Variable (DFIV) regression. It follows the logic of the classical Two-Stage Least Squares (2SLS) algorithm but replaces fixed basis functions with deep neural networks.

  1. Stage 1: The model learns a nonlinear feature map for the instrument ($Z$) to predict the features of the treatment ($X$).
  2. Stage 2: It learns a structural function mapping those predicted treatment features to the final outcome ($Y$).

The "Secret Sauce"

  • Analytical Ridge Regression: Instead of training the entire network end-to-end with standard Stochastic Gradient Descent (SGD), the authors use the closed-form analytical solution for ridge regression to find the optimal output weights at each training step.
  • Alternating Training: They use an alternating regime where they update the feature maps for the instrument and treatment separately. This allows them to backpropagate through the analytical solution, making the learning process much more stable than "adversarial" or "zero-sum game" approaches like DeepGMM.
  • Computational Efficiency: Because it uses closed-form solutions for the top layers, it avoids the $O(n^3)$ complexity of kernel-based methods, making it scalable to larger datasets.

Experimental Setup and Datasets

The authors evaluated DFIV on four distinct benchmarks to test its versatility:

  • Demand Design: A standard econometrics simulation for predicting ticket sales.
  • Demand Design with MNIST: A more complex version where a confounder (customer type) is represented by a high-dimensional MNIST digit image.
  • dSprites: A challenging task where the treatment itself is high-dimensional (64x64 images of shapes). This tests the model's ability to extract causal features from raw pixels.
  • BSuite (Catch, Mountain Car, Cartpole): Used for Off-Policy Evaluation (OPE) in Reinforcement Learning, treating the Bellman equation as an IV regression problem.

Key Results and Insights

DFIV consistently outperformed competitors like Kernel IV (KIV), DeepIV, and DeepGMM across both low-dimensional and high-dimensional tasks.

Out-of-sample MSE comparison across different confounding levels.
  • High-Dimensional Robustness: On the dSprites image dataset, DeepIV failed to produce meaningful results due to the difficulty of density estimation in high dimensions, while DFIV maintained low error. Unlike DeepIV, which tries to estimate the entire probability distribution of the treatment given the instrument, DFIV only cares about the expectation of the features.
  • Stability is King: The authors show that "jointly" optimizing the two stages of IV regression often fails because the model ignores the treatment and focuses only on the instrument-outcome correlation. Their alternating approach "forces" the model to respect the causal structure.
  • Causality meets RL: The paper highlights a beautiful connection: Off-Policy Evaluation in Reinforcement Learning can be mathematically framed as an IV regression task. In the BSuite tasks, DFIV was the most competitive "general-purpose" IV method, often matching the performance of Fitted Q Evaluation (FQE), a specialized baseline for RL.

Limitations and Future Work

While DFIV is a significant step forward, it assumes an additive noise model ($Y = f(X) + \epsilon$). Future work could investigate generalizations beyond this structure. Additionally, like many deep learning models, DFIV requires tuning regularization hyperparameters. While the authors provide a tuning strategy, automated selection remains an open research goal. Finally, while DFIV works well for standard OPE, real-world RL often involves even more complex confounding structures that may require further architectural innovations.

Summary updated

BibTeX
@inproceedings{xu2021learning,
  author = {Liyuan Xu and Yutian Chen and Siddarth Srinivasan and Nando de Freitas and Arnaud Doucet and Arthur Gretton},
  title = {{Learning Deep Features in Instrumental Variable Regression}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=sy4Kg_ZQmS7},
}
Figure