  Instrumental variables (IVs) provide a powerful strategy for identifying
causal effects in the presence of unobservable confounders. Within the
nonparametric setting (NPIV), recent methods have been based on nonlinear
generalizations of Two-Stage Least Squares and on minimax formulations derived
from moment conditions or duality. In a novel direction, we show how to
formulate a functional stochastic gradient descent algorithm to tackle NPIV
regression by directly minimizing the populational risk. We provide theoretical
support in the form of bounds on the excess risk, and conduct numerical
experiments showcasing our method's superior stability and competitive
performance relative to current state-of-the-art alternatives. This algorithm
enables flexible estimator choices, such as neural networks or kernel based
methods, as well as non-quadratic loss functions, which may be suitable for
structural equations beyond the setting of continuous outcomes and additive
noise. Finally, we demonstrate this flexibility of our framework by presenting
how it naturally addresses the important case of binary outcomes, which has
received far less attention by recent developments in the NPIV literature.
