{"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/faithful-heteroscedastic-regression-with","title":"Faithful Heteroscedastic Regression with Neural Networks","arxiv_id":"2212.09184","date":"2022-12-18","proceeding":null,"authors":["Andrew Stirn","Hans-Hermann Wessels","Megan Schertzer","Laura Pereira","Neville E. Sanjana","David A. Knowles"],"abstract":"Heteroscedastic regression models a Gaussian variable's mean and variance as a function of covariates. Parametric methods that employ neural networks for these parameter maps can capture complex relationships in the data. Yet, optimizing network parameters via log likelihood gradients can yield suboptimal mean and uncalibrated variance estimates. Current solutions side-step this optimization problem with surrogate objectives or Bayesian treatments. Instead, we make two simple modifications to optimization. Notably, their combination produces a heteroscedastic model with mean estimates that are provably as accurate as those from its homoscedastic counterpart (i.e.~fitting the mean under squared error loss). For a wide variety of network and task complexities, we find that mean estimates from existing heteroscedastic solutions can be significantly less accurate than those from an equivalently expressive mean-only model. Our approach provably retains the accuracy of an equally flexible mean-only model while also offering best-in-class variance calibration. Lastly, we show how to leverage our method to recover the underlying heteroscedastic noise variance.","url_abs":"https://arxiv.org/abs/2212.09184v1","url_pdf":"https://arxiv.org/pdf/2212.09184v1.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":"faithful-heteroscedastic-regression-with","repo_url":"https://github.com/astirn/faithful-heteroscedasticity","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"regression-1","task_name":"regression"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2212.09184","atlas_url":"https://app.syntology.ai/?focus=2212.09184","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.09184"}},"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/astirn/faithful-heteroscedasticity","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"unverified":6},"by_repo_kind":{"official":{"samples":15,"ran":9,"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":"69de547ed0f3de43","entry":"drop_unused_index_levels","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/analysis.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"69de547ed0f3de43"}},{"code_sha256_prefix":"4cc4eb09fc62d825","entry":"filter_model_class","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/analysis.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4cc4eb09fc62d825"}},{"code_sha256_prefix":"d28300cd8ca2086c","entry":"find_best_model","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/analysis.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d28300cd8ca2086c"}},{"code_sha256_prefix":"01bb6719b1132f5a","entry":"generate_toy_data","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/datasets.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01bb6719b1132f5a"}},{"code_sha256_prefix":"7f5388d42040cbbf","entry":"model_config_dir","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"utils.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7f5388d42040cbbf"}},{"code_sha256_prefix":"80588a88a89fe07f","entry":"model_config_index","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"utils.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"80588a88a89fe07f"}},{"code_sha256_prefix":"40250c382d71e763","entry":"pack_predictor_values","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40250c382d71e763"}},{"code_sha256_prefix":"939c359af9e8a1ac","entry":"pretty_model_name","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"utils.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"939c359af9e8a1ac"}},{"code_sha256_prefix":"7e3629bc60388d83","entry":"unpack_predictor_values","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"metrics.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e3629bc60388d83"}},{"code_sha256_prefix":"50339f5e601a3844","entry":"create_or_load_fold","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/datasets.py","link_basis":"harvester_set","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":"50339f5e601a3844"}},{"code_sha256_prefix":"4b6a18cb3da401e9","entry":"f_conv_net","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"experiments_crispr.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/experiments_crispr.py","link_basis":"harvester_set","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":"4b6a18cb3da401e9"}},{"code_sha256_prefix":"f93c271f15d8a545","entry":"f_hidden_layers","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"models.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/models.py","link_basis":"harvester_set","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":"f93c271f15d8a545"}},{"code_sha256_prefix":"09ed5acc39c0fdb7","entry":"f_neural_net","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"models.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/models.py","link_basis":"harvester_set","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":"09ed5acc39c0fdb7"}},{"code_sha256_prefix":"4529fc9ac5839676","entry":"f_output_layer","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"models.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/models.py","link_basis":"harvester_set","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":"4529fc9ac5839676"}},{"code_sha256_prefix":"5846dae8b882dabf","entry":"f_param","repo":"astirn/faithful-heteroscedasticity","repo_kind":"official","path":"experiments_vae.py","file_url":"https://github.com/astirn/faithful-heteroscedasticity/blob/HEAD/experiments_vae.py","link_basis":"harvester_set","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":"5846dae8b882dabf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}