{"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/relational-graph-attention-network-for-aspect","title":"Relational Graph Attention Network for Aspect-based Sentiment Analysis","arxiv_id":"2004.12362","date":"2020-04-26","proceeding":"ACL 2020 6","authors":["Kai Wang","Weizhou Shen","Yunyi Yang","Xiaojun Quan","Rui Wang"],"abstract":"Aspect-based sentiment analysis aims to determine the sentiment polarity towards a specific aspect in online reviews. Most recent efforts adopt attention-based neural network models to implicitly connect aspects with opinion words. However, due to the complexity of language and the existence of multiple aspects in a single sentence, these models often confuse the connections. In this paper, we address this problem by means of effective encoding of syntax information. Firstly, we define a unified aspect-oriented dependency tree structure rooted at a target aspect by reshaping and pruning an ordinary dependency parse tree. Then, we propose a relational graph attention network (R-GAT) to encode the new tree structure for sentiment prediction. Extensive experiments are conducted on the SemEval 2014 and Twitter datasets, and the experimental results confirm that the connections between aspects and opinion words can be better established with our approach, and the performance of the graph attention network (GAT) is significantly improved as a consequence.","url_abs":"https://arxiv.org/abs/2004.12362v1","url_pdf":"https://arxiv.org/pdf/2004.12362v1.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":"relational-graph-attention-network-for-aspect","repo_url":"https://github.com/shenwzh3/RGAT-ABSA","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"aspect-based-sentiment-analysis-1","task_name":"Aspect-Based Sentiment Analysis"},{"task_slug":"aspect-based-sentiment-analysis","task_name":"Aspect-Based Sentiment Analysis (ABSA)"},{"task_slug":"graph-attention","task_name":"Graph Attention"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"sentiment-analysis","task_name":"Sentiment Analysis"}],"methods":[{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2004.12362","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2004.12362"}},"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/huggingface/transformers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shenwzh3/RGAT-ABSA","reach":null}],"summary":{"ran":3,"ran_honours":1,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":"115b86dd96a1d0e7","entry":"DotprodAttention","repo":"shenwzh3/RGAT-ABSA","repo_kind":"official","path":"model.py","file_url":"https://github.com/shenwzh3/RGAT-ABSA/blob/HEAD/model.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":"115b86dd96a1d0e7"}},{"code_sha256_prefix":"d88c73dc0cb56dbf","entry":"Highway","repo":"shenwzh3/RGAT-ABSA","repo_kind":"official","path":"model.py","file_url":"https://github.com/shenwzh3/RGAT-ABSA/blob/HEAD/model.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":"d88c73dc0cb56dbf"}},{"code_sha256_prefix":"de6be27f7200c5a2","entry":"RelationAttention","repo":"shenwzh3/RGAT-ABSA","repo_kind":"official","path":"model.py","file_url":"https://github.com/shenwzh3/RGAT-ABSA/blob/HEAD/model.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":"de6be27f7200c5a2"}},{"code_sha256_prefix":"bf59110e6f5ddc08","entry":"mask_logits","repo":"shenwzh3/RGAT-ABSA","repo_kind":"official","path":"model.py","file_url":"https://github.com/shenwzh3/RGAT-ABSA/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf59110e6f5ddc08"}},{"code_sha256_prefix":"5cc375ba124fc59a","entry":"Aspect_Text_GAT_ours","repo":"shenwzh3/RGAT-ABSA","repo_kind":"official","path":"model.py","file_url":"https://github.com/shenwzh3/RGAT-ABSA/blob/HEAD/model.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":"5cc375ba124fc59a"}},{"code_sha256_prefix":"76ab310ac3cbd178","entry":"LinearAttention","repo":"shenwzh3/RGAT-ABSA","repo_kind":"official","path":"model.py","file_url":"https://github.com/shenwzh3/RGAT-ABSA/blob/HEAD/model.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":"76ab310ac3cbd178"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}