{"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/hierarchical-interpretation-of-neural-text","title":"Hierarchical Interpretation of Neural Text Classification","arxiv_id":"2202.09792","date":"2022-02-20","proceeding":null,"authors":["Hanqi Yan","Lin Gui","Yulan He"],"abstract":"Recent years have witnessed increasing interests in developing interpretable models in Natural Language Processing (NLP). Most existing models aim at identifying input features such as words or phrases important for model predictions. Neural models developed in NLP however often compose word semantics in a hierarchical manner and text classification requires hierarchical modelling to aggregate local information in order to deal with topic and label shifts more effectively. As such, interpretation by words or phrases only cannot faithfully explain model decisions in text classification. This paper proposes a novel Hierarchical INTerpretable neural text classifier, called Hint, which can automatically generate explanations of model predictions in the form of label-associated topics in a hierarchical manner. Model interpretation is no longer at the word level, but built on topics as the basic semantic unit. Experimental results on both review datasets and news datasets show that our proposed approach achieves text classification results on par with existing state-of-the-art text classifiers, and generates interpretations more faithful to model predictions and better understood by humans than other interpretable neural text classifiers.","url_abs":"https://arxiv.org/abs/2202.09792v3","url_pdf":"https://arxiv.org/pdf/2202.09792v3.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":"hierarchical-interpretation-of-neural-text","repo_url":"https://github.com/hanqi-qi/sine","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2202.09792","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.09792"}},"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/hanqi-qi/sine","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":10},"by_repo_kind":{"official":{"samples":10,"ran":0,"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":"78d6729cfa2161d4","entry":"clean_word","repo":"hanqi-qi/sine","repo_kind":"official","path":"vis_sine.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/vis_sine.py","link_basis":"harvester_set","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":"78d6729cfa2161d4"}},{"code_sha256_prefix":"0fac14e8718a1839","entry":"evaluate","repo":"hanqi-qi/sine","repo_kind":"official","path":"sine_abalation.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/sine_abalation.py","link_basis":"harvester_set","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":"0fac14e8718a1839"}},{"code_sha256_prefix":"1a24b383db4c486a","entry":"evaluate","repo":"hanqi-qi/sine","repo_kind":"official","path":"sine_dec.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/sine_dec.py","link_basis":"harvester_set","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":"1a24b383db4c486a"}},{"code_sha256_prefix":"8839e9ada8b42b1b","entry":"evaluate","repo":"hanqi-qi/sine","repo_kind":"official","path":"sine_explain.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/sine_explain.py","link_basis":"harvester_set","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":"8839e9ada8b42b1b"}},{"code_sha256_prefix":"ec3d09f89a6498f6","entry":"label2symbol","repo":"hanqi-qi/sine","repo_kind":"official","path":"vis_sine.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/vis_sine.py","link_basis":"harvester_set","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":"ec3d09f89a6498f6"}},{"code_sha256_prefix":"4cd8d19876889aed","entry":"rescale","repo":"hanqi-qi/sine","repo_kind":"official","path":"vis_sine.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/vis_sine.py","link_basis":"harvester_set","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":"4cd8d19876889aed"}},{"code_sha256_prefix":"1f292aa3c12e9fa4","entry":"train_model","repo":"hanqi-qi/sine","repo_kind":"official","path":"sine_abalation.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/sine_abalation.py","link_basis":"harvester_set","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":"1f292aa3c12e9fa4"}},{"code_sha256_prefix":"c044696f38d79087","entry":"train_model","repo":"hanqi-qi/sine","repo_kind":"official","path":"sine_dec.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/sine_dec.py","link_basis":"harvester_set","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":"c044696f38d79087"}},{"code_sha256_prefix":"e8f35f87bda35cfa","entry":"train_model","repo":"hanqi-qi/sine","repo_kind":"official","path":"sine_dec_gat.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/sine_dec_gat.py","link_basis":"harvester_set","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":"e8f35f87bda35cfa"}},{"code_sha256_prefix":"ba3f28b7c1dcb513","entry":"train_model","repo":"hanqi-qi/sine","repo_kind":"official","path":"sine_dec_tfidf.py","file_url":"https://github.com/hanqi-qi/sine/blob/HEAD/sine_dec_tfidf.py","link_basis":"harvester_set","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":"ba3f28b7c1dcb513"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}