{"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-three-stage-learning-framework-for-low","title":"A Three-Stage Learning Framework for Low-Resource Knowledge-Grounded Dialogue Generation","arxiv_id":"2109.04096","date":"2021-09-09","proceeding":"EMNLP 2021 11","authors":["Shilei Liu","Xiaofeng Zhao","Bochao Li","Feiliang Ren","Longhui Zhang","Shujuan Yin"],"abstract":"Neural conversation models have shown great potentials towards generating fluent and informative responses by introducing external background knowledge. Nevertheless, it is laborious to construct such knowledge-grounded dialogues, and existing models usually perform poorly when transfer to new domains with limited training samples. Therefore, building a knowledge-grounded dialogue system under the low-resource setting is a still crucial issue. In this paper, we propose a novel three-stage learning framework based on weakly supervised learning which benefits from large scale ungrounded dialogues and unstructured knowledge base. To better cooperate with this framework, we devise a variant of Transformer with decoupled decoder which facilitates the disentangled learning of response generation and knowledge incorporation. Evaluation results on two benchmarks indicate that our approach can outperform other state-of-the-art methods with less training data, and even in zero-resource scenario, our approach still performs well.","url_abs":"https://arxiv.org/abs/2109.04096v1","url_pdf":"https://arxiv.org/pdf/2109.04096v1.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-three-stage-learning-framework-for-low","repo_url":"https://github.com/neukg/kat-tslf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"dialogue-generation","task_name":"Dialogue Generation"},{"task_slug":"response-generation","task_name":"Response Generation"},{"task_slug":"weakly-supervised-learning","task_name":"Weakly-supervised Learning"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2109.04096","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.04096"}},"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/neukg/kat-tslf","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/neukg/KAT-TSLF","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":6,"ran":4,"ran_violates":1,"unverified":16},"by_repo_kind":{"official":{"samples":27,"ran":11,"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":"9df40357afea56cc","entry":"to_list","repo":"neukg/kat-tslf","repo_kind":"official","path":"run_kat.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/run_kat.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9df40357afea56cc"}},{"code_sha256_prefix":"076a62f8319088ad","entry":"Attention","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"076a62f8319088ad"}},{"code_sha256_prefix":"e3e39310f3d0ef9a","entry":"LearnedPositionalEmbedding","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e3e39310f3d0ef9a"}},{"code_sha256_prefix":"0505f2c6f279d366","entry":"_make_linear_from_emb","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0505f2c6f279d366"}},{"code_sha256_prefix":"8d77347cfa15b834","entry":"calc_banned_ngram_tokens","repo":"neukg/kat-tslf","repo_kind":"official","path":"kat/gen_utils.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/kat/gen_utils.py","link_basis":"plan_row","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":"8d77347cfa15b834"}},{"code_sha256_prefix":"3dac763ebcde95c6","entry":"fill_with_neg_inf","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3dac763ebcde95c6"}},{"code_sha256_prefix":"1a820c6ccda29913","entry":"invert_mask","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1a820c6ccda29913"}},{"code_sha256_prefix":"64e8746cf3f62e8e","entry":"lmap","repo":"neukg/kat-tslf","repo_kind":"official","path":"run_kat.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/run_kat.py","link_basis":"plan_row","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":"64e8746cf3f62e8e"}},{"code_sha256_prefix":"f20c9b1aead27fea","entry":"make_padding_mask","repo":"neukg/kat-tslf","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/kat/modeling.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f20c9b1aead27fea"}},{"code_sha256_prefix":"e8b6cf1e9387fc9a","entry":"mean","repo":"neukg/kat-tslf","repo_kind":"official","path":"dial/metrics.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/dial/metrics.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e8b6cf1e9387fc9a"}},{"code_sha256_prefix":"59b0b785b926c986","entry":"shift_tokens_right","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"59b0b785b926c986"}},{"code_sha256_prefix":"1c4335258b6b3c81","entry":"BartDecoder","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"1c4335258b6b3c81"}},{"code_sha256_prefix":"bd033265551789b6","entry":"BartEncoder","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"bd033265551789b6"}},{"code_sha256_prefix":"f71ab4c4691bb48f","entry":"BartModel","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"f71ab4c4691bb48f"}},{"code_sha256_prefix":"872d52d59b50cd30","entry":"DecoderLayer","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"872d52d59b50cd30"}},{"code_sha256_prefix":"9893bc0028ec41d0","entry":"EncoderLayer","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"9893bc0028ec41d0"}},{"code_sha256_prefix":"742714f74dc45495","entry":"PretrainedBartModel","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"742714f74dc45495"}},{"code_sha256_prefix":"c77b117cb39bd303","entry":"SinusoidalPositionalEmbedding","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"c77b117cb39bd303"}},{"code_sha256_prefix":"c1189a349bdb2e2a","entry":"_prepare_bart_decoder_inputs","repo":"neukg/KAT-TSLF","repo_kind":"official","path":"kat/modeling.py","file_url":"https://github.com/neukg/KAT-TSLF/blob/HEAD/kat/modeling.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":"c1189a349bdb2e2a"}},{"code_sha256_prefix":"a1d9937402bebf7e","entry":"add_newline_to_end_of_each_sentence","repo":"neukg/kat-tslf","repo_kind":"official","path":"dial/utils.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/dial/utils.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":"a1d9937402bebf7e"}},{"code_sha256_prefix":"6b81c6ad0d553004","entry":"calc_banned_bad_words_ids","repo":"neukg/kat-tslf","repo_kind":"official","path":"kat/gen_utils.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/kat/gen_utils.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":"6b81c6ad0d553004"}},{"code_sha256_prefix":"00ea45ede0d0bda7","entry":"calc_corpus_bleu","repo":"neukg/kat-tslf","repo_kind":"official","path":"dial/metrics.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/dial/metrics.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":"00ea45ede0d0bda7"}},{"code_sha256_prefix":"022dbe2dc9fabd22","entry":"calc_sentence_bleu","repo":"neukg/kat-tslf","repo_kind":"official","path":"dial/metrics.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/dial/metrics.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":"022dbe2dc9fabd22"}},{"code_sha256_prefix":"e7a0f438d6d3b92f","entry":"get_parameter_number","repo":"neukg/kat-tslf","repo_kind":"official","path":"run_kat.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/run_kat.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":"e7a0f438d6d3b92f"}},{"code_sha256_prefix":"e386d3a24af4d168","entry":"label_smoothed_nll_loss","repo":"neukg/kat-tslf","repo_kind":"official","path":"dial/utils.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/dial/utils.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":"e386d3a24af4d168"}},{"code_sha256_prefix":"7c43af131a6f39a6","entry":"lmap","repo":"neukg/kat-tslf","repo_kind":"official","path":"dial/utils.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/dial/utils.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":"7c43af131a6f39a6"}},{"code_sha256_prefix":"685c7abbaa62f39d","entry":"top_k_top_p_filtering","repo":"neukg/kat-tslf","repo_kind":"official","path":"kat/gen_utils.py","file_url":"https://github.com/neukg/kat-tslf/blob/HEAD/kat/gen_utils.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":"685c7abbaa62f39d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}