{"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/moraldial-a-framework-to-train-and-evaluate","title":"MoralDial: A Framework to Train and Evaluate Moral Dialogue Systems via Moral Discussions","arxiv_id":"2212.10720","date":"2022-12-21","proceeding":null,"authors":["Hao Sun","Zhexin Zhang","Fei Mi","Yasheng Wang","Wei Liu","Jianwei Cui","Bin Wang","Qun Liu","Minlie Huang"],"abstract":"Morality in dialogue systems has raised great attention in research recently. A moral dialogue system aligned with users' values could enhance conversation engagement and user connections. In this paper, we propose a framework, MoralDial to train and evaluate moral dialogue systems. In our framework, we first explore the communication mechanisms of morality and resolve expressed morality into three parts, which indicate the roadmap for building a moral dialogue system. Based on that, we design a simple yet effective method: constructing moral discussions between simulated specific users and the dialogue system. The constructed discussions consist of expressing, explaining, revising, and inferring moral views in dialogue exchanges, which makes conversational models learn morality well in a natural manner. Furthermore, we propose a novel evaluation method under the framework. We evaluate the multiple aspects of morality by judging the relation between dialogue responses and human values in discussions, where the multifaceted nature of morality is particularly considered. Automatic and manual experiments demonstrate that our framework is promising to train and evaluate moral dialogue systems.","url_abs":"https://arxiv.org/abs/2212.10720v2","url_pdf":"https://arxiv.org/pdf/2212.10720v2.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":"moraldial-a-framework-to-train-and-evaluate","repo_url":"https://github.com/thu-coai/moraldial","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2212.10720","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.10720"}},"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/thu-coai/moraldial","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":9,"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":"badfe876cb5502fb","entry":"agreement_metric","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/utils.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"badfe876cb5502fb"}},{"code_sha256_prefix":"236a6964d1137f1d","entry":"generate_samples_blender","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/utils.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"236a6964d1137f1d"}},{"code_sha256_prefix":"6927acb44ded8055","entry":"generate_samples_dialogpt","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/utils.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6927acb44ded8055"}},{"code_sha256_prefix":"e09546549d723075","entry":"lower_first","repo":"thu-coai/moraldial","repo_kind":"official","path":"agreement_scorer/dataset.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/agreement_scorer/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e09546549d723075"}},{"code_sha256_prefix":"8fbd3e75f72db768","entry":"stripbecause","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/eval_score.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/eval_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8fbd3e75f72db768"}},{"code_sha256_prefix":"5d271abe86bff5ad","entry":"stripbut","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/eval_mr.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/eval_mr.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5d271abe86bff5ad"}},{"code_sha256_prefix":"c67353dd13a7f6ab","entry":"stripsorry","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/eval_mr.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/eval_mr.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c67353dd13a7f6ab"}},{"code_sha256_prefix":"acb2c749d4904503","entry":"stripstart","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/eval_ril.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/eval_ril.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"acb2c749d4904503"}},{"code_sha256_prefix":"2f61b4a29e9c6df2","entry":"stripstart","repo":"thu-coai/moraldial","repo_kind":"official","path":"train_codes/mr_evaluation.py","file_url":"https://github.com/thu-coai/moraldial/blob/HEAD/train_codes/mr_evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2f61b4a29e9c6df2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}