arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2508.16713cs.SEcs.AIhep-ex

CelloAI:利用大型语言模型支持高能物理中的HPC软件开发

CelloAI: Leveraging Large Language Models for HPC Software Development in High Energy Physics

Brookhaven National Laboratory(布鲁克海文国家实验室);Lawrence Berkeley National Laboratory(伯克利国家实验室);Argonne National Laboratory(阿贡国家实验室)

Mohammad Atif, Kriti Chopra, Ozgur Kilic, Tianle Wang, Zhihua Dong, Charles Leggett, Meifeng Lin, Paolo Calafiura, Salman Habib

AI总结:

CelloAI是一个本地托管的HEP编码助手,结合LLM与RAG技术,通过语法感知分块和调用图知识提升代码文档生成与代码生成的准确性,并在ATLAS、CMS和DUNE实验应用中验证了其有效性。

摘要:

下一代高能物理(HEP)实验将产生前所未有的数据量,这要求在传统高吞吐计算之外整合高性能计算(HPC)。然而,将遗留软件移植到异构架构的挑战以及这些复杂科学代码库文档稀疏的问题,阻碍了HPC在HEP中的采用。我们提出CelloAI,一个本地托管的编码助手,它利用大型语言模型(LLMs)和检索增强生成(RAG)来支持HEP代码文档编写与代码生成。这种本地部署确保了数据隐私,消除了经常性成本,并在不依赖外部服务的情况下提供了大上下文窗口的访问能力。CelloAI通过专门的组件解决两个主要用例:代码文档编写和代码生成。对于代码文档编写,该助手提供:(a)通过从RAG来源(论文、海报、演示文稿)检索相关信息,为所有函数和类生成Doxygen风格的注释;(b)文件级摘要生成;以及(c)用于代码理解查询的交互式聊天机器人。对于代码生成,CelloAI采用语法感知的分块策略,在嵌入过程中保留语法边界,从而提高大型代码库中的检索准确性。该系统整合了调用图知识,以在代码修改期间保持依赖关系感知,并为性能优化和准确重构提供AI生成的建议。我们使用来自ATLAS、CMS和DUNE实验的真实HEP应用评估CelloAI,比较不同嵌入模型在代码检索有效性方面的表现。我们的结果表明,该AI助手能够增强代码理解并支持可靠的代码生成,同时保持科学计算环境所必需的透明性和安全性要求。

英文摘要:

Next-generation High Energy Physics (HEP) experiments will generate unprecedented data volumes, necessitating High Performance Computing (HPC) integration alongside traditional high-throughput computing. However, HPC adoption in HEP is hindered by the challenge of porting legacy software to heterogeneous architectures and the sparse documentation of these complex scientific codebases. We present CelloAI, a locally hosted coding assistant that leverages Large Language Models (LLMs) with retrieval-augmented generation (RAG) to support HEP code documentation and generation. This local deployment ensures data privacy, eliminates recurring costs and provides access to large context windows without external dependencies. CelloAI addresses two primary use cases, code documentation and code generation, through specialized components. For code documentation, the assistant provides: (a) Doxygen style comment generation for all functions and classes by retrieving relevant information from RAG sources (papers, posters, presentations), (b) file-level summary generation, and (c) an interactive chatbot for code comprehension queries. For code generation, CelloAI employs syntax-aware chunking strategies that preserve syntactic boundaries during embedding, improving retrieval accuracy in large codebases. The system integrates callgraph knowledge to maintain dependency awareness during code modifications and provides AI-generated suggestions for performance optimization and accurate refactoring. We evaluate CelloAI using real-world HEP applications from ATLAS, CMS, and DUNE experiments, comparing different embedding models for code retrieval effectiveness. Our results demonstrate the AI assistant's capability to enhance code understanding and support reliable code generation while maintaining the transparency and safety requirements essential for scientific computing environments.

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

↑