REVIEW 4 major objections 4 minor 35 references
RepViT-CXR: A Channel Replication Strategy for Vision Transformers in Chest X-ray Tuberculosis and Pneumonia Classification
T0 review · 4 major / 4 minor · reviewed 2026-08-04 · deepseek-v4-flash
Pith's one-line read Copying a grayscale X-ray into three channels lets a pretrained ViT beat prior TB and pneumonia baselines.
desk verdict A standard grayscale-to-RGB replication trick, with the headline numbers undermined by test-set early stopping. 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 mechanism is channel replication: the grayscale CXR tensor (1x224x224) is copied into a 3x224x224 pseudo-RGB tensor before patch embedding, so the ViT's pretrained patch projection sees the same intensity in each channel. This is what carries the argument: it converts a modality mismatch into a solved compatibility problem, letting the pretrained attention layers operate directly on the X-ray. The training loop's early-stopping rule and the comparison tables translate that compatibility into the paper's state-of-the-art claims.
What would settle it
Hold out a test split, use a separate validation split only for early stopping and model selection, and evaluate the final model once on the held-out split. If the 99.9% TB-CXR, 99.0% pneumonia, and 91.1% Shenzhen figures fall materially under this protocol, the out-of-sample state-of-the-art claim is not supported.
Extended reading notes
Core claim
The central claim is that channel replication alone—copying the normalized grayscale intensities into all three RGB planes—adapts a pretrained ViT-Base/16 to chest X-rays without information loss or architectural modification. The author then fine-tunes this standard transformer with cross-entropy loss, Adam at 1e-4, and early stopping, and reports near-perfect discrimination on TB-CXR, 99.0% accuracy on pediatric pneumonia, and the best accuracy among compared methods on Shenzhen TB. The conclusion is drawn that pretrained ViTs, once given a compatible input format, capture global context in chest X-rays that local-feature CNN baselines miss.
Load-bearing premise
The whole comparison rests on the assumption that the test set is untouched during training; but the procedure uses test accuracy to stop training and to choose the saved model, so the reported accuracies are selected, not purely out-of-sample, and may overstate generalization.
Editorial extensions
If this is right
- A pretrained ViT can be deployed on grayscale medical images with no architectural change and no disease-specific pretraining; only a three-channel replication step is required.
- On the TB-CXR benchmark, the reported 99.9% accuracy and AUC place channel replication above the prior Topo-CXR result of 99.3% accuracy and 99.8% AUC.
- Balanced precision and recall around 99% on pediatric pneumonia indicate the approach does not sacrifice one error type for the other.
- On Shenzhen TB, the best reported accuracy (91.1%) is achieved without data augmentation, though the AUC trails the highest previous baseline.
- Because the method needs no augmentation or heavy retraining, it is cheap to reproduce and could be integrated into clinical screening pipelines that already use ViT backbones.
Reading between the lines
- Because the test split is used for early stopping and saving the best model, the reported accuracies are best understood as upper bounds until confirmed on a truly held-out test set; this follows from the paper's own Algorithm 1, not from a claim the paper makes.
- The reported TB-CXR AUC is stated as 99.9 in the abstract and 99.64 in Table 2, and the Figure 1 caption has an unresolved placeholder citation; these small inconsistencies should be reconciled before the headline numbers are taken at face value.
- If the replication trick generalizes, it can be tested immediately on other single-channel modalities such as mammograms, retinal fundus images, or ultrasound, since it requires no architectural change.
- The comparisons span different train/test splits, image sizes, and preprocessing protocols across datasets, so some of the margin over prior methods may be protocol-driven rather than model-driven.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes RepViT-CXR, a channel-replication strategy that converts single-channel grayscale chest X-rays into three-channel RGB-like inputs so that a pretrained Vision Transformer (google/vit-base-patch16-224) can be fine-tuned for TB and pneumonia classification. The method is evaluated on three public CXR datasets (TB-CXR, Pediatric Pneumonia, Shenzhen CXR). The paper reports near-perfect results on TB-CXR (99.9% accuracy/AUC), 99.0% accuracy on Pediatric Pneumonia, and 91.1% accuracy on Shenzhen TB, and claims to establish a new state of the art. The core methodological contribution is the trivial channel-replication preprocessing step; the main scientific claim is the empirical superiority of the resulting pipeline over prior CNN-, topology-, and ViT-based methods.
Significance. If the empirical claims were supported, the paper would provide a useful, low-cost recipe for adapting ImageNet-pretrained ViTs to single-channel medical images, with potential practical value for CXR screening. The manuscript is clearly written, covers multiple datasets and standard metrics, and states that code and data are publicly available. However, the evaluation protocol is flawed: the test set is used for early stopping and model selection, making the reported metrics in-sample selection results rather than unbiased out-of-sample estimates. Since the state-of-the-art claim rests entirely on these numbers, the central contribution is not currently supported. The channel-replication idea itself is simple and already common practice; the paper does not compare against the obvious baseline of simply replicating the grayscale channel while using a proper validation split.
major comments (4)
- [§4.2 and Algorithm 1] The evaluation protocol uses the test set for model selection. Section 4.2 states 'early stopping based on test accuracy, using a patience of 10 epochs,' and Algorithm 1 saves the model whenever 'test accuracy improves' and then computes final metrics from that same test set. This means the reported accuracy/AUC are optimized on the test set and are not honest out-of-sample measurements. There is no separate validation set, so the 99.9% TB-CXR and 99.0% pneumonia numbers are inflated by selection bias. The central state-of-the-art claim is therefore unsupported. The authors must re-run the experiments using a held-out validation set for early stopping/checkpoint selection and report metrics on a test set used only once.
- [Tables 3–5] The comparisons to prior work are not controlled. In Table 3, prior methods use different dataset sizes (800 to 7000 images) and different train:test splits (70:30, 80:20, 90:10), while RepViT-CXR uses 4200 images and an 80:20 split. Table 4 mixes 80:20, 90:10, 92:8, 77:23, and 5-fold protocols, and Table 5 again mixes 5-fold, 70:30, 80:20, and 90:10. Accuracy differences of a few tenths of a percent cannot be attributed to the method when the evaluation conditions differ. A SOTA claim requires matched train/test splits and dataset sizes, or reimplementation of baselines under identical protocols.
- [§3 vs. §4.2 vs. Algorithm 1] The training protocol is internally inconsistent. Section 3 says 'early stopping (patience = 50) based on test accuracy' and also says 'best-performing model (highest validation accuracy) is saved.' Section 4.2 says patience=10 and early stopping based on test accuracy. Algorithm 1 says 'if test accuracy improves' then save the model. Since no validation split is defined anywhere, the terms 'validation accuracy' and 'test accuracy' are conflated. This ambiguity makes the experiments unreproducible even apart from the test-set-selection problem.
- [Abstract and Table 2] The headline numbers are inconsistent. The abstract reports 99.9% accuracy and 99.9% AUC on TB-CXR, while Table 2 reports 99.88% accuracy and 99.64% AUC. Section 5 repeats the 99.9% claim. Rounding to one decimal place is not sufficient for near-ceiling results that differ from prior work by 0.1–0.6 percentage points; exact values with confidence intervals are needed. This is especially important because the TB-CXR test set has only 840 images (20% of 4200), so a single misclassification changes accuracy by about 0.12%.
minor comments (4)
- [Figure 1] The caption contains an unresolved citation placeholder: 'The design follows the approach of [?].' This should be replaced with a proper reference or removed.
- [§2 and §3] The Related Work section describes RepViT-CXR as a 'hybrid model combining the efficiency of CNNs with the global context modeling capability of vision transformers,' but Section 3 uses a plain ViT-Base with no CNN components. This inconsistency should be corrected.
- [§4.2] Typo: 'conveted' should be 'converted.' Also, the sentence 'our code is publicly available at online' lacks an actual URL.
- [§4.2] The claim that 'our model ... does not require augmentation' is presented as a strength, but no ablation or sensitivity analysis is provided to justify that data augmentation would not help, particularly on the small Shenzhen dataset (662 images).
Circularity Check
Test-set early stopping and checkpoint selection make the reported SOTA metrics in-sample selection artifacts; no other derivation-level circularity.
-
fitted input called prediction
[Section 4.2 (Experimental Setup) and Algorithm 1]
"The training was performed for up to 50 epochs with early stopping based on test accuracy, using a patience of 10 epochs. ... if test accuracy improves then Save current model as best_model.pth ... Final Evaluation: Load best saved model Compute confusion matrix, accuracy, precision, recall, and ROC-AUC"
The same test split is used both to select the model checkpoint (early stopping and saving the best model by test accuracy) and to compute the reported final metrics. Therefore the reported accuracy/AUC values are, by construction, the best on-test scores observed during training rather than independent out-of-sample predictions. The state-of-the-art claim rests directly on these selected numbers, so the empirical conclusion is statistically forced by the evaluation protocol.
full rationale
The paper's methodological core is a simple channel replication preprocessing for ViTs; there is no theoretical derivation in which an output is defined in terms of an input. The method itself is not circular. The main circularity is in the evaluation loop: Algorithm 1 uses the test set to decide when to stop and which checkpoint to save, and then final metrics are computed on that same test set. This makes the reported 99.9% TB-CXR and 99.0% pneumonia numbers in-sample selection results, not honest generalization estimates. Self-citations, including Topo-CXR [7], are used only as baselines and are not load-bearing for the method. The 'channel replication without information loss' claim is trivially true but not used to derive any prediction. Overall, the central empirical claim reduces by construction to the test-set selection criterion, so the circularity score is 6.
Assumptions & free parameters
free parameters (4)
- learning_rate =
1e-4
- batch_size =
32
- early_stopping_patience =
10 (Section 4.2) or 50 (Section 3)
- random_seed =
Not reported
assumptions (3)
- domain assumption ImageNet-pretrained ViT-Base (vit-base-patch16-224) features transfer to grayscale chest X-rays.
- domain assumption The public datasets and their labels are correct and representative.
- domain assumption The train/test splits used are comparable to prior works in the comparison tables.
Cite this review
Pith. "Pith review of RepViT-CXR: A Channel Replication Strategy for Vision Transformers in Chest X-ray Tuberculosis and Pneumonia Classification." pith.science (2026). https://pith.science/paper/3FNP3BRI
@misc{pith2026250908234,
author = {Pith},
title = {Pith review of: RepViT-CXR: A Channel Replication Strategy for Vision Transformers in Chest X-ray Tuberculosis and Pneumonia Classification},
year = {2026},
howpublished = {\url{https://pith.science/paper/3FNP3BRI}},
note = {Machine review of arXiv:2509.08234}
}
read the original abstract
Chest X-ray (CXR) imaging remains one of the most widely used diagnostic tools for detecting pulmonary diseases such as tuberculosis (TB) and pneumonia. Recent advances in deep learning, particularly Vision Transformers (ViTs), have shown strong potential for automated medical image analysis. However, most ViT architectures are pretrained on natural images and require three-channel inputs, while CXR scans are inherently grayscale. To address this gap, we propose RepViT-CXR, a channel replication strategy that adapts single-channel CXR images into a ViT-compatible format without introducing additional information loss. We evaluate RepViT-CXR on three benchmark datasets. On the TB-CXR dataset,our method achieved an accuracy of 99.9% and an AUC of 99.9%, surpassing prior state-of-the-art methods such as Topo-CXR (99.3% accuracy, 99.8% AUC). For the Pediatric Pneumonia dataset, RepViT-CXR obtained 99.0% accuracy, with 99.2% recall, 99.3% precision, and an AUC of 99.0%, outperforming strong baselines including DCNN and VGG16. On the Shenzhen TB dataset, our approach achieved 91.1% accuracy and an AUC of 91.2%, marking a performance improvement over previously reported CNN-based methods. These results demonstrate that a simple yet effective channel replication strategy allows ViTs to fully leverage their representational power on grayscale medical imaging tasks. RepViT-CXR establishes a new state of the art for TB and pneumonia detection from chest X-rays, showing strong potential for deployment in real-world clinical screening systems.
Figures
Reference graph
Works this paper leans on
- [1]
-
[2]
D. S. Kermany, M. Goldbaum, W. Cai, C. C. Valentim, H. Liang, S. L. Baxter, A. McKeown, G. Yang, X. Wu, F. Yan, et al., Identifying medical diagnoses and treatable diseases by image-based deep learning, Cell 172 (2018) 1122–1131
work page 2018
-
[3]
F. Pasa, V . Golkov, F. Pfeiffer, D. Cremers, D. Pfeiffer, Efficient deep network architectures for fast chest x-ray tuberculosis screening and vi- sualization, Scientific reports 9 (2019) 1–9
work page 2019
-
[4]
S. S. Meraj, R. Yaakob, A. Azman, S. Rum, A. Shahrel, A. Nazri, N. F. Zakaria, Detection of pulmonary tuberculosis manifestation in chest x- rays using different convolutional neural network (cnn) models, Int. J. Eng. Adv. Technol.(IJEAT) 9 (2019) 2270–2275
work page 2019
- [5]
-
[6]
S. Rajaraman, S. Candemir, I. Kim, G. Thoma, S. Antani, Visualization and interpretation of con- volutional neural network predictions in detecting pneumonia in pediatric chest radiographs, Applied Sciences 8 (2018) 1715
work page 2018
- [7]
-
[8]
A. Hernández, Á. Panizo, D. Camacho, An ensem- ble algorithm based on deep learning for tubercu- losis classification, in: International conference on intelligent data engineering and automated learn- ing, Springer, 2019, pp. 145–154
work page 2019
Show all 35 references
-
[9]
Dosovitskiy, L
A. Dosovitskiy, L. Beyer, A. Kolesnikov, et al., An image is worth 16x16 words: Transformers for image recognition at scale, arXiv preprint arXiv:2010.11929 (2021)
2010 arXiv
-
[10]
Z. Liu, Y . Lin, Y . Cao, et al., Swin transformer: Hierarchical vision transformer using shifted win- dows, in: Proceedings of the IEEE/CVF Interna- tional Conference on Computer Vision, 2021, pp. 10012–10022
2021
-
[11]
To ˘gaçar, B
M. To ˘gaçar, B. Ergen, Z. Cömert, F. Özyurt, A deep feature learning model for pneumonia detec- tion applying a combination of mrmr feature selec- tion and machine learning models, Irbm 41 (2020) 212–222
2020
-
[12]
Jaeger, S
S. Jaeger, S. Candemir, S. Antani, Y .-X. J. Wáng, P.-X. Lu, G. Thoma, Two public chest x-ray datasets for computer-aided screening of pulmonary diseases, Quantitative imaging in medicine and surgery 4 (2014) 475
2014
-
[13]
Hwang, H.-E
S. Hwang, H.-E. Kim, J. Jeong, H.-J. Kim, A novel approach for tuberculosis screening based on deep convolutional neural networks, in: Medi- cal imaging 2016: computer-aided diagnosis, vol- ume 9785, SPIE, 2016, pp. 750–757
2016
-
[14]
Ahmed, M
F. Ahmed, M. A. N. Bhuiyan, B. Coskunuzer, Topo-cnn: Retinal image analysis with topologi- cal deep learning, Journal of Imaging Informatics in Medicine (2025) 1–17
2025
-
[15]
Ahmed, B
F. Ahmed, B. Coskunuzer, Tofi-ml: Retinal im- age screening with topological machine learning, in: Annual Conference on Medical Image Under- standing and Analysis, Springer, 2023, pp. 281– 297
2023
-
[16]
Ahmed, Topological Machine Learning in Med- ical Image Analysis, Ph.D
F. Ahmed, Topological Machine Learning in Med- ical Image Analysis, Ph.D. thesis, The University of Texas at Dallas, 2023
2023
-
[17]
Yadav, F
A. Yadav, F. Ahmed, O. Daescu, R. Gedik, B. Coskunuzer, Histopathological cancer de- tection with topological signatures, in: 2023 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), IEEE, 2023, pp. 1610– 1619
2023
-
[18]
Ahmed, M
F. Ahmed, M. A. N. Bhuiyan, Topological sig- natures vs. gradient histograms: A comparative study for medical image classification, arXiv preprint arXiv:2507.03006 (2025). 9
2025
-
[19]
Ahmed, Hog-cnn: Integrating histogram of oriented gradients with convolutional neural net- works for retinal image classification, arXiv preprint arXiv:2507.22274 (2025)
F. Ahmed, Hog-cnn: Integrating histogram of oriented gradients with convolutional neural net- works for retinal image classification, arXiv preprint arXiv:2507.22274 (2025)
2025 arXiv
-
[20]
Ahmed, Ocuvit: Automated detection of di- abetic retinopathy and amd using a hybrid vi- sion transformer approach, Available at SSRN 5166835 (2025)
F. Ahmed, Ocuvit: Automated detection of di- abetic retinopathy and amd using a hybrid vi- sion transformer approach, Available at SSRN 5166835 (2025)
2025
-
[21]
Ahmed, M
F. Ahmed, M. A. N. Bhuiyan, Robust five-class and binary diabetic retinopathy classification us- ing transfer learning and data augmentation, arXiv preprint arXiv:2507.17121 (2025)
2025 arXiv
-
[22]
Ahmed, Histovit: Vision transformer for accu- rate and scalable histopathological cancer diagno- sis, arXiv preprint arXiv:2508.11181 (2025)
F. Ahmed, Histovit: Vision transformer for accu- rate and scalable histopathological cancer diagno- sis, arXiv preprint arXiv:2508.11181 (2025)
2025 arXiv
-
[23]
Ahmed, Transfer learning with efficientnet for accurate leukemia cell classification, arXiv preprint arXiv:2508.06535 (2025)
F. Ahmed, Transfer learning with efficientnet for accurate leukemia cell classification, arXiv preprint arXiv:2508.06535 (2025)
2025 arXiv
-
[24]
Kermany, K
D. Kermany, K. Zhang, M. Goldbaum, et al., Labeled optical coherence tomography (oct) and chest x-ray images for classification, Mendeley data 2 (2018) 651
2018
-
[25]
Kaggle, Rsna pneumonia detection chal- lenge,https://www.kaggle.com/c/ rsna-pneumonia-detection-challenge/ data, ???? Accessed Nov 2022
2022
-
[26]
National Institutes of Health, Belarus tb database and tb portal,https://grantome.com/ grant/NIH/AAI12021001-1-0-5, ???? Accessed Nov 2022
2022
-
[27]
Goutam, M
B. Goutam, M. F. Hashmi, Z. W. Geem, N. D. Bokde, A comprehensive review of deep learning strategies in retinal disease diagnosis using fundus images, IEEE Access (2022)
2022
-
[28]
Yadav, K
O. Yadav, K. Passi, C. K. Jain, Using deep learn- ing to classify x-ray images of potential tuberculo- sis patients, in: 2018 IEEE International Confer- ence on Bioinformatics and Biomedicine (BIBM), IEEE, 2018, pp. 2368–2375
2018
-
[29]
L. G. C. Evalgelista, E. B. Guedes, Computer- aided tuberculosis detection from chest x-ray im- ages with convolutional neural networks, in: Anais do XV Encontro Nacional de Inteligência Artificial e Computacional, SBC, 2018, pp. 518– 527
2018
-
[30]
A. A. Saraiva, D. Santos, N. J. C. Costa, J. V . M. Sousa, N. M. F. Ferreira, A. Valente, S. Soares, Models of learning to classify x-ray images for the detection of pneumonia using neural networks., in: Bioimaging, 2019, pp. 76–83
2019
-
[31]
E. Ayan, H. M. Ünver, Diagnosis of pneumonia from chest x-ray images using deep learning, in: 2019 Scientific Meeting on Electrical-Electronics & Biomedical Engineering and Computer Science (EBBT), Ieee, 2019, pp. 1–5
2019
-
[32]
Rahman, M
T. Rahman, M. E. Chowdhury, A. Khandakar, K. R. Islam, K. F. Islam, Z. B. Mahbub, M. A. Kadir, S. Kashem, Transfer learning with deep convolutional neural network (cnn) for pneumonia detection using chest x-ray, Applied Sciences 10 (2020) 3233
2020
-
[33]
S. Xu, H. Wu, R. Bie, Cxnet-m1: anomaly detec- tion on chest x-rays with image-based deep learn- ing, IEEE Access 7 (2018) 4466–4477
2018
-
[34]
Lopes, J
U. Lopes, J. F. Valiati, Pre-trained convolu- tional neural networks as feature extractors for tu- berculosis detection, Computers in biology and medicine 89 (2017) 135–143
2017
-
[35]
Rajaraman, G
S. Rajaraman, G. Zamzmi, L. Folio, P. Alder- son, S. Antani, Chest x-ray bone suppression for improving classification of tuberculosis-consistent findings, Diagnostics 11 (2021) 840. 10
2021
Reviewed August 4, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.