{"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/towards-representation-learning-for-weighting","title":"Towards Representation Learning for Weighting Problems in Design-Based Causal Inference","arxiv_id":"2409.16407","date":"2024-09-24","proceeding":null,"authors":["Oscar Clivio","Avi Feller","Chris Holmes"],"abstract":"Reweighting a distribution to minimize a distance to a target distribution is a powerful and flexible strategy for estimating a wide range of causal effects, but can be challenging in practice because optimal weights typically depend on knowledge of the underlying data generating process. In this paper, we focus on design-based weights, which do not incorporate outcome information; prominent examples include prospective cohort studies, survey weighting, and the weighting portion of augmented weighting estimators. In such applications, we explore the central role of representation learning in finding desirable weights in practice. Unlike the common approach of assuming a well-specified representation, we highlight the error due to the choice of a representation and outline a general framework for finding suitable representations that minimize this error. Building on recent work that combines balancing weights and neural networks, we propose an end-to-end estimation procedure that learns a flexible representation, while retaining promising theoretical properties. We show that this approach is competitive in a range of common causal inference tasks.","url_abs":"https://arxiv.org/abs/2409.16407v1","url_pdf":"https://arxiv.org/pdf/2409.16407v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"towards-representation-learning-for-weighting","repo_url":"https://github.com/oscarclivio/representations_weighting","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"causal-inference","task_name":"Causal Inference"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"causal-inference","method_name":"Causal inference"},{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.16407","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.16407"}},"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":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/oscarclivio/representations_weighting","reach":{"status":"ok"}}],"summary":{"ran":14,"unverified":2},"by_repo_kind":{"official":{"samples":16,"ran":14,"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":16,"samples":[{"code_sha256_prefix":"02947b6fc7080474","entry":"a_to_integers","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/real_weights.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/real_weights.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"02947b6fc7080474"}},{"code_sha256_prefix":"6a92a2b84d154a21","entry":"build_fc_network","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/lightning_modules.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/lightning_modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a92a2b84d154a21"}},{"code_sha256_prefix":"30967154199b7233","entry":"check_integers","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/real_weights.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/real_weights.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"30967154199b7233"}},{"code_sha256_prefix":"592916282cc08ee4","entry":"check_one_hot","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/real_weights.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/real_weights.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"592916282cc08ee4"}},{"code_sha256_prefix":"2c31e149c4b9a353","entry":"compression_then_balancing","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/att_methods.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/att_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2c31e149c4b9a353"}},{"code_sha256_prefix":"392e1b7cf5b30d48","entry":"direct_covariate_compression","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/representations.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/representations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"392e1b7cf5b30d48"}},{"code_sha256_prefix":"1478b0334da8f133","entry":"entropy_balancing_weights","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/att_methods.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/att_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1478b0334da8f133"}},{"code_sha256_prefix":"aed9ae38ec4a03f5","entry":"exact_kernel","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aed9ae38ec4a03f5"}},{"code_sha256_prefix":"0c6a37389688774e","entry":"first_dimensions_compression","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/representations.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/representations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0c6a37389688774e"}},{"code_sha256_prefix":"eb06aba842f4f9ef","entry":"gaussian_kernel","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eb06aba842f4f9ef"}},{"code_sha256_prefix":"c7fc730e78c91a90","entry":"kernel2semimetric","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/ate_methods.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/ate_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7fc730e78c91a90"}},{"code_sha256_prefix":"ae272287e72a0ab2","entry":"mahalanobis_kernel","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/ate_methods.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/ate_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ae272287e72a0ab2"}},{"code_sha256_prefix":"514e2ce79c7b07f6","entry":"one_hot","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/datasets.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"514e2ce79c7b07f6"}},{"code_sha256_prefix":"4bd02ca4287d6c1f","entry":"shape_one","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/lightning_modules.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/lightning_modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4bd02ca4287d6c1f"}},{"code_sha256_prefix":"c9632a93ee931024","entry":"kernel_balancing","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/att_methods.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/att_methods.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c9632a93ee931024"}},{"code_sha256_prefix":"46a33cda34daec62","entry":"l1_error","repo":"oscarclivio/representations_weighting","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/oscarclivio/representations_weighting/blob/HEAD/src/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"46a33cda34daec62"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}