{"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/ecr-chain-advancing-generative-language","title":"ECR-Chain: Advancing Generative Language Models to Better Emotion-Cause Reasoners through Reasoning Chains","arxiv_id":"2405.10860","date":"2024-05-17","proceeding":null,"authors":["Zhaopei Huang","Jinming Zhao","Qin Jin"],"abstract":"Understanding the process of emotion generation is crucial for analyzing the causes behind emotions. Causal Emotion Entailment (CEE), an emotion-understanding task, aims to identify the causal utterances in a conversation that stimulate the emotions expressed in a target utterance. However, current works in CEE mainly focus on modeling semantic and emotional interactions in conversations, neglecting the exploration of the emotion-generation process. This hinders the models from deeply understanding emotions, restricting their ability to produce explainable predictions. In this work, inspired by the emotion generation process of \"stimulus-appraisal-emotion\" in the cognitive appraisal theory, we introduce a step-by-step reasoning method, Emotion-Cause Reasoning Chain (ECR-Chain), to infer the stimulus from the target emotional expressions in conversations. Specifically, we first introduce the ECR-Chain to ChatGPT via few-shot prompting, which significantly improves its performance on the CEE task. We further propose an automated construction process to utilize ChatGPT in building an ECR-Chain set, which can enhance the reasoning abilities of smaller models through supervised training and assist the Vicuna-7B model in achieving state-of-the-art CEE performance. Moreover, our methods can enable these generative language models to effectively perform emotion-cause reasoning in an explainable manner. Our code, data and more details are at https://github.com/hzp3517/ECR-Chain.","url_abs":"https://arxiv.org/abs/2405.10860v2","url_pdf":"https://arxiv.org/pdf/2405.10860v2.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":"ecr-chain-advancing-generative-language","repo_url":"https://github.com/hzp3517/ecr-chain","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"causal-emotion-entailment","task_name":"Causal Emotion Entailment"}],"methods":[{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.10860","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.10860"}},"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/hzp3517/ECR-Chain","reach":null}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"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":5,"samples":[{"code_sha256_prefix":"164e0309168e60b9","entry":"get_template","repo":"hzp3517/ECR-Chain","repo_kind":"official","path":"chatgpt/get_prompt_from_template.py","file_url":"https://github.com/hzp3517/ECR-Chain/blob/HEAD/chatgpt/get_prompt_from_template.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":"164e0309168e60b9"}},{"code_sha256_prefix":"99bf24112fd15d1e","entry":"load_neg_set","repo":"hzp3517/ECR-Chain","repo_kind":"official","path":"chatgpt/get_prompt_from_template.py","file_url":"https://github.com/hzp3517/ECR-Chain/blob/HEAD/chatgpt/get_prompt_from_template.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":"99bf24112fd15d1e"}},{"code_sha256_prefix":"7b051b42c0517c5f","entry":"load_rationalization_set","repo":"hzp3517/ECR-Chain","repo_kind":"official","path":"chatgpt/get_prompt_from_template.py","file_url":"https://github.com/hzp3517/ECR-Chain/blob/HEAD/chatgpt/get_prompt_from_template.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":"7b051b42c0517c5f"}},{"code_sha256_prefix":"224ae9defb54f2c1","entry":"load_set","repo":"hzp3517/ECR-Chain","repo_kind":"official","path":"chatgpt/get_prompt_from_template.py","file_url":"https://github.com/hzp3517/ECR-Chain/blob/HEAD/chatgpt/get_prompt_from_template.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":"224ae9defb54f2c1"}},{"code_sha256_prefix":"d88b6ff696d4ce5f","entry":"load_simplify_set","repo":"hzp3517/ECR-Chain","repo_kind":"official","path":"chatgpt/get_prompt_from_template.py","file_url":"https://github.com/hzp3517/ECR-Chain/blob/HEAD/chatgpt/get_prompt_from_template.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":"d88b6ff696d4ce5f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}