{"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/hahe-hierarchical-attention-for-hyper","title":"HAHE: Hierarchical Attention for Hyper-Relational Knowledge Graphs in Global and Local Level","arxiv_id":"2305.06588","date":"2023-05-11","proceeding":"ACL 2023 7","authors":["Haoran Luo","Haihong E","Yuhao Yang","Yikai Guo","Mingzhi Sun","Tianyu Yao","Zichen Tang","Kaiyang Wan","Meina Song","Wei Lin"],"abstract":"Link Prediction on Hyper-relational Knowledge Graphs (HKG) is a worthwhile endeavor. HKG consists of hyper-relational facts (H-Facts), composed of a main triple and several auxiliary attribute-value qualifiers, which can effectively represent factually comprehensive information. The internal structure of HKG can be represented as a hypergraph-based representation globally and a semantic sequence-based representation locally. However, existing research seldom simultaneously models the graphical and sequential structure of HKGs, limiting HKGs' representation. To overcome this limitation, we propose a novel Hierarchical Attention model for HKG Embedding (HAHE), including global-level and local-level attention. The global-level attention can model the graphical structure of HKG using hypergraph dual-attention layers, while the local-level attention can learn the sequential structure inside H-Facts via heterogeneous self-attention layers. Experiment results indicate that HAHE achieves state-of-the-art performance in link prediction tasks on HKG standard datasets. In addition, HAHE addresses the issue of HKG multi-position prediction for the first time, increasing the applicability of the HKG link prediction task. Our code is publicly available.","url_abs":"https://arxiv.org/abs/2305.06588v2","url_pdf":"https://arxiv.org/pdf/2305.06588v2.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":"hahe-hierarchical-attention-for-hyper","repo_url":"https://github.com/lhrlab/hahe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"prediction","task_name":"Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-prediction-on-jf17k","task":"Link Prediction","dataset":"JF17K","model":"HAHE","rank_in_archive_order":1,"of":3,"metrics":{"H@1":"0.554","H@10":"0.806","MRR":"0.623"},"uses_additional_data":false},{"leaderboard":"/sota/link-prediction-on-wd50k","task":"Link Prediction","dataset":"Temp8","model":"HAHE","rank_in_archive_order":1,"of":2,"metrics":{"Hit@1":"0.291","Hit@10":"0.516","MRR":"0.368"},"uses_additional_data":false},{"leaderboard":"/sota/link-prediction-on-wikipeople","task":"Link Prediction","dataset":"Wikipeople","model":"HAHE","rank_in_archive_order":1,"of":1,"metrics":{"H@1":"0.447","H@10":"0.639","MRR":"0.509"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2305.06588","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.06588"}},"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/lhrlab/hahe","reach":null}],"summary":{"ran":3,"unverified":3},"by_repo_kind":{"official":{"samples":6,"ran":3,"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":"c7a04b50a7ae1d74","entry":"FeedForward","repo":"lhrlab/hahe","repo_kind":"official","path":"src/transformer.py","file_url":"https://github.com/lhrlab/hahe/blob/HEAD/src/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c7a04b50a7ae1d74"}},{"code_sha256_prefix":"62cdeda5eb8e1d06","entry":"Global","repo":"lhrlab/hahe","repo_kind":"official","path":"src/transformer.py","file_url":"https://github.com/lhrlab/hahe/blob/HEAD/src/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"62cdeda5eb8e1d06"}},{"code_sha256_prefix":"73433de2ef4e87f4","entry":"PrepareForMultiHeadAttention","repo":"lhrlab/hahe","repo_kind":"official","path":"src/transformer.py","file_url":"https://github.com/lhrlab/hahe/blob/HEAD/src/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"73433de2ef4e87f4"}},{"code_sha256_prefix":"85383a26407bef78","entry":"MultiHeadAttention","repo":"lhrlab/hahe","repo_kind":"official","path":"src/transformer.py","file_url":"https://github.com/lhrlab/hahe/blob/HEAD/src/transformer.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":"85383a26407bef78"}},{"code_sha256_prefix":"96a90688e81415f4","entry":"Transformer","repo":"lhrlab/hahe","repo_kind":"official","path":"src/transformer.py","file_url":"https://github.com/lhrlab/hahe/blob/HEAD/src/transformer.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":"96a90688e81415f4"}},{"code_sha256_prefix":"61b713fd88663e63","entry":"TransformerLayer","repo":"lhrlab/hahe","repo_kind":"official","path":"src/transformer.py","file_url":"https://github.com/lhrlab/hahe/blob/HEAD/src/transformer.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":"61b713fd88663e63"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}