{"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/rethinking-self-attention-an-interpretable","title":"Rethinking Self-Attention: Towards Interpretability in Neural Parsing","arxiv_id":"1911.03875","date":"2019-11-10","proceeding":"Findings of the Association for Computational Linguistics 2020","authors":["Khalil Mrini","Franck Dernoncourt","Quan Tran","Trung Bui","Walter Chang","Ndapa Nakashole"],"abstract":"Attention mechanisms have improved the performance of NLP tasks while allowing models to remain explainable. Self-attention is currently widely used, however interpretability is difficult due to the numerous attention distributions. Recent work has shown that model representations can benefit from label-specific information, while facilitating interpretation of predictions. We introduce the Label Attention Layer: a new form of self-attention where attention heads represent labels. We test our novel layer by running constituency and dependency parsing experiments and show our new model obtains new state-of-the-art results for both tasks on both the Penn Treebank (PTB) and Chinese Treebank. Additionally, our model requires fewer self-attention layers compared to existing work. Finally, we find that the Label Attention heads learn relations between syntactic categories and show pathways to analyze errors.","url_abs":"https://arxiv.org/abs/1911.03875v3","url_pdf":"https://arxiv.org/pdf/1911.03875v3.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":"rethinking-self-attention-an-interpretable","repo_url":"https://github.com/KhalilMrini/LAL-Parser","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"rethinking-self-attention-an-interpretable","repo_url":"https://github.com/kh8fb/LAL-Parser-Server","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"constituency-parsing","task_name":"Constituency Parsing"},{"task_slug":"dependency-parsing","task_name":"Dependency Parsing"}],"methods":[{"method_slug":"interpretability","method_name":"Interpretability"},{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/constituency-parsing-on-penn-treebank","task":"Constituency Parsing","dataset":"Penn Treebank","model":"Label Attention Layer + HPSG + XLNet","rank_in_archive_order":3,"of":27,"metrics":{"F1 score":"96.38"},"uses_additional_data":false},{"leaderboard":"/sota/dependency-parsing-on-penn-treebank","task":"Dependency Parsing","dataset":"Penn Treebank","model":"Label Attention Layer + HPSG + XLNet","rank_in_archive_order":1,"of":22,"metrics":{"LAS":"96.26","POS":"97.3","UAS":"97.42"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/1911.03875","atlas_url":"https://app.syntology.ai/?focus=1911.03875","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1911.03875"}},"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/kh8fb/LAL-Parser-Server","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/KhalilMrini/LAL-Parser","reach":null}],"summary":{"ran_fixture":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"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":3,"samples":[{"code_sha256_prefix":"dc0027ee860349bf","entry":"get_bert","repo":"KhalilMrini/LAL-Parser","repo_kind":"official","path":"src_joint/KM_parser.py","file_url":"https://github.com/KhalilMrini/LAL-Parser/blob/HEAD/src_joint/KM_parser.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"DEP_MISSING","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dc0027ee860349bf"}},{"code_sha256_prefix":"c56c5bb68dd9c807","entry":"get_roberta","repo":"KhalilMrini/LAL-Parser","repo_kind":"official","path":"src_joint/KM_parser.py","file_url":"https://github.com/KhalilMrini/LAL-Parser/blob/HEAD/src_joint/KM_parser.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c56c5bb68dd9c807"}},{"code_sha256_prefix":"ec3f65bbdc55695a","entry":"get_xlnet","repo":"KhalilMrini/LAL-Parser","repo_kind":"official","path":"src_joint/KM_parser.py","file_url":"https://github.com/KhalilMrini/LAL-Parser/blob/HEAD/src_joint/KM_parser.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ec3f65bbdc55695a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}