{"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/towards-interpretable-natural-language","title":"Towards Interpretable Natural Language Understanding with Explanations as Latent Variables","arxiv_id":"2011.05268","date":"2020-10-24","proceeding":"NeurIPS 2020 12","authors":["Wangchunshu Zhou","Jinyi Hu","HANLIN ZHANG","Xiaodan Liang","Maosong Sun","Chenyan Xiong","Jian Tang"],"abstract":"Recently generating natural language explanations has shown very promising results in not only offering interpretable explanations but also providing additional information and supervision for prediction. However, existing approaches usually require a large set of human annotated explanations for training while collecting a large set of explanations is not only time consuming but also expensive. In this paper, we develop a general framework for interpretable natural language understanding that requires only a small set of human annotated explanations for training. Our framework treats natural language explanations as latent variables that model the underlying reasoning process of a neural model. We develop a variational EM framework for optimization where an explanation generation module and an explanation-augmented prediction module are alternatively optimized and mutually enhance each other. Moreover, we further propose an explanation-based self-training method under this framework for semi-supervised learning. It alternates between assigning pseudo-labels to unlabeled data and generating new explanations to iteratively improve each other. Experiments on two natural language understanding tasks demonstrate that our framework can not only make effective predictions in both supervised and semi-supervised settings, but also generate good natural language explanation.","url_abs":"https://arxiv.org/abs/2011.05268v3","url_pdf":"https://arxiv.org/pdf/2011.05268v3.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":"towards-interpretable-natural-language","repo_url":"https://github.com/JamesHujy/ELV","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"explanation-generation","task_name":"Explanation Generation"},{"task_slug":"natural-language-understanding","task_name":"Natural Language Understanding"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2011.05268","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2011.05268"}},"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/JamesHujy/ELV","reach":null}],"summary":{"ran":2,"unverified":12},"by_repo_kind":{"official":{"samples":14,"ran":2,"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":"cfcccfa363b0d97d","entry":"BertConfig","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"cfcccfa363b0d97d"}},{"code_sha256_prefix":"e0010670dcd7b506","entry":"LabelSmoothingLoss","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"e0010670dcd7b506"}},{"code_sha256_prefix":"79fb582753417716","entry":"BertAttention","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"79fb582753417716"}},{"code_sha256_prefix":"079b9f19680e22e9","entry":"BertEmbeddings","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"079b9f19680e22e9"}},{"code_sha256_prefix":"fcc6106b91ccf5a8","entry":"BertEncoder","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"fcc6106b91ccf5a8"}},{"code_sha256_prefix":"a073600618d7cd25","entry":"BertForSeq2SeqFinetuningWithPseudoMask","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"a073600618d7cd25"}},{"code_sha256_prefix":"4c4cc2ac34ec0f6d","entry":"BertLMPredictionHead","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"4c4cc2ac34ec0f6d"}},{"code_sha256_prefix":"06470b60e5848309","entry":"BertLayer","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"06470b60e5848309"}},{"code_sha256_prefix":"f31e6bafe1bf135f","entry":"BertModel","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"f31e6bafe1bf135f"}},{"code_sha256_prefix":"9ab2eef8291e2fb8","entry":"BertPreTrainingHeads","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"9ab2eef8291e2fb8"}},{"code_sha256_prefix":"8edf5cdb355831e7","entry":"BertPredictionHeadTransform","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"8edf5cdb355831e7"}},{"code_sha256_prefix":"0cddc969b8e047cc","entry":"BertSelfAttention","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"0cddc969b8e047cc"}},{"code_sha256_prefix":"1e4c8070e2b6f7a0","entry":"PreTrainedBertModel","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"1e4c8070e2b6f7a0"}},{"code_sha256_prefix":"a50158bd9f69ff91","entry":"TransformerFFN","repo":"JamesHujy/ELV","repo_kind":"official","path":"ELV_re/s2s_ft/modeling_decoding.py","file_url":"https://github.com/JamesHujy/ELV/blob/HEAD/ELV_re/s2s_ft/modeling_decoding.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":"a50158bd9f69ff91"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}