{"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/metric-learning-for-clifford-group","title":"Metric Learning for Clifford Group Equivariant Neural Networks","arxiv_id":"2407.09926","date":"2024-07-13","proceeding":null,"authors":["Riccardo Ali","Paulina Kulytė","Haitz Sáez de Ocáriz Borde","Pietro Liò"],"abstract":"Clifford Group Equivariant Neural Networks (CGENNs) leverage Clifford algebras and multivectors as an alternative approach to incorporating group equivariance to ensure symmetry constraints in neural representations. In principle, this formulation generalizes to orthogonal groups and preserves equivariance regardless of the metric signature. However, previous works have restricted internal network representations to Euclidean or Minkowski (pseudo-)metrics, handpicked depending on the problem at hand. In this work, we propose an alternative method that enables the metric to be learned in a data-driven fashion, allowing the CGENN network to learn more flexible representations. Specifically, we populate metric matrices fully, ensuring they are symmetric by construction, and leverage eigenvalue decomposition to integrate this additional learnable component into the original CGENN formulation in a principled manner. Additionally, we motivate our method using insights from category theory, which enables us to explain Clifford algebras as a categorical construction and guarantee the mathematical soundness of our approach. We validate our method in various tasks and showcase the advantages of learning more flexible latent metric representations. The code and data are available at https://github.com/rick-ali/Metric-Learning-for-CGENNs","url_abs":"https://arxiv.org/abs/2407.09926v1","url_pdf":"https://arxiv.org/pdf/2407.09926v1.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":"metric-learning-for-clifford-group","repo_url":"https://github.com/rick-ali/metric-learning-for-cgenns","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"metric-learning","task_name":"Metric Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.09926","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.09926"}},"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/rick-ali/Metric-Learning-for-CGENNs","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rick-ali/metric-learning-for-cgenns","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":7,"ran_honours":4,"ran_draft_wrong":3,"ran_violates":2,"ran_fixture":3,"unverified":7},"by_repo_kind":{"official":{"samples":26,"ran":19,"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":"eacc9335cde1d246","entry":"MVLinear","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","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":"eacc9335cde1d246"}},{"code_sha256_prefix":"12d00178b3ee0e76","entry":"_smooth_abs_sqrt","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12d00178b3ee0e76"}},{"code_sha256_prefix":"4fd600fe4428ec1d","entry":"calculate_norm","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4fd600fe4428ec1d"}},{"code_sha256_prefix":"378003362f195653","entry":"calculate_norms","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"378003362f195653"}},{"code_sha256_prefix":"c267455507445bf8","entry":"canonical_reordering_sign","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"algebra/metric.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/algebra/metric.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c267455507445bf8"}},{"code_sha256_prefix":"eb3217cce9b27f2c","entry":"canonical_reordering_sign","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eb3217cce9b27f2c"}},{"code_sha256_prefix":"2354e2c3c7b22d3c","entry":"canonical_reordering_sign","repo":"rick-ali/Metric-Learning-for-CGENNs","repo_kind":"official","path":"algebra/metric.py","file_url":"https://github.com/rick-ali/Metric-Learning-for-CGENNs/blob/HEAD/algebra/metric.py","link_basis":"first_harvest_node","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":"2354e2c3c7b22d3c"}},{"code_sha256_prefix":"cffd0c2ee938ffee","entry":"canonical_reordering_sign_euclidean","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"algebra/metric.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/algebra/metric.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cffd0c2ee938ffee"}},{"code_sha256_prefix":"4c1b710580c8b7cf","entry":"canonical_reordering_sign_euclidean","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c1b710580c8b7cf"}},{"code_sha256_prefix":"d5c05c34d2e55a48","entry":"canonical_reordering_sign_euclidean","repo":"rick-ali/Metric-Learning-for-CGENNs","repo_kind":"official","path":"algebra/metric.py","file_url":"https://github.com/rick-ali/Metric-Learning-for-CGENNs/blob/HEAD/algebra/metric.py","link_basis":"first_harvest_node","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":"d5c05c34d2e55a48"}},{"code_sha256_prefix":"8c0324f3633ef2c8","entry":"construct_gmt","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c0324f3633ef2c8"}},{"code_sha256_prefix":"24a3800851807b8e","entry":"count_set_bits","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"algebra/metric.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/algebra/metric.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"24a3800851807b8e"}},{"code_sha256_prefix":"a660d9bd93058229","entry":"count_set_bits","repo":"rick-ali/Metric-Learning-for-CGENNs","repo_kind":"official","path":"algebra/metric.py","file_url":"https://github.com/rick-ali/Metric-Learning-for-CGENNs/blob/HEAD/algebra/metric.py","link_basis":"first_harvest_node","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":"a660d9bd93058229"}},{"code_sha256_prefix":"02b4e625d513ec06","entry":"get_invariants","repo":"rick-ali/Metric-Learning-for-CGENNs","repo_kind":"official","path":"models/lorentz_cggnn.py","file_url":"https://github.com/rick-ali/Metric-Learning-for-CGENNs/blob/HEAD/models/lorentz_cggnn.py","link_basis":"first_harvest_node","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":"02b4e625d513ec06"}},{"code_sha256_prefix":"1ca665edea3adf3f","entry":"gmt_element","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1ca665edea3adf3f"}},{"code_sha256_prefix":"eb8ab1e8e209f7b1","entry":"psi","repo":"rick-ali/Metric-Learning-for-CGENNs","repo_kind":"official","path":"models/lorentz_cggnn.py","file_url":"https://github.com/rick-ali/Metric-Learning-for-CGENNs/blob/HEAD/models/lorentz_cggnn.py","link_basis":"first_harvest_node","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":"eb8ab1e8e209f7b1"}},{"code_sha256_prefix":"bc66f19be57720e7","entry":"unsorted_segment_mean","repo":"rick-ali/Metric-Learning-for-CGENNs","repo_kind":"official","path":"models/nbody_cggnn.py","file_url":"https://github.com/rick-ali/Metric-Learning-for-CGENNs/blob/HEAD/models/nbody_cggnn.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc66f19be57720e7"}},{"code_sha256_prefix":"f1e6153da7a4214f","entry":"unsorted_segment_sum","repo":"rick-ali/Metric-Learning-for-CGENNs","repo_kind":"official","path":"models/lorentz_cggnn.py","file_url":"https://github.com/rick-ali/Metric-Learning-for-CGENNs/blob/HEAD/models/lorentz_cggnn.py","link_basis":"first_harvest_node","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":"f1e6153da7a4214f"}},{"code_sha256_prefix":"f6c0971a1cd07155","entry":"unsqueeze_like","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f6c0971a1cd07155"}},{"code_sha256_prefix":"af68a09b089926e0","entry":"FullyConnectedSteerableGeometricProductLayer","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.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":"af68a09b089926e0"}},{"code_sha256_prefix":"80acaf82da83dc26","entry":"NormalizationLayer","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.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":"80acaf82da83dc26"}},{"code_sha256_prefix":"158aefe877c35425","entry":"b","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.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":"158aefe877c35425"}},{"code_sha256_prefix":"9a6fb42786449575","entry":"beta","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.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":"9a6fb42786449575"}},{"code_sha256_prefix":"54e377e3d53dcda9","entry":"cayley","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.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":"54e377e3d53dcda9"}},{"code_sha256_prefix":"a1a30d9532aee437","entry":"geometric_product","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.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":"a1a30d9532aee437"}},{"code_sha256_prefix":"dcba8eaf7d6bbc97","entry":"q","repo":"rick-ali/metric-learning-for-cgenns","repo_kind":"official","path":"models/modules/fcgp.py","file_url":"https://github.com/rick-ali/metric-learning-for-cgenns/blob/HEAD/models/modules/fcgp.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":"dcba8eaf7d6bbc97"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}