论文精选73°

微调大模型提升PR与问题分类

Fine-Tuning Large Language Models to Classify Pull Request-Issue Alignments: Going Beyond Prompting

精选理由

研究人员微调了多个大模型来自动匹配PR和问题,准确率提升显著,还能解释模型决策依据。

AI 摘要

研究通过微调GPT-4o和多个开源模型(CodeLlama-7B、CodeQwen1.5-7B等)来分类PR与问题的对应关系。微调后的模型准确率和F1-micro提升了6.15%,F1-macro提升了14.69%。CodeLlama-7B表现最佳,代码差异与问题内容对预测影响最大。

原文 · arXiv: DeepSeek

Fine-Tuning Large Language Models to Classify Pull Request-Issue Alignments: Going Beyond Prompting

Context: Accurate alignment between pull requests (PRs) and corresponding issues is crucial for efficient software development and maintaining code quality, as misalignments can reduce traceability, hinder defect localization, and decrease maintainability. Objective: This study aims to improve automated PR-issue alignment classification by leveraging fine-tuned large language models (LLMs) across multiple alignment categories, and conducts interpretability analysis to investigate the effects of PR-issue fields on the predictions of fine-tuned LLMs. Method: Our methodology consists of dataset preparation, LLM fine-tuning, and interpretability analysis. We first extended an existing dataset and applied data augmentation to address class imbalance. GPT-4o was then fine-tuned via instruction tuning, and open-source LLMs including CodeLlama-7B, CodeQwen1.5-7B, StableCode-3B, CodeGemma-7B, and Deepseek-Coder-6.7B were fine-tuned using classification-specific heads. Interpretability analysis using Shapley Additive Explanations (SHAP) was conducted to examine the influence of PR-issue fields on predictions for the best-performing open-source LLM. Results: Fine-tuned LLMs outperformed baseline models, achieving average improvements of 6.15% in accuracy and F1-micro, 14.69% in F1-macro, and 6.15% in recall. CodeLlama-7B emerged as the best-performing fine-tuned LLM overall, while interpretability analysis revealed that code diffs together with issue body and PR body contents exert the greatest influence on predictions. Conclusions: Fine-tuning substantially enhances PR-issue alignment classification, improving both accuracy and efficiency. Interpretability analysis provides actionable insights into the dataset features driving alignment decisions, deepening understanding of how LLMs reason over software artifacts.