从论文到程序:AI辅助量子多体代码生成中的知识外化
From Paper to Program: Specification-Guided Implementation of Quantum Many-Body Algorithms with Large Language Model
AI总结:
针对AI直接翻译论文为代码时因隐含约定导致失败的问题,提出知识外化方法,通过多阶段人机协作流程将隐式假设显式化,在DMRG和Pfaffian-MPS任务上验证了有效性。
摘要:
大型语言模型可以编写科学代码,但当正确性依赖于文献中的默认约定时,直接的论文到程序翻译仍然脆弱。我们将这一瓶颈识别为\textbf{知识外化}:在实现之前将隐式计算假设——索引约定、规范选择、费米子符号、收缩顺序和内存约束——转换为明确的技术规范。我们评估了一个多阶段、人在回路的工作流程,该流程在理论提取和代码生成之间插入这样的规范,并带有验证和停止门。该工作流程在两个算法上不同的量子多体任务上进行了测试:基于变分扫描的密度矩阵重整化群(DMRG)来自教学综述,以及将Hartree-Fock-Bogoliubov态构造性地转换为矩阵乘积态的Pfaffian方法,来自Jin等人五页的信件,Phys. Rev. B 105, L081101 (2022),该代码未公开。对于DMRG,在$4\ imes4$网格中,所有16个规范引导的模型配对都满足物理验证标准,而直接尝试为6/13。散文规范消融实验表明,外化的内容(而非LaTeX格式)是基本要素。对于Pfaffian-MPS,该工作流程在26次存档尝试中成功11次,而直接提示产生零次审计通过。跨规范转移是不对称的:由GPT~5.5实现的非GPT规范通过4/4,而由较弱模型实现的GPT~5.5规范失败4/4,表明存在残留的实现模型瓶颈。由此产生的\textit{论文到程序多体}技能为AI辅助实现多体算法以及诊断外化成功或失败提供了可审计的协议。
英文摘要:
Turning scientific papers into reliable code requires making implicit computational knowledge explicit. We introduce and evaluate a human-supervised workflow in which large language models develop and review technical specifications before implementing quantum many-body algorithms. The specifications encode conventions, procedures, scaling requirements, and validation gates for mathematical consistency, physical accuracy, and production-scale performance. For the density-matrix renormalization group, all 16 tested specification--implementation model pairings succeed, compared with 6 of 13 direct attempts; two further attempts succeed with a prose specification. For Pfaffian conversion of Hartree--Fock--Bogoliubov states to matrix product states, on eleven matched model--harness configurations, four self-paired workflow attempts pass and no direct attempts do; across all phases, 11 of 26 workflow attempts pass the audit and validation criteria. Cross-model transfer is asymmetric: one implementation model succeeds with all four specifications written by other models, whereas all four reverse-direction attempts fail. A consolidated specification informed by these experiments supports successful implementations in three previously unsuccessful model--harness configurations. Technical specifications therefore guide scalable implementation and help distinguish paper-to-code ambiguity from limitations in implementation capability. We synthesize these findings into the \emph{Paper-to-Program Many-Body} protocol, which turns implementation experience into reusable review criteria, validation gates, and reporting practices. Publicly archived prompts, transcripts, specifications, code, and validation records support independent verification and extension to other many-body algorithms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。