首次发现大模型正改变真实代码风格,命名习惯与复杂度显著变化。
code_transformed: The Influence of Large Language Models on Code
- 分析2万+个GitHub仓库代码,追踪编程风格演变趋势。
- Python中snake_case命名比例从40.7%升至49.8%,体现大模型影响。
- 适合关注代码生成、编程演化与大模型应用的研究者参考。
编码是人机交互的核心方式。随着大语言模型(LLMs)的快速发展,代码生成能力正在深刻改变编程实践。本文首次系统研究大模型对代码风格的影响,聚焦命名规范、复杂度、可维护性与相似性。通过分析2020至2025年间链接至arXiv论文的20,000多个GitHub仓库代码,我们发现代码风格演变趋势与大模型生成代码特征高度一致。例如,Python中snake_case函数名占比从2023年Q1的40.7%上升至2025年Q3的49.8%。此外,我们还通过分析大模型解决算法问题的推理过程,揭示其思维模式。实验结果为大模型影响现实编程风格提供了首个大规模实证证据。数据集与源码已开源:https://github.com/ignorancex/LLM_code。
原文摘要 · Abstract (English)
Coding remains one of the most fundamental modes of interaction between humans and machines. With the rapid advancement of Large Language Models (LLMs), code generation capabilities have begun to significantly reshape programming practices. This development prompts a central question: Have LLMs transformed code style, and how can such transformation be characterized? In this paper, we present a pioneering study that investigates the impact of LLMs on code style, with a focus on naming conventions, complexity, maintainability, and similarity. By analyzing code from over 20,000 GitHub repositories linked to arXiv papers published between 2020 and 2025, we identify measurable trends in the evolution of coding style that align with characteristics of LLM-generated code. For instance, the proportion of snake_case function names in Python code increased from 40.7% in Q1 2023 to 49.8% in Q3 2025. Furthermore, we investigate how LLMs approach algorithmic problems by examining their reasoning processes. Our experimental results may provide the first large-scale empirical evidence that LLMs affect real-world programming style. We release all the experimental dataset and source code at: https://github.com/ignorancex/LLM_code
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。