Towards Fully Automated Medical Imaging Code Generation via Validation-based Context Engineering
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 13 Oct 2026). Builds on 16 of its 47 references that are in the map. First posted on arXiv 29 Aug 2026.
Builds on
16 of 47 references.
References · 16
- 2021Evaluating Large Language Models Trained on Codecited by 8,205
- 2021Program Synthesis with Large Language Modelscited by 3,573
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,777
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,365
- 2023Teaching Large Language Models to Self-Debugcited by 972
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 884
- 2024A Survey on Large Language Models for Code Generationcited by 656
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 497
- 2020A Comprehensive Survey of Neural Architecture Search: Challenges and Solutionscited by 253
- 2024DS-Agent: Automated Data Science by Empowering Large Language Models with Case-Based Reasoningcited by 122
- 2024A Performance Study of LLM-Generated Code on Leetcodecited by 48
- 2023Exploring Code Analysis: Zero-Shot Insights on Syntax and Semantics with LLMscited by 19
4 more
- 2024Rewriting the Code: A Simple Method for Large Language Model Augmented Code Searchcited by 17
- 2025Optimizing the Interface Between Knowledge Graphs and LLMs for Complex Reasoningcited by 17
- 2024VoxelPrompt: A Vision Agent for End-to-End Medical Image Analysiscited by 6
- 2024MaCTG: Multi-Agent Collaborative Thought Graph for Automatic Programmingcited by 3
Built on by
Not cited yet.