{"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/end-to-end-differentiable-clustering-with","title":"End-to-end Differentiable Clustering with Associative Memories","arxiv_id":"2306.03209","date":"2023-06-05","proceeding":null,"authors":["Bishwajit Saha","Dmitry Krotov","Mohammed J. Zaki","Parikshit Ram"],"abstract":"Clustering is a widely used unsupervised learning technique involving an intensive discrete optimization problem. Associative Memory models or AMs are differentiable neural networks defining a recursive dynamical system, which have been integrated with various deep learning architectures. We uncover a novel connection between the AM dynamics and the inherent discrete assignment necessary in clustering to propose a novel unconstrained continuous relaxation of the discrete clustering problem, enabling end-to-end differentiable clustering with AM, dubbed ClAM. Leveraging the pattern completion ability of AMs, we further develop a novel self-supervised clustering loss. Our evaluations on varied datasets demonstrate that ClAM benefits from the self-supervision, and significantly improves upon both the traditional Lloyd's k-means algorithm, and more recent continuous clustering relaxations (by upto 60% in terms of the Silhouette Coefficient).","url_abs":"https://arxiv.org/abs/2306.03209v1","url_pdf":"https://arxiv.org/pdf/2306.03209v1.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":"end-to-end-differentiable-clustering-with","repo_url":"https://github.com/bsaha205/clam","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"}],"methods":[{"method_slug":"am","method_name":"AM"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2306.03209","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.03209"}},"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/bsaha205/clam","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":12},"by_repo_kind":{"official":{"samples":12,"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":"0343061c14e6fdd9","entry":"DCEC_clustering","repo":"bsaha205/clam","repo_kind":"official","path":"s_kmeans.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/s_kmeans.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":"0343061c14e6fdd9"}},{"code_sha256_prefix":"38ba031ceaf3f105","entry":"calculate_dist_to_closest_memory","repo":"bsaha205/clam","repo_kind":"official","path":"result_helper.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/result_helper.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":"38ba031ceaf3f105"}},{"code_sha256_prefix":"211e16993c7356dc","entry":"class2int","repo":"bsaha205/clam","repo_kind":"official","path":"parser.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/parser.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":"211e16993c7356dc"}},{"code_sha256_prefix":"592035015952d508","entry":"construct_masked_data","repo":"bsaha205/clam","repo_kind":"official","path":"helper.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/helper.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":"592035015952d508"}},{"code_sha256_prefix":"fd9d927238dd5f18","entry":"energy_loss","repo":"bsaha205/clam","repo_kind":"official","path":"helper.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/helper.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":"fd9d927238dd5f18"}},{"code_sha256_prefix":"e19839fc8f780c2e","entry":"find_closest_center","repo":"bsaha205/clam","repo_kind":"official","path":"result_helper.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/result_helper.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":"e19839fc8f780c2e"}},{"code_sha256_prefix":"ac7a55ce33b3c50e","entry":"generate_data","repo":"bsaha205/clam","repo_kind":"official","path":"plot_gaussian.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/plot_gaussian.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":"ac7a55ce33b3c50e"}},{"code_sha256_prefix":"39aa1230c0f6c727","entry":"get_init_mem","repo":"bsaha205/clam","repo_kind":"official","path":"result_helper.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/result_helper.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":"39aa1230c0f6c727"}},{"code_sha256_prefix":"9a42a204358a928e","entry":"get_labels","repo":"bsaha205/clam","repo_kind":"official","path":"plot_2d_cluster.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/plot_2d_cluster.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":"9a42a204358a928e"}},{"code_sha256_prefix":"b0bcf4780fb72330","entry":"mean_squared_error","repo":"bsaha205/clam","repo_kind":"official","path":"plot_gaussian.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/plot_gaussian.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":"b0bcf4780fb72330"}},{"code_sha256_prefix":"4a8531d986fd4fc4","entry":"mean_squared_loss","repo":"bsaha205/clam","repo_kind":"official","path":"helper.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/helper.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":"4a8531d986fd4fc4"}},{"code_sha256_prefix":"06620495a0b9b97e","entry":"read_file","repo":"bsaha205/clam","repo_kind":"official","path":"parser.py","file_url":"https://github.com/bsaha205/clam/blob/HEAD/parser.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":"06620495a0b9b97e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}