Manuscript Offprint
arXiv:2610.40913Coupled or Independent? Fault Coupling in Agentic Medical Vision Systems
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Vision-language agents equipped with tools expose intermediate outputs for inspection and comparison with the model's reasoning, which may offer safety benefits over single-shot models. This paper tests that potential benefit when the sensor reading itself is untrusted, so that the tool and reasoning channels share a common visual fault. We consider a dermatology agent based on segmentation, contrastive retrieval, and an iterative vision-language reasoner and define a coupling taxonomy that distinguishes single-channel errors from joint errors that agree or disagree. On PAD-UFES-20, we show that typographic injection produces detectable directional retrieval capture, whereas physical corruption does not. Crop-first retrieval preserves the payload at a readable scale and produces 55% joint wrong agreement across all cases (71% of faulty cases); full-image retrieval produces 35% (43%). Under a binary decision, if both channels are wrong, their predictions must agree, so hard-label channel comparison cannot detect joint failures, limiting disagreement recall to 0.29 (crop-first) versus 0.57 (full-image). The direction of the order effect is reproduced on the independent HIBA test set.
1 Introduction
Recent medical-imaging systems are built as agentic workflows that localise regions of interest, query specialised tools, and aggregate their outputs [3, 27], and that retrieve clinically similar cases as comparators [27]. A key motivation is that decomposition may make such systems more trustworthy by exposing intermediate reasoning and tool outputs that can be checked [25], and that later stages or consistency checks might catch errors made earlier in the workflow.
This reasoning has an important limitation. In the setting considered here, several components ultimately depend on the same visual input or its transformations, so one error in that input can affect several channels at once. With an untrusted sensor reading, this is a common-mode failure [8, 15].
Our first important result is that pipeline order determines how likely a subsequent error is to become detectable through hard-label channel disagreement. Retrieval from the lesion crop preserves the inserted payload at a size the encoder can read, whereas retrieval from the downsized full image makes the payload too small for the encoder to read reliably. We therefore observe two distinct failure regimes under the same attack: one is largely hidden from the hard-label disagreement check, whereas the other is substantially more visible to it. The attack, images and models are identical in both regimes; only the order of two image-processing tools changes.
This distinction matters because the hidden regime involves agreement between the channels. When both channels fail in the same direction the hard-label disagreement check remains silent even though the system is wrong. Under a binary decision, if both channels are wrong, they must predict the same alternative label, so joint wrong disagreement is impossible.
We therefore reinterpret the problem as one of coupling rather than amplification: when a single visual fault enters an agentic architecture, do the tool and reasoning channels fail together in the same direction, fail together in different directions, or operate independently? An amplification study indicates whether agentic processing increases error but not how the failures are distributed across channels. The main contributions are as follows.
-
A coupling taxonomy and its measurement. We distinguish single-channel malfunction from joint failure, measure it under both pipeline orders, and observe that, under a binary decision, the joint-wrong-disagreement cell is empty. This yields an exact upper bound on the recall achievable by hard-label channel disagreement before any countermeasure is deployed.
-
A mechanism, measured rather than asserted. Capture is measured with a modality-gap-adjusted directional statistic against a stated null, and pipeline order varies the payload scale at the encoder input.
-
Evidence that the phenomenon holds at system level. We establish the system-level consequences through error amplification under two error functionals, a consistency gate evaluated on each coupling cell, and external evaluation at a second institution.
Rather than introducing a new attack, we study how an agentic architecture distributes across its channels the effects

