{"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/this-probably-looks-exactly-like-that-an","title":"This Probably Looks Exactly Like That: An Invertible Prototypical Network","arxiv_id":"2407.12200","date":"2024-07-16","proceeding":null,"authors":["Zachariah Carmichael","Timothy Redgrave","Daniel Gonzalez Cedre","Walter J. Scheirer"],"abstract":"We combine concept-based neural networks with generative, flow-based classifiers into a novel, intrinsically explainable, exactly invertible approach to supervised learning. Prototypical neural networks, a type of concept-based neural network, represent an exciting way forward in realizing human-comprehensible machine learning without concept annotations, but a human-machine semantic gap continues to haunt current approaches. We find that reliance on indirect interpretation functions for prototypical explanations imposes a severe limit on prototypes' informative power. From this, we posit that invertibly learning prototypes as distributions over the latent space provides more robust, expressive, and interpretable modeling. We propose one such model, called ProtoFlow, by composing a normalizing flow with Gaussian mixture models. ProtoFlow (1) sets a new state-of-the-art in joint generative and predictive modeling and (2) achieves predictive performance comparable to existing prototypical neural networks while enabling richer interpretation.","url_abs":"https://arxiv.org/abs/2407.12200v1","url_pdf":"https://arxiv.org/pdf/2407.12200v1.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":"this-probably-looks-exactly-like-that-an","repo_url":"https://github.com/craymichael/protoflow","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2407.12200","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.12200"}},"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":"deterministic:regex_extraction","url":"https://github.com/craymichael/ProtoFlow","reach":{"status":"ok","spdx":"GPL-2.0"}}],"summary":{"ran":12,"unverified":4},"by_repo_kind":{"official":{"samples":16,"ran":12,"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":16,"samples":[{"code_sha256_prefix":"7252b82bcb3357b6","entry":"calculate_matmul","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/gmm.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/gmm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"7252b82bcb3357b6"}},{"code_sha256_prefix":"168a9cabc7a9663b","entry":"compute_softdtw","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/kmeans/soft_dtw_cuda.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/kmeans/soft_dtw_cuda.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"168a9cabc7a9663b"}},{"code_sha256_prefix":"ab0a02fe3f0bce01","entry":"compute_softdtw_backward","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/kmeans/soft_dtw_cuda.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/kmeans/soft_dtw_cuda.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"ab0a02fe3f0bce01"}},{"code_sha256_prefix":"c582f1abfdf87bbf","entry":"consistency_loss","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/training.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/training.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c582f1abfdf87bbf"}},{"code_sha256_prefix":"7294ea39eb1f484b","entry":"convert_legacy_config","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/utils.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"7294ea39eb1f484b"}},{"code_sha256_prefix":"32ba9344b7753cf9","entry":"dict_to_namespace","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/utils.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"32ba9344b7753cf9"}},{"code_sha256_prefix":"e89baae0a1437b16","entry":"elbo_bpd","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/metrics.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"e89baae0a1437b16"}},{"code_sha256_prefix":"d232e453e386a533","entry":"elbo_nats","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"denseflow/utils/loss.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/denseflow/utils/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d232e453e386a533"}},{"code_sha256_prefix":"4eae3eb7fc10b826","entry":"linear_rampup","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/training.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/training.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"4eae3eb7fc10b826"}},{"code_sha256_prefix":"9f24b4c6cbb5e19f","entry":"loglik_bpd","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"denseflow/utils/loss.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/denseflow/utils/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"9f24b4c6cbb5e19f"}},{"code_sha256_prefix":"9bff0117086fa0a0","entry":"loglik_nats","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"denseflow/utils/loss.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/denseflow/utils/loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"9bff0117086fa0a0"}},{"code_sha256_prefix":"b9bb230c9c9c7a26","entry":"z_log_prob","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/training.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/training.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"b9bb230c9c9c7a26"}},{"code_sha256_prefix":"3669431e2653a3ed","entry":"calculate_matmul_n_times","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/gmm.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/gmm.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"3669431e2653a3ed"}},{"code_sha256_prefix":"a30a1acd1c8065d4","entry":"get_dataset","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/datasets.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/datasets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"a30a1acd1c8065d4"}},{"code_sha256_prefix":"89a318a54beb022e","entry":"timed_run","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/kmeans/soft_dtw_cuda.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/kmeans/soft_dtw_cuda.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"89a318a54beb022e"}},{"code_sha256_prefix":"d8c19986ae830c3f","entry":"write_shm_meta","repo":"craymichael/ProtoFlow","repo_kind":"official","path":"protoflow/datasets.py","file_url":"https://github.com/craymichael/ProtoFlow/blob/HEAD/protoflow/datasets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d8c19986ae830c3f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}