一句话:提出多智能体框架 AutoMedImg,以多阶段验证与自动上下文工程实现零人工干预的医学影像处理代码生成。
通用大语言模型在小规模常规程序生成上表现可观,但面对医学影像处理这类复杂领域任务时,因缺乏显式领域知识与可靠的正确性验证机制,往往需要大量人工介入才能产出可靠的处理流水线。为此作者提出 AutoMedImg——一个面向全自动医学影像处理代码生成的多智能体框架。它把流程组织为两个阶段:规划阶段完成数据集分析与架构设计,并进行语义与形式验证;编码阶段并行生成各模块,同时施加静态检查、执行测试与装配验证。这种多阶段验证抑制了生成过程中的错误传播,而结合领域知识库、共享记忆与验证反馈的自动上下文工程则免去了人工提示构建。跨项目自适应流水线合成机制进一步累积已验证流水线,并按项目相似度检索可复用组件,实现跨项目学习以提升生成效率。作者在六个成熟医学影像数据集与五种骨干 LLM 上开展评估,结果显示框架完全无需人工干预,分割任务 Dice 最高达 0.90,分类准确率达 99%。
Large language models (LLMs) have demonstrated considerable promise in program generation for small-scale and conventional application development; however, they remain limited when applied to complex, domain-specific tasks such as medical image processing. General-purpose models lack explicit domain knowledge and robust validation mechanisms to ensure correctness, often requiring substantial human intervention to produce reliable processing pipelines. To address these limitations, we propose AutoMedImg, a multi-agent framework for fully automated medical image processing code generation. AutoMedImg orchestrates specialised agents across two phases: a Planning Phase that performs dataset analysis and architecture design with semantic and formal verification, and a Coding Phase that generates modules in parallel with static checking, execution testing, and assembly validation. This multi-stage validation mitigates error propagation throughout generation, while comprehensive auto-context engineering combining domain-specific knowledge bases, shared memory, and validation feedback automates context construction without manual prompting. A cross-project adaptive pipeline synthesis mechanism further accumulates validated pipelines and retrieves proven components for new tasks based on project similarity, enhancing generation efficiency through cross-project learning. Extensive evaluation across six diverse and well-established medical imaging datasets with five backbone LLMs demonstrates that AutoMedImg achieves zero human intervention, with Dice scores of up to 0.90 for segmentation tasks and 99% accuracy for classification.
@inproceedings{paperbot12303,
title = {Towards Fully Automated Medical Imaging Code Generation via Validation-Based Context Engineering},
author = {Zixiao Zhao and Jing Sun and Zhe Hou and Cheng-Hao Cai and Qian Liu and Mengze Li and Zijian Zhang and Jin Song Dong},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834399}
}