arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.05150cs.CL
收藏

CodeSCM:面向多模态代码生成的因果分析

CodeSCM: Causal Analysis for Multi-Modal Code Generation

Columbia University(哥伦比亚大学)

Mukur Gupta, Noopur Bhatt, Suman Jana

AI总结:

本文提出结构因果模型 CodeSCM,通过因果中介分析量化自然语言、代码和输入-输出示例等提示模态对代码生成的影响,发现输入-输出示例同样具有显著作用。

摘要:

本文提出 CodeSCM,一种用于分析基于大语言模型(LLMs)的多模态代码生成的结构因果模型(SCM)。通过对 CodeSCM 施加干预,我们测量不同提示模态(如自然语言、代码和输入-输出示例)对模型的因果效应。CodeSCM 引入潜在中介变量,以分离多模态代码生成提示中的代码语义与自然语言语义。利用这些中介变量上的因果中介分析原理,我们量化表示模型虚假倾向的直接效应。我们发现,除了自然语言指令之外,输入-输出示例对代码生成也有显著影响。

英文摘要:

In this paper, we propose CodeSCM, a Structural Causal Model (SCM) for analyzing multi-modal code generation using large language models (LLMs). By applying interventions to CodeSCM, we measure the causal effects of different prompt modalities, such as natural language, code, and input-output examples, on the model. CodeSCM introduces latent mediator variables to separate the code and natural language semantics of a multi-modal code generation prompt. Using the principles of Causal Mediation Analysis on these mediators we quantify direct effects representing the model's spurious leanings. We find that, in addition to natural language instructions, input-output examples significantly influence code generation.

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

↑