Deep Learning in Myocarditis: A Novel Approach to Severity Assessment

preprint OA: closed CC-BY-4.0
📄 Open PDF Full text JSON View at publisher
AI-generated deep summary by claude@2026-07, 2026-07-06 · read from full text

This paper retrospectively studied 314 patients (1076 myocardial biopsy samples) from 2002–2021 to develop an AI model that uses comprehensive histopathology to assess clinical severity in myocarditis. Using a Multiple Instance Learning approach to detect myocarditis across whole-slide images, the authors then built two severity-prediction models: a logistic regression model based on inflammatory cell density and a Transformer-based model using top-ranked patches, reporting AUROCs of 0.809 and 0.993, respectively. The Transformer model’s attention visualizations indicated it captured both inflammatory infiltration and additional morphological features linked to severe outcomes, while the main limitation explicitly noted is the need for future prospective validation in broader clinical settings. This paper does not explicitly discuss endometriosis or adenomyosis; it was included in the corpus via a keyword match in the upstream search index.

Read from the paper's body, not the abstract. Not a substitute for reading the paper. No clinical advice. How this works

Abstract

Background Myocarditis is a life-threatening disease with significant hemodynamic risks during the acute phase. Although histopathological examination of myocardial biopsy specimens remains the gold standard for diagnosis, there is no established method for objectively quantifying cardiomyocyte damage. We aimed to develop an AI model to evaluate clinical myocarditis severity using comprehensive pathology data. Methods We retrospectively analyzed 314 patients (1076 samples) who underwent myocardial biopsy from 2002 to 2021 at the National Cerebrovascular Center. Among these patients, 158 were diagnosed with myocarditis based on the Dallas criteria. A Multiple Instance Learning (MIL) model served as a pre-trained classifier to detect myocarditis across whole-slide images. We then constructed two clinical severity-prediction models: (1) a logistic regression model (Model 1) using the density of inflammatory cells per unit area, and (2) a Transformer-based model (Model 2), which processed the top-ranked patches identified by the MIL model to predict clinical severe outcomes. Results Model 1 achieved an AUROC of 0.809, indicating a robust association between inflammatory cell density and severe myocarditis. In contrast, Model 2, the Transformer-based approach, yielded an AUROC of 0.993 and demonstrated higher accuracy and precision for severity prediction. Attention score visualizations showed that Model 2 captured both inflammatory cell infiltration and additional morphological features. These findings suggest that combining MIL with Transformer architectures enables more comprehensive identification of key histological markers associated with clinical severe disease. Conclusions Our results highlight that a Transformer-based AI model analyzing whole-slide pathology images can accurately assess clinical myocarditis severity. Moreover, simply quantifying the extent of inflammatory cell infiltration also correlates strongly with clinical outcomes. These methods offer a promising avenue for improving diagnostic precision, guiding treatment decisions, and ultimately enhancing patient management. Future prospective studies are warranted to validate these models in broader clinical settings and facilitate their integration into routine pathological workflows. What is new? – This is the first study to apply an AI model for the diagnosis and severity assessment of myocarditis. – New evidence shows that inflammatory cell infiltration is related to the severity of myocarditis. – Using information from the entire tissue, not just inflammatory cells, allows for a more accurate assessment of myocarditis severity. What are the clinical implications? – The use of the AI model allows for an unprecedented histological evaluation of myocarditis severity, which can enhance early diagnosis and intervention strategies. – Rapid and precise assessments of myocarditis severity by the AI model can support clinicians in making timely and appropriate treatment decisions, potentially improving patient outcomes. – The incorporation of this AI model into clinical practice may streamline diagnostic workflows and optimize the allocation of medical resources, enhancing overall patient care.
Full text 38,284 characters · extracted from preprint-html · click to expand
Deep Learning in Myocarditis: A Novel Approach to Severity Assessment | medRxiv /* */ /* */ <!-- <!-- /*! * yepnope1.5.4 * (c) WTFPL, GPLv2 */ (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i (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];var j=d.createElement(s);var dl=l!='dataLayer'?'&l='+l:'';j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;j.type='text/javascript';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-P4HH5NV'); Skip to main content Home About Submit ALERTS / RSS Search for this keyword Advanced Search Deep Learning in Myocarditis: A Novel Approach to Severity Assessment Makoto Nishimori , Tomoyuki Otani , View ORCID Profile Yasuhide Asaumi , Keiko Ogo , View ORCID Profile Yoshihiko Ikeda , View ORCID Profile Kisaki Amemiya , View ORCID Profile Teruo Noguchi , View ORCID Profile Chisato Izumi , View ORCID Profile Masakazu Shinohara , View ORCID Profile Kinta Hatakeyama , View ORCID Profile Kunihiro Nishimura doi: https://doi.org/10.1101/2025.08.01.25332620 Makoto Nishimori 1 Division of Molecular Epidemiology, Kobe University Graduate School of Medicine , Kobe, Japan 2 Department of Preventive Medicine and Epidemiology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site Tomoyuki Otani 3 Department of Pathology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site Yasuhide Asaumi 4 Department of Cardiology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Yasuhide Asaumi Keiko Ogo 3 Department of Pathology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site Yoshihiko Ikeda 3 Department of Pathology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Yoshihiko Ikeda Kisaki Amemiya 3 Department of Pathology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Kisaki Amemiya Teruo Noguchi 4 Department of Cardiology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Teruo Noguchi Chisato Izumi 4 Department of Cardiology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Chisato Izumi Masakazu Shinohara 1 Division of Molecular Epidemiology, Kobe University Graduate School of Medicine , Kobe, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Masakazu Shinohara Kinta Hatakeyama 3 Department of Pathology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Kinta Hatakeyama Kunihiro Nishimura 2 Department of Preventive Medicine and Epidemiology, National Cerebral and Cardiovascular Center , Osaka, Japan Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Kunihiro Nishimura For correspondence: knishimu{at}ncvc.go.jp Abstract Full Text Info/History Metrics Data/Code Preview PDF Abstract Background Myocarditis is a life-threatening disease with significant hemodynamic risks during the acute phase. Although histopathological examination of myocardial biopsy specimens remains the gold standard for diagnosis, there is no established method for objectively quantifying cardiomyocyte damage. We aimed to develop an AI model to evaluate clinical myocarditis severity using comprehensive pathology data. Methods We retrospectively analyzed 314 patients (1076 samples) who underwent myocardial biopsy from 2002 to 2021 at the National Cerebrovascular Center. Among these patients, 158 were diagnosed with myocarditis based on the Dallas criteria. A Multiple Instance Learning (MIL) model served as a pre-trained classifier to detect myocarditis across whole-slide images. We then constructed two clinical severity-prediction models: (1) a logistic regression model (Model 1) using the density of inflammatory cells per unit area, and (2) a Transformer-based model (Model 2), which processed the top-ranked patches identified by the MIL model to predict clinical severe outcomes. Results Model 1 achieved an AUROC of 0.809, indicating a robust association between inflammatory cell density and severe myocarditis. In contrast, Model 2, the Transformer-based approach, yielded an AUROC of 0.993 and demonstrated higher accuracy and precision for severity prediction. Attention score visualizations showed that Model 2 captured both inflammatory cell infiltration and additional morphological features. These findings suggest that combining MIL with Transformer architectures enables more comprehensive identification of key histological markers associated with clinical severe disease. Conclusions Our results highlight that a Transformer-based AI model analyzing whole-slide pathology images can accurately assess clinical myocarditis severity. Moreover, simply quantifying the extent of inflammatory cell infiltration also correlates strongly with clinical outcomes. These methods offer a promising avenue for improving diagnostic precision, guiding treatment decisions, and ultimately enhancing patient management. Future prospective studies are warranted to validate these models in broader clinical settings and facilitate their integration into routine pathological workflows. What is new? – This is the first study to apply an AI model for the diagnosis and severity assessment of myocarditis. – New evidence shows that inflammatory cell infiltration is related to the severity of myocarditis. – Using information from the entire tissue, not just inflammatory cells, allows for a more accurate assessment of myocarditis severity. What are the clinical implications? – The use of the AI model allows for an unprecedented histological evaluation of myocarditis severity, which can enhance early diagnosis and intervention strategies. – Rapid and precise assessments of myocarditis severity by the AI model can support clinicians in making timely and appropriate treatment decisions, potentially improving patient outcomes. – The incorporation of this AI model into clinical practice may streamline diagnostic workflows and optimize the allocation of medical resources, enhancing overall patient care. Introduction Myocarditis is a very serious and high-risk disease carrying the risk of circulatory fluctuations during the acute phase 1 2 3 . Although clinical assessment typically involves symptoms, laboratory findings, and electrocardiograms, the definitive diagnosis relies on histopathological evaluation of myocardial biopsy 4 . Early assessment of clinical disease severity is also essential for guiding treatment and estimating prognosis 5 . Although a study evaluating the clinical severity of myocarditis from histopathology have been reported 6 , an accurate index for evaluation has not yet been established. A factor that histologically defines the severity of myocarditis is the degree of myocardial cell damage. However, there is no method for morphologically objective assessment of cardiomyocyte damage, such as coarsening of the myocyte cytoplasm, irregular shape, or disorganization of the arrangement of myocytes. Therefore, we aimed to develop an artificial intelligence (AI)-based model capable of detecting myocardial tissue features indicative of clinical disease severity. In previous studies on pathology AI models, various deep learning models have been developed for analyzing pathological tissues, including myocarditis 7 8 9 10 . While AI models for diagnosing myocarditis have been reported, no models specifically designed to assess the clinical severity of myocarditis have been developed. Achieving this goal requires a model capable of comprehensively interpreting whole-slide pathology images (WSIs). However, these images tend to be extremely large, making direct input into the model inefficient in terms of both computational resources and cost. Multiple Instance Learning (MIL) 11 provides a potential solution by dividing slides into smaller regions for training. In addition, MIL does not require detailed pixel-level annotations, instead using slide-level labels, which is particularly advantageous for pathology applications 12 . Transformer architectures 13 —now widely used as the backbone of large language models—have recently demonstrated high learning efficiency across multiple domains. To date, there are no reports of combining MIL with Transformer-based methods for myocardial pathology. We anticipate that this combination could significantly enhance performance in analyzing myocardial tissue. Therefore, the objective of this study is to develop a high-accuracy AI model capable of comprehensively interpreting WSIs to evaluate the clinical severity of myocarditis, ultimately aiming for clinical applicability. Methods Study Design, Data Sources, and Patient Population This retrospective cohort study included 314 patients (1076 samples) who underwent myocardial biopsy at the National Cerebrovascular Center (NCVC) from January 2002 to December 2021. The cohort comprised 158 myocarditis and 160 non-myocarditis patients, the latter monitored post-heart transplant showing no signs of acute cellular rejection (ACR Grade 0). Our clinical study adhered to relevant guidelines, approved by the Ethics Committee of the NCVC (Approval No. 12232021-1-1), and was conducted in accordance with the Declaration of Helsinki. Diagnostic and Severity Criteria for Myocarditis Diagnosis of myocarditis was determined by three cardiac pathologists based on the comprehensive Dallas criteria 4 . The severity of myocarditis was defined by short-term in-hospital outcomes, including mortality, cardiogenic shock, or the need for mechanical support —namely intra-aortic balloon pumping, an Impella device, extracorporeal membrane oxygenation, or a ventricular assist device. Whole Slide Image Data Hematoxylin and eosin-stained slides were digitized using a Hamamatsu NanoZoomer S210 C13239 series at a Source lens magnification of 40x, capturing detailed virtual slide images. Data Preprocessing We used the openslide (Python) library 14 to read and process each ndpi file. To accommodate the large size of whole-slide images (WSIs) while retaining detailed histological features, we segmented each slide into 256×256-pixel patches. These dimensions were chosen based on preliminary experiments and prior pathology studies, which suggested a balance between sufficient tissue context and computational feasibility 15 . Patches containing less than 50% tissue (based on simple thresholding of non-background pixels) were excluded to reduce noise from empty or artifact-laden regions. Data augmentation (e.g., random horizontal/vertical flips, rotations, and slight color jitter) was applied to mitigate overfitting and improve the model’s robustness to variations in staining and tissue orientation. 16 Pretraining Model To efficiently extract features indicative of myocarditis, a pretraining model was developed using all cases. The cases were randomly divided into training (70%), validation (15%), and test datasets (15%). A MIL model was employed, which does not require pixel-level annotations but uses slide-level labels for presence or absence of myocarditis. Model Development and Training In this study, we developed two distinct approaches for severity prediction, each leveraging a different methodology. We then evaluated and compared their prognostic performance to determine which approach could more accurately predict clinical outcomes. Model1 (Inflammatory Cell Detection and Logistic Regression) We focused on quantifying inflammatory infiltration as an initial, straightforward indicator of disease severity. First, two board-certified pathologists annotated lymphocytes on randomly selected patches. Lymphocytes were defined as mononuclear inflammatory cells with round nuclei, dense chromatin, and scant cytoplasm. All annotations were based on the consensus of the two pathologists. Using these annotations, we trained an object detection model based on YOLOv8 model 17 to count inflammatory cells per unit tissue area. A total of 1,000 annotated images were used; these were split into training (70%), validation (15%), and test (15%) sets. Default YOLOv8 hyperparameters were employed. We evaluated the object detection performance using metrics such as mean average precision on the validation set. The resulting feature for each 256×256 patch was the average lymphocytes count, computed by summing YOLOv8 detections and normalizing by tissue area. Finally, we applied a univariate logistic regression model, using the lymphocytes density as the sole independent variable to predict disease severity. This univariate approach enabled us to isolate the contribution of lymphocytes infiltration, with future plans to incorporate additional factors for more comprehensive modeling. Model2 (Transformer-Based Severity Classification) Model 2 employed a Transformer-based approach to classify disease severity. We began by applying a pretrained MIL model to estimate the likelihood of myocarditis for each patch. To reduce computational demands and focus on the most informative regions, we selected the top N patches showing the highest probabilities of myocarditis. These patches were then encoded into embedding vectors and processed by a Transformer encoder along with a Class Token. The final classification layer—a multi-layer perceptron applied to the Class Token output—performed a binary classification (severe vs. non-severe) via a sigmoid function. All major hyperparameters, including the Transformer architecture (e.g., number of layers, attention heads), the learning rate, and batch size, were optimized using Bayesian optimization 18 . Training was conducted in parallel on two workstations, each equipped with an NVIDIA GeForce RTX 4090 GPU, to expedite processing. Validation set performance guided hyperparameter tuning, ensuring the model converged effectively on the classification task. Decision Rationale Visualization To elucidate the contributions of different regions to the severity diagnosis, we visualized the attention scores assigned to each patch by the Class Token in the Transformer model 13 , indicating key areas impacting the severity assessment ( Figure 5 ). Statistics Model performance was assessed through precision, recall, F1-score, area under the receiver operating characteristic curve (AUROC), and area under the precision-recall curve (AUPRC). Overall accuracy was also evaluated, with 95% confidence intervals calculated using the bootstrap method 19 . P-values were determined using two-sided significance tests. Software The analysis was conducted using Python 3.8, with PyTorch 1.8 20 for deep learning tasks and scikit-learn for statistical calculations. Results Patients Characteristics The study period spanned from January 2002 to December 2021 at the NCVC. A total of 145 patients diagnosed with myocarditis, including children, were eligible for inclusion. These patients had undergone myocardial biopsy and were confirmed to have myocarditis. No specific exclusion criteria were set. The average age of these patients was 45 years (±21.46 years), with 59% being male. Among the total cohort, 88 patients (60.7%) were classified as severe cases. The average peak creatine kinase-MB values were 135.43 for the entire cohort, 166.83 for the severe group, and 54.99 for the non-severe group. Detailed information on other laboratory data at the onset for each group is provided in Table 1 . View this table: View inline View popup Table 1: Patient characteristics Pre-training with Multiple Instance Learning Model A pre-training model was developed using MIL on a dataset of 314 patients with 1076 myocardial pathology samples, including myocarditis patients, to diagnose myocarditis ( Table 2 ). The results from the training dataset showed an accuracy of 0.751 and an AUCROC of 0.717. In the validation dataset, the model achieved an accuracy of 0.749 and an AUCROC of 0.712. Visualization of the diagnostic rationale in the inference phase was performed, with heatmaps illustrating the areas diagnosed as myocarditis shown in Supplemental Figure 1. The heatmaps indicate higher values in regions where inflammatory cells are more concentrated. View this table: View inline View popup Download powerpoint Table 2: Results of pre-training model Model 1: Predicting Myocarditis Severity Using a Deep Learning Model Based on Inflammatory Cell Infiltration An object detection model (YOLOv8) was pre-trained to detect lymphocytes cells, based on annotations by two myocardial pathology specialists. This model was used to automatically detect the number of lymphocytes, and a logistic regression model was constructed using the number of lymphocytes per unit area as a variable to evaluate clinical myocarditis severity. The results of inflammatory cell detection by the Object Detection Model are shown in Supplemental Figure 1. Histogram plots of lymphocytes count per 256×256 pixel patch showed that clinical severe myocarditis cases had relatively higher lymphocytes counts per patch, while non-severe cases had lower counts ( Figure 3-A ). When converted to the number of lymphocytes per unit area (1 mm²), high values were observed in clinical severe cases, but most overlapped with non-severe cases ( Figure 3-B ). The logistic regression model using the number of lymphocytes per unit area as a variable resulted in an AUROC of 0.809 ( Figure 4-A ). Histograms of the predicted values for clinical severe and non-severe cases were also shown ( Figure 4-B ). Download figure Open in new tab Figure 1: Study Cohort and Analysis Workflow The flowchart shows the selection and analysis process for patients undergoing myocardial biopsy from 2002 to 2021. Out of 687 patients, 373 were excluded, leaving 314 patients with 1076 samples. These were divided into myocarditis (158 patients, 279 samples) and non-myocarditis (160 patients, 797 samples) groups. The myocarditis group was used for training two models after pre-training with a MIL model. Download figure Open in new tab Figure 2: AI Models for Severity Classification The figure shows two AI models used to classify myocarditis severity. Model 1: An object detection AI model counts inflammatory cells, followed by a logistic model to classify severity as severe or non-severe. Model 2: A trained MIL model predicts myocarditis probability. The MIL features are processed through a Transformer model to provide the final diagnosis of severe or non-severe. Download figure Open in new tab Figure 3: Distribution Plot of Lymphocytes Cells Detection Model (A) The distribution of lymphocytes counts per patch, comparing severe and non-severe samples. The x-axis represents the number of lymphocytes per patch, and the y-axis represents the frequency of these counts. (B) The distribution of lymphocytes counts per 1mm² for each patient, comparing severe and non-severe samples. The x-axis represents the number of lymphocytes per 1mm², and the y-axis represents the frequency of these counts. Download figure Open in new tab Figure 4: Results of Model 1 (A) Receiver Operating Characteristic (ROC) curve for Model 1. The x-axis represents the false positive rate, and the y-axis represents the true positive rate. Each point on the curve represents a different threshold value used to discriminate between classes. (B) Histogram of predicted values for Model 1. The x-axis represents the predicted value, and the y-axis represents the count of predictions. The red bars indicate positive samples, and the blue bars indicate negative samples. Model 2: Predicting Myocarditis Severity Using a Transformer-Based Model The pre-trained MIL model was fixed, and for each patch, the MIL model inferred the presence of myocarditis. The top N candidate patches were then input into a Transformer-based model to predict clinical myocarditis severity. The results showed an AUROC of 0.993 (0.952 - 1.000), an accuracy of 0.64 (0.480 - 0.800), a precision of 0.64 (0.480 - 0.800), and a recall of 1 (1 - 1) (Supplemental Table1). ROC curves and histograms of predicted values are shown in Figures 5-A and 5-B . Download figure Open in new tab Figure 5: Results of Model 2 (A) Receiver Operating Characteristic (ROC) curve for Model 2. The x-axis represents the false positive rate, and the y-axis represents the true positive rate. Each point on the curve represents a different threshold value used to discriminate between classes. (B) Histogram of predicted values for Model 2. The x-axis represents the predicted value, and the y-axis represents the count of predictions. The red bars indicate positive samples, and the blue bars indicate negative samples. Comparison of Models for Predicting Myocarditis Severity The metrics differences between Model 1 and Model 2 for predicting clinical severe myocarditis were evaluated using the bootstrap method. The Transformer-based Model 2 showed significantly higher accuracy, precision, and AUROC compared to Model 1. Visualization of Rationale for Severity Prediction To visualize the rationale for clinical severe myocarditis prediction with Model 2, the attention scores of each input patch were illustrated for representative cases ( Figure 6 ). Download figure Open in new tab Figure 6: Attention Scores for Severe Myocarditis The figure displays attention scores assigned to histological images of severe myocarditis by the model. Each image is associated with an attention score, indicating the model’s focus on different regions of the images. The green bars above each image represent the attention score, with higher bars indicating greater attention by the model. Discussion In this study, we developed two AI models to evaluate the severity of myocarditis. Model 1, based on lymphocytes density, achieved an AUROC of 0.809, providing novel evidence that lymphocytes count correlate strongly with disease severity. In contrast, Model 2, which uses a Transformer-based approach to analyze whole-slide pathology images, attained a higher AUROC of 0.993. These findings suggest that a deep learning model capable of integrating diverse morphological features throughout the tissue may outperform a simpler model focused solely on the extent of inflammatory cell infiltration. The clinical significance of Model 1 lies in its demonstration that inflammatory cell density is closely linked to disease severity. While immunological mechanisms have long been implicated in myocarditis 21 , research quantifying inflammatory infiltrates as a direct prognostic marker remains sparse. Model 2, employing the Transformer architecture, captures subtle morphological and spatial patterns beyond mere cell counts. Unlike recurrent neural network (RNN) 22 -based methods, Transformers incorporate broad contextual information, yielding more comprehensive pathological insights and higher predictive accuracy. These findings have potential relevance for risk stratification and therapeutic decision-making in clinical practice. For example, quantification of inflammatory cell density could aid in the early identification of patients who may benefit from intensified immunosuppressive therapy or mechanical circulatory support. Although weakly supervised learning and RNN-based whole-slide analysis have been explored in other fields (e.g., oncology) 15 , there is a scarcity of evidence demonstrating performance improvements via Transformers specifically in myocarditis. Our study thus contributes new data to this field and highlights the importance of considering histological features that extend beyond inflammatory cell infiltration. Limitations Several limitations must be acknowledged. First, this is a retrospective analysis and therefore cannot establish causality. Additionally, the applicability of these models to diverse patient populations or specific myocarditis subtypes (such as giant cell myocarditis) remains insufficiently explored. Furthermore, factors including sample size and inter-institutional variability may affect the generalizability of our results. Conclusion In conclusion, our results indicate that a Transformer-based deep learning approach offers more accurate severity prediction than a method reliant solely on inflammatory cell counts. At the same time, quantifying inflammatory infiltrates emerges as a potentially new and clinically relevant marker of disease severity. Moving forward, prospective and multi-center studies are needed to validate these models and integrate them into routine clinical workflows. By enabling more timely and precise therapeutic interventions, these AI-based models could ultimately improve patient outcomes and optimize healthcare resource allocation in the management of myocarditis. Funding There are no sources of funding related to this study. Conflict of interest None declared. Data Availability De-identified data are available on reasonable request to the corresponding author. Abbreviations AI Artificial Intelligence MIL Multiple Instance Learning WSIs Whole-Slide pathology Images AUROC Area Under the Receiver Operating Characteristic curve AUPRC Area Under the Precision-Recall Curve RNN Recurrent Neural Network References 1. ↵ Lorusso R , Centofanti P , Gelsomino S , Barili F , Di Mauro M , Orlando P , Botta L , Milazzo F , Actis Dato G , Casabona R , et al. Venoarterial Extracorporeal Membrane Oxygenation for Acute Fulminant Myocarditis in Adult Patients: A 5-Year Multi-Institutional Experience . Ann Thorac Surg . 2016 ; 101 : 919 – 926 . doi: 10.1016/j.athoracsur.2015.08.014 OpenUrl CrossRef PubMed 2. ↵ McCarthy RE , 3rd, Boehmer JP , Hruban RH , Hutchins GM , Kasper EK , Hare JM , Baughman KL. Long-term outcome of fulminant myocarditis as compared with acute (nonfulminant) myocarditis . N Engl J Med . 2000 ; 342 : 690 – 695 . doi: 10.1056/NEJM200003093421003 OpenUrl CrossRef PubMed Web of Science 3. ↵ Gupta S , Markham DW , Drazner MH , Mammen PP . Fulminant myocarditis . Nat Clin Pract Cardiovasc Med . 2008 ; 5 : 693 – 706 . doi: 10.1038/ncpcardio1331 OpenUrl CrossRef PubMed 4. ↵ Aretz HT , Billingham ME , Edwards WD , Factor SM , Fallon JT , Fenoglio JJ , Jr. , Olsen EG , Schoen FJ. Myocarditis . A histopathologic definition and classification . Am J Cardiovasc Pathol . 1987 ; 1 : 3 – 14 . OpenUrl PubMed 5. ↵ Ammirati E , Frigerio M , Adler ED , Basso C , Birnie DH , Brambatti M , Friedrich MG , Klingel K , Lehtonen J , Moslehi JJ , et al. Management of Acute Myocarditis and Chronic Inflammatory Cardiomyopathy: An Expert Consensus Document . Circ Heart Fail . 2020 ; 13 : e007405 . doi: 10.1161/CIRCHEARTFAILURE.120.007405 OpenUrl CrossRef PubMed 6. ↵ Kanaoka K , Onoue K , Terasaki S , Nakano T , Nakai M , Sumita Y , Hatakeyama K , Terasaki F , Kawakami R , Iwanaga Y , et al. Features and Outcomes of Histologically Proven Myocarditis With Fulminant Presentation . Circulation . 2022 ; 146 : 1425 – 1433 . doi: 10.1161/CIRCULATIONAHA.121.058869 OpenUrl CrossRef PubMed 7. ↵ Song Z , Zou S , Zhou W , Huang Y , Shao L , Yuan J , Gou X , Jin W , Wang Z , Chen X , et al. Clinically applicable histopathological diagnosis system for gastric cancer detection using deep learning . Nat Commun . 2020 ; 11 : 4294 . doi: 10.1038/s41467-020-18147-8 OpenUrl CrossRef PubMed 8. ↵ Yang H , Chen L , Cheng Z , Yang M , Wang J , Lin C , Wang Y , Huang L , Chen Y , Peng S , et al. Deep learning-based six-type classifier for lung cancer and mimics from histopathological whole slide images: a retrospective study . BMC Med . 2021 ; 19 : 80 . doi: 10.1186/s12916-021-01953-2 OpenUrl CrossRef PubMed 9. ↵ Jiang B , Bao L , He S , Chen X , Jin Z , Ye Y . Deep learning applications in breast cancer histopathological imaging: diagnosis, treatment, and prognosis . Breast Cancer Res . 2024 ; 26 : 137 . doi: 10.1186/s13058-024-01895-6 OpenUrl CrossRef PubMed 10. ↵ Moravvej SV , Alizadehsani R , Khanam S , Sobhaninia Z , Shoeibi A , Khozeimeh F , Sani ZA , Tan RS , Khosravi A , Nahavandi S , et al. RLMD-PA: A Reinforcement Learning-Based Myocarditis Diagnosis Combined with a Population-Based Algorithm for Pretraining Weights . Contrast Media Mol Imaging . 2022 ; 2022 : 8733632 . doi: 10.1155/2022/8733632 OpenUrl CrossRef PubMed 11. ↵ Andrews S , Tsochantaridis I , Hofmann T . Support vector machines for multiple-instance learning . Advances in neural information processing systems . 2002 ; 15 . 12. ↵ Gadermayr M , Tschuchnig M . Multiple instance learning for digital pathology: A review of the state-of-the-art, limitations & future potential . Comput Med Imaging Graph . 2024 ; 112 : 102337 . doi: 10.1016/j.compmedimag.2024.102337 OpenUrl CrossRef PubMed 13. ↵ Vaswani A . Attention is all you need . Advances in Neural Information Processing Systems . 2017 . 14. ↵ Goode A , Gilbert B , Harkes J , Jukic D , Satyanarayanan M . OpenSlide: A vendor-neutral software foundation for digital pathology . J Pathol Inform . 2013 ; 4 : 27 . doi: 10.4103/2153-3539.119005 OpenUrl CrossRef PubMed 15. ↵ Campanella G , Hanna MG , Geneslaw L , Miraflor A , Werneck Krauss Silva V , Busam KJ , Brogi E , Reuter VE , Klimstra DS , Fuchs TJ. Clinical-grade computational pathology using weakly supervised deep learning on whole slide images . Nat Med . 2019 ; 25 : 1301 – 1309 . doi: 10.1038/s41591-019-0508-1 OpenUrl CrossRef PubMed 16. ↵ Wang Z , Wang P , Liu K , Wang P , Fu Y , Lu C-T , Aggarwal CC , Pei J , Zhou Y. A Comprehensive Survey on Data Augmentation . arXiv preprint arXiv:240509591. 2024 . 17. ↵ Redmon J . You only look once: Unified, real-time object detection . Paper/Poster presented at: Proceedings of the IEEE conference on computer vision and pattern recognition ; 2016 ; 18. ↵ Snoek J , Larochelle H , Adams RP . Practical bayesian optimization of machine learning algorithms . Advances in neural information processing systems . 2012 ; 25 . 19. ↵ Mooney CZ , Duval RD , Duvall R . Bootstrapping: A nonparametric approach to statistical inference . sage ; 1993 . 20. ↵ Paszke A , Gross S , Massa F , Lerer A , Bradbury J , Chanan G , Killeen T , Lin Z , Gimelshein N , Antiga L . Pytorch: An imperative style, high-performance deep learning library . Advances in neural information processing systems . 2019 ; 32 . 21. ↵ Brociek E , Tyminska A , Giordani AS , Caforio ALP , Wojnicz R , Grabowski M , Ozieranski K. Myocarditis: Etiology, Pathogenesis, and Their Implications in Clinical Practice . Biology (Basel) . 2023 ; 12 . doi: 10.3390/biology12060874 OpenUrl CrossRef 22. ↵ Mienye ID , Swart TG , Obaido G . Recurrent neural networks: A comprehensive review of architectures, variants, and applications . Information . 2024 ; 15 : 517 . OpenUrl View the discussion thread. Back to top Previous Next Posted August 02, 2025. Download PDF Data/Code Email Thank you for your interest in spreading the word about medRxiv. NOTE: Your email address is requested solely to identify you as the sender of this article. Your Email * Your Name * Send To * Enter multiple addresses on separate lines or separate them with commas. You are going to email the following Deep Learning in Myocarditis: A Novel Approach to Severity Assessment Message Subject (Your Name) has forwarded a page to you from medRxiv Message Body (Your Name) thought you would like to see this page from the medRxiv website. Your Personal Message CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions. Share Deep Learning in Myocarditis: A Novel Approach to Severity Assessment Makoto Nishimori , Tomoyuki Otani , Yasuhide Asaumi , Keiko Ogo , Yoshihiko Ikeda , Kisaki Amemiya , Teruo Noguchi , Chisato Izumi , Masakazu Shinohara , Kinta Hatakeyama , Kunihiro Nishimura medRxiv 2025.08.01.25332620; doi: https://doi.org/10.1101/2025.08.01.25332620 Share This Article: Copy Citation Tools Deep Learning in Myocarditis: A Novel Approach to Severity Assessment Makoto Nishimori , Tomoyuki Otani , Yasuhide Asaumi , Keiko Ogo , Yoshihiko Ikeda , Kisaki Amemiya , Teruo Noguchi , Chisato Izumi , Masakazu Shinohara , Kinta Hatakeyama , Kunihiro Nishimura medRxiv 2025.08.01.25332620; doi: https://doi.org/10.1101/2025.08.01.25332620 Citation Manager Formats BibTeX Bookends EasyBib EndNote (tagged) EndNote 8 (xml) Medlars Mendeley Papers RefWorks Tagged Ref Manager RIS Zotero Tweet Widget Facebook Like Google Plus One Subject Area Cardiovascular Medicine Subject Areas All Articles Addiction Medicine (568) Allergy and Immunology (863) Anesthesia (299) Cardiovascular Medicine (4425) Dentistry and Oral Medicine (443) Dermatology (382) Emergency Medicine (607) Endocrinology (including Diabetes Mellitus and Metabolic Disease) (1507) Epidemiology (15221) Forensic Medicine (30) Gastroenterology (1123) Genetic and Genomic Medicine (6588) Geriatric Medicine (667) Health Economics (997) Health Informatics (4524) Health Policy (1368) Health Systems and Quality Improvement (1612) Hematology (540) HIV/AIDS (1264) Infectious Diseases (except HIV/AIDS) (15910) Intensive Care and Critical Care Medicine (1103) Medical Education (623) Medical Ethics (145) Nephrology (667) Neurology (6588) Nursing (346) Nutrition (998) Obstetrics and Gynecology (1143) Occupational and Environmental Health (956) Oncology (3331) Ophthalmology (971) Orthopedics (369) Otolaryngology (420) Pain Medicine (435) Palliative Medicine (129) Pathology (663) Pediatrics (1690) Pharmacology and Therapeutics (691) Primary Care Research (710) Psychiatry and Clinical Psychology (5440) Public and Global Health (9220) Radiology and Imaging (2195) Rehabilitation Medicine and Physical Therapy (1369) Respiratory Medicine (1196) Rheumatology (593) Sexual and Reproductive Health (710) Sports Medicine (529) Surgery (710) Toxicology (99) Transplantation (289) Urology (265) (function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9ffe19065d36aa64',t:'MTc3OTQ3Njc4Mw=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();

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.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00
unpaywall
last seen: 2026-05-22T02:00:06.705733+00:00
License: CC-BY-4.0