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

Reading time: 5 minute
...

📝 Original Info

  • Title: genriesz: A Python Package for Automatic Debiased Machine Learning with Generalized Riesz Regression
  • ArXiv ID: 2602.17543
  • Date: 2026-02-19
  • Authors: ** - Masa Katayama (GitHub: @MasaKat0) - et al. (논문에 명시된 다른 저자 정보가 제공되지 않아 현재는 확인 불가) **

📝 Abstract

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.

💡 Deep Analysis

📄 Full Content

Many targets in causal inference and econometrics can be expressed as linear functionals of an unknown regression function. Prominent examples include the average treatment effect (ATE), the average treatment effect on the treated (ATT), and average marginal effects (AME).

Automatic debiased machine learning (ADML) provides general tools for valid inference on such targets (Chernozhukov et al., 2022b).

The ADML workflow separates the problem into two parts. First, one estimates nuisance components, typically a regression function and a Riesz representer. Second, one plugs these estimates into a Neyman orthogonal score and averages the resulting score over the sample. A Donsker condition or cross-fitting then yields valid inference under weak rate conditions (Chernozhukov et al., 2018;Klaassen, 1987).

Various methods have been proposed for Riesz representer estimation, such as Riesz regression (Chernozhukov et al., 2021;Chen & Liao, 2015), covariate balancing (Imai & Ratkovic, 2013), and density ratio estimation (Sugiyama et al., 2012). Kato (2026Kato ( , 2025a) ) demonstrates a unifying perspective, Riesz representer fitting under Bregman divergences, which is also referred to as generalized Riesz regression, Bregman-Riesz regression, or generalized covariate balancing. Hereafter, we refer to this method as generalized Riesz regression, a name that emphasizes the connection between Riesz representer fitting and balancing weights through the choice of link function. In this framework, one can recover the various methods listed above by specifying particular forms of the Bregman divergence.

Our genriesz package implements generalized Riesz regression for ADML. Users specify the estimand through an evaluation oracle and choose a Riesz representer model and a Bregman generator. The package then constructs a generator-induced link function to deliver automatic regressor balancing, estimates the representer by convex optimization with ℓ p regularization, and reports regression adjustment (RA), Riesz weighting (RW), augmented Riesz weighting (ARW), and targeted maximum likelihood estimation (TMLE)-style estimates with confidence intervals, optionally using cross-fitting (Bang & Robins, 2005;van der Laan, 2006).

The flowchart of this automatic procedure is below, where each object will be defined in the subsequent sections (Figure 1):

(i) the user specifies the parameter functional m (W, γ 0 ) for the parameter of interest θ 0 := E [m (W, γ 0 )], the Bregman generator g for Riesz representer estimation, and the basis functions ϕ(X).

(ii) the package automatically computes the link function ζ X, ϕ(X) ⊤ β that yields regressor balancing, and estimates the Riesz representer α 0 and, when needed, the regression function γ 0 .

(iii) the package outputs RA, RW, ARW, and TMLE-style estimators with standard errors and confidence intervals.

During this process, the user does not need to specify the analytic form of the Riesz representer α 0 or the link function ζ. These are constructed from the chosen basis and generator.

Relation to existing software. The genriesz package complements established DML libraries such as DoubleML (Bach et al., 2022) and EconML (Battocchi et al., 2019), as well as broader causal inference toolkits such as DoWhy (Sharma & Kiciman, 2020) and CausalML (Chen et al., 2020). These libraries offer rich sets of estimators for canonical causal models and heterogeneous treatment effects. In contrast, genriesz is estimand-and-balancing-centric: the user provides the functional m, the representer model, and the specific form of the Bregman divergence, while the package constructs generalized Riesz representers with a link function that yields balancing weights and returns the corresponding estimators. This focus also makes explicit the connection between Riesz representer fitting and balancing weights, including stable weights (Zubizarreta, 2015) and entropy balancing (Hainmueller, 2012), as well as density ratio estimation methods available in specialized packages such as densratio (Makiyama, 2019).

Generalized Riesz regression connects Riesz representer estimation, covariate balancing, and debiased estimation through Bregman divergence minimization. This section summarizes the methodological and theoretical foundations that underlie the software design. Full technical details, proofs, and extensions are provided in Kato (2026).

2.1 Linear Functionals, Riesz Representers, and Orthogonal Scores

We consider targets of the form

where m (W, γ) is linear in γ. In genriesz, users supply m as a callable that evaluates γ at modified inputs, for example, by switching a treatment component. Under standard conditions, there exists a Riesz representer α 0 such that

for all suitable γ.

(2)

The Riesz representer enters the Neyman orthogonal score

which plays a central role in debiased estimation and valid inference under weak conditions, with cross-fitting (Chernozhukov et al., 2018).

BKL divergence

Reference

This content is AI-processed based on open access ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut