paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Evaluating and Improving Framework-based Parallel Code Completion with Large Language Models

基于大语言模型的框架式并行代码补全的评估与改进
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 4/10 · 论文研究基于LLM的框架式并行代码补全,属于LLM4Code方向,与用户核心关注的静态分析、形式化验证以及浮点/贝叶斯程序分析交叉较少;且其主要目标是提升LLM补全性能,属于用户不感兴趣的研究目标本身为LLM的类型。引用 0 inbox
Ke Liu, Qinglin Wang, Xiang Chen, Guang Yang, Yigui Feng, Gencheng Liu, Jie Liu
crossref: 2026-09-12

AI 速览

一句话:定义框架式并行代码补全任务并构建数据集,提出课程式微调框架 HPCL 显著提升大模型补全性能。

现代多核 CPU、GPU 与分布式系统依赖 OpenMP、MPI、CUDA 等框架编写并行代码,而大语言模型在并发、同步与框架特定语义等结构化推理上表现不佳。作者将实际开发中「从串行代码逐步引入并行指令」的工作流形式化为框架式并行代码补全任务(FPCC),包含定位插入点、选择并行框架、补全并行指令码三个子任务,并构建了覆盖六种主流框架的 16,638 对高质量并行代码数据集。实证结果显示六种流行 LLM 在 FPCC 上表现普遍较差,尤其在插入点识别与指令码正确补全方面。为此作者提出 HPCL,一个课程式微调框架,按插入点识别、框架选择、指令码补全的顺序渐进提升模型能力。相比 LLM 基线,EM 提升 17.82%,DIR 提升 5.43%。专家引导的误差分析还总结了常见失败模式,并指出检索增强补全与一致性感知训练等未来方向。

问题
大语言模型虽在通用代码生成上表现良好,却难以胜任并行编程所需的并发、同步与框架语义推理;论文将串行代码到并行指令的增量开发过程形式化为框架式并行代码补全任务(FPCC)。
方法
构建覆盖六种并行框架、含插入点、框架与指令码标注的 16,638 对代码数据集,并提出课程式微调框架 HPCL,按插入点识别、框架选择、指令码补全三个阶段渐进训练。
评估
在自建 FPCC 数据集上评测六种流行 LLM 及所提方法,以 EM 与 DIR 为主要指标,并结合专家引导的误差分析总结失败模式。
原文摘要(Abstract)

Modern computing architectures (e.g., multi-core CPUs, GPUs, distributed systems) rely on parallel code implemented via frameworks such as OpenMP, MPI, and CUDA. While large language models (LLMs) have shown strong performance in general code generation, they struggle with the structured reasoning required for parallel programming, such as handling concurrency, synchronization, and framework-specific semantics. In practical parallel code development, a common workflow begins with sequential code and incrementally introduces parallel directive codes. We formalize this process as the task of framework-based parallel code completion (FPCC), which involves three subtasks: identifying insertion points, selecting parallel frameworks, and completing parallel directive codes.To support this task, we construct a high-quality dataset of 16,638 framework-based parallel code pairs across six widely used frameworks, labeled with directive points, parallel frameworks, and the code of parallel directives. However, our empirical results show that six popular LLMs perform poorly on FPCC, particularly struggling with identifying insertion points and completing correct directive codes.To address these limitations, we propose HPCL, a curriculum-based fine-tuning framework that progressively improves model capabilities in insertion point identification, parallel framework selection, and parallel directive code completion. Our approach achieves substantial improvements, yielding an 17.82% increase in EM and a 5.43% improvement in DIR scores over LLM-based baselines. Finally, expert-guided error analysis reveals common failure patterns and suggests future directions, such as in retrieval-augmented completion and consistency-aware training.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9434,
  title = {Evaluating and Improving Framework-based Parallel Code Completion with Large Language Models},
  author = {Ke Liu and Qinglin Wang and Xiang Chen and Guang Yang and Yigui Feng and Gencheng Liu and Jie Liu},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00204}
}