{"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/epidemic-inference-through-generative-neural","title":"A Bayesian generative neural network framework for epidemic inference problems","arxiv_id":"2111.03383","date":"2021-11-05","proceeding":null,"authors":["Indaco Biazzo","Alfredo Braunstein","Luca Dall'Asta","Fabio Mazza"],"abstract":"The reconstruction of missing information in epidemic spreading on contact networks can be essential in the prevention and containment strategies. The identification and warning of infectious but asymptomatic individuals (i.e., contact tracing), the well-known patient-zero problem, or the inference of the infectivity values in structured populations are examples of significant epidemic inference problems. As the number of possible epidemic cascades grows exponentially with the number of individuals involved and only an almost negligible subset of them is compatible with the observations (e.g., medical tests), epidemic inference in contact networks poses incredible computational challenges. We present a new generative neural networks framework that learns to generate the most probable infection cascades compatible with observations. The proposed method achieves better (in some cases, significantly better) or comparable results with existing methods in all problems considered both in synthetic and real contact networks. Given its generality, clear Bayesian and variational nature, the presented framework paves the way to solve fundamental inference epidemic problems with high precision in small and medium-sized real case scenarios such as the spread of infections in workplaces and hospitals.","url_abs":"https://arxiv.org/abs/2111.03383v3","url_pdf":"https://arxiv.org/pdf/2111.03383v3.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":"epidemic-inference-through-generative-neural","repo_url":"https://github.com/ocadni/annfore-results","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"epidemic-inference-through-generative-neural","repo_url":"https://github.com/ocadni/annfore","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2111.03383","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.03383"}},"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/ocadni/annfore-results","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ocadni/annfore","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":24},"by_repo_kind":{"official":{"samples":24,"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":"88a25afdb229a4de","entry":"batch_mm","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/models/common.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/models/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"88a25afdb229a4de"}},{"code_sha256_prefix":"e46492b8d6cb0304","entry":"calc_avg_states","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/l_utils.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/l_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e46492b8d6cb0304"}},{"code_sha256_prefix":"f32d4ccb471ff352","entry":"calc_feat_power","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/net/deep_linear.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/net/deep_linear.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f32d4ccb471ff352"}},{"code_sha256_prefix":"d30029f478a818ae","entry":"calc_p_no_c_np","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/models/common.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/models/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d30029f478a818ae"}},{"code_sha256_prefix":"169404d17a6af306","entry":"check_convert_tensor","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/models/common.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/models/common.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"169404d17a6af306"}},{"code_sha256_prefix":"7010edca19a563be","entry":"check_convert_tensor","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/models/sir_model_sep.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/models/sir_model_sep.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7010edca19a563be"}},{"code_sha256_prefix":"8e6aaa40cc72bcbb","entry":"format_src_print","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/l_utils.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/l_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8e6aaa40cc72bcbb"}},{"code_sha256_prefix":"5e93c65f419d5914","entry":"get_linear_layers_path","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/net/base.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/net/base.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5e93c65f419d5914"}},{"code_sha256_prefix":"db96eb179ca980fe","entry":"logP","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/train_params.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/train_params.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"db96eb179ca980fe"}},{"code_sha256_prefix":"33352cf70ab668d7","entry":"logP_logQ","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/train_params.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/train_params.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"33352cf70ab668d7"}},{"code_sha256_prefix":"8260a897032b015e","entry":"loss_fn","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/losses.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8260a897032b015e"}},{"code_sha256_prefix":"a7f1d520148c4025","entry":"loss_fn_coeff","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/losses.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a7f1d520148c4025"}},{"code_sha256_prefix":"22fae26097751c91","entry":"loss_fn_coeff_p_sus","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/losses.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"22fae26097751c91"}},{"code_sha256_prefix":"70402e4f401c4103","entry":"make_lin_layers","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/net/deep_linear.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/net/deep_linear.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"70402e4f401c4103"}},{"code_sha256_prefix":"88747e21714a2d36","entry":"make_masks","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/net/nn_sir_path_obs.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/net/nn_sir_path_obs.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"88747e21714a2d36"}},{"code_sha256_prefix":"f4f47a0dd89c33fc","entry":"make_opt","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/opt.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/opt.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f4f47a0dd89c33fc"}},{"code_sha256_prefix":"30a691fc43d7825e","entry":"my_linear","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/net/deep_linear.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/net/deep_linear.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"30a691fc43d7825e"}},{"code_sha256_prefix":"90ce614d4b6b5793","entry":"normalize","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/models/sir_model_sep.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/models/sir_model_sep.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"90ce614d4b6b5793"}},{"code_sha256_prefix":"23f65953c94eee38","entry":"one_hot_conf_from_times","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/utils/conf_utils.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/utils/conf_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23f65953c94eee38"}},{"code_sha256_prefix":"3eb2444e97ae7693","entry":"one_hot_samples","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/utils/conf_utils.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/utils/conf_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3eb2444e97ae7693"}},{"code_sha256_prefix":"b326d2cdb16132fc","entry":"one_hot_samples_relative_r","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/utils/conf_utils.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/utils/conf_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b326d2cdb16132fc"}},{"code_sha256_prefix":"25fc7691e23186cf","entry":"opt_param_init","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/train_params.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/train_params.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"25fc7691e23186cf"}},{"code_sha256_prefix":"8de71585e15ab1b8","entry":"sample_avg_states","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/learn/l_utils.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/learn/l_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8de71585e15ab1b8"}},{"code_sha256_prefix":"9fb5bf91b56bc932","entry":"transform_to_spins","repo":"ocadni/annfore","repo_kind":"official","path":"annfore/models/sir_model_sep.py","file_url":"https://github.com/ocadni/annfore/blob/HEAD/annfore/models/sir_model_sep.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9fb5bf91b56bc932"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}