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

重新思考代码语言模型中的枢轴编程语言

Rethinking Pivot Programming Languages in Code Language Models

  • Ulm University(乌尔姆大学)
  • University of Southern Denmark(南丹麦大学)

机构由 AI 辅助整理,请以论文原文为准。

Andor Diera, Lukas Galke Poech, Matthias Tichy

AI总结:

本研究在控制混淆因素下重新审视代码语言模型中的枢轴编程语言,发现Python的特殊角色源于其面向英语的亲和性,而非普遍的几何中心性。

AI中文摘要:

多语言代码语言模型在编程语言(PL)之间迁移技能,但是否存在某种编程语言占据特权枢轴位置仍存争议:几何分析指向C族语言和Go,而行为证据则强调Python。我们在控制表征各向异性和跨PL长度变化(这两个混淆因素损害了先前基于余弦的分析)的条件下重新审视这一问题。在三个代码模型上,针对多语言竞争性编程数据,我们研究了跨PL组织的三个视角:成对PL几何、PL-英语对齐,以及通过候选PL表示空间的枢轴检索。结果是关系依赖的。代码-代码几何揭示了结构化的语言区域,但无普遍中心;代码-英语对齐偏向高级脚本语言;而枢轴检索在代码到代码和英语到代码迁移中偏好不同的中间空间。这些发现表明,Python的特殊角色更应被理解为面向英语的亲和性,而非普遍的几何中心性。

英文摘要:

Multilingual code language models transfer skills across programming languages (PLs), but whether any PL occupies a privileged pivot position remains contested: geometric analyses point to C-family languages and Go, while behavioral evidence highlights Python. We revisit this question under controls for representational anisotropy and length variation across PLs, two confounds that compromise prior cosine-based analyses. Across three code models on multilingual competitive-programming data, we study three views of cross-PL organization: pairwise PL geometry, PL-English alignment, and pivoted retrieval through candidate PL representation spaces. The results are relation-dependent. Code-code geometry reveals structured language regions but no universal center; code-English alignment favors high-level scripting languages; and pivoted retrieval favors different intermediate spaces for code-to-code and English-to-code transfer. These findings suggest that Python's special role is better understood as English-facing affinity than as universal geometric centrality.

补充信息

↑