{"id":"c378e044-26b8-4c55-badf-271807605357","arxiv_id":"2507.02488","paper_version":2,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":5.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":5,"one_line_summary":"A two-stage sparse attention mechanism, selecting top regions then top pixels per query, improves accuracy on multiple medical imaging benchmarks with lower compute than full attention.","lead":"MedFormer is a new medical image analysis backbone that selects the most relevant image regions, then the most relevant pixels within them, before applying attention. It reports accuracy gains over several baselines in classification, segmentation, and detection, but the paper's theoretical efficiency proof has a mathematical gap.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"The DSSA efficiency proof in Sec. III-B is invalid: Eq. 12 gives FLOPs < InEq and Eq. 13 gives InEq > L, which does not imply FLOPs < L; moreover, with k1 = S^2 (their Stage 4 setting), the real token-attention term is O((HW)^2), not sub-4/3.","rationale":"The reader's weakest_assumption isolates exactly the same logical inversion in Eq. 14 of Section III-B, and I agree that this is the most load-bearing weakness. The concern is not merely stylistic: the claimed asymptotic efficiency of DSSA is one of the paper's headline contributions, and the invalid implication directly undermines it. I add two reinforcing observations. First, the AM-GM constant is miscalculated: the correct cube-root factor is 3*2^{1/3}, not 6, so even the displayed numerical lower bound is wrong. Second, and more importantly, the asymptotic claim is false for the paper's own Stage 4 configuration, where k1 = S^2: the Q(Kg)^T term is O((HW)^2), so DSSA is asymptotically quadratic in the number of tokens at that stage. This means the stated O((HW)^{4/3}) complexity cannot be salvaged by fixing the AM-GM step; the authors would need to qualify the claim, change the selection strategy, or restrict the analysis to stages with k1/S^2 bounded away from 1. The empirical contributions are separable from this proof, and the reported results are plausible, with a useful t-test and ablations, but the code link is not provided and error bars are mostly absent, so the reader's CONDITIONAL verdict remains appropriate. No verdict change is needed: the condition should explicitly require a corrected complexity derivation and a check of whether the claimed bound holds for the reported hyperparameters.","tokens_in":20773,"tokens_out":8543,"duration_ms":90957,"concrete_test":"Use symbolic algebra to test the claimed bound directly. Derive from Eq. 11 the exact expression FLOPs = 3HWC^2 + S^2(S^2C + S^2 + k1) + (1+lambda)k1(HW)^2(C+1)/S^2, then check whether this expression is less than 3HWC^2 + 6C(k1)^{2/3}(HW)^{4/3} for the Table I hyperparameters at image resolutions 224x224 and 1024x1024. In particular, set S=7, k1=49, lambda=1/8, C=256, H=W=1024, and compare the Q(Kg)^T contribution alone, (1024/32)^2 * 49 * C, against the claimed bound 6C * 49^{2/3} * (1024/32)^{8/3}. If that term exceeds the claimed bound, the O((HW)^{4/3}) claim is false for the deployed hyperparameters; in any case Eq. 14 must be re-derived without the invalid FLOPs < lower-bound step.","verdict_should_be":"UNCHANGED","load_bearing_attack":"Section III-B's complexity analysis is the principal support for the claimed subquadratic advantage over vanilla attention, but the chain in Eqs. 12-14 is logically broken. Eq. 12 establishes FLOPs < InEq; Eq. 13 establishes InEq > L, where L = 3HWC^2 + 6C(k1)^{2/3}(HW)^{4/3}. From X < Y and Y > Z, nothing follows about the relation between X and Z, so the conclusion that the upper bound of FLOPs is strictly less than the lower bound of InEq is a non sequitur. The AM-GM evaluation is also arithmetically incorrect: applying AM-GM to the three terms 2S^4C, k1H^2W^2C/S^2, and k1H^2W^2C/S^2 gives 3*2^{1/3} C (k1)^{2/3}(HW)^{4/3}, not 6C(k1)^{2/3}(HW)^{4/3}. Independently, no repair of the constant can yield the advertised scaling. From Eq. 11, the dominant token-attention term is HW(C+1)(k1HW/S^2 + k2) = (1+lambda) k1 (HW)^2 (C+1) / S^2, which is O(C k1 (HW)^2 / S^2). In the Stage 4 configuration of Table I, k1 = S^2 = 49, making this term O(C(HW)^2), i.e., quadratic, not O((HW)^{4/3}). DSSA thus degenerates to full token-level attention over all regions at that stage. The theoretical efficiency claim is therefore unsupported, and the measured FLOPs in Tables III-VI do not by themselves establish the claimed asymptotic advantage.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"MedFormer is a four-stage hierarchical vision transformer proposed as a general-purpose backbone for medical image classification, semantic segmentation, and lesion detection. Its core attention module, DSSA, first selects the k1 most relevant regions for each query and then selects the k2 most relevant pixel-level tokens within those regions before computing attention. The paper claims a theoretical FLOPs bound below O((HW)^(4/3)) and reports experiments on eight datasets, comparing against task-specific medical methods and general-purpose backbones. The empirical results show competitive accuracy, e.g., MedFormer-B* reaching 84.07% DSC on Synapse and 94.57% top-1 accuracy on ISIC-2018 classification, together with ablations of attention mechanisms, the LCE module, hyperparameters, model depth, and attention visualizations.","tokens_in":21255,"tokens_out":7388,"duration_ms":82058,"significance":"The breadth of experiments and the attempt at a general-purpose medical backbone are valuable; if the DSSA design and reported gains replicate, it could be a useful architecture for the medical imaging community. The manuscript compares against many relevant baselines and includes ablation studies, which is a strength. However, the central theoretical efficiency claim is invalid: the proof in Section III-B derives a lower bound and then treats it as an upper bound on FLOPs, and the actual token-attention term is O((HW)^2) under the fixed S and k1 settings in Table I. Because efficiency is a stated primary contribution, this is a load-bearing error. The selection of key hyperparameters on the evaluation datasets further weakens the generalizability claims, and the measured FLOPs do not consistently support a practical efficiency advantage over the compared backbones.","major_comments":[{"comment":"The complexity proof is logically invalid. Equation (12) establishes FLOPs < InEq, and Equation (13) establishes InEq > L, where L = 3HWC^2 + 6C(k1)^(2/3)(HW)^(4/3). From FLOPs < InEq and InEq > L, nothing follows about the relation between FLOPs and L, so the conclusion in Equation (14) is a non sequitur. Moreover, applying Equation (12) directly gives FLOPs = O((HW)^2) for fixed S, k1, and lambda, because the token-attention term in Equation (11) is (1+lambda)k1(C+1)(HW)^2/S^2. At Stage 4 in Table I, k1 = S^2 = 49, so the region-level selection retains all regions and the token-level attention is quadratic in HW. Thus the advertised sub-4/3 complexity is not established and, with the stated hyperparameters, is false.","section":"III-B, Eqs. (12)-(14)"},{"comment":"Even setting aside the logical direction, the AM-GM evaluation is arithmetically incorrect. The cube root of the product 2(S^2)^2C * k1(HW)^2/S^2 C * k1(HW)^2/S^2 C is 2^(1/3) C (k1)^(2/3)(HW)^(4/3), so the coefficient should be 3*2^(1/3), not 6. More fundamentally, AM-GM provides a lower bound on InEq, and a lower bound on InEq cannot serve as an upper bound on FLOPs; this step cannot be repaired by correcting the constant.","section":"III-B, Eq. (13)"},{"comment":"The key hyperparameters S, the k1 schedule, lambda, and the network depth are selected by maximizing accuracy or DSC on ISIC-2018 Classification and CVC-ClinicDB, which are also used as evaluation datasets in the main comparisons. Because the same datasets are reused for tuning and evaluation, the reported performance gaps on those datasets are partly due to selection and cannot support the claim of 'potential generalizability across tasks and datasets' without a held-out validation protocol or an additional independent evaluation set.","section":"IV-E3, Tables IX and X"},{"comment":"The claimed efficiency advantage is not supported by the measured FLOPs. In Table III, MedFormer-B reports 4.79G FLOPs versus 4.61G for ViT-S and 4.49G for BiFormer-S; in Table VI, MedFormer-B reports 13.34G FLOPs versus 13.32G for BiFormer-S. Thus, even if the asymptotic proof were repaired, the empirical results do not establish a systematic reduction in computational cost relative to full attention or routing attention, and the abstract's efficiency claim would remain unsupported.","section":"Tables III and VI; Abstract"}],"minor_comments":[{"comment":"In the third contribution bullet, 'DDSA' should be 'DSSA' to match the notation used throughout the paper.","section":"Section I, Contributions"},{"comment":"The caption contains an incomplete sentence: 'represents the current query's position. represent the pixels or local windows that the query focuses on, respectively.' Please rewrite this as a complete sentence.","section":"Figure 1 caption"},{"comment":"The caption says 'THE BEST RESULT IS IN BLOD' rather than 'BOLD'; please correct the typo.","section":"Table IV caption"},{"comment":"The header row appears to repeat 'Params (M) FLOPs (G)' and the column grouping is confusing; please reformat so that each numeric column is labeled once and the metric groups are clear.","section":"Table V header"},{"comment":"The text says pretrained MedFormer versions are 'not incorporated into the formal comparisons,' but the pretrained rows are printed in Table III; please clarify whether these rows are intended as part of the comparison or as a separate illustration.","section":"IV-B2"},{"comment":"The sentence 'we then substitute S2C and k1HW/S2 into Eq. 11' is unclear; the intended replacements are S^2 + k1 < S^2 C and k2 < k1HW/S^2, and the derivation should be stated accordingly.","section":"III-B, Eq. (12)"}],"recommendation":"reject","confidential_remarks":"The central issue is that the efficiency proof in Section III-B is invalid, and the actual asymptotic scaling with the paper's own hyperparameters is quadratic rather than sub-4/3. This goes to the core stated contribution, so I cannot recommend acceptance. The paper has a substantial empirical component, and if the authors revise it to remove the asymptotic claim, add a proper held-out hyperparameter validation, and reposition the contribution as an empirically efficient backbone, a resubmission could be viable."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"First, the new thing: DSSA does region-level routing plus per-query pixel-level top-k selection inside the picked regions. That combination is genuinely absent from BiFormer and Explicit Sparse Transformer, and the paper evaluates it widely—classification, segmentation, detection across multiple medical datasets. The ablation in Table VII is the right kind of evidence: under the same MedFormer backbone, DSSA beats both Bi-level Routing and Explicit Sparse on ISIC-2018 and Synapse. The gains over the strongest baselines are modest but consistent.\n\nNow the soft spots, in order of size. Section III-B's complexity proof is broken. Eq. 12 gives an upper bound on FLOPs in terms of InEq; Eq. 13 gives a lower bound on InEq. From X < Y and Y > Z you cannot conclude anything about X and Z, yet that's exactly what Eq. 14 does. The AM-GM constant is also wrong—3*2^{1/3}, not 6—and even fixing that doesn't help: the dominant token-attention term in Eq. 11 is O(k1(HW)^2/S^2), which at stage 4 with k1=S^2=49 is O((HW)^2). So the paper's central efficiency claim, that DSSA is sub-O((HW)^{4/3}), is unsupported.\n\nSecond, the hyperparameters are tuned on the same test sets that produce the headline numbers. Tables IX and X use the ISIC-2018 classification test split and the CVC-ClinicDB test set to pick k1, lambda, and depth. That makes part of the reported advantage fitted to those benchmarks.\n\nThird, the abstract says the code is on GitHub, but the paper gives no link or commit hash. Given the proof error and the test-set selection, the empirical claims need the code to be verifiable.\n\nMinor: the 'first general-purpose medical transformer backbone' claim is overstated, and the significance test against MAXFormer is one test with a modest margin. The paper itself does acknowledge the HD deficit on Synapse, which is honest.\n\nWho this is for: people working on efficient attention for medical imaging. The DSSA mechanism is a plausible new variant, and the evaluation scope is broader than most. It deserves a serious referee, but the review should demand a corrected complexity analysis (or a removed claim), a code link, and either held-out validation or a clear statement that test-set tuning happened. I'd send it to review with major-revision expectations.","headline":"DSSA is a genuinely new sparse-attention variant with solid empirical coverage, but the FLOPs proof in Sec. III-B is logically broken and the hyperparameters are tuned on the test sets.","tokens_in":21765,"tokens_out":3921,"would_cite":true,"duration_ms":41369,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"MedFormer claims a single transformer backbone with dual sparse selection attention that outperforms specialized medical models across classification, segmentation, and detection.","keywords":["medical image classification","semantic segmentation","lesion detection","vision transformer","sparse attention","content-aware attention","hierarchical backbone","noise robustness"],"falsifier":"Take a fixed configuration, e.g. $H=W=224$, $C=384$, $S=7$, $k_1=16$, $k_2=\\lambda k_1 HW/S^2$ with $\\lambda=1/8$, plug the actual operation counts from Eq. (11) into a script, and check whether the true FLOPs is below $3HWC^2+6C(k_1)^{2/3}(HW)^{4/3}$; the paper's complexity conclusion is false if the inequality is violated.","tokens_in":20577,"feed_emoji":"🩺","tokens_out":5512,"duration_ms":58952,"temperature":0.7,"pith_summary":"MedFormer is a medical vision transformer designed as a single general-purpose backbone for classification, semantic segmentation, and lesion detection. The authors claim that its four-stage pyramid structure provides hierarchical features for dense prediction, and that its Dual Sparse Selection Attention (DSSA) makes the model faster and more noise-robust than full attention by selecting the most relevant regions and then the most relevant pixels. If this holds, medical imaging teams could replace task-specific transformer designs with one backbone that works across modalities such as dermoscopy, colonoscopy, MRI, and CT. Experiments across eight datasets support the claim that MedFormer matches or beats specialized models while using fewer parameters and FLOPs in several configurations. The authors also report a known weak spot: on multi-organ segmentation, boundary tokens tend to be dropped, showing up as worse Hausdorff distance.","feed_headline":"Dual sparse attention makes one medical vision backbone win three tasks","feed_subtitle":"A pyramid transformer prunes pixels twice, cutting cost and noise, and beats task-specific models on eight medical datasets.","key_machinery":"The central object is the Dual Sparse Selection Attention (DSSA) layer. It performs two explicit sparse selections: a region-level top-$k_1$ selection on region-averaged queries and keys, and a pixel-level top-$k_2$ selection within the surviving regions, so each query attends only to a small, content-chosen set of pixels. This mechanism carries the paper's efficiency and robustness claims: it cuts the token count entering the attention matrix, filters out noise tokens before computing attention, and is inserted into a four-stage pyramid (patch embedding, three patch-merging stages, and $\\{2,2,8,2\\}$ blocks in the Small variant) to produce multiscale features for dense prediction tasks.","core_discovery":"On its own terms, the paper claims that a content-aware, twice-sparse attention mechanism can deliver the global modeling of a transformer without the quadratic cost or the noise sensitivity of full attention. DSSA first partitions the feature map into $S \\times S$ regions, averages queries and keys inside each region, and keeps the $k_1$ most relevant regions per query; it then gathers pixel-level keys and values from those regions and keeps only the $k_2$ most relevant pixels per query. A full pixel-to-pixel attention is then computed on this small gathered set, followed by a $5 \\times 5$ depth-wise convolution for local context. The authors argue that this makes DSSA's complexity less than $\\mathcal{O}((HW)^{4/3})$, a substantial reduction from vanilla attention, and that it improves accuracy by excluding noise pixels. They further claim that a four-stage pyramid of such blocks, MedFormer, consistently enhances performance on medical image classification, segmentation, and detection across eight datasets.","pith_inferences":["Beyond the paper, the same region-then-pixel two-stage selection could be applied to video or volumetric data, where region-level pruning would cut most of the attention cost before pixel-level selection.","A corrected complexity analysis would need to bound FLOPs directly rather than through the intermediate expression; until then, the practical efficiency advantage should be judged from measured throughput and memory rather than from the stated bound.","The paper's boundary-token observation suggests a testable extension: adding a small local or boundary-aware branch could recover edge fidelity without sacrificing the global sparse attention, and should be evaluated on Hausdorff distance.","The ablation comparing DSSA against shifted-window, explicit sparse, deformable, and bi-level routing attention could be extended to modality-specific datasets to test whether content-aware selection matters most in noisy modalities such as ultrasound."],"forward_implications":["If DSSA's noise-filtering behavior is real, lesion and polyp models should need fewer tokens to reach the same accuracy, because attention is concentrated on clinically relevant content.","If the FLOPs bound holds, the complexity of DSSA scales sub-quadratically in image area, so MedFormer can be applied to larger medical images than full-attention transformers.","If MedFormer works as a general backbone, the same pretrained pyramid can be reused for classification, segmentation, and detection heads across different imaging modalities.","The authors' reported drop in Hausdorff distance on Synapse implies that tasks where organ boundaries are the focus may need a boundary-aware supplement to the sparse selection."],"supporting_citations":[{"why":"Supplies the region-level routing attention idea that DSSA extends toward pixel-level selection.","marker":"[18]"},{"why":"Supplies the explicit top-k pixel selection idea used as the second stage of DSSA.","marker":"[22]"},{"why":"Provides the shifted-window local attention baseline and motivates the need for a more flexible sparse pattern.","marker":"[17]"},{"why":"Provides the pyramid backbone structure that MedFormer adapts for multiscale medical features.","marker":"[21]"},{"why":"Defines the vanilla full-attention baseline whose quadratic cost DSSA is designed to reduce.","marker":"[16]"},{"why":"Serves as the strongest segmentation baseline using routing attention and is the main comparison for the pixel-level denoising claim.","marker":"[13]"}],"fun_headline_variants":["Dual sparse attention makes MedFormer a universal medical vision backbone","MedFormer's twice-sparse attention cuts cost, noise, wins on eight datasets","Pyramid + sparse attention: MedFormer masters three medical tasks","One model, three tasks: MedFormer's dual sparse attention proves efficient"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"The efficiency claim stands on a single inequality step: the paper treats a lower bound on an intermediate expression as an upper bound on FLOPs, and if that step is invalid the claimed complexity advantage over full attention collapses.","fun_headline_variants_meta":{"raw":{"variants":["Dual sparse attention makes MedFormer a universal medical vision backbone","MedFormer's twice-sparse attention cuts cost, noise, wins on eight datasets","Pyramid + sparse attention: MedFormer masters three medical tasks","One model, three tasks: MedFormer's dual sparse attention proves efficient"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000596,"raw_usage":{"total_tokens":2826,"prompt_tokens":1016,"completion_tokens":1810,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":632,"completion_tokens_details":{"reasoning_tokens":1733}},"tokens_in":632,"tokens_out":1810,"duration_ms":16140,"temperature":1.0,"reasoning_tokens":1733,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-06T20:29:09.281147+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"Take a fixed configuration, e.g. $H=W=224$, $C=384$, $S=7$, $k_1=16$, $k_2=\\lambda k_1 HW/S^2$ with $\\lambda=1/8$, plug the actual operation counts from Eq. (11) into a script, and check whether the true FLOPs is below $3HWC^2+6C(k_1)^{2/3}(HW)^{4/3}$; the paper's complexity conclusion is false if the inequality is violated.","supporting_citations":[{"cited_title":"Biformer: Vision transformer with bi-level routing attention,","cited_arxiv_id":null,"evidence_quote":"Supplies the region-level routing attention idea that DSSA extends toward pixel-level selection."}],"review_version":1}