PairCoder++: Pair Programming as a Universal Paradigm for Verified Code-Driven Multimodal and Structured-Artifact Generation

📄 arXiv: 2607.01883v1 📥 PDF

作者: Junhao Chen, Xiang Li, Mingjin Chen, Boran Zhang, Henghaofan Zhang, Yibin Xu, Yuehan Cui, Fangsheng Weng, Fei Ma, Qi Tian, Ruqi Huang, Hao Zhao

分类: cs.CL

发布日期: 2026-07-02

备注: Accepted by ACL 2026. Project Page: https://yisuanwang.github.io/PairCoder/


💡 一句话要点

提出PairCoder以解决代码驱动生成中的验证问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 代码生成 双代理编程 验证机制 结构化工件 工具链支持 性能提升

📋 核心要点

  1. 现有方法在生成结构化工件时,单次推理的脆弱性导致验证困难,影响生成质量。
  2. 论文提出PairCoder,通过双代理编程的方式,结合工具链进行代码编写与验证,提高生成工件的可靠性。
  3. 在多项基准测试中,PairCoder在可验证工件的生成上显著提升了性能,执行率提高了0.20到0.78,编译率提升了10到30个百分点。

📝 摘要(中文)

代码是大型语言模型生成结构化工件的媒介,如图表、科学图形、CAD模型等。在这一过程中,单次推理的脆弱性源于编译器、渲染器或模拟器对模型的不可见性。本文提出PairCoder,通过双代理对编程的方式进行验证:Driver代理编写程序,Navigator代理根据验证证据进行审查,并在错误持续时互换角色。在17个公共基准和三家供应商的七个模型上,PairCoder在可验证工件的基准测试中显著提升了性能,执行率和编译率均有显著提高。

🔬 方法详解

问题定义:论文要解决的具体问题是如何在生成结构化工件时提高验证的可靠性。现有方法在单次推理过程中,编译器和渲染器的不可见性导致生成的工件难以验证,影响了生成质量和效率。

核心思路:论文的核心解决思路是通过双代理编程的方式,将代码编写和验证过程结合起来。Driver代理负责编写程序,而Navigator代理则根据验证证据进行审查,二者在出现错误时互换角色,以确保生成工件的准确性和可靠性。

技术框架:整体架构包括两个主要模块:Driver代理和Navigator代理。Driver负责生成代码,Navigator则进行实时审查和反馈。整个过程依赖于工具链的支持,以便在生成过程中提供必要的验证信息。

关键创新:最重要的技术创新点在于将双代理编程作为一种通用范式,利用工具链的反馈机制来增强生成过程的可靠性。这种方法与现有的单一模型推理方法本质上不同,后者缺乏实时的验证支持。

关键设计:在设计上,PairCoder的参数设置和损失函数经过精心调整,以确保在不同模型和基准测试中都能取得最佳效果。网络结构方面,Driver和Navigator的交互机制被优化,以实现高效的角色切换和信息共享。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,PairCoder在可验证工件的生成上显著提升了性能,例如Blender场景的可执行性从0.20提升至0.78,TikZ编译率在每个模型上提高了10到30个百分点。整体性能提升在2.9到9.2倍之间,显示出该方法的有效性。

🎯 应用场景

该研究的潜在应用领域包括软件开发、自动化设计和科学计算等。通过提高代码生成的可靠性,PairCoder可以在多个行业中实现更高效的工作流程,减少人工干预,提升生产力。未来,该方法可能会推动更多基于代码生成的智能工具的发展。

📄 摘要(原文)

Code is the medium through which large language models generate structured artifacts: charts, scientific figures, vector graphics, CAD models, 3D scenes, and hardware designs are all produced by writing programs. In this regime single pass inference is brittle, because the compiler, renderer, or simulator that decides whether the artifact exists is invisible to the model. We present PairCoder, which grounds review in the toolchain and realizes it as two agent pair programming: a Driver agent writes the program, a Navigator agent reviews it against verification evidence (diagnostics, execution results, and renderings of the current artifact beside the target), and the two switch roles when errors persist. Across 17 public benchmarks and seven models from three vendors, PairCoder improves essentially every benchmark whose artifact is verifiable, on full official metric suites rather than execution alone (for example, Blender scene executability 0.20 to 0.78; TikZ compile rate up 10 to 30 points on every model), at 2.9 to 9.2 times single model cost (about 7 times overall). The improvements concentrate where the toolchain provides an informative oracle and the baseline leaves headroom, and the method ties or mildly regresses where the oracle is weak; we frame pair programming as a reliable recipe for verified code driven generation.