{"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/the-hessian-penalty-a-weak-prior-for","title":"The Hessian Penalty: A Weak Prior for Unsupervised Disentanglement","arxiv_id":"2008.10599","date":"2020-08-24","proceeding":"ECCV 2020 8","authors":["William Peebles","John Peebles","Jun-Yan Zhu","Alexei Efros","Antonio Torralba"],"abstract":"Existing disentanglement methods for deep generative models rely on hand-picked priors and complex encoder-based architectures. In this paper, we propose the Hessian Penalty, a simple regularization term that encourages the Hessian of a generative model with respect to its input to be diagonal. We introduce a model-agnostic, unbiased stochastic approximation of this term based on Hutchinson's estimator to compute it efficiently during training. Our method can be applied to a wide range of deep generators with just a few lines of code. We show that training with the Hessian Penalty often causes axis-aligned disentanglement to emerge in latent space when applied to ProGAN on several datasets. Additionally, we use our regularization term to identify interpretable directions in BigGAN's latent space in an unsupervised fashion. Finally, we provide empirical evidence that the Hessian Penalty encourages substantial shrinkage when applied to over-parameterized latent spaces.","url_abs":"https://arxiv.org/abs/2008.10599v1","url_pdf":"https://arxiv.org/pdf/2008.10599v1.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":"the-hessian-penalty-a-weak-prior-for","repo_url":"https://github.com/wpeebles/hessian_penalty","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"tasks":[{"task_slug":"disentanglement","task_name":"Disentanglement"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"progan","method_name":"ProGAN"},{"method_slug":"wgan-gp-loss","method_name":"WGAN-GP Loss"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2008.10599","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2008.10599"}},"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/wpeebles/hessian_penalty","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"summary":{"ran_draft_wrong":4,"ran":3,"unverified":14},"by_repo_kind":{"official":{"samples":21,"ran":7,"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":"85eb95cce203dfc7","entry":"D_arch","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/BigGAN.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/BigGAN.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"85eb95cce203dfc7"}},{"code_sha256_prefix":"e8c308c9283407d7","entry":"G_arch","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/BigGAN.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/BigGAN.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e8c308c9283407d7"}},{"code_sha256_prefix":"52d10a10fb72fb9f","entry":"find_classes","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/datasets.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/datasets.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"52d10a10fb72fb9f"}},{"code_sha256_prefix":"c41836f3e51fa8f1","entry":"gram_schmidt","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/layers.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/layers.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c41836f3e51fa8f1"}},{"code_sha256_prefix":"4e6a8faaf8e44abe","entry":"is_image_file","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/datasets.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/datasets.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4e6a8faaf8e44abe"}},{"code_sha256_prefix":"79e61b6269a450e8","entry":"make_dataset","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/datasets.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/datasets.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"79e61b6269a450e8"}},{"code_sha256_prefix":"8de600fe2220e241","entry":"rademacher","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"hessian_penalty_pytorch.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/hessian_penalty_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"8de600fe2220e241"}},{"code_sha256_prefix":"a99a05ac52533be9","entry":"D_arch","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/BigGANdeep.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/BigGANdeep.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a99a05ac52533be9"}},{"code_sha256_prefix":"44d6a6343f6eb182","entry":"G_arch","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/BigGANdeep.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/BigGANdeep.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"44d6a6343f6eb182"}},{"code_sha256_prefix":"7a6f2360b5090449","entry":"fast_gram_schmidt","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/layers.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7a6f2360b5090449"}},{"code_sha256_prefix":"84a7e309cd2bf8f6","entry":"get_current_hessian_penalty_loss_weight","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"progan_experiments/training/hessian_penalties.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/progan_experiments/training/hessian_penalties.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"84a7e309cd2bf8f6"}},{"code_sha256_prefix":"8cd6ed99fbc46c9b","entry":"hessian_penalty","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"hessian_penalty_np.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/hessian_penalty_np.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"8cd6ed99fbc46c9b"}},{"code_sha256_prefix":"3c316ca169bb8f87","entry":"hessian_penalty","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"hessian_penalty_pytorch.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/hessian_penalty_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3c316ca169bb8f87"}},{"code_sha256_prefix":"982a26492dc6b7fb","entry":"loss_dcgan_dis","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/losses.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"982a26492dc6b7fb"}},{"code_sha256_prefix":"6c34831223553b6f","entry":"loss_dcgan_gen","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/losses.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"6c34831223553b6f"}},{"code_sha256_prefix":"290cd37ab0098d5c","entry":"loss_hinge_dis","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/losses.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"290cd37ab0098d5c"}},{"code_sha256_prefix":"c0f4937338732adf","entry":"multi_layer_second_directional_derivative","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"hessian_penalty_pytorch.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/hessian_penalty_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c0f4937338732adf"}},{"code_sha256_prefix":"eee49efebcd3ff56","entry":"multi_layer_second_directional_derivative","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/hessian_penalty.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/hessian_penalty.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"eee49efebcd3ff56"}},{"code_sha256_prefix":"4015ab1f3ab9b881","entry":"proj","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/layers.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4015ab1f3ab9b881"}},{"code_sha256_prefix":"58800b4db4b14ffd","entry":"rademacher","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/hessian_penalty.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/hessian_penalty.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"58800b4db4b14ffd"}},{"code_sha256_prefix":"ea70317070ce2ab5","entry":"second_directional_derivative","repo":"wpeebles/hessian_penalty","repo_kind":"official","path":"biggan_discovery/hessian_penalty.py","file_url":"https://github.com/wpeebles/hessian_penalty/blob/HEAD/biggan_discovery/hessian_penalty.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ea70317070ce2ab5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}