{"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/inducing-neural-collapse-to-a-fixed-hierarchy","title":"Inducing Neural Collapse to a Fixed Hierarchy-Aware Frame for Reducing Mistake Severity","arxiv_id":"2303.05689","date":"2023-03-10","proceeding":"ICCV 2023 1","authors":["TONG LIANG","Jim Davis"],"abstract":"There is a recently discovered and intriguing phenomenon called Neural Collapse: at the terminal phase of training a deep neural network for classification, the within-class penultimate feature means and the associated classifier vectors of all flat classes collapse to the vertices of a simplex Equiangular Tight Frame (ETF). Recent work has tried to exploit this phenomenon by fixing the related classifier weights to a pre-computed ETF to induce neural collapse and maximize the separation of the learned features when training with imbalanced data. In this work, we propose to fix the linear classifier of a deep neural network to a Hierarchy-Aware Frame (HAFrame), instead of an ETF, and use a cosine similarity-based auxiliary loss to learn hierarchy-aware penultimate features that collapse to the HAFrame. We demonstrate that our approach reduces the mistake severity of the model's predictions while maintaining its top-1 accuracy on several datasets of varying scales with hierarchies of heights ranging from 3 to 12. Code: https://github.com/ltong1130ztr/HAFrame","url_abs":"https://arxiv.org/abs/2303.05689v2","url_pdf":"https://arxiv.org/pdf/2303.05689v2.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":"inducing-neural-collapse-to-a-fixed-hierarchy","repo_url":"https://github.com/ltong1130ztr/haframe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2303.05689","atlas_url":"https://app.syntology.ai/?focus=2303.05689","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.05689"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/ltong1130ztr/haframe","reach":null}],"summary":{"ran":1,"ran_fixture":1,"ran_draft_wrong":4,"ran_honours":1},"by_repo_kind":{"official":{"samples":7,"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":7,"samples":[{"code_sha256_prefix":"b2ebddc977309207","entry":"DistanceDict","repo":"ltong1130ztr/haframe","repo_kind":"official","path":"HAFrame/solve_HAF.py","file_url":"https://github.com/ltong1130ztr/haframe/blob/HEAD/HAFrame/solve_HAF.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b2ebddc977309207"}},{"code_sha256_prefix":"35485c4530562fe0","entry":"cls_weights_matrix_factorization_solver","repo":"ltong1130ztr/haframe","repo_kind":"official","path":"HAFrame/solve_HAF.py","file_url":"https://github.com/ltong1130ztr/haframe/blob/HEAD/HAFrame/solve_HAF.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"35485c4530562fe0"}},{"code_sha256_prefix":"88560c243b8f8496","entry":"find_max_separation_matrix_factorization_solver","repo":"ltong1130ztr/haframe","repo_kind":"official","path":"HAFrame/solve_HAF.py","file_url":"https://github.com/ltong1130ztr/haframe/blob/HEAD/HAFrame/solve_HAF.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"88560c243b8f8496"}},{"code_sha256_prefix":"480ca9eff5a52152","entry":"fixed_haf_cls_weights","repo":"ltong1130ztr/haframe","repo_kind":"official","path":"HAFrame/solve_HAF.py","file_url":"https://github.com/ltong1130ztr/haframe/blob/HEAD/HAFrame/solve_HAF.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"480ca9eff5a52152"}},{"code_sha256_prefix":"449bc1c4ca4fa6bb","entry":"load_distance_matrix","repo":"ltong1130ztr/haframe","repo_kind":"official","path":"HAFrame/solve_HAF.py","file_url":"https://github.com/ltong1130ztr/haframe/blob/HEAD/HAFrame/solve_HAF.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"449bc1c4ca4fa6bb"}},{"code_sha256_prefix":"4da9d5c7c6c3c9ce","entry":"load_distances","repo":"ltong1130ztr/haframe","repo_kind":"official","path":"HAFrame/solve_HAF.py","file_url":"https://github.com/ltong1130ztr/haframe/blob/HEAD/HAFrame/solve_HAF.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4da9d5c7c6c3c9ce"}},{"code_sha256_prefix":"22db6d272cd3127f","entry":"map_hdistance_to_cosine_similarity_exponential_decay","repo":"ltong1130ztr/haframe","repo_kind":"official","path":"HAFrame/solve_HAF.py","file_url":"https://github.com/ltong1130ztr/haframe/blob/HEAD/HAFrame/solve_HAF.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"22db6d272cd3127f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}