{"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/on-tractable-computation-of-expected","title":"On Tractable Computation of Expected Predictions","arxiv_id":"1910.02182","date":"2019-10-05","proceeding":"NeurIPS 2019 12","authors":["Pasha Khosravi","YooJung Choi","Yitao Liang","Antonio Vergari","Guy Van Den Broeck"],"abstract":"Computing expected predictions of discriminative models is a fundamental task in machine learning that appears in many interesting applications such as fairness, handling missing values, and data analysis. Unfortunately, computing expectations of a discriminative model with respect to a probability distribution defined by an arbitrary generative model has been proven to be hard in general. In fact, the task is intractable even for simple models such as logistic regression and a naive Bayes distribution. In this paper, we identify a pair of generative and discriminative models that enables tractable computation of expectations, as well as moments of any order, of the latter with respect to the former in case of regression. Specifically, we consider expressive probabilistic circuits with certain structural constraints that support tractable probabilistic inference. Moreover, we exploit the tractable computation of high-order moments to derive an algorithm to approximate the expectations for classification scenarios in which exact computations are intractable. Our framework to compute expected predictions allows for handling of missing data during prediction time in a principled and accurate way and enables reasoning about the behavior of discriminative models. We empirically show our algorithm to consistently outperform standard imputation techniques on a variety of datasets. Finally, we illustrate how our framework can be used for exploratory data analysis.","url_abs":"https://arxiv.org/abs/1910.02182v2","url_pdf":"https://arxiv.org/pdf/1910.02182v2.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":"on-tractable-computation-of-expected","repo_url":"https://github.com/UCLA-StarAI/mc2","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[{"task_slug":"fairness","task_name":"Fairness"},{"task_slug":"imputation","task_name":"Imputation"},{"task_slug":"missing-values","task_name":"Missing Values"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"logistic-regression","method_name":"Logistic Regression"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1910.02182","atlas_url":"https://app.syntology.ai/?focus=1910.02182","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1910.02182"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/UCLA-StarAI/mc2","reach":null}],"summary":{"ran_honours":3,"ran_violates":1},"by_repo_kind":{"official":{"samples":4,"ran":4,"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":4,"samples":[{"code_sha256_prefix":"7c2345c530764f4e","entry":"choose","repo":"UCLA-StarAI/mc2","repo_kind":"official","path":"circuit_expect.py","file_url":"https://github.com/UCLA-StarAI/mc2/blob/HEAD/circuit_expect.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7c2345c530764f4e"}},{"code_sha256_prefix":"fd9e2ff504731050","entry":"lgc_index","repo":"UCLA-StarAI/mc2","repo_kind":"official","path":"circuit_expect.py","file_url":"https://github.com/UCLA-StarAI/mc2/blob/HEAD/circuit_expect.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fd9e2ff504731050"}},{"code_sha256_prefix":"f39615036d1d684a","entry":"psdd_index","repo":"UCLA-StarAI/mc2","repo_kind":"official","path":"circuit_expect.py","file_url":"https://github.com/UCLA-StarAI/mc2/blob/HEAD/circuit_expect.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f39615036d1d684a"}},{"code_sha256_prefix":"d27450ae75004f5b","entry":"taylor_aprox","repo":"UCLA-StarAI/mc2","repo_kind":"official","path":"scripts/main_exp_benchmark.py","file_url":"https://github.com/UCLA-StarAI/mc2/blob/HEAD/scripts/main_exp_benchmark.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d27450ae75004f5b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}