{"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/empo-theory-driven-dataset-construction-for","title":"EmPO: Emotion Grounding for Empathetic Response Generation through Preference Optimization","arxiv_id":"2406.19071","date":"2024-06-27","proceeding":null,"authors":["Ondrej Sotolar","Vojtech Formanek","Alok Debnath","Allison Lahnala","Charles Welch","Lucie Flek"],"abstract":"Empathetic response generation is a desirable aspect of conversational agents, crucial for facilitating engaging and emotionally intelligent multi-turn conversations between humans and machines. Leveraging large language models for this task has shown promising results, yet challenges persist in ensuring both the empathetic quality of the responses and retention of the generalization performance of the models. We propose a novel approach where we construct theory-driven preference datasets based on emotion grounding and use them to align LLMs with preference optimization algorithms to address these challenges. To evaluate empathetic response generation, we employ the EmpatheticDialogues dataset, assessing empathy with the diff-Epitome and BERTscore metrics and with multi-dimensional human evaluation. Additionally, we measure diversity and emotional valence using feature-based methods. We also evaluate the impact of training on the generalization performance using the MMLU benchmark and tasks from the Open LLM Leaderboard. The results show that LLMs can be aligned for empathetic response generation by preference optimization while retaining their general performance and that emotion grounding can guide preference dataset creation. We make all datasets, source code, and models publicly available. https://github.com/justtherightsize/empo","url_abs":"https://arxiv.org/abs/2406.19071v2","url_pdf":"https://arxiv.org/pdf/2406.19071v2.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":"empo-theory-driven-dataset-construction-for","repo_url":"https://github.com/justtherightsize/empo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"empathetic-response-generation","task_name":"Empathetic Response Generation"},{"task_slug":"mmlu","task_name":"MMLU"},{"task_slug":"response-generation","task_name":"Response Generation"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.19071","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.19071"}},"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/justtherightsize/empo","reach":{"status":"ok"}}],"summary":{"ran":9,"unverified":2},"by_repo_kind":{"official":{"samples":11,"ran":9,"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":11,"samples":[{"code_sha256_prefix":"6a0afca1adf01a5d","entry":"args_generate_path","repo":"justtherightsize/empo","repo_kind":"official","path":"src/evaluate_from_local.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/evaluate_from_local.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":"6a0afca1adf01a5d"}},{"code_sha256_prefix":"75f766fb37d5251d","entry":"compute_averages","repo":"justtherightsize/empo","repo_kind":"official","path":"src/average_diff.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/average_diff.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":"75f766fb37d5251d"}},{"code_sha256_prefix":"e96e9041d54eacc6","entry":"dialog2chat","repo":"justtherightsize/empo","repo_kind":"official","path":"src/ed_load.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/ed_load.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":"e96e9041d54eacc6"}},{"code_sha256_prefix":"be49b2361cbb145f","entry":"get_opposite_emotions","repo":"justtherightsize/empo","repo_kind":"official","path":"src/emotions.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/emotions.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":"be49b2361cbb145f"}},{"code_sha256_prefix":"797be47ec69176a2","entry":"get_progressive_chunks","repo":"justtherightsize/empo","repo_kind":"official","path":"src/ed_load.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/ed_load.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":"797be47ec69176a2"}},{"code_sha256_prefix":"7607b1c1a349fac2","entry":"get_sys_msg","repo":"justtherightsize/empo","repo_kind":"official","path":"src/base_metrics.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/base_metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7607b1c1a349fac2"}},{"code_sha256_prefix":"e82f1463f52bf3ed","entry":"preprocess","repo":"justtherightsize/empo","repo_kind":"official","path":"src/evaluate_from_local.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/evaluate_from_local.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":"e82f1463f52bf3ed"}},{"code_sha256_prefix":"695530d48ac5a937","entry":"select_by_category","repo":"justtherightsize/empo","repo_kind":"official","path":"src/evaluate_from_local.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/evaluate_from_local.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":"695530d48ac5a937"}},{"code_sha256_prefix":"5232dde5c7e8644c","entry":"to_epi_format","repo":"justtherightsize/empo","repo_kind":"official","path":"src/diff_epitome.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/diff_epitome.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":"5232dde5c7e8644c"}},{"code_sha256_prefix":"c667dd98492e114c","entry":"get_opposite_ed_keys","repo":"justtherightsize/empo","repo_kind":"official","path":"src/emotions.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/emotions.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":"c667dd98492e114c"}},{"code_sha256_prefix":"51d47732f869b389","entry":"load_preprocess_ed","repo":"justtherightsize/empo","repo_kind":"official","path":"src/ed_load.py","file_url":"https://github.com/justtherightsize/empo/blob/HEAD/src/ed_load.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":"51d47732f869b389"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}