{"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/dianjin-r1-evaluating-and-enhancing-financial","title":"DianJin-R1: Evaluating and Enhancing Financial Reasoning in Large Language Models","arxiv_id":"2504.15716","date":"2025-04-22","proceeding":null,"authors":["Jie Zhu","Qian Chen","Huaixia Dou","Junhui Li","Lifan Guo","Feng Chen","Chi Zhang"],"abstract":"Effective reasoning remains a core challenge for large language models (LLMs) in the financial domain, where tasks often require domain-specific knowledge, precise numerical calculations, and strict adherence to compliance rules. We propose DianJin-R1, a reasoning-enhanced framework designed to address these challenges through reasoning-augmented supervision and reinforcement learning. Central to our approach is DianJin-R1-Data, a high-quality dataset constructed from CFLUE, FinQA, and a proprietary compliance corpus (Chinese Compliance Check, CCC), combining diverse financial reasoning scenarios with verified annotations. Our models, DianJin-R1-7B and DianJin-R1-32B, are fine-tuned from Qwen2.5-7B-Instruct and Qwen2.5-32B-Instruct using a structured format that generates both reasoning steps and final answers. To further refine reasoning quality, we apply Group Relative Policy Optimization (GRPO), a reinforcement learning method that incorporates dual reward signals: one encouraging structured outputs and another rewarding answer correctness. We evaluate our models on five benchmarks: three financial datasets (CFLUE, FinQA, and CCC) and two general reasoning benchmarks (MATH-500 and GPQA-Diamond). Experimental results show that DianJin-R1 models consistently outperform their non-reasoning counterparts, especially on complex financial tasks. Moreover, on the real-world CCC dataset, our single-call reasoning models match or even surpass the performance of multi-agent systems that require significantly more computational cost. These findings demonstrate the effectiveness of DianJin-R1 in enhancing financial reasoning through structured supervision and reward-aligned learning, offering a scalable and practical solution for real-world applications.","url_abs":"https://arxiv.org/abs/2504.15716v1","url_pdf":"https://arxiv.org/pdf/2504.15716v1.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":"dianjin-r1-evaluating-and-enhancing-financial","repo_url":"https://github.com/aliyun/qwen-dianjin","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"math","task_name":"Math"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2504.15716","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2504.15716"}},"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/aliyun/qwen-dianjin","reach":null}],"summary":{"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"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":"e81f53ee64a9fcbe","entry":"get_rope_index","repo":"aliyun/qwen-dianjin","repo_kind":"official","path":"DianJin-OCR-R1/src/rl/verl/models/transformers/qwen2_vl.py","file_url":"https://github.com/aliyun/qwen-dianjin/blob/HEAD/DianJin-OCR-R1/src/rl/verl/models/transformers/qwen2_vl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e81f53ee64a9fcbe"}},{"code_sha256_prefix":"94cb835f47dcfc92","entry":"qwen2_vl_attn_forward","repo":"aliyun/qwen-dianjin","repo_kind":"official","path":"DianJin-OCR-R1/src/rl/verl/models/transformers/qwen2_vl.py","file_url":"https://github.com/aliyun/qwen-dianjin/blob/HEAD/DianJin-OCR-R1/src/rl/verl/models/transformers/qwen2_vl.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":"94cb835f47dcfc92"}},{"code_sha256_prefix":"1a0b75b2de257457","entry":"qwen2_vl_forward_old","repo":"aliyun/qwen-dianjin","repo_kind":"official","path":"DianJin-OCR-R1/src/rl/verl/models/transformers/qwen2_vl.py","file_url":"https://github.com/aliyun/qwen-dianjin/blob/HEAD/DianJin-OCR-R1/src/rl/verl/models/transformers/qwen2_vl.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":"1a0b75b2de257457"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}