{"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/arxiv-2605-20302","title":"Neural Collapse by Design: Learning Class Prototypes on the Hypersphere","arxiv_id":"2605.20302","date":"2026-05-19","proceeding":"ICML","authors":["Panagiotis Koromilas","Theodoros Giannakopoulos","Mihalis A. Nicolaou","Yannis Panagakis"],"abstract":"Supervised classification has a theoretical optimum, Neural Collapse (NC), yet neither of its two dominant paradigms reaches it in practice. Cross entropy (CE) leaves radial degrees of freedom unconstrained and converges to a degenerate geometry, while supervised contrastive learning (SCL) drives features toward NC during pretraining but discards this structure in a post hoc linear probing phase. We show that both paradigms are different appearances of the same method that contrasts prototypes on the unit hypersphere, and that closing the gap requires fixing each at its point of failure. From the CE side, we propose NTCE and NONL, two normalized losses that import contrastive optimization's missing ingredients into classifier learning: a large effective negative set and decoupled alignment and uniformity terms. From the SCL side, we prove that SCL's objective already optimizes throughout training for a principled classifier whose weights are the class mean embeddings, making linear probing both redundant and harmful. Empirically, on four benchmarks including ImageNet-1K, NTCE and NONL surpass CE accuracy, closely approximate NC ($\\geq 95\\%$), and match CE's converged NC on 4/5 metrics in under $7.5\\%$ of its iterations, while SCL with fixed prototypes matches linear probing without the hours-long classifier training phase. The learned geometry yields $+5.5\\%$ mean relative improvement in transfer learning, up to $+8.7\\%$ under severe class imbalance, and improved robustness to corruptions on ImageNet-C. Our work recasts supervised learning as prototype learning on the hypersphere, with NC reached by design.","url_abs":"https://arxiv.org/abs/2605.20302","url_pdf":"https://arxiv.org/pdf/2605.20302","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2605.20302","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.20302"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/pakoromilas/nc_by_design","reach":null}],"summary":{"ran":5,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":7,"ran":5,"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":"626073c608c99a4c","entry":"control_block_gradients","repo":"pakoromilas/nc_by_design","repo_kind":"found_in_text","path":"networks/resnet_big.py","file_url":"https://github.com/pakoromilas/nc_by_design/blob/HEAD/networks/resnet_big.py","link_basis":"first_harvest_node","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":"626073c608c99a4c"}},{"code_sha256_prefix":"0b5e70c6b93a8051","entry":"embedding_ETF_metrics","repo":"pakoromilas/nc_by_design","repo_kind":"found_in_text","path":"util.py","file_url":"https://github.com/pakoromilas/nc_by_design/blob/HEAD/util.py","link_basis":"first_harvest_node","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":"0b5e70c6b93a8051"}},{"code_sha256_prefix":"a9d09c00371caf08","entry":"generate_simplex_etf","repo":"pakoromilas/nc_by_design","repo_kind":"found_in_text","path":"networks/resnet_big.py","file_url":"https://github.com/pakoromilas/nc_by_design/blob/HEAD/networks/resnet_big.py","link_basis":"first_harvest_node","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":"a9d09c00371caf08"}},{"code_sha256_prefix":"bd7e8189f3c5e975","entry":"get_learning_rate_for_batch_size","repo":"pakoromilas/nc_by_design","repo_kind":"found_in_text","path":"main_supcon.py","file_url":"https://github.com/pakoromilas/nc_by_design/blob/HEAD/main_supcon.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"bd7e8189f3c5e975"}},{"code_sha256_prefix":"f3915d184c480cb7","entry":"weight_embeddings_information","repo":"pakoromilas/nc_by_design","repo_kind":"found_in_text","path":"util.py","file_url":"https://github.com/pakoromilas/nc_by_design/blob/HEAD/util.py","link_basis":"first_harvest_node","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":"f3915d184c480cb7"}},{"code_sha256_prefix":"04e0e228859cf62b","entry":"NC","repo":"pakoromilas/nc_by_design","repo_kind":"found_in_text","path":"util.py","file_url":"https://github.com/pakoromilas/nc_by_design/blob/HEAD/util.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":"04e0e228859cf62b"}},{"code_sha256_prefix":"4c0a8859c4aa301e","entry":"reduce_tensor","repo":"pakoromilas/nc_by_design","repo_kind":"found_in_text","path":"main_ce.py","file_url":"https://github.com/pakoromilas/nc_by_design/blob/HEAD/main_ce.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":"4c0a8859c4aa301e"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}