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

arXiv: https://arxiv.org/abs/2602.17543 · HTML: https://mlsanity.com/paper/2602.17543/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 20 of its 48 references that are in the map.
- First posted on arXiv 19 Feb 2026.

## Builds on (most cited first, 20 of 20)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Estimation and Inference of Heterogeneous Treatment Effects using Random Forests](https://mlsanity.com/paper/1510.04342/) (2015)
- [Generalized Random Forests](https://mlsanity.com/paper/1610.01271/) (2016)
- [Positive-Unlabeled Learning with Non-Negative Risk Estimator](https://mlsanity.com/paper/1703.00593/) (2017)
- [Telescoping Density-Ratio Estimation](https://mlsanity.com/paper/2006.12204/) (2020)
- [Approximate Residual Balancing: De-Biased Inference of Average Treatment Effects in High Dimensions](https://mlsanity.com/paper/1604.07125/) (2016)
- [Non-Negative Bregman Divergence Minimization for Deep Direct Density Ratio Estimation](https://mlsanity.com/paper/2006.06979/) (2020)
- [RieszNet and ForestRiesz: Automatic Debiased Machine Learning with Neural Nets and Random Forests](https://mlsanity.com/paper/2110.03031/) (2021)
- [Covariate Balancing Propensity Score by Tailored Loss Functions](https://mlsanity.com/paper/1601.05890/) (2016)
- [DoubleML -- An Object-Oriented Implementation of Double Machine Learning in Python](https://mlsanity.com/paper/2104.03220/) (2021)
- [Augmented balancing weights as linear regression](https://mlsanity.com/paper/2304.14545/) (2023)
- [Regularized calibrated estimation of propensity scores with model misspecification and high-dimensional data](https://mlsanity.com/paper/1710.08074/) (2017)
- [DoubleML -- An Object-Oriented Implementation of Double Machine Learning in R](https://mlsanity.com/paper/2103.09603/) (2021)
- [Direct Bias-Correction Term Estimation for Average Treatment Effect Estimation](https://mlsanity.com/paper/2509.22122/) (2025)
- [Nearest Neighbor Matching as Least Squares Density Ratio Estimation and Riesz Regression](https://mlsanity.com/paper/2510.24433/) (2025)
- [Kernel Ridge Riesz Representers: Generalization, Mis-specification, and the Counterfactual Effective Dimension](https://mlsanity.com/paper/2102.11076/) (2021)
- [RieszBoost: Gradient Boosting for Riesz Regression](https://mlsanity.com/paper/2501.04871/) (2025)
- [Estimating Average Treatment Effects with Support Vector Machines](https://mlsanity.com/paper/2102.11926/) (2021)
- [Generalized Riesz Regression: A Unified Framework for Debiased Machine Learning with Riesz Representer Fitting under Bregman Divergence](https://mlsanity.com/paper/2601.07752/) (2026)
- [Distributional Balancing for Causal Inference: A Unified Framework via Characteristic Function Distance](https://mlsanity.com/paper/2601.15449/) (2026)

## Abstract (arXiv)

Efficient estimation of causal and structural parameters can be automated using the Riesz representation theorem and debiased machine learning (DML). We present genriesz, an open-source Python package that implements 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, calibrated estimation, and density ratio 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, 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 modulr interface for specifying (i) the target linear functional via a black-box evaluation oracle, (ii) the representer model via 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 estimation problems such as the average treatment effect (ATE), ATE on treated (ATT), and average marginal effect estimation. The Python package is available at https://github.com/MasaKat0/genriesz and on PyPI.
