{"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/combining-generative-and-discriminative-3","title":"Combining Generative and Discriminative Models for Hybrid Inference","arxiv_id":"1906.02547","date":"2019-06-06","proceeding":"NeurIPS 2019 12","authors":["Victor Garcia Satorras","Zeynep Akata","Max Welling"],"abstract":"A graphical model is a structured representation of the data generating process. The traditional method to reason over random variables is to perform inference in this graphical model. However, in many cases the generating process is only a poor approximation of the much more complex true data generating process, leading to suboptimal estimation. The subtleties of the generative process are however captured in the data itself and we can `learn to infer', that is, learn a direct mapping from observations to explanatory latent variables. In this work we propose a hybrid model that combines graphical inference with a learned inverse model, which we structure as in a graph neural network, while the iterative algorithm as a whole is formulated as a recurrent neural network. By using cross-validation we can automatically balance the amount of work performed by graphical inference versus learned inference. We apply our ideas to the Kalman filter, a Gaussian hidden Markov model for time sequences, and show, among other things, that our model can estimate the trajectory of a noisy chaotic Lorenz Attractor much more accurately than either the learned or graphical inference run in isolation.","url_abs":"https://arxiv.org/abs/1906.02547v4","url_pdf":"https://arxiv.org/pdf/1906.02547v4.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":"combining-generative-and-discriminative-3","repo_url":"https://github.com/vgsatorras/hybrid-inference","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=1906.02547","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1906.02547"}},"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/vgsatorras/hybrid-inference","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"ran":0,"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":0,"samples":[{"code_sha256_prefix":"3a71957933c7588d","entry":"create_model_parameters_a","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"datasets/synthetic.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/datasets/synthetic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3a71957933c7588d"}},{"code_sha256_prefix":"4cb4dcfa4885bddb","entry":"create_model_parameters_v","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"datasets/synthetic.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/datasets/synthetic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4cb4dcfa4885bddb"}},{"code_sha256_prefix":"8d8a060173c9ed76","entry":"dot","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"models/kalman.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/models/kalman.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d8a060173c9ed76"}},{"code_sha256_prefix":"d62049b91144dfbf","entry":"meas2inv","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"models/gnn.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/models/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d62049b91144dfbf"}},{"code_sha256_prefix":"1d0741e1c7376a3e","entry":"mse","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"evaluation.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1d0741e1c7376a3e"}},{"code_sha256_prefix":"6b252d9a54e11bf6","entry":"mse_arr_loss","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"losses.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b252d9a54e11bf6"}},{"code_sha256_prefix":"9fe7a49b5072645a","entry":"polar2cartesian","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"datasets/nclt.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/datasets/nclt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9fe7a49b5072645a"}},{"code_sha256_prefix":"8df2979bb3d67229","entry":"remove_bias","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"datasets/nclt.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/datasets/nclt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8df2979bb3d67229"}},{"code_sha256_prefix":"35a42c74001f2028","entry":"simulate_system","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"datasets/synthetic.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/datasets/synthetic.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35a42c74001f2028"}},{"code_sha256_prefix":"c40ee8f9ea96e188","entry":"unsorted_segment_sum","repo":"vgsatorras/hybrid-inference","repo_kind":"official","path":"models/gnn.py","file_url":"https://github.com/vgsatorras/hybrid-inference/blob/HEAD/models/gnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c40ee8f9ea96e188"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}