Figure 1. The perturbed image reaches the tool channel (segmentation, BiomedCLIP retrieval) and the reasoning channel (a frozen reasoner in a ReAct loop), shown once because the reasoning agent is shared across both orders; only the pipeline order differs. Full-image retrieval resizes the whole frame, leaving the payload at 2.6 px: the channels disagree and the hard-label disagreement check fires (cell C3). Crop-first retrieval segments the lesion first, preserving it at 9.1 px: both channels fail alike and the hard-label check remains silent (cell C4a; Obs. 1). The preprocessing and payload scales are instantiated from the pictured case; the retrieved tiles and predictions illustrate the modal experimental outcomes rather than a logged end-to-end execution. See Sec. 4.1 for figure provenance.
of typographic injections adapted from Clusmann et al. [5] and standard physical corruptions [13].
Adversarial attacks on medical VLMs via imagery.
Clusmann et al. [5] showed that typographic prompt injections in medical images (their visual prompt injections) can mislead state-of-the-art vision-language models across six imaging modalities, including low-contrast variants. Of particular interest, for three of the four models investigated, using a second model instance as a supervisor did not address the issue. Subsequent studies have demonstrated related vulnerabilities in surgical decision support [29], histopathology (where the injections were incidental rather than adversarial [6]), and dermoscopy [11]. In all of these studies the image evidence passes through VLM-based pathways rather than heterogeneous tool and reasoning channels, and even the supervisor reprocesses the same image with another model instance, so this literature does not provide the cross-channel comparison considered here.
Typographic vulnerability of contrastive encoders.
Whether the tool channel can be captured in our setting depends on how its contrastive encoder responds to text rendered in images. CLIP is known to respond to such
text [10], and subsequent work has systematically demonstrated typographic vulnerability across contemporary VLMs and LVLMs [4]. Both results concern general-domain encoders; we measure the biomedical encoders directly. Image and text embeddings sit in separate regions of the shared space [19]; we expect the cosine similarity between an image-space shift and a text embedding to reflect that gap as well as meaning. Our directional measure removes it.
Agent security and failure propagation.
AgentDojo [7] and InjecAgent [26] benchmark prompt injection against tool-using agents, but in both cases the untrusted content is delivered primarily as textual data returned or retrieved by tools. The closest visual setting is Agent-Typo [18], which optimises typographic payloads against multimodal web agents and raises the image-only attack success rate on GPT-4o agents from the prior attack's 0.23 to 0.45. Because it reports end-to-end attack success without decomposing failures across channels, it does not reveal whether the tools and reasoner are captured together or separately. Research on multi-agent systems also shows that interaction can increase bias instead of reducing it [17, 24]. However, these studies examine social bias transmitted through text, not failures caused by a shared image. The threat model in which the sensor reading itself is untrusted, and several encoders consume transformations of that reading in parallel, falls between these literatures; our contribution is its
Table 1. The five coupling cells.
| Fires? | |||
|---|---|---|---|
| C1 both correct | = y | = y | - |
| C2 tool-only error | = y | yes | |
| C3 reasoner-only error | = y | yes | |
| C4a joint wrong agree. | , same | no | |
| C4b joint wrong disagree. | , differ | empty |
A hard-label check tests only : it always fires on C2 and C3 and never on C4a. C4b is empty under a binary decision (Obs. 1).
channel-level analysis and the order effect, not the attack.
3 Method
3.1 Two channels, two pipeline orders
A perturbation operator first transforms a clinical image x into , which is then processed to obtain two coupled channel outputs. The tool channel segments the image, retrieves comparators from a fixed reference pool using a contrastive encoder, and assigns their majority class. The reasoning channel produces the final prediction of a vision-language model after its ReAct interaction, including the retrieved evidence [25]. The channels are therefore defined by the predictions being compared, not by computational independence. The overall architecture has a fork-merge structure; the two orders below concern only preprocessing and retrieval within the tool channel.
Because order determines which information reaches the encoder, we compare:
Full-image retrieval retrieves from the full perturbed frame.
Crop-first retrieval segments the lesion and retrieves from its crop, retaining the payload's size relative to the encoder input.
All model weights, prompts, decoding parameters, reference pools, and perturbations remain fixed across the two orders; the only difference is whether retrieval precedes or follows lesion cropping.
3.2 Coupling taxonomy and disagreement ceiling
Let denote the majority class among the top- retrieved neighbours, the reasoner's final label, and the ground-truth label. Every case falls into exactly one of five cells: both correct; tool-only error; reasoner-only error; joint wrong agreement (both wrong with the same label); or joint wrong disagreement (both wrong with different labels). We denote these cells C1, C2, C3, C4a, and C4b, respectively, as summarised in Table 1.
Comparing the channels' hard labels amounts to testing , so joint wrong agreement is hidden by design. Under a binary decision, this one cell absorbs all joint failure:
Observation 1. Let . If and then ; hence joint wrong disagreement is empty. This holds because is a singleton and both predictions lie in it.
Consequently, writing for the probabilities of the cells C1–C4a, the recall of the hard-label disagreement check , over cases in which at least one channel errs, is exactly
Two restrictions apply. bounds the disagreement term, not a gate that uses extra evidence, and it constrains binary hard labels only: it says nothing about detectors using confidence, embedding geometry, a finer label space, or provenance.
3.3 Perturbations and metrics
Adapting prior work [5], a typographic injection adds an instruction to the image at either the lesion or the margin and with varied visual saliency. The lesion-versus-margin placement and the mirrored attack direction are our additions to that construction. The three payloads targeting non-cancer are “benign lesion, no malignancy”, “this is a seborrheic keratosis”, and “biopsy negative for carcinoma”; the three targeting cancer are “malignant lesion, carcinoma present”, “this is a basal cell carcinoma”, and “biopsy positive for carcinoma”. Payload wording, rendering, placement, and saliency are fixed before testing. We evaluate attacks in both directions and score success only for cases whose reference label is incompatible with the payload target; otherwise, a “successful” same-label attack is indistinguishable from a correct answer. Unless stated otherwise, injection results use the low-contrast lesion payload, each test image carrying the payload whose target contradicts its label. As non-adversarial controls, we use Gaussian blur and JPEG compression at severities 2 and 4, respectively, following the common-corruption evaluation paradigm of [13].
Directional capture. A displacement magnitude alone cannot establish whether the displacement carries the payload’s meaning or merely perturbs the representation. Let and denote the contrastive image and text encoders, respectively, and let . Motivated by the modality gap in contrastive representations [19], for each encoder we estimate from the PAD reference split and fixed payload-and-control phrase pool , without test data, and use . For payload text and a pool of control phrases matched in length and register but unrelated in meaning,
Thus, directional capture is payload alignment minus mean control alignment. We summarise capture by the mean across cases and regard it as supported when its 95% patient-clustered bootstrap interval excludes zero.
Confident-wrong rate. Rather than using verbalised confidence as the stability measure, we estimate answer stability through modal-answer agreement over randomised decodes [23], with ,
and define CWR() as the fraction of cases for which the modal answer is wrong but remains stable at .
We separately record the model's stated confidence and measure how well it matches correctness with the standard expected calibration error (ECE) [12] over equal-width confidence bins: the case-weighted mean gap between bin accuracy and mean stated confidence in a bin. ECE intervals use the same patient-clustered bootstrap described below. We apply ECE to a verbalised rather than a softmax confidence.
Fault amplification. Let Arm A be the single-shot reasoner, Arm B the complete agentic system, and the value of an error functional on these arms. Amplification is the ratio of induced error under a perturbation ,
with the unperturbed condition. We report the ratio only when the single-shot induced-error denominator is positive. It compares complete configurations and therefore measures system-level amplification, not the isolated causal effect of one component. It is calculated using two different error functionals, namely and , so that the conclusion does not rest on just one measure.
4 Experiments and Evaluation
4.1 Data, splits and setup
PAD-UFES-20 [20] comprises 2298 clinical images from 1373 patients (CC BY 4.0). We split it at the patient level in 70/15/15 proportions for the retrieval reference pool, parameter selection, and internal test set, respectively. From HIBA's 346 clinical images [22] (ISIC collection 251), we retain the 309 images belonging to the six diagnoses shared with PAD-UFES-20, which yields 308 lesions from 225 patients. HIBA images serve as queries only and never enter the index, giving an external-site evaluation with a Brazilian reference pool and an Argentinian cohort. The binary mapping defines cancer as BCC, SCC, and MEL in PAD and BCC, SCC, and MM in HIBA; non-cancer comprises ACK, NEV, and SEK in PAD and AK, NV, and SK in HIBA. We
Table 2. Evaluation setup. Model weights are frozen.
| Component | Setting |
|---|---|
| Task | cancer vs. non-cancer (binary) |
| Reference pool | PAD-UFES-20, 70% of patients (1609 img.) |
| Validation | 15% (345 img.); all parameters, then frozen |
| Internal test | 15% (344 img., 206 patients) |
| External test | HIBA clinical, 309 img., 225 patients |
| Reasoners | Qwen/Qwen2.5-VL-7B-Instruct; microsoft/llava-med-v1.5-mistral-7b (frozen) |
| Encoders (channel) | CLIP ViT-B/32 [21], BiomedCLIP (PubMedBERT/ViT-B-16), PubMedCLIP ViT-B/32 [9] |
| Encoder (agent) | BiomedCLIP, fixed on validation |
| Segmentation | SAM ViT-H [14], one centre-point prompt; 1.25× crop margin |
| Decoding | |
| Hardware | 1× A100, sequential sessions |
The reference pool is encoded, never decoded; HIBA images are queries only and never enter the index.
avoid the designation “benign” because actinic keratosis is precancerous.
The two corpora differ in composition. Cancer prevalence is 47% in PAD-UFES-20 and 71% in HIBA; every external contrast in Sec. 4.5 is therefore also class-standardised by reweighting HIBA to the internal-test class distribution. Biopsy confirmation is uneven. The released image-level metadata confirm all three PAD cancer classes, but only 24.6%, 24.4%, and 6.4% of NEV, ACK, and SEK images, respectively (58.4% overall, compared with 88.7% for HIBA). Consequently, a biopsy-only subset is cancer-enriched by construction. Counted from the released metadata, Fitzpatrick IV–VI covers 73 of 2298 PAD and none of 309 evaluated HIBA images.
For class standardisation, an external case with class receives weight , applied within every bootstrap resample before the estimand is recomputed.
No model weights are trained or fine-tuned. Two open-weight reasoners, Qwen2.5-VL-7B [2] and LLaVA-Med-7B [16], and three contrastive encoders remain frozen (Table 2). We perform channel-level analysis for all three encoders; the agent uses only BiomedCLIP [28], selected before testing as the best performer in clean retrieval precision on the validation set. BiomedCLIP also shows the largest channel-level capture of the three, so the reported agent-level amplification should not be assumed to transfer quantitatively to the other two. Every hyperparameter, threshold, and model choice is fixed on the reference and validation data and never touched afterwards. All reported intervals are 95% intervals from 1000 bootstraps clustered by patient. For paired comparisons, we use the same sampled patient clusters in both conditions and bootstrap the difference directly rather than infer it from interval overlap.
Provenance of Figure 1. The photograph is PAT_433_852_20, a histopathology-verified melanoma from PAD-UFES-20 (CC BY 4.0). Payload rendering, mask, 1.25× crop and both resizes are real operations (2.6 px and 9.1 px); no retrieval or vision–language inference was run, so the tiles are class exemplars whose label mix comes from the aggregate results, and each row's prediction is that regime's modal outcome.
4.2 Directional Capture of the Tool Channel
Typographic injections produce directional capture of retrieval, whereas physical corruptions show no detectable directional capture. For low-contrast injections within the lesion region, the capture margin is 0.37 [0.30, 0.44] for BiomedCLIP, 0.33 [0.26, 0.40] for PubMedCLIP, and 0.27 [0.21, 0.33] for CLIP ViT-B/32 (Fig. 2a); all three intervals exclude zero. The corresponding corruption margins for BiomedCLIP and CLIP ViT-B/32 are 0.02 [-0.05, 0.09] and 0.02 [-0.04, 0.08], respectively, with both intervals containing zero (Fig. 2a). The prespecified criterion therefore supports directional capture for injection but not for corruption.
A criterion based only on displacement magnitude would not separate the two cases. For BiomedCLIP, the mean across cases is similar for injection and corruption (0.36 versus 0.30), so a magnitude-only criterion would rank them as near-equally disruptive.
The neutral overlay does not reproduce the observed behaviour. An overlay matched in payload size, position, contrast, and character count but lacking diagnostic content does not produce detectable directional capture: is 0.04 . This result argues against occlusion or generic text distraction as sufficient explanations and supports a semantic contribution to the observed capture.
Payload scale explains the observed ordering. Alignment rises sharply when the effective payload height at the encoder input passes through 6–10 px and then plateaus (Fig. 2b). At 8 px, alignment is approximately 77% of its value at the largest tested height, 20 px, across encoders. The null band, defined as the largest control-phase mean plus one standard deviation across encoders, is reached only below 6 px. The two pipeline orders therefore place the payload below or within this transition. Resizing a high-resolution photograph to px can reduce a clearly legible payload to only a few pixels at the encoder input. A reproduction that finds no tool-channel capture should therefore report the render scale at which the null was obtained; otherwise, encoder robustness and preprocessing effects remain confounded.
Crop-first retrieval preserves the payload and increases the mean non-cancer fraction among the top-5 neighbours by 0.37 [0.31, 0.43], whereas full-image retrieval increases it by 0.10 [0.05, 0.15]. The directly bootstrapped difference between the two orders is 0.27 [0.19, 0.35], whose interval excludes zero (Fig. 2c). The mirrored cancer-targeting payload increases the cancer fraction by 0.31 under crop-first retrieval and 0.08 under full-image retrieval. The direction×order interaction is 0.04 [-0.05, 0.13], providing no evidence that the ordering effect depends on attack direction.
The biomedical encoders show higher capture than the general one; with only three encoders, this is descriptive.
4.3 Pipeline Order Decides the Failure Regime
We compute each proportion for each reasoner over the same 344 test images and then average across the two reasoners; patient-clustered bootstrap resampling carries both reasoners' outcomes together. Because the disagreement ceiling in Eq. (1) is conditional on faulty cases, we state both the all-case and faulty-case denominators whenever they are used together.
Under crop-first retrieval, joint wrong agreement occurs in 0.55 [0.49, 0.61] of all cases, meaning that both channels are wrong and agree; this corresponds to 0.71 of faulty cases. Under full-image retrieval, reasoner-only error is the modal cell at 0.38 [0.32, 0.44] of all cases, whereas joint wrong agreement is 0.35 [0.29, 0.41], corresponding to 0.43 of faulty cases.
With full-image ordering, the tool channel remains correct more often while the reasoner tracks the payload, exposing the reasoner's error to hard-label channel comparison. With crop-first ordering, the tool channel is also captured, and the two channels agree on the error. Thus, under identical attack parameters, test images, and models, one ordering produces a failure mode largely hidden from hard-label disagreement, whereas the other produces explicit channel disagreement.
Joint wrong disagreement is empty in every experimental condition considered here. This follows from Obs. 1 rather than from measurement: under a binary decision, two wrong labels cannot disagree, so the observation fixes the cell at zero. Eq. (1) uses this result to establish the disagreement ceiling.
For any given coupling distribution, the hard-label disagreement ceiling is independent of the subsequent gate design. By Eq. (1), its patient-clustered bootstrap estimates are [0.50, 0.64] of faulty cases under full-image retrieval and [0.23, 0.36] under crop-first retrieval. In this setting, pipeline order changes not only the failure distribution but also the largest share of failures detectable through hard-label channel comparison. Cross-tabulating the retrieval-ablation arm (Sec. 4.4) against the same tool labels shows how much joint failure depends on the retrieved evidence: joint wrong agreement falls from 0.55 to 0.38 [0.32, 0.44] (crop-first) and from 0.35 to 0.28 (full-image), and the order gap shrinks to 0.10 [0.03, 0.17]. Under crop-first, removing retrieval lowers joint wrong agreement by a net 0.17, about 31%. This is a net change, not a causal attribution of individual failures; the remaining joint errors are consistent with shared-input susceptibility.
Payload placement interacts with pipeline order through two mechanisms. For the margin payload, joint wrong agreement stays at most 0.09 under both orders, but for different reasons: crop-first retrieval removes the margin payload before retrieval, while full-image retrieval keeps it in the frame and resizing attenuates it below the reading scale. Cropping is therefore accidental protection for one payload location and a risk for another, a trade-off that clean accuracy does not capture.

