{"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/coneheads-hierarchy-aware-attention-1","title":"Coneheads: Hierarchy Aware Attention","arxiv_id":"2306.00392","date":"2023-06-01","proceeding":"NeurIPS 2023 11","authors":["Albert Tseng","Tao Yu","Toni J. B. Liu","Christopher De Sa"],"abstract":"Attention networks such as transformers have achieved state-of-the-art performance in many domains. These networks rely heavily on the dot product attention operator, which computes the similarity between two points by taking their inner product. However, the inner product does not explicitly model the complex structural properties of real world datasets, such as hierarchies between data points. To remedy this, we introduce cone attention, a drop-in replacement for dot product attention based on hyperbolic entailment cones. Cone attention associates two points by the depth of their lowest common ancestor in a hierarchy defined by hyperbolic cones, which intuitively measures the divergence of two points and gives a hierarchy aware similarity score. We test cone attention on a wide variety of models and tasks and show that it improves task-level performance over dot product attention and other baselines, and is able to match dot-product attention with significantly fewer parameters. Our results suggest that cone attention is an effective way to capture hierarchical relationships when calculating attention.","url_abs":"https://arxiv.org/abs/2306.00392v2","url_pdf":"https://arxiv.org/pdf/2306.00392v2.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":"coneheads-hierarchy-aware-attention-1","repo_url":"https://github.com/tsengalb99/coneheads","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"coneheads-hierarchy-aware-attention-1","repo_url":"https://github.com/MindCode-4/code-11/tree/main/coneheads-hierarchy-aware-attention","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"coneheads-hierarchy-aware-attention-1","repo_url":"https://github.com/MindCode-4/code-6/tree/main/coneheads-hierarchy-aware-attention","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"coneheads-hierarchy-aware-attention-1","repo_url":"https://github.com/MindSpore-scientific/code-3/tree/main/coneheads-hierarchy-aware-attention","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[],"methods":[{"method_slug":"aware","method_name":"AWARE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2306.00392","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.00392"}},"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/facebookresearch/DiT","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindSpore-scientific/code-3/tree/main/coneheads-hierarchy-aware-attention","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tsengalb99/coneheads","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindCode-4/code-6/tree/main/coneheads-hierarchy-aware-attention","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindCode-4/code-11/tree/main/coneheads-hierarchy-aware-attention","reach":null}],"summary":{"ran_violates":1,"ran_draft_wrong":5,"ran_fixture":1},"by_repo_kind":{"official":{"samples":6,"ran":6,"repositories":1},"listed":{"samples":1,"ran":1,"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":6,"samples":[{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"MindSpore-scientific/code-3","repo_kind":"listed","path":"Adaptive-Nesterov-Momentum-Algorithm/adan.py","file_url":"https://github.com/MindSpore-scientific/code-3/blob/HEAD/Adaptive-Nesterov-Momentum-Algorithm/adan.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"848aac7f0587758a","entry":"map_psi","repo":"tsengalb99/coneheads","repo_kind":"official","path":"penumbral.py","file_url":"https://github.com/tsengalb99/coneheads/blob/HEAD/penumbral.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"848aac7f0587758a"}},{"code_sha256_prefix":"f9635df6ce8a0f46","entry":"map_xi","repo":"tsengalb99/coneheads","repo_kind":"official","path":"umbral.py","file_url":"https://github.com/tsengalb99/coneheads/blob/HEAD/umbral.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f9635df6ce8a0f46"}},{"code_sha256_prefix":"0738494b0724bcf8","entry":"map_xi","repo":"tsengalb99/coneheads","repo_kind":"official","path":"umbral.py","file_url":"https://github.com/tsengalb99/coneheads/blob/HEAD/umbral.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0738494b0724bcf8"}},{"code_sha256_prefix":"e31388eaae26fb0d","entry":"penumbral","repo":"tsengalb99/coneheads","repo_kind":"official","path":"penumbral.py","file_url":"https://github.com/tsengalb99/coneheads/blob/HEAD/penumbral.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e31388eaae26fb0d"}},{"code_sha256_prefix":"d3431bdb8ea750ce","entry":"umbral","repo":"tsengalb99/coneheads","repo_kind":"official","path":"umbral.py","file_url":"https://github.com/tsengalb99/coneheads/blob/HEAD/umbral.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d3431bdb8ea750ce"}},{"code_sha256_prefix":"6d038550cc281727","entry":"umbral","repo":"tsengalb99/coneheads","repo_kind":"official","path":"umbral.py","file_url":"https://github.com/tsengalb99/coneheads/blob/HEAD/umbral.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6d038550cc281727"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}