{"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/a-novel-perspective-to-look-at-attention-bi","title":"A Novel Perspective to Look At Attention: Bi-level Attention-based Explainable Topic Modeling for News Classification","arxiv_id":"2203.07216","date":"2022-03-14","proceeding":"Findings (ACL) 2022 5","authors":["Dairui Liu","Derek Greene","Ruihai Dong"],"abstract":"Many recent deep learning-based solutions have widely adopted the attention-based mechanism in various tasks of the NLP discipline. However, the inherent characteristics of deep learning models and the flexibility of the attention mechanism increase the models' complexity, thus leading to challenges in model explainability. In this paper, to address this challenge, we propose a novel practical framework by utilizing a two-tier attention architecture to decouple the complexity of explanation and the decision-making process. We apply it in the context of a news article classification task. The experiments on two large-scaled news corpora demonstrate that the proposed model can achieve competitive performance with many state-of-the-art alternatives and illustrate its appropriateness from an explainability perspective.","url_abs":"https://arxiv.org/abs/2203.07216v2","url_pdf":"https://arxiv.org/pdf/2203.07216v2.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":"a-novel-perspective-to-look-at-attention-bi","repo_url":"https://github.com/ruixinhua/batm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"a-novel-perspective-to-look-at-attention-bi","repo_url":"https://github.com/ruixinhua/explainednrs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"deep-learning","task_name":"Deep Learning"},{"task_slug":"news-classification","task_name":"News Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2203.07216","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.07216"}},"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/Ruixinhua/BATM","reach":null}],"summary":{"ran":3,"ran_draft_wrong":2,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"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":"ae39ebe9b461169b","entry":"AttLayer","repo":"Ruixinhua/BATM","repo_kind":"official","path":"models/nc_bi_attention.py","file_url":"https://github.com/Ruixinhua/BATM/blob/HEAD/models/nc_bi_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ae39ebe9b461169b"}},{"code_sha256_prefix":"f33ee413f30ccb0b","entry":"BaseClassifyModel","repo":"Ruixinhua/BATM","repo_kind":"official","path":"models/nc_bi_attention.py","file_url":"https://github.com/Ruixinhua/BATM/blob/HEAD/models/nc_bi_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f33ee413f30ccb0b"}},{"code_sha256_prefix":"587f583c6bb53989","entry":"MultiHeadedAttention","repo":"Ruixinhua/BATM","repo_kind":"official","path":"models/nc_bi_attention.py","file_url":"https://github.com/Ruixinhua/BATM/blob/HEAD/models/nc_bi_attention.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":"587f583c6bb53989"}},{"code_sha256_prefix":"f49f69ecc50ef233","entry":"attention","repo":"Ruixinhua/BATM","repo_kind":"official","path":"models/nc_bi_attention.py","file_url":"https://github.com/Ruixinhua/BATM/blob/HEAD/models/nc_bi_attention.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":"f49f69ecc50ef233"}},{"code_sha256_prefix":"cd43759ae3ce9c77","entry":"clones","repo":"Ruixinhua/BATM","repo_kind":"official","path":"models/nc_bi_attention.py","file_url":"https://github.com/Ruixinhua/BATM/blob/HEAD/models/nc_bi_attention.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":"cd43759ae3ce9c77"}},{"code_sha256_prefix":"12ae508b754da36f","entry":"BaseModel","repo":"Ruixinhua/BATM","repo_kind":"official","path":"models/nc_bi_attention.py","file_url":"https://github.com/Ruixinhua/BATM/blob/HEAD/models/nc_bi_attention.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":"12ae508b754da36f"}},{"code_sha256_prefix":"ae382f70d27a7cb6","entry":"BiAttentionClassifyModel","repo":"Ruixinhua/BATM","repo_kind":"official","path":"models/nc_bi_attention.py","file_url":"https://github.com/Ruixinhua/BATM/blob/HEAD/models/nc_bi_attention.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":"ae382f70d27a7cb6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}