arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2607.04582cs.SE
收藏

用于控制流图生成的轻量级语言模型微调

Finetuning Lightweight LLMs for Control Flow Graph Generation

Waseda University(早稻田大学)

Hanyu Zhang, Tomoji Kishi

AI总结:

研究用微调轻量级大语言模型生成控制流图,设计统一输出格式和特定任务微调提示,构建数据集,在六个模型上评估,结果表明微调后的轻量级模型在生成控制流图上效果良好,有跨语言泛化能力。

摘要:

控制流图(CFG)是软件分析、代码理解和软件维护的重要程序表示。传统CFG生成技术有局限,本文研究用微调轻量级大语言模型进行CFG生成,设计格式和提示,构建数据集并在六个模型上评估,结果显示微调后的模型效果良好且有跨语言泛化能力。

英文摘要:

Control Flow Graph (CFG) is an important program representations for software analysis, code understanding, and software maintenance. Traditional CFG generation techniques mainly rely on bytecode or abstract syntax trees. However, these approaches usually require complete, compilable, and syntax error-free code, which limits their applicability to incomplete or erroneous code. Furthermore, they often depend on language specific tools, making it difficult to support multiple programming languages in a unified manner. To address these limitations, this paper investigates the use of fine-tuned lightweight large language models (LLMs) for CFG generation. We first design a unified CFG output format and a task-specific fine-tuning prompt for CFG generation. Then, we construct a dataset based on an existing LeetCode dataset through automatic CFG generation and error augmentation. We evaluate the proposed approach on six lightweight LLM models, including three code-specific LLMs: CodeLlama, QwenCoder, and DeepSeekCoder; and three general purpose LLMs: Llama3.2-3B, Qwen-4B, and Phi-4B. The experimental results show that, through fine-tuning, lightweight LLMs achieve promising results for CFG generation, particularly when the input code is incomplete or erroneous. It also demonstrates cross-language generalization capability on programming language not included in the fine-tuning data.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