A Unified Vision Transformer and Convolutional Neural Network Framework for Multi-Domain Cancer Classification | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article A Unified Vision Transformer and Convolutional Neural Network Framework for Multi-Domain Cancer Classification Heba M. Emara, Walid El-Shafai, Naglaa F. Soliman, Abeer D. Algarni, and 2 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-6633290/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Accurate and reliable classification of cancer from medical imaging is essential for effective computer-aided diagnosis. In this study, we conduct a comprehensive evaluation of three deep learning architectures—Convolutional Neural Networks (CNNs), Vision Transformers (ViTs), and a hybrid model (HViT-CNN) that integrates CNN backbones with transformer-based attention mechanisms. These models are benchmarked across three diverse and clinically relevant imaging modalities: brain magnetic resonance imaging (MRI), dermoscopic images for skin cancer, and cytology slides for cervical cancer. While CNNs demonstrate strong performance in capturing local texture features and ViTs offer advantages in modeling global spatial relationships, both architectures exhibit modality-specific limitations. The proposed HViT-CNN addresses these limitations by combining localized feature extraction with global contextual reasoning. Across all datasets, the hybrid model consistently achieved the highest classification accuracy of 98.4% for brain tumors, 98.0% for skin cancer, and 99.0% for cervical cancer—outperforming its individual components. These results underscore the effectiveness of hybrid architectures in handling both coarse and fine-grained image features, and highlight their potential for advancing generalizable, high-precision diagnostic tools in medical image analysis. Brain tumor Skin cancer Cervical cancer CNN Vision Transformer Hybrid Models Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-6633290","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":469800098,"identity":"65d444ba-f235-486f-9983-143d20120bfc","order_by":0,"name":"Heba M. Emara","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABUElEQVRIie2QMWvCQBSAXwhk6QtZDyzmL5wEbEtt0p9yx4FTlUIXx4OCTu4ZBP9CRUjXkwwuaedAhiqFdnFQCkWo1CaFIkaFjoXmG453vPveu/cACgr+IFQhgLbKQl3BZJMoY3aSg4rMQoMB2ySc3yhItxQ4qIy7o7kmA/ukEy0mDGpN+/KIP1+36LEl9VGCUHPltuJFj4Joy6TSixpDyqB+U1Hm0PEjikQZ4hyhLnIKja8o0WSi+dAICP8M+UCaQclsrxAUVksIoch/7GnmLFPF863Z65LBOlPuP8w2RVtZ76my3lFirGZduE+ujHR8xftgBnqmpJsxUkW5eSVq1k+5TIRPXhzCQPA73RyWMJ2lEhrOWY8KllfGD2G8WCUXviWm8zm4vN/pDt6wRb3y+HYaz1qut2fRsFWHhj+R/n0FntvYLnb+xd4uBQUFBf+JL9jRc0gd/tfSAAAAAElFTkSuQmCC","orcid":"","institution":"Ministry of Higher Education","correspondingAuthor":true,"prefix":"","firstName":"Heba","middleName":"M.","lastName":"Emara","suffix":""},{"id":469800099,"identity":"ec4b386a-e4a9-4abf-b74a-8b57835b2e8c","order_by":1,"name":"Walid El-Shafai","email":"","orcid":"","institution":"Menoufia University","correspondingAuthor":false,"prefix":"","firstName":"Walid","middleName":"","lastName":"El-Shafai","suffix":""},{"id":469800100,"identity":"92e6a3dd-22d2-4b97-910e-913b0180f231","order_by":2,"name":"Naglaa F. Soliman","email":"","orcid":"","institution":"Princess Nourah bint Abdulrahman University","correspondingAuthor":false,"prefix":"","firstName":"Naglaa","middleName":"F.","lastName":"Soliman","suffix":""},{"id":469800101,"identity":"4ace6419-c06d-4d2a-8350-0bda5194bd05","order_by":3,"name":"Abeer D. Algarni","email":"","orcid":"","institution":"Princess Nourah bint Abdulrahman University","correspondingAuthor":false,"prefix":"","firstName":"Abeer","middleName":"D.","lastName":"Algarni","suffix":""},{"id":469800102,"identity":"0b60be7e-2be3-4596-86ae-d99ce792e459","order_by":4,"name":"Fathi E. Abd El-Samie","email":"","orcid":"","institution":"Princess Nourah bint Abdulrahman University","correspondingAuthor":false,"prefix":"","firstName":"Fathi","middleName":"E. Abd","lastName":"El-Samie","suffix":""},{"id":469800103,"identity":"72688130-dc02-4021-9a7b-86b824548ba5","order_by":5,"name":"Amira A. Mahmoud","email":"","orcid":"","institution":"Ministry of Higher Education","correspondingAuthor":false,"prefix":"","firstName":"Amira","middleName":"A.","lastName":"Mahmoud","suffix":""}],"badges":[],"createdAt":"2025-05-10 07:53:16","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-6633290/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-6633290/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":103817576,"identity":"909065fc-8392-4d73-a55b-194398f88aba","added_by":"auto","created_at":"2026-03-03 09:27:37","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1010277,"visible":true,"origin":"","legend":"","description":"","filename":"braintumorvisiontransform.pdf","url":"https://assets-eu.researchsquare.com/files/rs-6633290/v1_covered_62281b01-13a1-4f3c-a0ef-18374f6d5546.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"A Unified Vision Transformer and Convolutional Neural Network Framework for Multi-Domain Cancer Classification","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Brain tumor, Skin cancer, Cervical cancer, CNN, Vision Transformer, Hybrid Models","lastPublishedDoi":"10.21203/rs.3.rs-6633290/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-6633290/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"Accurate and reliable classification of cancer from medical imaging is essential for effective computer-aided diagnosis. In this study, we conduct a comprehensive evaluation of three deep learning architectures—Convolutional Neural Networks (CNNs), Vision Transformers (ViTs), and a hybrid model (HViT-CNN) that integrates CNN backbones with transformer-based attention mechanisms. These models are benchmarked across three diverse and clinically relevant imaging modalities: brain magnetic resonance imaging (MRI), dermoscopic images for skin cancer, and cytology slides for cervical cancer. While CNNs demonstrate strong performance in capturing local texture features and ViTs offer advantages in modeling global spatial relationships, both architectures exhibit modality-specific limitations. The proposed HViT-CNN addresses these limitations by combining localized feature extraction with global contextual reasoning. Across all datasets, the hybrid model consistently achieved the highest classification accuracy of 98.4% for brain tumors, 98.0% for skin cancer, and 99.0% for cervical cancer—outperforming its individual components. These results underscore the effectiveness of hybrid architectures in handling both coarse and fine-grained image features, and highlight their potential for advancing generalizable, high-precision diagnostic tools in medical image analysis.","manuscriptTitle":"A Unified Vision Transformer and Convolutional Neural Network Framework for Multi-Domain Cancer Classification","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-06-13 06:59:12","doi":"10.21203/rs.3.rs-6633290/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"6b7e35cf-9f4f-4747-9f74-bf34708450d6","owner":[],"postedDate":"June 13th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-03-03T09:26:27+00:00","versionOfRecord":[],"versionCreatedAt":"2025-06-13 06:59:12","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-6633290","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-6633290","identity":"rs-6633290","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.