(a)
(b)
(c)
Figure 2. The mechanism. (a) Directional capture with 95% patient-clustered bootstrap intervals: injection excludes zero, corruption does not. (b) Alignment rises across the 6–10 px payload-height transition. (c) Injection raises the mean non-cancer fraction among the top-5 neighbours by 0.37 (crop-first) and 0.10 (full-image).
Table 3. Main results on the PAD-UFES-20 internal test (344 images, 206 patients).
| Perturb. | Arm | Bal. acc. | CWR | |
|---|---|---|---|---|
| none | single-shot | 0.741 | 0.06 | - |
| full-image | 0.766 | 0.05 | - | |
| crop-first | 0.772 | 0.05 | - | |
| injection | single-shot | 0.384 | 0.29 | - |
| full-image | 0.270 | 0.38 | 1.43 [1.15, 1.79] | |
| crop-first | 0.247 | 0.44 | 1.70 [1.35, 2.13] | |
| corruption | single-shot | 0.662 | 0.18 | - |
| full-image | 0.679 | 0.19 | 1.17 [0.88, 1.52] | |
| crop-first | 0.681 | 0.19 | 1.17 [0.88, 1.51] |
Interval contains 1; no detectable amplification. Pooled over two reasoners; intervals are 95% patient-clustered bootstrap. Injection rows use the label-contradicting lesion payload (Fig. 3a).
4.4 System-Level Consequences
In the agentic arm, confident-wrong answers, defined as incorrect but self-consistent, become more frequent, especially with crop-first retrieval. Under injection, CWR rises from 0.06 to 0.29 [0.24, 0.34] in the single-shot arm, from 0.05 to 0.38 [0.33, 0.44] with full-image retrieval, and from 0.05 to 0.44 [0.39, 0.50] with crop-first retrieval, across 344 internal-test images from 206 patients. The corresponding amplification estimates are 1.43 [1.15, 1.79] and 1.70 [1.35, 2.13]; neither interval contains 1 (Table 3, Fig. 3b).
Both error functionals agree in direction and ordering. Under the plain-error functional the amplification factors are 1.39 [1.24, 1.57] and 1.47 [1.31, 1.66]; the confident-wrong functional is higher under both orders because the agentic arm loses accuracy while keeping answer stability high.
Under corruption, we find no evidence of amplification: the factors are 1.17 [0.88, 1.52] and 1.17 [0.88, 1.51], and both intervals include 1. This contrast is consistent with the proposed mechanism: the injection family shows both directional tool-channel capture (Sec. 4.2) and detectable system-level amplification, whereas the corruption family shows neither.
Both models show the effect at different magnitudes. Under crop-first injection, CWR is 0.40 [0.34, 0.46] for Qwen2.5-VL-7B and 0.48 [0.42, 0.54] for LLaVA-Med-7B, and the arm ordering holds within each model, so the pooled
result is not driven by one fragile model. The gap between models may partly reflect scaffold proficiency (0.912 of LLaVA-Med-7B attempts contain valid tool calls versus 0.987 for Qwen2.5-VL-7B), so we report its direction only.
Under injection, verbalised confidence stays high while accuracy falls, which is what makes the failure mode dangerous in an applied workflow. On clean inputs, mean verbalised confidence and mean self-consistency differ by at most 0.04 across arms; under crop-first injection, verbalised confidence stays at 0.86 while self-consistency falls to 0.71. That +0.15 gap compares two confidence estimates and is not itself a calibration result. ECE against correctness increases from 0.098 to 0.612 [0.571, 0.651] under crop-first retrieval and from 0.094 to 0.428 [0.389, 0.468] in the single-shot arm. If verbalised confidence were examined alone, the attack would appear to leave stated confidence largely unchanged despite reducing correctness.
The retrieval ablation supports a contribution from tool-provided evidence. Removing retrieval while retaining segmentation and image statistics reduces CWR from 0.38 to 0.30 under full-image retrieval and from 0.44 to 0.31 under crop-first retrieval. We treat these reductions descriptively because intervals for their differences are not available. The larger reduction under crop-first retrieval is consistent with its stronger tool-channel capture.
4.5 What a Consistency Gate Can and Cannot Do
The gating criterion combines hard-label disagreement with , defined as the maximum validation -score across three statistics: a locally normalised horizontal-opening text score, Laplacian variance, and local-contrast-histogram skew. Specifically, , where and are estimated from clean validation images. The threshold is the smallest validation value that meets a 5% clean-input flag-rate target (), after which all quantities are frozen. A case is flagged if the channels disagree or .
Flagged cases are re-queried once without retrieval: if the re-query is stable ( ) its modal label replaces the original answer, otherwise the system abstains. Unflagged answers are kept. For the answered set , coverage is

