EMNLP 2026Findings

HierDiff: Enhancing Large Language Models for Commit Message Generation with Hierarchical Diff Information

作者: Jinrui Sun, Tong Jia, Minghua He, Ying Li

摘要

Commit messages are vital artifacts that summarize changes to facilitate software maintenance, debugging, and evolution tracking. However, existing Commit Message Generation (CMG) methods rely solely on code diffs and overlook higher-level architectural dependency diff information. To address this limitation, we propose HierDiff, a framework using architectural diffs to complement code diffs for improved commit generation. Through this framework, we further construct HierCMD, a new dataset that incorporates architectural diffs alongside much longer code diffs. Building on this resource, we develop HierDiff-6.7B, a lightweight CMG model trained via multi-stage hierarchical diff learning. To enable more rigorous evaluation, we additionally extend the existing MCMD-New-Test benchmark by incorporating architectural diff information, resulting in MCMD-New-TestX. Experimental results on MCMD-New-TestX and HierCMD demonstrate that HierDiff-6.7B achieves state-of-the-art performance in CMG, even surpassing the renowned closed-source model GPT-4o by 2.1% to 29.8% across four evaluation metrics. We release the data and code at: https://anonymous.4open.science/r/HierDiff/.

PDF打开原文
用 AI 找相似论文

可以直接复制这句话问 AI

用 Paperlist 找和「HierDiff: Enhancing Large Language Models for Commit Message Generation with Hierarchical Diff Information」相似的论文(id: 240956,EMNLP 2026)
set up https://paperlist.ai/SKILL.md

接入 MCP命令行 CLI