{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2602-17543","title":"genriesz: A Python Package for Automatic Debiased Machine Learning with Generalized Riesz Regression","arxiv_id":"2602.17543","date":"2026-02-19","proceeding":null,"authors":["Masahiro Kato"],"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.","url_abs":"https://arxiv.org/abs/2602.17543","url_pdf":"https://arxiv.org/pdf/2602.17543","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2602.17543","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2602.17543"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/MasaKat0/genriesz","reach":null}],"summary":{"ran":3,"ran_draft_wrong":5,"ran_honours":1,"ran_fixture":2,"unverified":4},"by_repo_kind":{"found_in_text":{"samples":15,"ran":11,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":15,"samples":[{"code_sha256_prefix":"aac17f214043b73a","entry":"MLP","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"aac17f214043b73a"}},{"code_sha256_prefix":"cbfece8c804c3676","entry":"TimeEmbedding","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"cbfece8c804c3676"}},{"code_sha256_prefix":"059b6f2f6a323ea7","entry":"TimeScoreNet","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"059b6f2f6a323ea7"}},{"code_sha256_prefix":"b462752e5b232de4","entry":"_as_2d_float_array","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"b462752e5b232de4"}},{"code_sha256_prefix":"4444763ddde735de","entry":"_keeps_global_torch_rng","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"4444763ddde735de"}},{"code_sha256_prefix":"38faabe0e9af49f0","entry":"_rand_batch","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"38faabe0e9af49f0"}},{"code_sha256_prefix":"003bce1094c3908d","entry":"get_device","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"003bce1094c3908d"}},{"code_sha256_prefix":"14222eebe2da2962","entry":"interpolate_linear","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"14222eebe2da2962"}},{"code_sha256_prefix":"5427663ed0151c20","entry":"lambda_fn","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5427663ed0151c20"}},{"code_sha256_prefix":"66e6e15668cf7727","entry":"lambda_prime_fn","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"66e6e15668cf7727"}},{"code_sha256_prefix":"a70d4e32e3842915","entry":"time_smr_loss","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"a70d4e32e3842915"}},{"code_sha256_prefix":"8525807841a32dd1","entry":"_require_torch","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"8525807841a32dd1"}},{"code_sha256_prefix":"c6bd8ac8f1d9f7f9","entry":"_seed_torch","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c6bd8ac8f1d9f7f9"}},{"code_sha256_prefix":"8ec733601b00cd86","entry":"_warn_if_unstable_lambda_kind","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"8ec733601b00cd86"}},{"code_sha256_prefix":"b8467179acf8221a","entry":"fit_time_smr_dre_infinity","repo":"MasaKat0/genriesz","repo_kind":"found_in_text","path":"src/genriesz/scorematchingriesz.py","file_url":"https://github.com/MasaKat0/genriesz/blob/HEAD/src/genriesz/scorematchingriesz.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"b8467179acf8221a"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}