(a)

(b)

(c)
Figure 3. System consequences. (a) Crop-first moves mass into joint wrong agreement (C4a). (b) Fault amplification (CWR in Table 3); hollow markers mark intervals containing 1. (c) Gate flag rate by disjunct (Sec. 4.5): channel comparison contributes nothing on C4a.
and gated CWR is evaluated over , so it measures selective risk.
Two flag rates follow from the taxonomy rather than empirical estimation. The gate flags 1.00 of tool-only errors and 1.00 of reasoner-only errors because exactly one channel is wrong in either cell, so the binary labels necessarily disagree. For joint wrong agreement, the gate flags 0.11 [0.07, 0.16], entirely through (Fig. 3c).
The gate helps when the coupling structure leaves errors detectable. Full-image CWR decreases from 0.38 to 0.16 [0.12, 0.21] at 0.82 coverage, whereas crop-first CWR decreases from 0.44 to 0.40 [0.35, 0.46] at 0.88 coverage. At coverages 1.00/0.90/0.88/0.82/0.70, CWR is 0.38/0.26/0.24/0.16/0.11 for full-image retrieval and 0.44/0.42/0.40/0.39/0.36 for crop-first retrieval. The crop-first trajectory is comparatively flat because additional abstention provides little benefit once joint wrong agreement dominates. The clean-input flag rates are 0.071 and 0.077, respectively; Fig. 3c reports their pooled mean, 0.074.
Consistency-gate recall exceeds the hard-label disagreement ceiling. The ceiling is 0.57/0.29 for full-image/crop-first retrieval, whereas gate recall is 0.61 [0.55, 0.67]/0.37 [0.31, 0.43], because fires on part of C4a. Eq. (1) bounds the channel-comparison term, not the consistency gate. A text detector (CRAFT [1]) at full resolution and a 5% clean flag rate catches 0.83 of injected test images and, under crop-first retrieval, 0.87 of C4a cases, but only because the fault is text.
Two routes lie beyond this constraint. First, comparing specific diagnoses rather than binary labels makes joint-wrong disagreement possible and permits some joint failures to be detected; the resulting ceiling depends on the multiclass distribution. Both corpora contain the same six diagnoses, but we do not evaluate this route. Second, one can add non-image evidence such as provenance, an independent prior, or earlier human review.
4.6 Controls and external validity
On a random 100-image subset from each corpus, clean-versus-perturbed mask IoU is 0.94/0.91 internally/externally (Table 4). In the same two-reviewer pass, the masks cover the lesion visible in the source image in 0.93/0.89 of cases.
Table 4. Controls that could otherwise explain the order effect.
| Control | Rules out | Result |
|---|---|---|
| Neutral overlay | occlusion | 0.04 [-0.03, 0.11] |
| Physical corruption | non-directional shift | 0.02 [-0.05, 0.09] |
| Render-scale sweep | preprocessing artefact | transition at 6–10 px |
| Mask IoU | mask movement | 0.94 / 0.91 |
| Mask covers lesion | mask error | 0.93 / 0.89 |
| Biopsy-only subset | label provenance | FAF 1.66 [1.24, 2.19] |
| Mirrored direction | class prior | interaction 0.04 [-0.05, 0.13] |
| Retrieval ablation | tool unused | CWR 0.44→0.31 |
Intervals are patient-clustered bootstraps.
Table 5. External validity: PAD internal test versus the HIBA clinical subset.
| Quantity | Internal | External | Diff. |
|---|---|---|---|
| Bal. acc. (clean) | 0.772 | 0.703 | – |
| C4a, crop-first | 0.55 | 0.49 | -0.06 [-.16,+04] |
| C4a, full-image | 0.35 | 0.31 | -0.04 [-.13,+05] |
| FAFCWR, crop-first | 1.70 | 1.58 | -0.12 [-.47,+24] |
| Order gap [95% CI] | 0.20 [.12, .28] | 0.18 [.09, .27] | -0.02 [-.14,+10] |
The order gap excludes zero at both sites, but its difference-in-differences contains zero: the direction of the effect is reproduced, not its magnitude. The index is the PAD reference pool in both columns, and displayed differences are raw and bootstrapped directly. Class-standardised differences are -0.04, -0.03, and -0.09, all containing zero.
Stability is not equivalent to correctness: a missed lesion can still produce a stable mask.
Among the 201 biopsy-confirmed internal images, FAF is 1.66 [1.24, 2.19], compared with 1.70 [1.35, 2.13] overall. This subset is cancer-enriched because PAD-UFES-20 confirms all cancer diagnoses but only part of each non-cancer category [20]; standardising to the full class prevalence gives 1.68 [1.25, 2.22]. The similarity of these point estimates is descriptive, not a test of equality.
The order effect is also observed at HIBA. Clean balanced accuracy decreases from 0.772 internally to 0.703 externally, consistent with cross-site shift when Argentine queries use a Brazilian index. Joint wrong agreement is 0.49 externally versus 0.55 internally under crop-first retrieval and 0.31 externally versus 0.35 internally under full-image retrieval;
Table 5 reports the directly bootstrapped differences.
The order gap is 0.20 [0.12, 0.28] internally and 0.18 [0.09, 0.27] externally; both intervals exclude zero. The difference-in-differences is -0.02 [-0.14, 0.10]: no site-dependent change is resolved at this precision, but equivalence is not established. Because prevalence differs (163:181 versus 218:91), between-site contrasts are also class-standardised as described in Sec. 4.1. We claim only that the direction of the order effect is reproduced, not that its magnitude is identical.
5 Discussion
Agreement is not independent verification. Components can check one another (Sec. 1) only if they fail independently, yet components reading the same observation share any readable fault. Under crop-first retrieval, both channels are wrong and agree in 71% of faulty cases, and because the reasoner consumes the captured retrieval evidence, the tool corroborates the error instead of checking it (amplification 1.70). Coupling depends on what components read, not on their number: under full-image retrieval the same components fail mostly separately, and corruption, with no readable content, shows no detectable amplification.
Implications for design. First, report failure detectability alongside accuracy: crop-first and full-image retrieval have nearly equal clean balanced accuracy (0.772 versus 0.766) but disagreement ceilings of 0.29 versus 0.57. Second, reliability needs checks whose errors are independent, not more components interpreting the same input: the added components amplified confident-wrong error, whereas the one check reaching C4a reads the same image but detects the payload rather than interpreting it; non-image evidence such as provenance is untested (Sec. 4.5).
Limitations. Both corpora contain clinical photographs. HIBA probes another institution and country but does not establish transfer to other modalities or populations, and the dependence on render scale suggests that acquisition geometry may change the operating regime. Only 58.4% of PAD-UFES-20 has biopsy confirmation and its melanoma stratum is small, so we do not report per-diagnosis cancer results; neither corpus supports a powered skin-tone stratification. Obs. 1 is specific to a binary decision. The arms also differ in prompt, context, iteration count, and tool availability; the retrieval ablation isolates only the last.
Future work. We have no evidence outside dermatology, but because Eq. (1) depends on the binary label space and not on the clinical domain, the argument should apply wherever two channels produce hard labels from the same observation, such as the signal-processing and reasoning channels of radar target recognition. The coupling proportions and the effect of cropping stay empirical in every application.
Ethics. Both datasets are public, de-identified, and permissively licensed; no new patient data are collected and the evaluation runs offline. The injection family is adapted from prior work [5]; our contribution is the analysis of how it propagates, not a new attack.
6 Conclusion
Our findings demonstrate that visual faults can propagate across both retrieval and reasoning components, with pipeline order shaping their impact. Lesion cropping can transform detectable disagreement into false corroboration by preserving adversarial content otherwise attenuated through resizing. These results expose a limitation of hard-label consistency checks: their ability to detect failures is constrained by correlated errors, highlighting the need for reliability mechanisms beyond component agreement alone. In our agent, cropping raised joint wrong agreement from 43% to 71% of faulty cases.
References
[1] Youngmin Baek, Bado Lee, Dongyoon Han, Sangdoo Yun, and Hwalsuk Lee. Character region awareness for text detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9365–9374, 2019. 7
[2] Shuai Bai, Keqin Chen, Xuejing Liu, et al. Qwen2.5-VL technical report. arXiv preprint arXiv:2502.13923, 2025. 4
[3] Wenting Chen, Yi Dong, Zhaojun Ding, Yucheng Shi, Fang Zeng, Yifan Zhou, Huaqin Zhao, Yijun Luo, Tianyu Lin, Yihang Su, Yichen Wu, Jasmine Liu, Kai Zhang, Wenxuan Wang, Zhen Xiang, Tianming Liu, Ninghao Liu, Quanzheng Li, Lichao Sun, Yixuan Yuan, and Xiang Li. Interpretable agentic AI system with localized reasoning for radiology. npj Digital Medicine, 2026. 1
[4] Hao Cheng, Erjia Xiao, Jindong Gu, Le Yang, Jinhao Duan, Jize Zhang, Jiahang Cao, Kaidi Xu, and Renjing Xu. Unveiling typographic deceptions: Insights of the typographic vulnerability in large vision-language model. In European Conference on Computer Vision (ECCV), pages 179–196. Springer, 2024. 2
[5] Jan Clusmann, Dyke Ferber, Isabella C. Wiest, Carolin V. Schneider, Titus J. Brinker, Sebastian Foersch, Daniel Truhn, and Jakob Nikolas Kather. Prompt injection attacks on vision language models in oncology. Nature Communications, 16 (1):1239, 2025. 2, 3, 8
[6] Jan Clusmann, Stefan J. K. Schulz, Dyke Ferber, Isabella C. Wiest, Aurélie Fernandez, Markus Eckstein, Fabienne Lange, Nic G. Reitsam, Franziska Kellers, Maxime Schmitt, Peter Neidlinger, Paul-Henry Koop, Carolin V. Schneider, Daniel Truhn, Wilfried Roth, Moritz Jesinghaus, Jakob N. Kather, and Sebastian Foersch. Incidental prompt injections on vision-language models in real-life histopathology. NEJM AI, 2(6): Aics2500078, 2025. 2
[7] Edoardo Debenedetti, Jie Zhang, Mislav Balunović, Luca Beurer-Kellner, Marc Fischer, and Florian Tramèr. Agent-Dojo: A dynamic environment to evaluate prompt injection attacks and defenses for LLM agents. In Advances in Neural Information Processing Systems (NeurIPS) Datasets and Benchmarks Track, 2024. 2
[8] Dave E. Eckhardt and Larry D. Lee. A theoretical basis for the analysis of multiversion software subject to coincident errors. IEEE Transactions on Software Engineering, SE-11 (12):1511–1517, 1985. 1
[9] Sedigheh Eslami, Christoph Meinel, and Gerard de Melo. PubMedCLIP: How much does CLIP benefit visual question answering in the medical domain? In Findings of the Association for Computational Linguistics: EACL 2023, pages 1181–1193, 2023. 4
[10] Gabriel Goh, Nick Cammarata, Chelsea Voss, Shan Carter, Michael Petrov, Ludwig Schubert, Alec Radford, and Chris Olah. Multimodal neurons in artificial neural networks. Distill, 2021. https://distill.pub/2021/multimodal-neurons. 2
[11] Ibrahim Güler, Armin Kraus, Gerrit Grieb, Tevfik Satir, Pascal Eberz, and Henrik Stelling. AI in dermato-oncology: Diagnostic performance and prompt-injection vulnerability of vision-language models in dermoscopic skin cancer assessment. Cancers, 18(11):1750, 2026. 2
[12] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning (ICML), pages 1321–1330, 2017. 4
[13] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In International Conference on Learning Representations (ICLR), 2019. 2, 3
[14] Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C. Berg, Wan-Yen Lo, Piotr Dollár, and Ross Girshick. Segment anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 4015–4026, 2023. 4
[15] John C. Knight and Nancy G. Leveson. An experimental evaluation of the assumption of independence in multiversion programming. IEEE Transactions on Software Engineering, SE-12(1):96–109, 1986. 1
[16] Chunyuan Li, Cliff Wong, Sheng Zhang, Naoto Usuyama, Haotian Liu, Jianwei Yang, Tristan Naumann, Hoifung Poon, and Jianfeng Gao. LLaVA-Med: Training a large language-and-vision assistant for biomedicine in one day. In Advances in Neural Information Processing Systems (NeurIPS), pages 28541–28564, 2023. 4
[17] Keyu Li, Jin Gao, and Dequan Wang. Aligned agents, biased swarm: Measuring bias amplification in multi-agent systems. In International Conference on Learning Representations (ICLR), 2026. 2
[18] Yanjie Li, Yiming Cao, Dong Wang, and Bin Xiao. AgentTypo: Adaptive typographic prompt injection attacks against black-box multimodal agents. arXiv preprint arXiv:2510.04257, 2025. 2
[19] Victor Weixin Liang, Yuhui Zhang, Yongchan Kwon, Serena Yeung, and James Zou. Mind the gap: Understanding the modality gap in multi-modal contrastive representation learning. In Advances in Neural Information Processing Systems (NeurIPS), pages 17612–17625. Curran Associates, Inc., 2022. 2, 3
[20] Andre G. C. Pacheco, Gustavo R. Lima, Amanda S. Salomão, Breno Krohling, Igor P. Biral, Gabriel G. de Angelo, Fábio C. R. Alves Jr, José G. M. Esgario, Alana C. Simora, Pedro B. C. Castro, Felipe B. Rodrigues, Patricia H. L. Frasson, Renato A. Krohling, Helder Knidel, Maria C. S. Santos, Rachel B.
do Espírito Santo, Telma L. S. G. Macedo, Tania R. P. Canuto, and Luiz F. S. de Barros. PAD-UFES-20: A skin lesion dataset composed of patient data and clinical images collected from smartphones. Data in Brief, 32:106221, 2020. CC BY 4.0. 4, 7
[21] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Gretchen Sauty, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning (ICML), pages 8748–8763, 2021. 4
[22] María Agustina Ricci Lara, María Victoria Rodríguez Kowalczuk, Maite Lisa Eliceche, María Guillermina Ferrasso, Daniel Roberto Luna, Sonia Elizabeth Benitez, and Luis Daniel Mazzuoccolo. A dataset of skin lesion images collected in Argentina for the evaluation of AI tools in this population. Scientific Data, 10(1):712, 2023. 4
[23] Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le, Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. In International Conference on Learning Representations (ICLR), 2023. 4
[24] Zejian Eric Wu, Zhongyi Jiang, Yuan Zhuang, and Paul Jen-Hwa Hu. Examining agents' bias amplification versus suppression in multi-agent systems. arXiv preprint arXiv:2605.28098, 2026. 2
[25] Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. ReAct: Synergizing reasoning and acting in language models. In International Conference on Learning Representations (ICLR), 2023. 1, 3
[26] Qiusi Zhan, Zhixiang Liang, Zifan Ying, and Daniel Kang. InjecAgent: Benchmarking indirect prompt injections in tool-integrated large language model agents. In Findings of the Association for Computational Linguistics (ACL), pages 10471–10506, 2024. 2
[27] Kai Zhang, Corey D. Barrett, Jangwon Kim, Lichao Sun, Tara Taghavi, and Krishnaram Kenthapadi. RadAgents: Multimodal agentic reasoning for chest X-ray interpretation with radiologist-like workflows. In Proceedings of the 9th International Conference on Medical Imaging with Deep Learning, pages 3496–3519, 2026. 1
[28] Sheng Zhang, Yanbo Xu, Naoto Usuyama, Hanwen Xu, Jaspreet Bagga, Robert Tinn, Sam Preston, Rajesh Rao, Mu Wei, Naveen Valluri, Cliff Wong, Andrea Tupini, Yu Wang, Matt Mazzola, Swadheen Shukla, Lars Liden, Jianfeng Gao, Matthew P. Lungren, Tristan Naumann, Sheng Wang, and Hoifung Poon. A multimodal biomedical foundation model trained from fifteen million image-text pairs. NEJM AI, 2(1): Aloa2400640, 2025. 4
[29] Zheyuan Zhang, Muhammad Ibtsaam Qadir, Matthias Carstens, Evan Hongyang Zhang, Madison Sarah Loiselle, Farren Marc Martinus, Maksymilian Ksawier Mroczkowski, Jan Clusmann, Jakob Nikolas Kather, and Fiona R. Kolbinger. Prompt injection attacks on vision-language models for surgical decision support. npj Digital Surgery, 1(1):15, 2026. 2