genriesz: A Python Package for Automatic Debiased Machine Learning with Generalized Riesz Regression

Published: 19 Feb 2026, Last Modified: 19 Feb 2026OpenReview Archive Direct UploadEveryoneCC BY-NC-ND 4.0
Abstract: Efficient estimation of causal and structural parameters can be automated via the Riesz representation theorem and debiased machine learning (DML). We present \texttt{genriesz}, an open-source Python package implementing automatic DML and generalized Riesz regression}, a unified framework for estimating Riesz representers by minimizing empirical Bregman divergences. This framework includes covariate balancing, nearest-neighbor matching, and calibrated estimation as special cases. A key design principle of the package is automatic regressor balancing (ARB): given a Bregman generator $g$ and a representer model class, \texttt{genriesz} automatically constructs a compatible link function so that the generalized Riesz regression estimator satisfies balancing (moment-matching) optimality conditions in a user-chosen basis.The package provides a modular interface for specifying (i) the target linear functional through a black-box evaluation oracle, (ii) the representer model through basis functions (polynomial, RKHS approximations, random forest leaf encodings, neural embeddings, and a nearest-neighbor catchment basis), and (iii) the Bregman generator with optional user-supplied derivatives. It returns regression adjustment (RA), Riesz weighting (RW), augmented Riesz weighting (ARW), and TMLE-style estimators with cross-fitting, confidence intervals, and $p$-values. We highlight representative workflows for ATE, ATT, average marginal effects, panel difference-in-differences, and nearest-neighbor matching. The Python package is available at \url{https://github.com/MasaKat0/genriesz} and on PyPI.
Loading