{"title":"MedImgGuard: evidence-verified LLM code review for data leakage and evaluation contamination in medical imaging AI code","authors":"Tian Zhang, Ruwang Jiao, Jianlun Ma, Aohan Mei, Ying Qian, Jianhui Lv, Hongjiang Wang, Yong Jiang","doi":"10.1007/s10515-026-00680-3","DOIUrl":null,"url":null,"abstract":"<div><p>Data leakage and evaluation contamination can substantially inflate reported performance in medical imaging artificial intelligence systems, yet these risks are often introduced through concrete repository-level implementation decisions rather than explicit methodological statements. Existing static analysis, machine learning bug detection, and large language model (LLM)-based code review methods are limited in detecting such protocol-semantic defects because they usually lack medical identity modeling, evaluation-stage reasoning, traceable evidence construction, and claim-level verification. This paper presents MedImgGuard, an evidence-verified LLM code review framework for detecting data leakage and evaluation contamination in medical imaging AI repositories. MedImgGuard constructs a Protocol Evidence Graph from source code, configurations, and metadata schema to represent program-flow dependencies, medical identity semantics, evaluation-stage relations, fit-apply dependencies, metric-decision relations, and evidence anchors. It then checks protocol invariants for identity-disjoint splitting, training-only fitting, and test-stage isolation, and extracts compact evidence slices for candidate findings. The LLM is used as an evidence-to-review translator rather than an unconstrained detector, and its generated atomic claims are verified against repository evidence before reporting. We evaluate MedImgGuard on controlled defect and real-world repository benchmarks. The results show that MedImgGuard achieves the best overall detection performance, with a precision of 0.86, recall of 0.82, and F1-score of 0.84, while also improving localization quality, evidence recovery, review faithfulness, and actionability. These results demonstrate that protocol-aware evidence construction and claim-level verification can make LLM-assisted review more reliable for medical imaging AI code.</p></div>","PeriodicalId":55414,"journal":{"name":"Automated Software Engineering","volume":"33 4","pages":""},"PeriodicalIF":3.9000,"publicationDate":"2026-10-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Automated Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s10515-026-00680-3","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Data leakage and evaluation contamination can substantially inflate reported performance in medical imaging artificial intelligence systems, yet these risks are often introduced through concrete repository-level implementation decisions rather than explicit methodological statements. Existing static analysis, machine learning bug detection, and large language model (LLM)-based code review methods are limited in detecting such protocol-semantic defects because they usually lack medical identity modeling, evaluation-stage reasoning, traceable evidence construction, and claim-level verification. This paper presents MedImgGuard, an evidence-verified LLM code review framework for detecting data leakage and evaluation contamination in medical imaging AI repositories. MedImgGuard constructs a Protocol Evidence Graph from source code, configurations, and metadata schema to represent program-flow dependencies, medical identity semantics, evaluation-stage relations, fit-apply dependencies, metric-decision relations, and evidence anchors. It then checks protocol invariants for identity-disjoint splitting, training-only fitting, and test-stage isolation, and extracts compact evidence slices for candidate findings. The LLM is used as an evidence-to-review translator rather than an unconstrained detector, and its generated atomic claims are verified against repository evidence before reporting. We evaluate MedImgGuard on controlled defect and real-world repository benchmarks. The results show that MedImgGuard achieves the best overall detection performance, with a precision of 0.86, recall of 0.82, and F1-score of 0.84, while also improving localization quality, evidence recovery, review faithfulness, and actionability. These results demonstrate that protocol-aware evidence construction and claim-level verification can make LLM-assisted review more reliable for medical imaging AI code.
期刊介绍:
This journal details research, tutorial papers, survey and accounts of significant industrial experience in the foundations, techniques, tools and applications of automated software engineering technology. This includes the study of techniques for constructing, understanding, adapting, and modeling software artifacts and processes.
Coverage in Automated Software Engineering examines both automatic systems and collaborative systems as well as computational models of human software engineering activities. In addition, it presents knowledge representations and artificial intelligence techniques applicable to automated software engineering, and formal techniques that support or provide theoretical foundations. The journal also includes reviews of books, software, conferences and workshops.