REVIEW 4 major objections 4 minor 34 references
DuoFormer: Leveraging Hierarchical Representations by Local and Global Attention Vision Transformer
T0 review · 4 major / 4 minor · reviewed 2026-08-07 · deepseek-v4-flash
Pith's one-line read The paper claims that a CNN-backed, multi-scale tokenization plus paired scale-wise and patch-wise attention outperforms standard ViT, Swin, and ResNet baselines on kidney cancer histopathology classification.
desk verdict A clean hybrid architecture with credible ablations, but the headline performance claim is undermined by overlapping error bars and apparent test-set-based configuration selection. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing object is the multi-scale token: for each image, features from four CNN stages are projected to a common dimension, split into non-overlapping patches, and concatenated so each patch token contains embeddings at several resolutions. A scale token, initialized from a fused, downsampled version of the same hierarchical features, is prepended to those tokens. A local multi-head self-attention (LMSA) layer attends over the scale dimension of every patch, then a global attention over patches uses the scale token and a class token. This pair, local attention over scales plus global attention over patches, is what the paper argues recovers spatial detail lost by uniform ViT layers while retaining global context.
What would settle it
Re-run both datasets under a validation-locked protocol: choose the scale set, layer count, and head count using only training and validation accuracy, then evaluate the chosen model on the test split exactly once and compare with the same procedure for the baselines; if the mean balanced accuracy falls to within one standard deviation of the best baseline, the claimed advantage is not established.
Extended reading notes
Core claim
The paper claims that multi-scale inductive bias built into the tokenizer is what lets a ViT work well on small medical datasets. Concretely, with ImageNet-supervised fine-tuning the ResNet18 version reaches 91.22% balanced accuracy on Utah ccRCC versus 86.39% for ResNet18-ViT Large; on TCGA ccRCC the ResNet50 version reaches 76.57% versus 75.89% for ResNet50-ViT Base. With a frozen pathology self-supervised backbone, DuoFormer reaches 84.94% on TCGA versus 83.35% for SwaV-ViT Large. The paper also reports ablations showing that neither local nor global attention alone matches the combination, and that the optimal set of scales is dataset-dependent.
Load-bearing premise
The load-bearing premise is that the per-dataset model configurations, specifically which scales are kept and how many attention layers and heads are used, were chosen using validation performance alone; if those choices were instead read from the test accuracies in the ablation tables, the reported gains are optimistically biased.
Editorial extensions
If this is right
- Using both local and global attention is necessary for the reported results: the ablation shows each attention branch alone underperforms the pair by several points on both datasets.
- Scale selection is dataset-dependent: on the smaller Utah set, including four scales hurts relative to two, while on TCGA three and four scales help.
- The components transfer across backbones and pretraining regimes, working with ImageNet-supervised ResNet18 and ResNet50 and with a frozen pathology self-supervised backbone.
- The reported gains do not require additional transformer pretraining or auxiliary self-supervised tasks, which addresses a known obstacle to applying ViTs on small medical datasets.
Reading between the lines
- A validation-locked re-run, where the scale set, layer count, and head count are chosen using only validation accuracy, would separate the architecture's contribution from configuration selection; the paper does not report such a lockdown.
- If the multi-scale tokenizer truly supplies the inductive bias that plain ViTs lack, the accuracy gap between DuoFormer and a similar-size ViT should shrink as training data grows; training both on increasing subsets of TCGA would test that.
- The same tokenization could be lifted to whole-slide or segmentation tasks by keeping the per-patch scale embeddings as outputs instead of collapsing them into a single classification token.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes DuoFormer, a hybrid CNN-transformer architecture for histopathology image classification. A pretrained CNN backbone produces hierarchical multi-scale feature maps, which are converted into multi-scale tokens via a new patch tokenization process. A scale-wise attention mechanism (local attention) captures intra- and inter-scale associations, while a global patch attention (with a learned scale token) models long-range spatial dependencies. The method is evaluated on two clear-cell renal cell carcinoma datasets (Utah ccRCC and TCGA ccRCC) under ImageNet fine-tuning and pathology self-supervised transfer learning, comparing against ViT, Swin, and hybrid baselines. The paper reports accuracy gains across several settings and includes ablations on scale inclusion, scale attention, scale token variants, and number of layers/heads.
Significance. If the performance claims hold under a sound evaluation protocol, DuoFormer is a useful contribution to medical image classification: the multi-scale tokenization and scale-wise attention provide a concrete way to inject CNN inductive biases into transformers while retaining global context. The ablations are extensive and internally consistent, showing that combining local and global attention improves over either alone, and the code is publicly released. However, the headline 'significantly outperforms' claim is currently not established. The reported margins are often within one standard deviation of the baselines (e.g., 84.94±2.63 vs 83.35±1.90 in Table 2), and the configuration selection appears to have used the test accuracies reported in Table 3 and Appendix Table 5 without a validation-lockdown statement. The architecture's merits are plausible, but the evaluation needs to be redone or carefully documented before the central empirical claim can be accepted.
major comments (4)
- [Section 3.2.1, Table 3, Appendix A, Table 5] The final DuoFormer configurations are selected as the per-dataset best from tables that report test accuracies: Table 3 shows the best scale combination per dataset (scales {0,1} for Utah with 91.22%, all four scales for TCGA with 84.94%), and Table 5 shows the best layer count (6 for Utah, 8 for TCGA) and head count (8 for both) with accuracies that match the headline results. The paper never states that the test set was used only once after all design choices were fixed, nor that configuration selection was performed on validation data. If these tables are test-set numbers, the reported final accuracy is a maximum over roughly 15-25 noisy five-run estimates. Given reported standard deviations of 1.0-2.6 points, such selection can plausibly inflate accuracy by more than the smallest headline margins (Table 2: 84.94 vs 83.35 for SwaV-ViT Large; Table 1: 76.57 vs 75.89 for ResNet50-ViT Base). Please provide an explicit validation-lockdown statement: all hyperparameters (scales, layers, heads) must be selected on validation data, and the test set must be evaluated once afterward. If the reported numbers were already obtained under such a locked protocol, state so and provide the validation accuracies that justified each configuration choice.
- [Section 3.2, Tables 1 and 2] The baselines are not given an equivalent hyperparameter search. For DuoFormer, the paper tunes the number of scales, layers, and heads per dataset (Tables 3 and 5), but for the baselines (ViT-Base/Large, ResNet50-ViT, SwaV-ViT, Swin) no tuning effort or search budget is reported. An asymmetric tuning protocol can easily account for the small observed gaps, e.g., the 0.68-point advantage over ResNet50-ViT Base in TCGA fine-tuning and the 1.59-point advantage over SwaV-ViT Large in transfer learning. Please report the hyperparameter search budget for each baseline (number of configurations tried, validation accuracy of the selected baseline) or equalize the tuning effort across methods.
- [Abstract; Tables 1 and 2] The abstract's claim of 'significantly outperforms baseline models' is not supported by any statistical significance test. With five-run means and standard deviations, the differences in Table 1 (76.57±2.23 vs 75.89±2.60) and Table 2 (84.94±2.63 vs 83.35±1.90) are not significant under a standard t-test. Please report paired significance tests (e.g., paired t-test across the five runs) for each comparison, apply a multiple-comparison correction if many configurations were compared, and temper the abstract claim accordingly if the significance does not hold.
- [Section 2.3, Figure 2] The design choice to remove LayerNorm, FFN, and residual connections from the global attention branch is described as 'empirically removes' in Section 2.3, but no ablation experiment is presented to justify this removal. This is a central architectural decision that could substantially affect performance and the comparison with hybrid-ViT baselines. Please include an ablation that reinstates LN/FFN/residuals in the global branch, reporting the effect on both datasets.
minor comments (4)
- [Section 3.1] The text says performance is evaluated using 'balanced accuracy across all classes', but the tables are labeled 'Acc. (%)'. Please clarify whether the reported numbers are balanced accuracy or plain accuracy; the class distributions are highly imbalanced (e.g., TCGA has 180,471 cancer tiles vs 7,932 necrosis tiles), so this distinction matters.
- [Table 3] The checkmark notation for scale combinations is compact but slightly hard to parse; consider labeling each row as a set (e.g., 'S0+S1') or adding a legend that identifies the scale indices.
- [Section 1, References] There are several typos and formatting inconsistencies, including 'Comparıson' in the Table 1 caption, 'pre-trainıng' in Section 3.2, and inconsistent capitalization of 'duo attention' versus 'Duo Attention'. A careful proofread is recommended.
- [Section 2.3] The claim that the scale token aggregates 'necessary details' and guides local attention would be easier to verify if the token's role were visualized or traced; as written, it is a reasonable design choice but the supporting evidence is only the overall accuracy, not an analysis of what the scale token learns.
Circularity Check
No circular derivation: DuoFormer's claims are empirical and benchmarked against external baselines.
full rationale
The paper's central claim is an empirical accuracy comparison against external baselines, and its methodology section describes architectural constructions rather than a derivation chain in which an output quantity is defined in terms of an input quantity. The multi-scale patch tokenization, scale token, and duo attention module are proposed as novel components, and their contributions are evaluated through ablations in Tables 3-5; no reported result is shown to reduce to an equation that was used as its own premise. The only self-citation with author overlap is the dataset source (Zhang et al., 2023), which supplies the Utah ccRCC and TCGA ccRCC datasets as an externally available benchmark; using those datasets does not require accepting any conclusion of the cited paper, so the citation is not load-bearing in a circular sense. Selecting final configurations from the accuracy tables in Table 3 and Appendix Table 5 and then reporting those same numbers as the final results is a potential evaluation-protocol weakness, but it is not a circular reduction: the reported accuracies are empirical measurements of a trained model, not quantities that equal their inputs by construction. No fitted parameter is renamed as a prediction, no uniqueness theorem is imported from the authors' prior work, and no known result is repackaged under new coordinates. The absence of an explicit validation-lockdown statement is a methodological caveat rather than a circular step. Accordingly, the circularity score is 0.
Assumptions & free parameters
free parameters (4)
- Embedding dimension D =
768
- Number of attention layers per dataset =
6 layers for Utah, 8 layers for TCGA
- Number of attention heads =
8 heads for both datasets
- Scale combination per dataset =
Utah: scales 1 and 3; TCGA: all four scales
assumptions (3)
- domain assumption A pretrained CNN backbone produces hierarchical feature maps that can be split into the same number of patches per stage and concatenated into meaningful multi-scale tokens.
- domain assumption The pretrained backbones (ImageNet, TCGA, TULIP) provide features that transfer to the target ccRCC classification task.
- ad hoc to paper Removing LayerNorm, FFN, and residuals from the global attention branch is a safe design.
Cite this review
Pith. "Pith review of DuoFormer: Leveraging Hierarchical Representations by Local and Global Attention Vision Transformer." pith.science (2026). https://pith.science/paper/RHFTNI2U
@misc{pith2026250612982,
author = {Pith},
title = {Pith review of: DuoFormer: Leveraging Hierarchical Representations by Local and Global Attention Vision Transformer},
year = {2026},
howpublished = {\url{https://pith.science/paper/RHFTNI2U}},
note = {Machine review of arXiv:2506.12982}
}
read the original abstract
Despite the widespread adoption of transformers in medical applications, the exploration of multi-scale learning through transformers remains limited, while hierarchical representations are considered advantageous for computer-aided medical diagnosis. We propose a novel hierarchical transformer model that adeptly integrates the feature extraction capabilities of Convolutional Neural Networks (CNNs) with the advanced representational potential of Vision Transformers (ViTs). Addressing the lack of inductive biases and dependence on extensive training datasets in ViTs, our model employs a CNN backbone to generate hierarchical visual representations. These representations are adapted for transformer input through an innovative patch tokenization process, preserving the inherited multi-scale inductive biases. We also introduce a scale-wise attention mechanism that directly captures intra-scale and inter-scale associations. This mechanism complements patch-wise attention by enhancing spatial understanding and preserving global perception, which we refer to as local and global attention, respectively. Our model significantly outperforms baseline models in terms of classification accuracy, demonstrating its efficiency in bridging the gap between Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs). The components are designed as plug-and-play for different CNN architectures and can be adapted for multiple applications. The code is available at https://github.com/xiaoyatang/DuoFormer.git.
Figures
Reference graph
Works this paper leans on
-
[1]
Computing receptive fields of convolutional neural networks
Andr \'e Araujo, Wade Norris, and Jack Sim. Computing receptive fields of convolutional neural networks. Distill, 4 0 (11): 0 e21, 2019
work page 2019
-
[2]
Advances in medical image analysis with vision transformers: a comprehensive review
Reza Azad, Amirhossein Kazerouni, Moein Heidari, Ehsan Khodapanah Aghdam, Amirali Molaei, Yiwei Jia, Abin Jose, Rijo Roy, and Dorit Merhof. Advances in medical image analysis with vision transformers: a comprehensive review. Medical Image Analysis, 91: 0 103000, 2024
work page 2024
-
[3]
Med-former: A transformer based architecture for medical image classification
G Jignesh Chowdary and Zhaozheng Yin. Med-former: A transformer based architecture for medical image classification. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 448--457. Springer, 2024
work page 2024
-
[4]
Coatnet: Marrying convolution and attention for all data sizes
Zihang Dai, Hanxiao Liu, Quoc V Le, and Mingxing Tan. Coatnet: Marrying convolution and attention for all data sizes. Advances in neural information processing systems, 34: 0 3965--3977, 2021
work page 2021
-
[5]
An image is worth 16x16 words: Transformers for image recognition at scale
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020
arXiv 2010
-
[6]
Convit: Improving vision transformers with soft convolutional inductive biases
St \'e phane d’Ascoli, Hugo Touvron, Matthew L Leavitt, Ari S Morcos, Giulio Biroli, and Levent Sagun. Convit: Improving vision transformers with soft convolutional inductive biases. In International conference on machine learning, pages 2286--2296. PMLR, 2021
work page 2021
-
[7]
Rmt: Retentive networks meet vision transformers
Qihang Fan, Huaibo Huang, Mingrui Chen, Hongmin Liu, and Ran He. Rmt: Retentive networks meet vision transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5641--5651, 2024
work page 2024
-
[8]
Cmt: Convolutional neural networks meet vision transformers
Jianyuan Guo, Kai Han, Han Wu, Chang Xu, Yehui Tang, Chunjing Xu, and Yunhe Wang. Cmt: Convolutional neural networks meet vision transformers. 2022 ieee. In CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12165--12175, 2022
work page 2022
Show all 34 references
-
[9]
Higt: Hierarchical interaction graph-transformer for whole slide image analysis
Ziyu Guo, Weiqin Zhao, Shujun Wang, and Lequan Yu. Higt: Hierarchical interaction graph-transformer for whole slide image analysis. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 755--764. Springer, 2023
2023
-
[10]
Deep residual learning for image recognition
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770--778, 2016
2016
-
[11]
Conv2former: A simple transformer-style convnet for visual recognition
Qibin Hou, Cheng-Ze Lu, Ming-Ming Cheng, and Jiashi Feng. Conv2former: A simple transformer-style convnet for visual recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024
2024
-
[12]
Benchmarking self-supervised learning on diverse pathology datasets
Mingu Kang, Heon Song, Seonwook Park, Donggeun Yoo, and S \'e rgio Pereira. Benchmarking self-supervised learning on diverse pathology datasets. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3344--3354, 2023
2023
-
[13]
Vision transformer for small-size datasets
Seung Hoon Lee, Seunghyun Lee, and Byung Cheol Song. Vision transformer for small-size datasets. arXiv preprint arXiv:2112.13492, 2021
2021 arXiv
-
[14]
Mvitv2: Improved multiscale vision transformers for classification and detection
Yanghao Li, Chao-Yuan Wu, Haoqi Fan, Karttikeya Mangalam, Bo Xiong, Jitendra Malik, and Christoph Feichtenhofer. Mvitv2: Improved multiscale vision transformers for classification and detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recogniti...
2022
-
[15]
Localvit: Bringing locality to vision transformers
Yawei Li, Kai Zhang, Jiezhang Cao, Radu Timofte, and Luc Van Gool. Localvit: Bringing locality to vision transformers. arXiv preprint arXiv:2104.05707, 2021
2021 arXiv
-
[16]
Scale-aware modulation meet transformer
Weifeng Lin, Ziheng Wu, Jiayu Chen, Jun Huang, and Lianwen Jin. Scale-aware modulation meet transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6015--6026, 2023
2023
-
[17]
Exploiting geometric features via hierarchical graph pyramid transformer for cancer diagnosis using histopathological images
Mingxin Liu, Yunzan Liu, Pengbo Xu, Hui Cui, Jing Ke, and Jiquan Ma. Exploiting geometric features via hierarchical graph pyramid transformer for cancer diagnosis using histopathological images. IEEE Transactions on Medical Imaging, 2024
2024
-
[18]
Efficient training of visual transformers with small datasets
Yahui Liu, Enver Sangineto, Wei Bi, Nicu Sebe, Bruno Lepri, and Marco Nadai. Efficient training of visual transformers with small datasets. Advances in Neural Information Processing Systems, 34: 0 23818--23830, 2021 a
2021
-
[19]
Swin transformer: Hierarchical vision transformer using shifted windows
Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF international conference on computer vision, pages 10012--10022, 2021 b
2021
-
[20]
Hybrid ladder transformers with efficient parallel-cross attention for medical image segmentation
Haozhe Luo, Yu Changdong, and Raghavendra Selvan. Hybrid ladder transformers with efficient parallel-cross attention for medical image segmentation. In International conference on medical imaging with deep learning, pages 808--819. PMLR, 2022
2022
-
[21]
Medvit: a robust vision transformer for generalized medical image classification
Omid Nejati Manzari, Hamid Ahmadabadi, Hossein Kashiani, Shahriar B Shokouhi, and Ahmad Ayatollahi. Medvit: a robust vision transformer for generalized medical image classification. Computers in biology and medicine, 157: 0 106791, 2023
2023
-
[22]
Cell-detr: Efficient cell detection and classification in wsis with transformers
Oscar Pina, Eduard Dorca, and Veronica Vilaplana. Cell-detr: Efficient cell detection and classification in wsis with transformers. In Medical Imaging with Deep Learning, 2024
2024
-
[23]
Do vision transformers see like convolutional neural networks? Advances in neural information processing systems, 34: 0 12116--12128, 2021
Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang, and Alexey Dosovitskiy. Do vision transformers see like convolutional neural networks? Advances in neural information processing systems, 34: 0 12116--12128, 2021
2021
-
[24]
Transformers in medical imaging: A survey
Fahad Shamshad, Salman Khan, Syed Waqas Zamir, Muhammad Haris Khan, Munawar Hayat, Fahad Shahbaz Khan, and Huazhu Fu. Transformers in medical imaging: A survey. Medical image analysis, 88: 0 102802, 2023
2023
-
[25]
Transmil: Transformer based correlated multiple instance learning for whole slide image classification
Zhuchen Shao, Hao Bian, Yang Chen, Yifeng Wang, Jian Zhang, Xiangyang Ji, et al. Transmil: Transformer based correlated multiple instance learning for whole slide image classification. Advances in neural information processing systems, 34: 0 2136--2147, 2021
2021
-
[26]
Training data-efficient image transformers & distillation through attention
Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Herv \'e J \'e gou. Training data-efficient image transformers & distillation through attention. In International conference on machine learning, pages 10347--10357. PMLR, 2021
2021
-
[27]
Uctransnet: rethinking the skip connections in u-net from a channel-wise perspective with transformer
Haonan Wang, Peng Cao, Jiaqi Wang, and Osmar R Zaiane. Uctransnet: rethinking the skip connections in u-net from a channel-wise perspective with transformer. In Proceedings of the AAAI conference on artificial intelligence, volume 36, pages 2441--2449, 2022
2022
-
[28]
The cancer genome atlas pan-cancer analysis project
John N Weinstein, Eric A Collisson, Gordon B Mills, Kenna R Shaw, Brad A Ozenberger, Kyle Ellrott, Ilya Shmulevich, Chris Sander, and Joshua M Stuart. The cancer genome atlas pan-cancer analysis project. Nature genetics, 45 0 (10): 0 1113--1120, 2013
2013
-
[29]
Cvt: Introducing convolutions to vision transformers
Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. Cvt: Introducing convolutions to vision transformers. In Proceedings of the IEEE/CVF international conference on computer vision, pages 22--31, 2021
2021
-
[30]
Co-scale conv-attentional image transformers
Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers. In Proceedings of the IEEE/CVF international conference on computer vision, pages 9981--9990, 2021
2021
-
[31]
Incorporating convolution designs into visual transformers
Kun Yuan, Shaopeng Guo, Ziwei Liu, Aojun Zhou, Fengwei Yu, and Wei Wu. Incorporating convolution designs into visual transformers. In Proceedings of the IEEE/CVF international conference on computer vision, pages 579--588, 2021
2021
-
[32]
Class-m: Adaptive stain separation-based contrastive learning with pseudo-labeling for histopathological image classification
Bodong Zhang, Hamid Manoochehri, Man Minh Ho, Fahimeh Fooladgar, Yosep Chong, Beatrice S Knudsen, Deepika Sirohi, and Tolga Tasdizen. Class-m: Adaptive stain separation-based contrastive learning with pseudo-labeling for histopathological image classification. arXiv preprint a...
2023 arXiv
-
[33]
Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting
Yunhao Zhang and Junchi Yan. Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. In The eleventh international conference on learning representations, 2023
2023
-
[34]
Deformable detr: Deformable transformers for end-to-end object detection
Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. arXiv preprint arXiv:2010.04159, 2020
2010 arXiv
Reviewed August 7, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.