Skip to main content
Journal of Pathology Informatics logoLink to Journal of Pathology Informatics
. 2026 Jul 2;22:100689. doi: 10.1016/j.jpi.2026.100689

Hierarchical vision transformers for Epstein-Barr virus status and histological subtype prediction in Hodgkin lymphoma whole-slide images

Zsolt Bedőházi a,b,⁎, Zsófia Sztupinszki c,d, Ragnar P Kristjánsson c, Mikkel Werling c,e, Stephen Hamilton-Dutoit f, Kristina L Lauridsen f, Lisa Ottander g, Trine L Plesner h, Peter Hollander g, Ingrid Glimelius g,i, Lene Sjö h, Estrid Høgdall j,k, Carsten Utoft Niemann c,e,l, Klaus Rostgaard c, Péter Pollner m,n, Henrik Hjalgrim c,e,o,⁎⁎,1, István Csabai b,1
PMCID: PMC13445367  PMID: 42564825

Abstract

Accurate stratification of Hodgkin lymphoma (HL) by immunologic/histological subtypes and Epstein-Barr virus (EBV) status is essential for epidemiological and translational research, yet large-scale testing is impractical and expensive. Digital pathology models that utilize routinely used hematoxylin and eosin (H&E) whole-slide images (WSIs) could close this gap. We developed and validated a hierarchical Vision Transformer pipeline that aggregates cell-, patch-, and region-level context to predict EBV status and the three most prevalent immunological/histological HL subtypes: nodular sclerosis (NS), mixed cellularity (MC), and nodular lymphocyte-predominant HL (NLPHL)—from H&E-stained WSIs, and additionally evaluated a standard attention-based multiple-instance learning (ABMIL) baseline for direct architectural comparison. The development pool comprised 1643 HL cases (1952 WSIs) from 18 Danish hospitals and was used for hospital-preserving 5-fold cross-validation; external validation was performed on an independent hold-out cohort of 458 cases (532 WSIs) from five hold-out hospitals. For subtype prediction, analyses were restricted to the 1560 cases belonging to NS, MC, or NLPHL. On the external EBV cohort (N=458) the hierarchical pipeline achieved an area under the receiver operating characteristic curve (ROC–AUC) of 0.73 (95% confidence interval (CI) 0.68–0.77), precision–recall (PR)–AUC 0.57 (95% CI 0.49–0.66) with recall (sensitivity) 0.74 (95% CI 0.67–0.80) and macro-F1 score 0.60 (95% CI 0.54, 0.65). For 3-class subtype prediction on 359 external cases, discrimination reached ROC–AUC 0.84 (95% CI 0.80–0.88) and PR–AUC 0.63 (95% CI 0.56–0.71) with a macro-F1 of 0.56 (95% CI 0.48, 0.64) and macro-recall 0.55 (95% CI 0.47, 0.63); residual errors were dominated by NS-MC confusions. An ABMIL baseline using the same patch embeddings achieved ROC–AUC 0.76 (95% CI 0.72–0.81) for EBV and 0.89 (95% CI 0.86–0.92) subtype prediction, outperforming the hierarchical model on both tasks. This multicenter study shows that both hierarchical and attention-based architectures can determine EBV status and major HL subtypes directly from routine H&E slides with externally validated performance across hospitals, whereas the finding that the simpler baseline outperformed the hierarchical model suggests that strong foundation-model embeddings combined with attention-based pooling may reduce the need for explicit multi-scale modelling in cohorts of this size.

Keywords: Hodgkin lymphoma, Epstein-Barr virus, Histological subtyping, Digital pathology, Whole-slide images, Deep learning, Vision Transformer, Foundation models

Highlights

  • •

    Hierarchical ViT and ABMIL architectures predict EBV status and HL subtypes from H&E WSIs.

  • •

    Multicenter study: 2101 cases (2484 WSIs) across 23 Danish hospitals.

  • •

    EBV status is predicted externally with ROC–AUC 0.726 (HIPT) and 0.763 (ABMIL).

  • •

    HL subtypes are predicted externally with ROC–AUC 0.842 (HIPT) and 0.890 (ABMIL).

  • •

    Simpler ABMIL baseline outperformed HIPT on both tasks on the external cohort.

Introduction

Hodgkin lymphoma (HL) is a malignancy of the lymphatic system, diagnosed in more than 80,000 individuals and responsible for over 20,000 deaths worldwide each year.1, 2 Although modern treatments can achieve survival rates exceeding 90%,3, 4 access to such care is not universal,5 and in addition, late effects among HL survivors remain a concern.6 At the population level, HL incidence and mortality show opposing associations with socio-economic development: incidence is generally higher and mortality lower in affluent countries compared to low-income settings.1 With ongoing population growth and ageing, global HL incidence and mortality are projected to increase by 30% and 50%, respectively, by 2040.7 Therefore, efforts to better understand the causes of HL and to prevent it remain highly relevant.

Unraveling HL etiology has been complicated by evidence suggesting that HL comprises biologically distinct disease entities.8 Current histopathological classifications recognize two immunologically distinct forms: nodular lymphocyte-predominant HL (NLPHL, ∼5%–10% of cases) and classical HL (cHL).4, 9, 10 The latter is further subdivided into four histological subtypes: nodular sclerosis (NS, 70% of cHL), mixed cellularity (MC, 20%–25% of cHL), lymphocyte depleted (LD), and lymphocyte rich HL (LR).11 Epidemiological differences between cHL subtypes, particularly between NS and MC, have been repeatedly observed,12 but histological categories alone do not fully capture the underlying etiological diversity.

In 30%–40% of cHL cases, malignant cells harbor the Epstein-Barr virus (EBV),13, 14, 15 which is believed to be causative in these instances. EBV-positivity occurs across both NS and MC subtypes. Interestingly, EBV-positivity itself has been shown to associate with socioeconomic factors.16 Because EBV status currently does not influence standard treatment decisions, it is not routinely assessed during diagnostic work-up.15, 17 Consequently, epidemiological knowledge of EBV-positive vs. EBV-negative cHL is largely based on retrospective studies re-examining archived biopsy samples, often limited by small sample sizes and other methodological constraints.14, 15, 18, 19

There is growing interest in whether the tumor microenvironment in HL varies according to EBV status,20 with differences potentially detectable through advanced image analysis. Such variations could be of biological relevance and may influence disease behavior and patient outcomes.17, 21, 22 However, unlike other malignant lymphomas, HL lesions are dominated by a heterogeneous mix of reactive immune cells, with malignant cells comprising only 1%–2% of the tumor mass.23 This atypical biology of HL, including its strong dependence on the tumor microenvironment, unusual sex- and age-specific incidence patterns, and autoimmune-like features, suggests that digital pathology models optimized for other cancers cannot be directly generalized to HL.7, 8, 24, 25, 26

Recent advances in machine learning, particularly deep learning models such as convolutional neural networks (CNNs) and Vision Transformers, have shown promise in analyzing WSIs in lymphomas, including HL.26, 27, 28, 29, 30, 31 These models can detect complex spatial patterns not apparent to human observers. For example, CNNs have been used to predict disease progression in large B-cell lymphomas,32, 33 and Vision Transformers have improved classification and outcome prediction in diffuse large B-cell lymphoma.34, 35

A robust, scalable WSI analysis tool capable of classifying large numbers of HL by histological subtype and EBV status would address several critical limitations of current epidemiological practice. First, it would overcome the subjectivity and variability that are inherent in manual histopathological assessment,36, 37, 38 thereby ensuring greater objectivity and reproducibility. Second, automation would enable efficient processing and classification of thousands of digital slides, an impractical task through manual review alone. Third, uniform, large-scale classification of cases would facilitate more comprehensive epidemiological studies of HL subtypes and EBV status, yielding deeper insights into disease etiology and prognosis. Finally, application not only to newly collected samples but also to historical material would maximize the value of both existing biobanks and ongoing clinical collections.

The starting point for this study was a desire to investigate the potential for machine learning image analysis to enable high-throughput epidemiological etiological research. This aim determined the end points of primary interest (EBV status and histology). Importantly, however, if successful, this study could also inform the design of clinically relevant digital pathology tools to aid the distinction between cHL and NLPHL, for which treatment strategies already differ, as well as between EBV-positive and EBV-negative cHL variants, which may become relevant with more modern treatment modalities.

In this study, we evaluated a context-aware Hierarchical Image Pyramid Transformer (HIPT) architecture39 for predicting HL histology and tumor EBV status from WSIs in a uniquely large population-based cohort of 2101 HL patients collected from 23 Danish hospitals.40 Our interest in HIPT was motivated by two considerations. First, many weakly supervised WSI pipelines follow a multiple-instance learning (MIL) paradigm,41 in which patches are encoded independently and aggregated with permutation-invariant pooling; while effective, this bag-of-patches abstraction can overlook spatial relationships and larger-scale tissue context.42, 43 Second, informative signals in WSIs span multiple physical scales, from cellular morphology to broader tissue architecture. HIPT is explicitly designed to model this hierarchy through staged aggregation of local and regional information. We therefore considered HIPT a biologically and computationally well-motivated architecture for HL WSIs, supported by prior HIPT benchmarks showing strong performance across multiple slide-level cancer subtyping and survival prediction tasks.39 At the same time, recent benchmarking of WSI aggregation methods has shown that no single aggregation strategy is consistently optimal across tasks, and that spatially aware aggregation may provide less additional benefit when strong domain-specific pathology foundation-model embeddings are used.44 We therefore treated the added value of hierarchical modelling as an empirical question rather than an assumption. To benchmark this design choice directly, we additionally evaluated a standard attention-based multiple-instance learning (ABMIL) baseline41 using the same pretrained UNI patch embeddings, patient-level splits, and external hold-out cohort, enabling a direct comparison between hierarchical and flat aggregation strategies on the same data.

Our dataset, substantially larger than any previously utilized HL dataset, provides a unique opportunity to characterize HL in greater detail and to develop robust, generalizable prognostic models. The development and validation of this image analysis tool represent the first step toward standardized, high-throughput HL classification, with significant implications for digital pathology, epidemiological research, and ultimately for reducing global inequalities in diagnostic quality and clinical outcomes.

Methods

Data

Cohorts and labels

The present investigation is nested within a nationwide Danish HL project, which has been described in detail elsewhere.40 In brief, the project includes a collection of available primary tissue biopsies from incident HL cases in Denmark in the period 1990 through 2010, which have been EBV-typed retrospectively by means of in-situ hybridization for EBV-encoded small RNAs (EBERs; INFORM EBER Probe, Benchmark ULTRA platform from Ventana Medical Systems, Tucson, AZ, USA) as part of the project. WSI for all patients were scanned at a central pathology lab. The project was initiated by a broad search in the Danish Cancer Registry and the Danish Pathology Registry for potential HL cases incident in 1990–2010. From this list, true HL cases with suitable material for tissue microarrays were harvested. Collected tissues (all from excision biopsies) were re-examined, and histology was revised by one of two Danish pathologists. EBV typing was carried out by viewing digitized pictures by three Danes and replicated by two Swedes. The consensus EBV typing used resulted from combining the results from the two teams, such that if any core was deemed EBER-positive, the case was EBV-positive; if all useable cores were EBER-negative, the case was EBV-negative. Inter-rater agreements (kappa coefficients) were 91.5% overall, 92.5% in MCHL, and 90.0% in NSHL cases. We used all EBV-typed cases from this project, representing 75% of all HL cases in Denmark.

Our study included N=2101 lymphoma cases from 23 Danish hospitals (Bis, Esb, Gen, Glo, Her, Hil, Hjø, Hol, Hols, Hvi, Nyk, Næs, Ode, Ran, Rig, Ros, Sla, Sve, Søn, Vej, Vib, Ålb, and Årh), corresponding to 2484 hematoxylin and eosin (H&E)-stained whole-slide images (WSIs; range per patient: 1–8, median: 1). WSIs from the same patient were grouped to prevent any patient-level leakage. Each case had an institutional label (hospital), EBV status (0/1), and a histological subtype label. Baseline characteristics for the full study cohort (used for the EBV task) are summarized in Table 1, and the distribution of EBV status across histological subtypes is shown in Table 2. The subtype prediction task uses a predefined three-class subset described below.

Table 1.

Baseline patient characteristics by cohort. Values are presented as n (%). EBV = Epstein-Barr virus; NLPHL = nodular lymphocyte-predominant Hodgkin lymphoma.

Characteristic Development (CV) (N = 1643) Hold-out (external) (N = 458) Total (N = 2101)
Sex
Female 679 (41.3%) 196 (42.8%) 875 (41.6%)
Male 964 (58.7%) 262 (57.2%) 1226 (58.4%)
Histological subtype
Nodular sclerosis (NS) 825 (50.2%) 264 (57.6%) 1089 (51.8%)
Mixed cellularity (MC) 285 (17.3%) 73 (15.9%) 358 (17.0%)
NLPHL 91 (5.5%) 22 (4.8%) 113 (5.4%)
Other & unspecified (UNS) 442 (26.9%) 99 (21.6%) 541 (20.7%)
EBV status
Positive 548 (33.4%) 162 (35.4%) 710 (33.8%)
Negative 1095 (66.6%) 296 (64.6%) 1391 (66.2%)
Smoking status
Current 274 (16.7%) 100 (21.8%) 374 (17.8%)
Former 103 (6.3%) 35 (7.6%) 138 (6.6%)
Never 325 (19.8%) 103 (22.5%) 428 (20.4%)
Unknown 941 (57.3%) 220 (48.0%) 1161 (55.3%)
Table 2.

EBV status by histological subtype. EBV = Epstein-Barr virus; NLPHL = nodular lymphocyte-predominant Hodgkin lymphoma.

Subtype EBV+ EBV– Total % EBV+
Nodular sclerosis 276 (25.3%) 813 (74.7%) 1089 25.3%
Mixed cellularity 214 (59.8%) 144 (40.2%) 358 59.8%
NLPHL 12 (10.6%) 101 (89.4%) 113 10.6%
Other & unspecified (UNS) 208 (38.4%) 333 (61.6%) 541 38.9%
Overall 710 (33.8%) 1391 (66.2%) 2101 33.8%

Two prediction tasks were investigated: 1) EBV status (binary): all 2101 cases were used. 2) Histological subtype: analyses were restricted to the three most prevalent subtypes—NS, MC, and NLPHL—yielding N=1560 cases (1832 WSIs). For the three-class subtype task, we excluded cases labelled as Unspecified (UNS) and the two rarest cHL subtypes (LR, LD) to avoid unstable estimates.

Hospital-preserving partitioning and cross-validation

To ensure and emulate robust external validation and avoid institutional data leakage, we implemented a hospital-preserving partitioning strategy that assigned entire hospitals to either the development pool or an independent hold-out test cohort.

The selection of hospitals for the external hold-out cohort was performed using a combinatorial optimization approach designed to identify hospital combinations that yield balanced distributions of key clinical variables between the development and hold-out cohorts. For each candidate combination, we computed the Jensen–Shannon (JS) divergence between the development and hold-out distributions for four balancing variables: EBV status, sex, histological subtype, and smoking status (a HL risk factor).

The total optimization score for each candidate split was computed as the sum of JS divergences across all balancing variables plus a sample-size balance penalty term (weighted by a factor of 2) to discourage extreme imbalances in cohort sizes:

Score=∑v∈VJSPvdev∥Pvhold+2∣ρobs−ρexp∣,

where V=EBVstatussexhistologicalsubtypesmoking status denotes the set of balancing variables, and Pvdev and Pvhold are the empirical distributions of variable v in the development and hold-out cohorts, respectively. The observed ratio ρobs was defined as the fraction of cases assigned to the hold-out cohort, and the expected ratio ρexp was defined from the proportion of hospitals allocated to the hold-out cohort.

The minimum-score split assigned Glo, Hol, Ode, Ran, and Ålb to the hold-out set (458 cases) and left 1643 cases from 18 hospitals for development, with JS≤3.7×10−3 for all variables, indicating good balance.

The 18 development hospitals were divided into 5 cross-validation (CV) folds through a two-stage optimization: k-means clustering first grouped hospitals according to EBV positivity rate, sex ratio, subtype distribution, and smoking-data completeness, and the resulting assignments were then refined with simulated annealing that minimized the weighted sum of JS divergences across folds.

This hospital-preserving design ensures that model performance estimates from CV and external validation reflect generalization to entirely new clinical sites rather than interpolation within sites already seen during training. The identical hospital partitions were re-used for both tasks; for the subtype task, only the cases belonging to the three retained subtypes were kept within each split.

The hospitals assigned to each validation fold are listed in Table 3. In each fold, the training set consisted of all remaining development hospitals excluding the five hold-out hospitals.

Table 3.

Hospital allocation across validation folds (5-fold CV). Within each fold, the training and validation sets are institutionally disjoint and exclude the five hold-out hospitals.

Fold Hospitals in validation set
1 Nyk, Rig
2 Hvi, Næs, Årh
3 Esb, Ros, Sla, Vib
4 Bis, Gen, Her, Sve, Søn
5 Hil, Hjø, Hols, Vej

EBV task cohorts

For EBV prediction, the development pool contained 1macro-averaged over subtypes and computed on the independent h643 cases and the independent hold-out cohort contained 458 cases (hospitals Glo/Hol/Ode/Ran/Ålb). Overall cohort totals and EBV label counts are reported in Appendix Table A.1. Detailed per-fold counts for the development pool (including EBV 0/1 distributions) are provided in Appendix Table A.2.

Subtype task cohorts

For three-class subtype prediction (NS/MC/NLPHL), the development pool contained 1201 cases (using the same hospital-preserving CV partitions as the EBV task, after removing UNS and the two rarest subtypes), and the independent hold-out cohort contained 359 cases from the same 5 external hospitals. Overall cohort totals and subtype label counts are reported in Appendix Table A.3. Detailed per-fold counts for the development pool are provided in Appendix Table A.4.

In summary, the same hospital partitions were used across tasks to ensure comparability: the EBV task used all 2101 cases, whereas the subtype task used the subset of 1560 cases belonging to NS/MC/NLPHL, preserving the original train/validation folds and hold-out hospitals while reducing per-split case counts accordingly.

To address the clinically relevant distinction between NLPHL and cHL, we additionally defined a binary classification task by merging the NS and MC categories into a single cHL class, yielding a binary NLPHL-versus-cHL label set. The same hospital-preserving CV splits and external hold-out cohort were used as for the three-class subtype task.

Image segmentation and patching

To handle WSIs with gigapixel dimensions,43, 45, 46 we used a custom-developed method to: (i) isolate background at low resolution and (ii) extract fixed-size regions for downstream modelling. Tissue localization began by generating a coarse segmentation mask from a downsampled thumbnail (on the order of a few hundred pixels per side), leveraging RGB intensity contrast between tissue and background. The resulting mask was then resized to the target extraction scale for patch extraction.

We adopted a HIPT-style hierarchical representation to retain spatial context across scales (patch → region → slide) while remaining computationally feasible for gigapixel WSIs. To align with the HIPT39 encoder stack, we extracted non-overlapping 4096×4096 pixel regions at 20× (0.45μm/pixel), retaining only regions intersecting the tissue mask. Rather than pre-extracting isolated 256×256 pixel patches and re-grouping them, each 4096×4096 region was deterministically partitioned into a 16×16 grid of 256×256 sub-patches. For a slide with M regions, this yields an array of shape M2562563; after embedding the 256×256 tiles with the patch-level encoder, we obtain M2561024 features that feed directly into the region-level Transformer. Segmentation hyperparameters (thumbnail size, histogram binning, and intensity cutoffs) were tuned by visual inspection. The workflow was optimized for efficient processing of terabyte-scale WSIs by applying lightweight operations on low-resolution data parallelizing execution, making disk I/O the main performance constraint.

We did not apply stain normalization before feature extraction, motivated by recent evidence that sufficiently pretrained foundation models are robust to stain variability with minimal impact on downstream accuracy.47 For downstream weakly supervised learning, all WSIs from a patient were grouped into a patient-level “WSI bag,” preserving region coordinates and linked to the corresponding EBV and subtype labels used to train the slide-level aggregator.

Hierarchical Vision Transformers

Gigapixel histopathology slides exhibit a natural hierarchy of visual patterns across spatial scales. At a fixed magnification, the pixel spacing is constant (approximately 0.5μm per pixel at 20×), so cell morphology, local cell–cell interactions, and broader tissue architecture appear at predictable physical scales. The HIPT39 exploits this structure by decomposing each WSI into nested windows: 16×16 “cell” tiles, 256×256 “patch” windows, and 4096×4096 “region” tiles. The model then aggregates information bottom-up using Transformers at each level, enabling multi-scale reasoning while avoiding the mixing of unrelated magnifications. Fig. 1 illustrates the hierarchy used in this study.

Fig. 1.

Fig. 1

Hierarchical Vision Transformer workflow for WSI classification. Slides are decomposed at 20× into 4096×4096 regions, each represented as a 16×16 grid of 256×256 patches. Patch-level representations are extracted with the frozen UNI encoder (1024-dimensional CLS embeddings). These patch tokens are aggregated by a region-level Transformer (ViT4096−256) into one 192-dimensional region embedding per region, and region embeddings are subsequently aggregated by a lightweight slide-level module (ViTWSI−4096) with attention pooling to form a slide embedding. The slide-level module and classifier head were trained separately per task (EBV status and histological subtype), yielding task-specific probability outputs. The illustrated WSI is shown for visualization only and is not derived from the study cohort. EBV = Epstein-Barr virus; NS = nodular sclerosis; MC = mixed cellularity; NLPHL = nodular lymphocyte-predominant Hodgkin lymphoma.

Notation

Let xWSI denote a WSI. After tissue segmentation and tiling, each slide is represented as a set of M non-overlapping regions rkk=1M of size 4096×4096 pixels. Each region rk is subdivided into a 16×16 grid of 256×256 patches pk,jj=1256. In the original HIPT formulation, each 256×256 patch can be further tokenized into 256 non-overlapping 16×16 tiles, yielding a sequence of 256 tokens that is summarized by a learnable class token (CLS). We adopt the same hierarchical aggregation scheme, but in our implementation the patch-level content is represented by a pretrained foundation model embedding (UNI; see Training section) rather than a RGB ViT256−16.

Original HIPT hierarchy (for context)

HIPT stacks three Transformer modules. At the patch level, ViT256−16 aggregates 16×16 tiles within a 256×256 patch and outputs a patch summary token CLS256j. At the region level, ViT4096−256 aggregates the 256 patch summaries within a 4096×4096 region to produce a region summary token CLS4096k. Finally, a slide-level module ViTWSI−4096 aggregates the M region-level tokens to form a single slide representation for classification. This hierarchy may be written as:

CLS256j=ViT256−16x16ii=1256,CLS4096k=ViT4096−256CLS256jj=1256,y^=ViTWSI−4096CLS4096kk=1M,

where x16i denotes embedded 16×16 tile tokens within a patch, j indexes patches within a region, and k indexes regions within the WSI (with M regions per slide). Here, y^ denotes slide-level logits. Notably, both the patch- and region-level Transformers operate on fixed-length sequences of 256 tokens, keeping attention complexity bounded at those stages.

Implementation in this study (UNI → region-level ViT → slide-level ViT)

In our pipeline, the patch-level encoder is replaced by UNI,48 which maps each 256×256 patch to a 1024-dimensional embedding ek,j∈R1024 (CLS token of UNI). These patch embeddings serve as the 256 input tokens for the region-level Transformer. UNI was used as-is and kept frozen (no additional pretraining or fine-tuning). For each region k, the set of embeddings ek,jj=1256 can be arranged into a 16×16×1024 feature grid. We denote this region encoder by gθ· (ViT4096−256), which was trained in our study to output a single region token zk∈R192 summarizing region context. The slide-level aggregator hψ· (ViTWSI−4096) was then trained on slide-level labels and consumes the variable-length sequence zkk=1M to output slide-level logits for EBV status or histological subtype:

zk=gθek,jj=1256,zk∈R192,y^=hψzkk=1M.

Overall, this hierarchy enables the model to integrate local cellular context (encoded in patch embeddings), meso-scale regional patterns (via the region Transformer), and slide-level heterogeneity (via the slide aggregator) within a single, context-aware representation learned from WSIs.

Attention-based multiple-instance learning baseline

To assess whether the hierarchical design provided an empirical advantage on this dataset, we additionally implemented a standard ABMIL baseline.41 The comparison was designed to be as direct as possible: the ABMIL model used the same patient-level splits, the same external hold-out hospitals, and the same pretrained UNI patch embeddings as the HIPT pipeline.

Concretely, in the HIPT pipeline each slide was represented as a set of M regions, where each region contained 256 UNI embeddings ek,j∈R1024 extracted from 256×256 patches (k=1,…,M, j=1,…,256). For the ABMIL baseline, we flattened this hierarchical representation into a single bag of patch-level embeddings per slide:

Bslide=enn=1N,N=M×256,

where each en∈R1024 denotes one UNI patch embedding from the slide. Thus, unlike HIPT, ABMIL does not explicitly model intermediate region structure and instead treats the slide as an unordered bag of embedded patches.

Each embedding en was first transformed by a multilayer perceptron into an instance representation vn∈R256. A learned attention function then assigned a scalar score to each instance representation, and the corresponding attention weights were normalized across the bag:

αn=expavn∑m=1Nexpavm,

where a· denotes the attention branch of the model. The slide-level bag representation was then computed as a weighted sum of instance features:

vbag=∑n=1Nαnvn.

This bag-level representation was passed to a final classifier head to predict either EBV status (2 classes) or histological subtype (3 classes).

To maintain comparability with the HIPT experiments, we re-used the same training/validation splits and external hold-out cohort, and kept the optimization setup closely aligned where possible. In particular, the ABMIL baseline used the same learning rate, weight decay, class-balancing strategy, and task-specific training schedule as the slide-level HIPT classifier.

Training

We used a three-stage HIPT pipeline comprising: (i) a frozen patch-level encoder, (ii) a self-supervised region-level encoder, and (iii) a supervised slide-level aggregator trained separately for each task. All representation learning, hyperparameter tuning, and model selection were restricted to the development hospitals; the five hold-out hospitals were not used during region pretraining, slide-level training, or tuning.

Patch-level encoder (frozen)

Patch embeddings were extracted with the UNI pathology foundation model,48 a self-supervised Vision Transformer pretrained on >100 million H&E patches from more than 100,000 WSIs across diverse tissue types. Rather than retraining or fine-tuning the patch-level encoder on our cohort, we used UNI as a fixed feature extractor because it had been pretrained on a substantially larger and more diverse histopathology dataset than was available in our study. We therefore considered freezing the patch encoder a pragmatic design choice that leveraged a strong general-purpose pathology representation while focusing task-specific learning on the region- and slide-level modules. Each 256×256 patch pk,j yielded a 1024-dimensional embedding ek,j∈R1024 (CLS token), which served as the patch token within the hierarchy (Hierarchical Vision Transformers section).

Region-level encoder (self-supervised DINO v1)

We trained the region-level Transformer gθ (ViT4096−256; n=6 layers, h=6 heads, d=192) on UNI feature grids using DINO v1-style student–teacher self-distillation.49 For each 4096×4096 region rk, the set of patch embeddings ek,jj=1256 was arranged into a 16×16×1024 grid and spatially cropped using a multicrop strategy: 2 “global” crops of size 14×14 (196 tokens) and 8 “local” crops of size 6×6 (36 tokens), each crop retaining the 1024 feature channels. Let G and L denote the sets of global and local crops, respectively. The student network produces a probability vector ps· and the teacher produces pt·; training minimized the cross-entropy between teacher predictions on global crops and student predictions across all other crops:

LDINO=∑v∈G∑u∈G∪L,u≠vHptvpsu.

Here H·· denotes cross-entropy and v,u index multicrop views of the same region feature grid. Region-level pretraining used AdamW50 with per-GPU batch size 256 and data-parallel training. We trained for 100 epochs with a 10-epoch linear warm-up to a base learning rate of 5×10−4 followed by cosine decay to 10−6. Weight decay followed a cosine schedule from 0.04 to 0.4, teacher momentum was scheduled from 0.996 toward 1.0, and teacher temperature was 0.04. After pretraining, each region rk was mapped to a single 192-dimensional region token zk, yielding an M192 sequence per WSI.

Slide-level encoder (supervised) and model selection

For slide-level prediction, we trained a lightweight aggregator hψ (ViTWSI−4096) on sequences of region tokens zkk=1M (Hierarchical Vision Transformers section). Before final training, we optimized the slide-level configuration on the EBV task using 5-fold, hospital-disjoint CV with Optuna51 (TPE sampler with Hyperband pruning) for 1000 trials and up to 30 epochs per trial. The objective was the mean across folds of the maximum validation area under the receiver operating characteristic curve (ROC–AUC) attained over training epochs. The search space included learning rate, weight decay, Transformer width, number of heads, number of layers, and dropout rates. The selected configuration was reused unchanged for the three-class subtype task. For visualizations of the hyperparameter optimization process, see Appendix Fig. E.1.

Using the selected hyperparameters, the final slide-level model applied a token-wise projection MLP to each region token, followed by a single-layer Transformer encoder with 2 attention heads and a feedforward dimension of 256 operating over the sequence of region tokens. A gated ABMIL pooling module then produced a slide representation as a learned weighted sum of region features, which was passed through a post-pooling projection MLP and a final linear classifier head (2 outputs for EBV; 3 for subtype). Dropout was applied at four points: in the token-wise projection MLP (rate 0.5), within the Transformer encoder layer (rate 0.0), in the gated-attention pooling module (rate 0.0), and in the post-pooling projection MLP (rate 0.15). We trained with AdamW,50 batch size 1, and class-weighted cross-entropy for 50 epochs per CV fold (hospital-disjoint folds). The learning rate was 1.0578×10−5 and weight decay was 3.0048×10−4. To address class imbalance, we applied square-root reweighting of class frequencies anchored to the minority class. Within each fold, the checkpoint with the best validation ROC–AUC (on the hold-out validation hospitals) was retained. For inference, the 5-fold-specific models were ensembled by averaging predicted probabilities.

For the ABMIL baseline, training was performed separately for the EBV and subtype tasks using the same hospital-preserving splits. The model operated directly on frozen UNI patch embeddings and was trained end-to-end at the slide level with AdamW,50 batch size 1, and class-weighted cross-entropy, using the same learning rate (1.0578×10−5), weight decay (3.0048×10−4), and square-root class reweighting strategy as in the HIPT slide-level experiments. The feature-processing block preceding attention consisted of three fully connected layers with hidden dimension 256, each followed by a LeakyReLU activation and dropout (rate 0.25). The attention branch consisted of two fully connected layers with attention hidden dimension 256, tanh activation, and dropout (rate 0.25), followed by a softmax operation over all instances in the bag. The resulting bag-level representation was passed to a classifier head producing either 2 output logits for EBV prediction or 3 output logits for subtype prediction. Models were trained for up to 50 epochs per fold, and the checkpoint with the best validation ROC–AUC was retained. As in the HIPT analysis, 5-fold-specific models were ensembled at inference time by averaging predicted probabilities.

For the binary NLPHL-versus-cHL task, both HIPT and ABMIL were trained using the same optimization settings, class-balancing strategy, and model selection protocol as described above for the three-class subtype task, with the sole difference being the binary label definition.

Model calibration, threshold optimization, and evaluation

Data partitions and external validation

Models were trained with 5-fold CV using patient-level splits that preserved hospital provenance. In each fold, hospitals assigned to validation were disjoint from those used for training. External evaluation was performed on an independent hold-out cohort comprising hospitals that were fully disjoint from the development pool (see the Hospital-preserving partitioning and CV section). All hyperparameter selection, post hoc calibration, and decision-threshold optimization used only CV training/validation data from the development hospitals to prevent leakage into the hold-out cohort.

Temperature scaling (probability calibration)

Because neural-network softmax outputs are typically miscalibrated, probability calibration was performed via temperature scaling. For each CV fold i, we used the validation-set logits zi∈RNi×C and corresponding labels yi, where Ni is the number of validation cases in fold i and yn∈1…C denotes the true class index for case n. A scalar temperature Ti>0 was learned by minimizing the negative log-likelihood (NLL):

T^i=argminT>0LNLLT=−1Ni∑n=1Nilogexpzn,yni/T∑c=1Cexpzn,ci/T.

Calibrated class probabilities were then obtained as p^n,ci=softmaxzni/T^ic. Per-fold calibration quality was summariszed using the top-label Expected Calibration Error (ECE; 15 bins) and the multiclass Brier score.

Post hoc decision rule and per-class thresholds

To mitigate class imbalance at decision time, a per-class threshold vector τ=τ1…τC∈01C was learned and applied with a margin-based selection rule. For a calibrated probability vector p^∈01C, let the qualified set be Q=c∈1…C:p^c≥τc. Predicted class y^ was assigned as:

y^=argmaxc∈Qp^c−τc,ifQ≠∅,argmaxcp^c,otherwise.

Thresholds were optimized to maximize macro-F1 on validation data under this same decision rule using a coordinate-descent search over a fixed grid τc∈0.010.02…0.99. Concretely, within each fold i, we first calibrated probabilities with T^i, then obtained a fold-specific threshold vector τ^i by maximizing macro-F1 on that fold's validation set.

Pooled operating point

To obtain a single fixed operating point, calibrated validation probabilities from all CV folds were concatenated p^1…p^5, and a pooled threshold vector τ^ was refit by maximizing macro-F1 under the margin rule on the union of CV validation data.

Ensembling and application to the hold-out cohort

On the hold-out test set, five independently trained models produced logits zm∈RNtest×C (m=1,…,5), where Ntest is the number of cases in the hold-out cohort. Each model's logits were temperature-scaled with its corresponding T^m and converted to probabilities: p^m=softmaxzm/T^m. Ensemble probabilities were computed as the arithmetic mean, p-=15∑m=15p^m, and the pooled threshold vector τ^ was applied with the margin-based rule above to produce top-1 predictions.

Importantly, the temperature parameters and pooled decision thresholds were estimated exclusively from CV predictions within the development cohort and were then applied unchanged to the independent hold-out cohort. Thus, calibration in this study was not performed separately on the external test cohort, but was treated as a fixed part of the prediction pipeline learned on development data. In what follows, we refer to this combination of temperature scaling and per-class margin-based thresholds as the calibrated, threshold-tuned model (ensemble). As a baseline, we also evaluated the uncalibrated five-model ensemble using simple argmax over class probabilities (fixed 0.5 threshold in the binary setting); we refer to this as the uncalibrated argmax baseline.

Evaluation metrics and uncertainty

Performance was summarized using accuracy, F1, precision, recall (sensitivity), specificity, one-vs-rest ROC–AUC, precision–recall AUC (PR–AUC), and Cohen's κ. For the multiclass (subtype) task, label-based metrics were macro-averaged over classes and class-wise top-1 precision/recall/F1 and specificity were additionally reported; for the binary (EBV) task, precision/recall/F1 refer to the positive class and specificity to the negative class. For CV experiments, metrics were computed on each fold's validation set and summarized as the mean across folds with 95% confidence intervals (CIs) computed from the fold-wise standard error using a t-distribution. For the external test set, uncertainty was quantified via nonparametric bootstrap with replacement (10,000 replicates), reporting percentile 95% CIs (2.5th–97.5th percentiles). Calibration on the external set was additionally reported using top-label ECE and the (multiclass) Brier score computed on the ensemble probabilities before and after temperature scaling.

Implementation details

Temperature scaling used a one-dimensional search minimizing NLL (convex in T); ECE used 15 equally spaced bins. Threshold search employed a fixed grid 0.010.99 per class with a small number of coordinate-descent passes, which was found sufficient for stable macro-F1 optimization. All calibration and threshold fitting were confined to CV validation data; the external test set was never used for model selection or tuning.

Results

EBV prediction

Cross-validation performance

Across five hospital-preserving folds, temperature scaling followed by a pooled F1-optimal threshold (learned on calibrated validation predictions) yielded a sensitivity-oriented operating point with strong overall performance (Appendix Table B.1). Discrimination (ROC–AUC) was stable, whereas probability alignment improved on the pooled CV validation set (top-label ECE 0.0354→0.0257; Brier 0.3737→0.3734). The pooled positive-class decision threshold was τEBV=0.330. Per-fold temperatures and calibration diagnostics are provided in Appendix Table B.2; per-fold confusion matrices appear in Appendix Table B.2. For completeness, a summary of the uncalibrated argmax baseline is reported in Appendix Table B.4.

Calibration and threshold tuning increased recall (sensitivity) and F1 with a compensatory reduction in specificity, consistent with the intended, recall-oriented operating point.

External test performance on the hold-out hospitals

External evaluation was performed on the independent hold-out cohort (N=458; hospitals Glo, Hol, Ode, Ran, and Ålb). For inference, logits from each of the five CV models were temperature-scaled using the corresponding per-fold temperature Ti learned on that fold's CV-validation set; calibrated probabilities were then averaged across models. The single positive-class threshold τEBV=0.330 (estimated on pooled, calibrated CV-validation predictions; see the CV performance section under EBV prediction) was fixed and applied to the ensemble probabilities to generate hard labels.

On the hold-out cohort, the model achieved ROC–AUC =0.726 (95% CI [0.677, 0.774]) and PR–AUC =0.570 (95% CI [0.494, 0.658]) and recall =0.735 (95% CI [0.665, 0.801]) at the fixed operating point τEBV=0.330 (Table 4). Fig. 2 shows the ROC and PR curves and the corresponding confusion matrix for this operating point. Calibration on the external cohort yielded top-label ECE =0.0447 and Brier score =0.1965.

Table 4.

External (hold-out) performance for binary Epstein-Barr virus (EBV) prediction using the calibrated, threshold-tuned ensemble. Metrics were computed on the independent hold-out cohort (five hospitals), with 95% confidence intervals (CIs) obtained via bootstrapping.

Metric Mean 95% CI
ROC–AUC 0.726 [0.677, 0.774]
PR–AUC 0.570 [0.494, 0.658]
Accuracy 0.646 [0.603, 0.690]
F1 0.595 [0.536, 0.649]
Recall 0.735 [0.665, 0.801]
Specificity 0.598 [0.542, 0.653]
Precision 0.500 [0.436, 0.563]
Cohen's κ 0.301 [0.218, 0.381]
Fig. 2.

Fig. 2

(a) ROC curve, (b) precision–recall curve, and (c) confusion matrix for EBV prediction on the external (hold-out) cohort at the fixed operating point τEBV=0.330, using the calibrated, threshold-tuned ensemble. Shaded regions indicate bootstrap 95% (CIs); confusion-matrix cells show counts and row-normalized percentages.

Overall, temperature scaling with a CV-derived decision threshold increased recall and F1 on the external cohort while reducing specificity and accuracy. For completeness, the uncalibrated argmax baseline (fixed 0.5 threshold) is reported in Appendix Table B.5, with its confusion matrix shown in Appendix Fig. B.1; ROC/PR curves were identical.

EBV prediction within major histological subtype strata

Because EBV prevalence differed across histological subtypes in our cohort (Table 2), we performed a post hoc stratified analysis on the external hold-out cohort to examine whether the EBV classifier retained discriminatory ability within major subtype strata. Using the same calibrated ensemble predictions and fixed threshold τEBV=0.330 as in the primary EBV analysis, we evaluated EBV prediction separately in NS and MC.

Within NS (N=264; EBV +/EBV−=76/188), the calibrated model achieved ROC–AUC =0.725 (95% CI [0.657, 0.792]) and PR–AUC =0.545 (95% CI [0.438, 0.659]). Using the pooled threshold of 0.330, sensitivity was 0.658 (95% CI [0.549, 0.762]) and specificity was 0.644 (95% CI [0.575, 0.712]). Within MC (N=73; EBV +/EBV−=43/30), the calibrated model achieved ROC–AUC =0.666 (95% CI [0.524, 0.798]) and PR–AUC =0.665 (95% CI [0.536, 0.836]). Using the same pooled threshold, sensitivity was 0.907 (95% CI [0.811, 0.978]) and specificity was 0.333 (95% CI [0.167, 0.514]).

These subgroup analyses indicate that EBV prediction was not solely driven by between-subtype differences in prevalence, as the classifier retained above-chance discriminatory ability even when evaluation was restricted to a single histological subtype. The differing operating characteristics across NS and MC suggest that subtype-associated morphology likely contributes to the learned EBV signal, but does not fully account for it.

Histological subtype prediction

Cross-validation performance

Using the three most common immunological/histological categories (NS, MC, and NLPHL) with hospital-preserving 5-fold CV, performance on the pooled CV validation predictions reached mean Accuracy =0.796 (95% CI [0.740, 0.853]), macro-F1 =0.723 (95% CI [0.665, 0.781]), macro-Recall =0.733 (95% CI [0.666, 0.801]), and macro-Precision =0.735 (95% CI [0.662, 0.807]) (Appendix Table C.1). Discrimination was high, with ROC–AUC =0.877 (95% CI [0.837, 0.918]) and macro PR–AUC =0.737 (95% CI [0.642, 0.832]). On pooled CV validation probabilities, temperature scaling yielded a small decrease in Brier score (0.3156 → 0.3138) and a slight increase in top-label ECE (0.0288 → 0.0312).

The pooled per-class decision thresholds (learned on concatenated calibrated CV validation predictions using the margin rule; macro-F1 objective) were: NS =0.560, MC =0.290, and NLPHL =0.480. Per-fold calibration diagnostics and confusion-matrix patterns are provided in Appendix Tables C.2 and C.3, together with class-wise CV metrics in Appendix Tables C.4 and C.5. For completeness, the uncalibrated argmax baseline summary metrics are reported in Appendix Table C.6.

Post hoc calibration with margin-based thresholding yielded a balanced operating point across classes, with strong macro-F1, precision, and recall while maintaining high ranking performance (ROC–AUC/PR–AUC).

External test performance on the hold-out hospitals

External evaluation was performed on the independent hold-out cohort (N=359; hospitals Glo, Hol, Ode, Ran, and Ålb). For inference, each of the five CV models produced per-case logits, which were temperature-scaled using fold-specific temperatures Ti fit on the corresponding CV-validation splits. Calibrated probabilities were averaged across models to form an ensemble. A single vector of per-class thresholds (learned on the concatenated, calibrated CV-validation predictions under the margin rule) was held fixed and applied to the ensemble probabilities to generate hard labels (falling back to global argmax if no class exceeded its threshold).

On the hold-out cohort, performance reached accuracy =0.719 (95% CI [0.671, 0.763]) with F1 =0.562 (95% CI [0.475, 0.640]) (Table 5). Discrimination remained high with ROC–AUC =0.842 (95% CI [0.806, 0.877]) and PR–AUC =0.629 (95% CI [0.559, 0.714]). Calibration diagnostics on the hold-out ensemble probabilities were similar to CV, with ECE =0.0552 and Brier score =0.3333.

Table 5.

External (hold-out) performance for three-class subtype prediction (NS/MC/NLPHL) using the calibrated, threshold-tuned ensemble. Metrics were macro-averaged over subtypes and computed on the independent hold-out cohort, with 95% CIs obtained via bootstrapping.

Metric. Mean 95% CI
ROC–AUC 0.842 [0.806, 0.877]
PR–AUC 0.629 [0.559, 0.714]
Accuracy 0.719 [0.671, 0.763]
F1 0.562 [0.475, 0.640]
Recall 0.545 [0.469, 0.625]
Specificity 0.787 [0.752, 0.823]
Precision 0.608 [0.503, 0.709]
Cohen's κ 0.336 [0.235, 0.432]

Fig. 3 summarizes one-vs-rest ROC and PR curves and the corresponding confusion matrix for the external cohort. Most residual errors occurred between NS and MC, whereas NLPHL predictions were comparatively sparse. For completeness, the uncalibrated argmax baseline summary metrics and confusion matrix are reported in Appendix Table C.7 and Fig. C.1; per-class hold-out metrics for both strategies are also provided in Appendix Tables C.8–C.9.

Fig. 3.

Fig. 3

(a) One-vs-rest ROC curves, (b) one-vs-rest precision–recall curves, and (c) confusion matrix for three-class subtype prediction on the external (hold-out) cohort at the fixed operating points defined by the pooled class-specific thresholds, using the calibrated, threshold-tuned ensemble. Shaded regions indicate bootstrap 95% (CIs); confusion-matrix cells show counts and row-normalized percentages. NS = nodular sclerosis; MC = mixed cellularity; NLPHL = nodular lymphocyte-predominant Hodgkin lymphoma.

Unlike EBV (see External test performance on the hold-out hospitals section under EBV prediction), calibration and threshold tuning did not yield measurable gains on the subtype classification task; the dominant off-diagonal mass remained NS ↔ MC, consistent with the class-wise trends observed in CV.

Attention-based MIL baseline: Results and architectural comparison

External hold-out performance

Table 6 summarizes the external hold-out performance of the ABMIL baseline for both EBV prediction and three-class subtype classification, using the calibrated, threshold-tuned ensemble.

Table 6.

ABMIL baseline: external hold-out performance for EBV prediction and three-class subtype classification using the calibrated, threshold-tuned ensemble. The calibrated EBV threshold was τEBV=0.320; per-class subtype thresholds were NS: 0.520, MC: 0.340, NLPHL: 0.400. Values are reported with 95% bootstrap confidence intervals.

EBV prediction
Three-class subtype prediction
Metric Value 95% CI Value 95% CI
ROC–AUC 0.763 [0.715, 0.810] 0.890 [0.860, 0.917]
PR–AUC 0.655 [0.578, 0.735] 0.666 [0.600, 0.761]
Accuracy 0.677 [0.633, 0.718] 0.763 [0.719, 0.805]
F1 0.635 [0.578, 0.687] 0.685 [0.611, 0.748]
Recall 0.796 [0.732, 0.856] 0.720 [0.642, 0.793]
Specificity 0.611 [0.556, 0.667] 0.849 [0.816, 0.880]
Precision 0.529 [0.466, 0.590] 0.662 [0.588, 0.734]
Cohen's κ 0.366 [0.287, 0.444] 0.484 [0.389, 0.570]

For EBV prediction (N=458), ABMIL achieved ROC–AUC 0.763 (95% CI [0.715, 0.810]) and PR–AUC 0.655 (95% CI [0.578, 0.735]). At the calibrated threshold of 0.320, recall reached 0.796 (95% CI [0.732, 0.856]) with specificity 0.611 (95% CI [0.556, 0.667]) and F1 0.635 (95% CI [0.578, 0.687]).

For three-class subtype prediction (N=359), ABMIL achieved ROC–AUC 0.890 (95% CI [0.860, 0.917]) and PR–AUC 0.666 (95% CI [0.600, 0.761]). Using the calibrated per-class thresholds, macro-recall was 0.720 (95% CI [0.642, 0.793]), macro-specificity 0.849 (95% CI [0.816, 0.880]), and macro-F1 0.685 (95% CI [0.611, 0.748]).

ROC curves, PR curves, and confusion matrices for both tasks are provided in Appendix Fig. D.1.

Comparison with HIPT

Table 7 provides a direct side-by-side comparison of HIPT and ABMIL on the external hold-out cohort. On the external EBV cohort, ABMIL achieved higher ROC–AUC (0.763 vs. 0.726), accuracy (0.677 vs. 0.646), and F1 (0.635 vs. 0.595) than HIPT. A similar pattern was observed for three-class subtype prediction, where ABMIL outperformed HIPT in ROC–AUC (0.890 vs. 0.842), accuracy (0.763 vs. 0.719), and macro-F1 (0.685 vs. 0.562). Thus, on this dataset, the simpler ABMIL baseline yielded stronger predictive performance than the more complex hierarchical model across both tasks.

Table 7.

Comparison of the calibrated, threshold-tuned HIPT and ABMIL models on the independent external hold-out cohort. For subtype prediction, F1 denotes macro-F1. 95% CIs were obtained by bootstrapping.

Task. Model ROC–AUC Accuracy F1
EBV HIPT 0.726 [0.677, 0.774] 0.646 [0.603, 0.690] 0.595 [0.536, 0.649]
EBV ABMIL 0.763 [0.715, 0.810] 0.677 [0.633, 0.718] 0.635 [0.578, 0.687]
Subtype HIPT 0.842 [0.806, 0.877] 0.719 [0.671, 0.763] 0.562 [0.475, 0.640]
Subtype ABMIL 0.890 [0.860, 0.917] 0.763 [0.719, 0.805] 0.685 [0.611, 0.748]

Two-sided permutation tests on the external hold-out predictions showed that, for both EBV prediction and subtype classification, the differences between ABMIL and HIPT were statistically significant for ROC–AUC and F1, but not for accuracy (Appendix Table D.2). The corresponding uncalibrated argmax comparison is provided in Appendix Table D.1.

Binary NLPHL versus classical HL distinction

To directly address the clinically and biologically relevant distinction between NLPHL and cHL (cHL = NS + MC), we trained and evaluated dedicated binary classifiers using both the HIPT and ABMIL architectures on the same hospital-preserving splits and external hold-out cohort as the three-class subtype task.

Table 8 summarizes the external hold-out performance of both models using the calibrated, threshold-tuned evaluation. Both architectures achieved high discrimination, with ROC–AUC values of 0.949 (95% CI [0.921, 0.972]) for HIPT and 0.955 (95% CI [0.928, 0.977]) for ABMIL. However, the low PR–AUC values (0.473 and 0.486, respectively) and wide confidence intervals reflect the substantial class imbalance in the hold-out cohort, which contained only 22 NLPHL cases among 359 subtype-evaluable patients.

Table 8.

Binary NLPHL-versus-classical-HL (cHL = NS + MC) prediction on the external hold-out cohort using the calibrated, threshold-tuned ensembles. Values are reported with 95% bootstrap confidence intervals. The hold-out cohort contained 337 cHL and 22 NLPHL cases.

Metric HIPT ABMIL
ROC–AUC 0.949 [0.921, 0.972] 0.955 [0.928, 0.977]
PR–AUC 0.473 [0.306, 0.700] 0.486 [0.325, 0.723]
Accuracy 0.942 [0.916, 0.964] 0.947 [0.922, 0.969]
F1 0.323 [0.095, 0.529] 0.486 [0.261, 0.667]
Recall 0.227 [0.059, 0.417] 0.409 [0.200, 0.625]
Specificity 0.988 [0.976, 0.997] 0.982 [0.967, 0.994]
Precision 0.556 [0.200, 0.875] 0.600 [0.333, 0.846]
Cohen's κ 0.298 [0.074, 0.508] 0.460 [0.235, 0.650]

At the calibrated operating points, HIPT correctly identified 5 of 22 true NLPHL cases (recall 0.227) with 4 false positives among 337 cHL cases (specificity 0.988), whereas ABMIL identified 9 of 22 NLPHL cases (recall 0.409) with 6 false positives (specificity 0.982). The higher recall of ABMIL is consistent with the pattern observed in the three class subtype analysis, where ABMIL also outperformed HIPT. Uncalibrated argmax results were qualitatively similar for both models, with ABMIL again showing stronger NLPHL detection (recall 0.500 vs. 0.318 for HIPT).

Discussion

In this study, we evaluated a hierarchical Vision Transformer pipeline for EBV status prediction and histological subtype classification in HL, and compared it against a simpler ABMIL41 baseline using the same UNI patch embeddings and hospital-preserving data partitions. We chose this hierarchical pipeline to better capture multiscale context and spatial dependencies in WSIs, while also evaluating a standard ABMIL baseline to benchmark the added value of hierarchical modelling. Both models demonstrated good performance with potential for clinical decision-support, though further improvements in accuracy and robustness are needed (Table 4, Table 5).

The choice of HIPT as the primary architecture was motivated by evidence that hierarchical and spatially aware aggregation methods have shown strong performance across multiple slide-level cancer subtyping and survival prediction tasks.39 Moreover, HL presents signals at multiple physical scales—from individual malignant cells to the broader composition of the reactive microenvironment—making a multiscale architecture a biologically principled starting point. The ABMIL comparison was feasible without additional feature extraction because the first-level UNI patch embeddings, already computed for the HIPT pipeline, could be directly aggregated by attention-based pooling, effectively bypassing the region- and slide-level Transformer stages.

An important finding of this comparison was that the simpler ABMIL baseline outperformed HIPT on the external hold-out cohort for both EBV prediction and subtype classification, suggesting that explicitly modelling the patch-to-region-to-slide hierarchy did not translate into superior predictive performance in this setting. Several factors may explain this result. First, the region-level encoder in HIPT compresses 256 patch embeddings (each 1024-dimensional) from a 4096×4096 region into a single 192-dimensional region token, representing a substantial dimensionality reduction that may discard fine-grained information relevant to the prediction tasks. Second, the hierarchical architecture introduces additional trainable stages compared with ABMIL, increasing the risk of overfitting when training data are limited. In the original HIPT study,39 the lower hierarchical encoders were pretrained at pan-cancer scale, using more than 10,000 WSIs and over 400,000 extracted 4096×4096 regions for region-level pretraining. By contrast, our development cohort comprised 1952 WSIs and 98,973 extracted 4096×4096 regions, corresponding to approximately one quarter of the original region-level pretraining scale. This data limitation likely prevented the hierarchical model from fully exploiting multiscale context. Third, particularly for EBV prediction, the most informative morphological signals may reside in relatively localized regions that can be captured effectively by strong UNI patch embeddings combined with attention-based pooling, without requiring explicit spatial modelling. The same pattern was observed for subtype prediction, suggesting that data scale and representation bottlenecks may have limited the benefit of hierarchical modelling across both tasks. These observations are consistent with recent benchmarking of WSI aggregation methods, which found that spatially aware aggregation provides less additional benefit when strong domain-specific foundation-model embeddings are used.44

We therefore interpret HIPT in this study as a biologically motivated multiscale modelling strategy whose feasibility was demonstrated, but not as an empirically superior alternative to MIL for the present dataset. These findings do not diminish the value of hierarchical architectures in general, but indicate that their advantages may only materialize with substantially larger training cohorts. In settings where cohort size is limited, strong foundation-model patch embeddings combined with attention-based aggregation can provide a competitive and computationally more efficient alternative.

It should be noted that there is known label noise in the outcome; trained human pathologists assessing HL tumors have been shown to vary significantly in their diagnostic assessments.36, 37, 38 Historical re-review studies show that ∼30% of HL cases are reclassified on expert panel review,36, 37 and EBV detection studies report interobserver κ values as low as 0.6, depending on subtype and staining method.38 The fact that the model showcases reasonable performance despite this limitation gives credence to the hypothesis that modern deep-learning architectures are capable of extracting biologically meaningful signals from routine H&E-stained lymphoma biopsies,52 and that the approach is not fundamentally limited by a lack of signal in the images.

A specific instance of label ambiguity concerns EBV-positive NLPHL cases. EBV-positivity in NLPHL is unusual, and distinguishing EBV-positivity in lymphocyte-predominant (LP) tumor cells from EBV-positive reactive cells in the background infiltrate can be difficult. In this study, these cases were retained according to the available pathological review and consensus EBV assignment. The relatively high number of apparently EBV-positive NLPHL cases in our cohort suggests that some cases may reflect ambiguity in attributing EBV-positivity to LP tumor cells rather than background cells, or uncertainty in the subtype assignment itself. As more precise reclassification was not achievable within the constraints of this study, these cases were retained according to the consensus assignment.

For EBV prediction, post hoc calibration and threshold selection shifted the operating point toward higher recall (sensitivity) on both CV and external evaluation. This led to fewer false negatives at the cost of decreased specificity, without changing discrimination. In a clinical context where missing true positive cases may be less acceptable, such a trade-off could be operationally beneficial. Nevertheless, even the calibrated models leave substantial room for improvement before they could be relied upon without human oversight. Histological subtype and EBV status are biologically related in HL, so some overlap in the morphological information relevant to each task is expected. To address the possibility that EBV prediction mainly reflected subtype-associated morphology, we evaluated the EBV classifier separately within NS and MC on the external hold-out cohort. The persistence of above-chance discrimination within both subtype strata suggests that the model is not relying exclusively on between-subtype differences, although some degree of shared morphological signal is likely.

Subtype prediction followed a similar pattern, although external performance gains were limited. Whereas calibration and threshold tuning improved balanced metrics during CV, the effect did not translate into measurable improvement on the external dataset. Persistent misclassification patterns, particularly between NS and MC, suggest that either the available images do not carry enough discriminative information or that the current modelling approach cannot fully extract it. These confusion patterns are consistent with known diagnostic difficulty in this setting36, 37, 38 and support the interpretation that the model is approaching the same decision boundary limitations that challenge human pathologists.

The dedicated binary NLPHL-versus-cHL analysis confirmed that both architectures achieve high overall discrimination for this clinically relevant distinction (ROC–AUC > 0.94), but sensitivity for the rare NLPHL class remained limited, consistent with the small number of NLPHL cases in both the training and hold-out cohorts. Reliable binary NLPHL detection will likely require substantially larger cohorts with greater NLPHL representation.

Three broad explanations may account for the performance plateau. First, current models may be capable but limited by sample size, image heterogeneity, or lack of optimization. Larger and more diverse datasets, combined with architectural or methodological advances, may yield improved results. Previous results have pointed to large performance differences when models are transferred between different health-care systems (notably between the USA and Europe), indicating that models are overfitting to the specific factors that vary between sites, including protocols and reagents.53, 54 Second, the diagnostic categories themselves may reflect historical classification rather than discrete biological entities of etiological significance or indeed of clinical relevance in the context of specific treatments.55 If the subtype labels are imperfect proxies for underlying disease mechanisms, then the task may not be fully solvable on morphology alone.56, 57 Further machine learning efforts could therefore serve not only as a mechanism for improved classification of WSIs but also as a tool to ascertain whether the currently defined diagnostic groups truly align with biological reality. Third, the models consider slide-derived information alone. Incorporating additional patient-level data such as age, sex, smoking history (a risk factor for EBV-positive HL), or genetic profiling may provide orthogonal context and help resolve ambiguous cases. We have deliberately abstained from doing so here. Our aim was to assess what a machine could learn from assessing the visible composition of the tumor microenvironment only, without clues from orthogonal context or artifacts of the slides. Such a classifier presumably would be biologically based, and hence more reliable and transportable than would be the case for a classifier using additional orthogonal information.

We also did not perform an ablation study on freezing vs retraining the patch-level encoder. Our design deliberately relied on a strong pretrained pathology foundation model and focused task-specific learning on the higher levels of the hierarchy. Although end-to-end training or retraining the patch encoder from scratch may be worth exploring in future work, this would require substantially greater computational cost and may not be advantageous in a cohort that is much smaller and less diverse than the data used for large-scale pathology foundation-model pretraining. A further limitation is that we did not perform a systematic explainability analysis of model predictions. Although standard post hoc attribution methods could in principle be applied to both hierarchical and MIL-based WSI models, robust interpretation would require evaluation across a sufficiently large number of cases together with structured expert pathological review. Moreover, the underlying slide data cannot be shared publicly, which limits the reproducibility of any such analysis. We therefore chose not to include qualitative heatmap-based interpretations in the present study in order to avoid over-interpreting a small number of examples. A more comprehensive assessment of model explainability remains an important direction for future work.

Future work should address these challenges by expanding training cohorts, incorporating multimodal inputs, and evaluating alternative prediction targets beyond conventional histological labels. Approaches that integrate morphological features with molecular and clinical information may offer more stable and biologically valid decision boundaries. Evaluation against prospective workflows will also be necessary to determine how such models perform in the hands of practicing pathologists and whether they can meaningfully enhance clinical efficiency, accuracy, or consistency. In practical deployment on a truly new source, the fixed calibration and thresholding scheme learned on development data may still be used, but local recalibration could be beneficial if well-annotated site-specific validation data are available and probability-based decisions are required.

A major strength of this study is the scale and comprehensiveness of the dataset. To our knowledge, this represents the largest collection of EBV-typed HL WSIs assembled to date, comprising 2101 cases from 23 Danish hospitals. The cohort is also population-based, reflecting nationwide case ascertainment rather than referral- or center-selected sampling. The inclusion of WSIs from multiple institutions enhances the real-world relevance of the analysis and reduces the risk of center-specific bias, whereas the use of patient-level grouping prevents leakage and ensures valid evaluation of model generalization.

Despite this, the dataset remains modest in size relative to the complexity of modern deep learning models. Larger and more diverse cohorts, particularly including international centers, a wider spectrum of histological subtypes, and greater variation in staining and scanning protocols, will likely be required to fully evaluate the potential of hierarchical Vision Transformers in this domain. Furthermore, although all cases underwent standard diagnostic review, only two pathologists contributed to the labeling. Given well-established inter-observer variability in HL classification, some diagnostic noise is likely, and this may partially limit the achievable performance ceiling for purely morphology-based models. Future studies incorporating larger training cohorts, adjudicated reference diagnoses, and additional multimodal clinical or molecular information may therefore provide a firmer basis for evaluating the true limits of automated prediction in this setting.

This study represents a proof of concept rather than a deployable diagnostic tool. The results demonstrate that both hierarchical and attention-based architectures can capture clinically meaningful patterns from routine histopathology with cross-institutional generalizability, even in HL where more than 90% of cells on a slide are non-malignant immune cells. The finding that a simpler ABMIL baseline outperformed the more complex HIPT model further underscores that model complexity must be matched to available training data, and that strong foundation-model representations can compensate for simpler aggregation strategies. Whereas performance remains insufficient for autonomous use, these findings highlight a promising direction in which computational models serve as companions to pathologist expertise, potentially advancing toward more precise and biologically grounded diagnostic approaches.

Declaration of generative AI and AI-assisted technologies in the manuscript preparation process

During the preparation of this work, the authors used ChatGPT in order to improve the readability of the manuscript. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the published article.

CRediT authorship contribution statement

All authors read and approved the final version of the manuscript.

Zsolt Bedőházi: Conceptualization, Methodology, Software, Investigation, Formal analysis, Visualization, Validation, Writing – original draft, Writing – review & editing. Zsófia Sztupinszki: Conceptualization, Methodology, Data curation, Writing – review & editing. Ragnar P. Kristjánsson: Conceptualization, Project administration, Writing – original draft, Writing – review & editing. Mikkel Werling: Conceptualization, Project administration, Writing – original draft, Writing – review & editing. Stephen Hamilton-Dutoit: Resources, Data curation, Writing – review & editing. Kristina L. Lauridsen: Resources, Data curation, Writing – review & editing. Lisa Ottander: Resources, Data curation, Writing – review & editing. Trine L. Plesner: Resources, Data curation, Writing – review & editing. Peter Hollander: Resources, Data curation, Writing – review & editing. Ingrid Glimelius: Resources, Data curation, Funding acquisition, Writing – review & editing. Lene Sjö: Resources, Data curation, Writing – review & editing. Estrid Høgdall: Resources, Data curation, Writing – review & editing. Carsten Utoft Niemann: Funding acquisition, Writing – review & editing. Klaus Rostgaard: Conceptualization, Writing – original draft, Writing – review & editing. Péter Pollner: Funding acquisition, Resources, Writing – review & editing. Henrik Hjalgrim: Conceptualization, Supervision, Funding acquisition, Resources, Writing – original draft, Writing – review & editing. István Csabai: Supervision, Funding acquisition, Resources, Writing – review & editing.

Ethics declaration

The study was approved by the Danish Scientific Committee with exemption from informed consent (H-2-2011-107) and registered with Statens Serum Institut Data Compliance (J21/00363).

Funding

This work was supported by the National Research, Development and Innovation Office of Hungary Grants 2020-1.1.2-PIACI-KFI-2021-00298 (Zs.B.) and MILAB Artificial Intelligence National Laboratory (RRF-2.3.1-21-2022-00004) (I.Cs.).

This research was funded by the Ministry of Culture and Innovation from the National Research, Development and Innovation Fund, grant (2025-1.2.1-HU-RIZONT-2025-00032, HAI-SO: Healthcare Artificial Intelligence-Driven System Optimization) within the framework of the HU-RIZONT International Excellence Research Cooperation Program (P.P.).

This research was supported by the National Research, Development, and Innovation Office of Hungary via grant NKKP-153428 HIGHLIGHT (I.Cs.).

The work was supported by grants from the Danish Cancer Society (R40-A2167), the Independent Research Fund Denmark (09-072164), the Danish Childhood Cancer Foundation (2019-5998), and the National Institutes of Health (1001CA257679-01A1) (H.H.).

The work was supported by a grant from the Danish Cancer Society (R374-A22191) (R.P.K.).

The study was supported by a grant from the Swedish Cancer Society (22 2167) (I.G.).

This work was supported by the Danish Data Science Academy, which is funded by the Novo Nordisk Foundation (NNF21SA0069429) and VILLUM FONDEN (40516) (M.W.).

Declaration of competing interest

The authors declare the following financial interests/personal relationships which may be considered as potential competing interests:

Zsolt Bedohazi reports financial support was provided by National Research, Development and Innovation Office of Hungary (Grant 2020–1.1.2-PIACI-KFI-2021-00298). Istvan Csabai reports financial support was provided by MILAB Artificial Intelligence National Laboratory (RRF-2.3.1-21-2022-00004). Istvan Csabai reports financial support was provided by National Research, Development, and Innovation Office of Hungary (Grant NKKP-153428 HIGHLIGHT). Peter Pollner reports financial support was provided by the Ministry of Culture and Innovation from the National Research, Development and Innovation Fund, grant (2025-1.2.1-HU-RIZONT-2025-00032, HAI-SO: Healthcare Artificial Intelligence-Driven System Optimization) within the framework of the HU-RIZONT International Excellence Research Cooperation Program. Henrik Hjalgrim reports financial support was provided by Danish Cancer Society (R40-A2167). Henrik Hjalgrim reports financial support was provided by Independent Research Fund Denmark (09–072164). Henrik Hjalgrim reports financial support was provided by Danish Childhood Cancer Foundation (2019–5998). Henrik Hjalgrim reports financial support was provided by National Institutes of Health (1001CA257679-01A1). Ragnar P. Kristjansson reports financial support was provided by Danish Cancer Society (R374-A22191). Ingrid Glimelius reports financial support was provided by Swedish Cancer Society (222167). Mikkel Werling reports financial support was provided by Danish Data Science Academy - Novo Nordisk Foundation (NNF21SA0069429) and VILLUM FONDEN (40516). Carsten Utoft Niemann reports a relationship with Abbvie that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with AstraZeneca that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Janssen that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Beigene that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Genmab that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Octapharma that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Takeda that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with MSD that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Lilly that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with CSL Behring that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Galapagos that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Synamics that includes: consulting or advisory and funding grants. Carsten Utoft Niemann reports a relationship with Novo Nordisk Foundation that includes: consulting or advisory and funding grants. If there are other authors, they declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this article.

Contributor Information

Zsolt Bedőházi, Email: zsoltbedohazi@inf.elte.hu.

Henrik Hjalgrim, Email: hhj@cancer.dk.

Appendix A. Cohort tables

A.1. EBV task cohorts

Table A.1.

EBV prediction task: Overall cohort sizes and Epstein-Barr virus (EBV) label counts for the development (CV) pool and the independent external hold-out cohort (five hospitals).

EBV prediction cohort N(cases) EBV (0/1)
Development (CV) 1643 1095 / 548
Hold-out (external) 458 296 / 162

Table A.2.

EBV prediction task: per-fold cohort composition in the development pool under hospital-preserving 5-fold cross-validation. Overall totals for the development pool and the external hold-out cohort are given in Table A.1.

Fold Training set
Validation set
Total
N EBV (0/1) N EBV (0/1) N
1 1302 880/422 341 215/126 1643
2 1326 880/446 317 215/102 1643
3 1308 874/434 335 221/114 1643
4 1318 871/447 325 224/101 1643
5 1318 875/443 325 220/105 1643

A.2. Subtype task cohorts

Table A.3.

Subtype prediction task (three-class NS/MC/NLPHL): overall cohort sizes and subtype label counts for the development (CV) pool and the independent external hold-out cohort (five hospitals). NS = nodular sclerosis; MC = mixed cellularity; NLPHL = nodular lymphocyte-predominant Hodgkin lymphoma.

Subtype prediction cohort N (cases) NS/MC/NLPHL
Development (CV) 1201 825 / 285 / 91
Hold-out (external) 359 264 / 73 / 22

Table A.4.

Subtype prediction task (three-class NS/MC/NLPHL): per-fold cohort composition in the development pool under hospital-preserving 5-fold cross-validation (same hospital partitions as the EBV task after excluding the two rarest subtypes). Overall totals for the development pool and the external hold-out cohort are given in Table A.3.

Fold Training set
Validation set
Total
N NS/MC/NLPHL N NS/MC/NLPHL N
1 956 661/224/71 245 164/61/20 1201
2 971 647/247/77 230 178/38/14 1201
3 937 659/207/71 264 166/78/20 1201
4 994 686/233/75 207 139/52/16 1201
5 946 647/229/70 255 178/56/21 1201

Appendix B. EBV task: Additional results

This section provides additional quantitative results for the EBV prediction task: CV performance of the calibrated model, temperature-scaling diagnostics, and per-fold confusion matrices, and baseline results for the uncalibrated argmax ensemble on both CV folds and the external hold-out cohort.

B.1. Cross-validation performance (calibrated model)

Table B.1.

CV performance for Epstein-Barr virus (EBV) prediction using the calibrated, threshold-tuned ensemble. Metrics were computed per fold and summarized as the mean over CV folds with 95% confidence intervals (CIs) computed from the fold-wise standard error.

Metric Mean 95% CI
ROC–AUC 0.747 [0.737, 0.756]
PR–AUC 0.587 [0.537, 0.636]
Accuracy 0.705 [0.689, 0.721]
F1 0.617 [0.604, 0.629]
Recall 0.717 [0.616, 0.817]
Specificity 0.702 [0.627, 0.777]
Precision 0.548 [0.491, 0.605]
Cohen's κ 0.386 [0.376, 0.397]

B.2. Cross-validation diagnostics

Table B.2.

Per-fold temperature scaling diagnostics on EBV CV validation sets. “pre”/“post” denote values before/after temperature scaling for top-label ECE and the Brier score. The pooled row reports metrics computed on concatenated CV validation predictions.

Fold Temperature T ECE (pre → post) Brier (pre → post)
0 1.136 0.0606 → 0.0480 0.3907 → 0.3900
1 1.038 0.0806 → 0.0741 0.3723 → 0.3725
2 0.872 0.0487 → 0.0338 0.3705 → 0.3695
3 1.040 0.0645 → 0.0686 0.3538 → 0.3539
4 1.022 0.0361 → 0.0419 0.3806 → 0.3805
Pooled (CV-val) – 0.0354 → 0.0257 0.3737 → 0.3734

Table B.3.

Per-fold CV confusion matrices for EBV prediction. Each cell shows counts from the calibrated, threshold-tuned ensemble, with counts from the uncalibrated argmax baseline in parentheses.

Fold 0
Fold 1
Fold 2
Fold 3
Fold 4
Predicted
Predicted
Predicted
Predicted
Predicted
True EBV 0 EBV 1 True EBV 0 EBV 1 True EBV 0 EBV 1 True EBV 0 EBV 1 True EBV 0 EBV 1
EBV 0 167 (196) 48 (19) EBV 0 138 (180) 77 (35) EBV 0 164 (184) 57 (37) EBV 0 159 (196) 65 (28) EBV 0 141 (181) 79 (39)
EBV 1 48 (70) 78 (56) EBV 1 22 (53) 80 (49) EBV 1 39 (52) 75 (62) EBV 1 29 (55) 72 (46) EBV 1 20 (58) 85 (47)

B.3. Cross-validation baseline (uncalibrated argmax)

Table B.4.

CV baseline performance for EBV prediction using the uncalibrated argmax baseline (fixed 0.5 threshold). Metrics were computed per fold and reported as means over CV folds, with 95% confidence intervals (CIs) computed from the fold-wise standard error.

Metric Mean 95% CI
ROC–AUC 0.747 [0.737, 0.756]
PR–AUC 0.587 [0.537, 0.636]
Accuracy 0.728 [0.707, 0.750]
F1 0.537 [0.494, 0.579]
Recall 0.474 [0.423, 0.526]
Specificity 0.856 [0.810, 0.902]
Precision 0.625 [0.531, 0.718]
Cohen's κ 0.350 [0.296, 0.405]

B.4. External (hold-out) baseline (uncalibrated argmax)

Table B.5.

External (hold-out) EBV baseline performance using the uncalibrated argmax baseline (fixed 0.5 threshold). Metrics were computed on the independent hold-out cohort, with 95% confidence intervals (CIs) obtained via bootstrapping.

Metric. Mean 95% CI
ROC–AUC 0.726 [0.677, 0.774]
PR–AUC 0.570 [0.494, 0.658]
Accuracy 0.712 [0.670, 0.753]
F1 0.522 [0.448, 0.592]
Recall 0.444 [0.367, 0.524]
Specificity 0.858 [0.818, 0.897]
Precision 0.632 [0.543, 0.719]
Cohen's κ 0.324 [0.235, 0.414]

Fig. B.1.

Fig. B.1

Confusion matrix for EBV prediction on the external (hold-out) cohort using uncalibrated argmax baseline (fixed 0.5 threshold). Cells show counts and row-normalized percentages.

Appendix C. Subtypes task: Additional results

This section provides additional quantitative results for the three-class histological subtype prediction task (NS, MC, NLPHL): CV performance of the calibrated model, temperature-scaling diagnostics and per-fold confusion matrices, class-wise metrics, and baseline results for the uncalibrated argmax baseline on both CV folds and the external hold-out cohort.

C.1. Cross-validation performance (calibrated model)

Table C.1.

CV performance for three-class subtype prediction (NS, MC, NLPHL) using the calibrated, threshold-tuned ensemble. Metrics were macro-averaged over subtypes and reported as means over CV folds, with 95% confidence intervals (CIs) computed from the fold-wise standard error. NS = nodular sclerosis; MC = mixed cellularity; NLPHL = nodular lymphocyte-predominant Hodgkin lymphoma.

Metric Mean 95% CI
ROC–AUC 0.877 [0.837, 0.918]
PR–AUC 0.737 [0.642, 0.832]
Accuracy 0.796 [0.740, 0.853]
F1 0.723 [0.665, 0.781]
Recall 0.733 [0.666, 0.801]
Specificity 0.859 [0.829, 0.890]
Precision 0.735 [0.662, 0.807]
Cohen's κ 0.564 [0.458, 0.671]

C.2. Cross-validation diagnostics

Table C.2.

Per-fold temperature scaling diagnostics on CV validation sets for the three-class histological subtype prediction task. “pre”/“post” denote values before/after temperature scaling for top-label ECE and the multiclass Brier score. The pooled row reports metrics computed on concatenated CV validation predictions.

Fold T ECE (pre → post) Brier (pre → post)
0 1.138 0.0554 → 0.0428 0.2667 → 0.2637
1 0.711 0.1052 → 0.0691 0.3149 → 0.3092
2 0.951 0.0313 → 0.0361 0.3549 → 0.3551
3 1.090 0.0477 → 0.0354 0.2800 → 0.2792
4 0.852 0.0709 → 0.0772 0.3513 → 0.3513
Pooled (CV-val) – 0.0288 → 0.0312 0.3156 → 0.3138

Table C.3.

Per-fold CV confusion matrices for three-class histological subtype prediction. Each cell shows counts from the calibrated, threshold-tuned ensemble, with counts from the uncalibrated argmax baseline in parentheses.

Fold 0
Fold 1
Fold 2
Fold 3
Fold 4
Predicted
Predicted
Predicted
Predicted
Predicted
True NS MC NLPHL True NS MC NLPHL True NS MC NLPHL True NS MC NLPHL True NS MC NLPHL
NS 153 (152) 7 (6) 4 (6) NS 156 (156) 16 (17) 6 (5) NS 128 (138) 38 (23) 0 (5) NS 124 (130) 12 (5) 3 (4) NS 142 (145) 34 (29) 2 (4)
MC 25 (26) 33 (32) 3 (3) MC 16 (16) 18 (18) 4 (4) MC 18 (28) 59 (44) 1 (6) MC 9 (23) 40 (22) 3 (7) MC 16 (19) 37 (33) 3 (4)
NLPHL 0 (0) 2 (2) 18 (18) NLPHL 0 (1) 1 (2) 13 (11) NLPHL 4 (5) 5 (2) 11 (13) NLPHL 4 (4) 2 (2) 10 (10) NLPHL 7 (7) 3 (3) 11 (11)

C.3. Cross-validation class-wise metrics

Table C.4.

CV class-wise metrics for subtype prediction using the uncalibrated argmax baseline. Entries are mean across CV folds with 95% CIs computed from the fold-wise standard error.

Class F1 Recall Precision Specificity
NS 0.861 [0.819, 0.903] 0.877 [0.809, 0.944] 0.848 [0.804, 0.892] 0.656 [0.618, 0.694]
MC 0.560 [0.487, 0.633] 0.515 [0.431, 0.599] 0.638 [0.462, 0.814] 0.903 [0.838, 0.969]
NLPHL 0.619 [0.504, 0.734] 0.697 [0.514, 0.879] 0.563 [0.477, 0.649] 0.956 [0.945, 0.967]

Table C.5.

CV class-wise metrics for subtype prediction using the calibrated, threshold-tuned ensemble. Entries are mean across CV folds with 95% CIs computed from the fold-wise standard error.

Class F1 Recall Precision Specificity
NS 0.865 [0.812, 0.917] 0.854 [0.770, 0.938] 0.877 [0.844, 0.910] 0.734 [0.666, 0.802]
MC 0.623 [0.501, 0.744] 0.640 [0.478, 0.802] 0.624 [0.460, 0.787] 0.871 [0.776, 0.966]
NLPHL 0.682 [0.583, 0.781] 0.705 [0.464, 0.947] 0.703 [0.537, 0.869] 0.973 [0.954, 0.992]

C.4. Cross-validation baseline (uncalibrated argmax)

Table C.6.

CV baseline performance for three-class subtype prediction (NS, MC, NLPHL) using the uncalibrated argmax baseline. Metrics were macro-averaged over subtypes and reported as means over CV folds, with 95% confidence intervals (CIs) computed from the fold-wise standard error.

Metric Mean 95% CI
ROC–AUC 0.877 [0.837, 0.918]
PR–AUC 0.737 [0.641, 0.833]
Accuracy 0.778 [0.731, 0.825]
F1 0.680 [0.621, 0.739]
Recall 0.696 [0.628, 0.765]
Specificity 0.839 [0.818, 0.860]
Precision 0.683 [0.616, 0.749]
Cohen's κ 0.513 [0.432, 0.594]

C.5. External (hold-out) baseline (uncalibrated argmax)

Table C.7.

External (hold-out) baseline performance for three-class subtype prediction using the uncalibrated argmax baseline. Metrics were macro-averaged over subtypes and computed on the independent hold-out cohort, with 95% CIs obtained via bootstrapping.

Metric Mean 95% CI
ROC–AUC 0.841 [0.805, 0.876]
PR–AUC 0.629 [0.559, 0.714]
Accuracy 0.760 [0.716, 0.805]
F1 0.578 [0.490, 0.655]
Recall 0.548 [0.471, 0.629]
Specificity 0.781 [0.747, 0.816]
Precision 0.629 [0.526, 0.727]
Cohen's κ 0.362 [0.255, 0.462]

Fig. C.1.

Fig. C.1

Confusion matrix for subtype prediction on the external (hold-out) cohort using the uncalibrated argmax baseline. Cells show counts and row-normalized percentages.

C.6. External (hold-out) class-wise metrics

Table C.8.

External (hold-out) class-wise metrics for subtype prediction using the uncalibrated argmax baseline, with 95% CIs calculated using bootstrapping.

Class F1 Recall Precision Specificity
NS 0.859 [0.826, 0.889] 0.898 [0.860, 0.933] 0.823 [0.779, 0.866] 0.463 [0.363, 0.564]
MC 0.431 [0.319, 0.535] 0.384 [0.273, 0.500] 0.491 [0.360, 0.621] 0.899 [0.862, 0.932]
NLPHL 0.444 [0.222, 0.634] 0.364 [0.167, 0.571] 0.571 [0.300, 0.833] 0.982 [0.967, 0.994]

Table C.9.

External (hold-out) class-wise metrics for subtype prediction using the calibrated, threshold-tuned ensemble, with 95% CIs calculated using bootstrapping.

Class F1 Recall Precision Specificity
NS 0.825 [0.788, 0.859] 0.811 [0.762, 0.856] 0.839 [0.794, 0.882] 0.568 [0.467, 0.667]
MC 0.448 [0.349, 0.540] 0.507 [0.389, 0.623] 0.402 [0.302, 0.505] 0.808 [0.761, 0.852]
NLPHL 0.412 [0.182, 0.606] 0.318 [0.130, 0.526] 0.583 [0.286, 0.857] 0.985 [0.971, 0.997]

Appendix D. ABMIL baseline comparison

This section provides additional results for the comparison between the proposed hierarchical Vision Transformer pipeline (HIPT) and the ABMIL baseline. We first present ROC curves, PR curves, and confusion matrices for the ABMIL baseline on the external hold-out cohort, followed by the uncalibrated argmax comparison and permutation-test results.

D.1. External hold-out curves and confusion matrices

Fig. D.1.

Fig. D.1

ABMIL baseline: external hold-out ROC curves, precision–recall curves, and confusion matrices for (a–c) EBV prediction and (d–f) three-class subtype prediction, using the calibrated, threshold-tuned ensemble.

D.2. Uncalibrated argmax comparison

Table D.1.

Comparison of the uncalibrated argmax HIPT and ABMIL models on the independent external hold-out cohort. For subtype prediction, F1 denotes macro-F1. 95% confidence intervals were obtained by bootstrapping.

Task Model ROC–AUC Accuracy F1
EBV HIPT 0.726 [0.677, 0.774] 0.712 [0.670, 0.753] 0.522 [0.448, 0.592]
EBV ABMIL 0.763 [0.715, 0.810] 0.725 [0.683, 0.766] 0.620 [0.557, 0.680]
Subtype HIPT 0.841 [0.805, 0.876] 0.760 [0.716, 0.805] 0.578 [0.490, 0.655]
Subtype ABMIL 0.890 [0.860, 0.917] 0.791 [0.749, 0.833] 0.700 [0.625, 0.764]

D.3. Permutation tests

Table D.2.

Two-sided permutation tests comparing HIPT and ABMIL on the independent external hold-out cohort. Reported p-values correspond to the null hypothesis of no performance difference between models for each metric and evaluation setting. Bold values indicate statistical significance at p<0.05.

Evaluation setting Task Metric p-value
Uncalibrated argmax EBV ROC–AUC 0.0325
Accuracy 0.5791
F1 0.0010
Subtype ROC–AUC 0.0006
Accuracy 0.1902
Macro-F1 0.0019
Calibrated, threshold-tuned EBV ROC–AUC 0.0281
Accuracy 0.1741
F1 0.0453
Subtype ROC–AUC 0.0011
Accuracy 0.0536
Macro-F1 0.0012

Appendix E. Hyperparameter optimization results (slide-level transformer)

Fig. E.1.

Fig. E.1

Bayesian hyperparameter optimization for the slide-level Transformer (EBV task). The parallel-coordinate plot shows the relation between training hyperparameters—learning rate (lr), weight decay (weight_decay), dropout rates (dropout_attn, dropout_global_phi, dropout_Transformer, dropout_global_rho)—and Transformer encoder settings (dim_feedforward, num_heads, num_layers) versus validation ROC–AUC. Optimization used Optuna's TPE sampler with a Hyperband pruner over 1000 trials, each trained for up to 30 epochs under 5-fold CV on the development pool (hospital-disjoint folds). The final configuration selected in the main text corresponds to the top region of the ROC–AUC axis and was reused for the three-class subtype task to preserve comparability across endpoints.

Data availability

According to Danish legislation, electronic health data may not be shared publicly. The data may be shared on a collaborative basis based on a data processing agreement.

The source code for this study is available from the authors upon request.

References

  • 1.Bray F., Laversanne M., Sung H., et al. Global cancer statistics 2022: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries. CA Cancer J Clin. 2024;74:229–263. doi: 10.3322/caac.21834. [DOI] [PubMed] [Google Scholar]
  • 2.Huang J., Pang W.S., Lok V., et al. Incidence, mortality, risk factors, and trends for Hodgkin lymphoma: a global data analysis. J Hematol Oncol. 2022;15:57. doi: 10.1186/s13045-022-01281-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Brice P., Kerviler E. de, Friedberg J.W. Classical Hodgkin lymphoma. Lancet. 2021;398:1518–1527. doi: 10.1016/S0140-6736(20)32207-8. [DOI] [PubMed] [Google Scholar]
  • 4.Hjalgrim H., Jarrett R.F. 2020. Epidemiology of Hodgkin Lymphoma; pp. 3–23. [DOI] [Google Scholar]
  • 5.Wolfson J., Sun C.-L., Wyatt L., et al. Impact of treatment site on disparities in outcome among adolescent and young adults with Hodgkin lymphoma. Leukemia. 2017;31:1450–1453. doi: 10.1038/leu.2017.66. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Ng A.K., Leeuwen F.E. van. Hodgkin lymphoma: late effects of treatment and guidelines for surveillance. Semin Hematol. 2016;53:209–215. doi: 10.1053/j.seminhematol.2016.05.008. [DOI] [PubMed] [Google Scholar]
  • 7.Singh D., Vaccarella S., Gini A., et al. Global patterns of Hodgkin lymphoma incidence and mortality in 2020 and a prediction of the future burden in 2040. Int J Cancer. 2022;150:1941–1947. doi: 10.1002/ijc.33948. [DOI] [PubMed] [Google Scholar]
  • 8.MacMahon B. Epidemiology of Hodgkin’s disease. Cancer Res. 1966;26:1189–1201. [PubMed] [Google Scholar]
  • 9.Satou A., Takahara T., Nakamura S. An update on the pathology and molecular features of Hodgkin lymphoma. Cancers. 2022;14:2647. doi: 10.3390/cancers14112647. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Connors J.M., Cozen W., Steidl C., et al. Hodgkin lymphoma. Nat Rev Dis Primers. 2020;6 doi: 10.1038/s41572-020-0189-6. [DOI] [PubMed] [Google Scholar]
  • 11.Attygalle A.D., Chan J.K.C., Coupland S.E., et al. The 5th edition of the world health organization classification of mature lymphoid and stromal tumours – an overview and update. Leukem Lymph. 2024;65:413–429. doi: 10.1080/10428194.2023.2297939. [DOI] [PubMed] [Google Scholar]
  • 12.Hjalgrim H., Chang E.T., Glaser S.L. Oxford University Press; 2017. Hodgkin Lymphoma. Cancer Epidemiology and Prevention. [DOI] [Google Scholar]
  • 13.Gandhi M.K., Tellam J.T., Khanna R. Epstein–barr virus-associated Hodgkin’s lymphoma. Br J Haematol. 2004;125:267–281. doi: 10.1111/j.1365-2141.2004.04902.x. [DOI] [PubMed] [Google Scholar]
  • 14.Murray P.G., Young L.S. An etiological role for the Epstein-Barr virus in the pathogenesis of classical Hodgkin lymphoma. Blood. 2019;134:591–596. doi: 10.1182/blood.2019000568. [DOI] [PubMed] [Google Scholar]
  • 15.Lee J.-H., Kim Y., Choi J.-W., et al. Prevalence and prognostic significance of Epstein-Barr virus infection in classical Hodgkin’s lymphoma: a meta-analysis. Arch Med Res. 2014;45:417–431. doi: 10.1016/j.arcmed.2014.06.001. [DOI] [PubMed] [Google Scholar]
  • 16.Campos A.H.J.F.M., Moreira A., Ribeiro K.B., et al. Frequency of EBV associated classical Hodgkin lymphoma decreases over a 54-year period in a Brazilian population. Sci Rep. 2018;8:1849. doi: 10.1038/s41598-018-20133-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Carbone A., Gloghini A., Carlo-Stella C. Are EBV-related and EBV-unrelated Hodgkin lymphomas different with regard to susceptibility to checkpoint blockade? Blood. 2018;132:17–22. doi: 10.1182/blood-2018-02-833806. [DOI] [PubMed] [Google Scholar]
  • 18.Glaser S.L., Lin R.J., Stewart S.L., et al. Epstein-Barr virus-associated Hodgkin’s disease: epidemiologic characteristics in international data. Int J Cancer. 1997;70:375–382. doi: 10.1002/(sici)1097-0215(19970207)70:4<375::aid-ijc1>3.0.co;2-t. [DOI] [PubMed] [Google Scholar]
  • 19.Kamper-Jørgensen M., Rostgaard K., Glaser S.L., et al. Cigarette smoking and risk of Hodgkin lymphoma and its subtypes: a pooled analysis from the International Lymphoma Epidemiology Consortium (InterLymph) Ann Oncol Off J Eur Soc Med Oncol. 2013;24:2245–2255. doi: 10.1093/annonc/mdt218. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Carbone A., Gloghini A. Epstein Barr virus-associated Hodgkin lymphoma. Cancers (Basel) 2018;10 doi: 10.3390/cancers10060163. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Nagpal P., Descalzi-Montoya D.B., Lodhi N. The circuitry of the tumour microenvironment in adult and pediatric Hodgkin lymphoma: cellular composition, cytokine profile, EBV, and exosomes. Cancer Rep (Hoboken, NJ) 2021;4 doi: 10.1002/cnr2.1311. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Wu R., Sattarzadeh A., Rutgers B., et al. The microenvironment of classical Hodgkin lymphoma: heterogeneity by Epstein-Barr virus presence and location within the tumour. Blood Cancer J. 2016;6 doi: 10.1038/bcj.2016.26. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Carbone A., Alibrahim M.N. Hodgkin lymphoma classification-from historical concepts to current refinements. Cancers (Basel) 2025;17 doi: 10.3390/cancers17172929. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Weniger M.A., Küppers R. Molecular biology of Hodgkin lymphoma. Leukemia. 2021;35:968–981. doi: 10.1038/s41375-021-01204-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Hollander P., Rostgaard K., Smedby K.E., et al. Autoimmune and atopic disorders and risk of classical Hodgkin lymphoma. Am J Epidemiol. 2015;182:624–632. doi: 10.1093/aje/kwv081. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Fu Y., Huang Z., Deng X., et al. Artificial intelligence in lymphoma histopathology: systematic review. J Med Internet Res. 2025;27 doi: 10.2196/62851. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Uppal A., Kakkar B., Johri P., et al. Enhancing lymphoma cancer detection using deep transfer learning on histopathological images. Sci Rep. 2025;15 doi: 10.1038/s41598-025-21888-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Ogundokun R.O., Owolawi P.A., Tu C., et al. Autoencoder-assisted stacked ensemble learning for lymphoma subtype classification: a hybrid deep learning and machine learning approach. Tomography (Ann Arbor, Mich) 2025;11 doi: 10.3390/tomography11080091. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Orlov N.V., Chen W.W., Eckley D.M., et al. Automatic classification of lymphoma images with transform-based global features. IEEE Trans Inform Technol Biomed Publ IEEE Eng Med Biol Soc. 2010;14:1003–1013. doi: 10.1109/TITB.2010.2050695. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Shankar V., Yang X., Krishna V., et al. In: Proceedings of the 3rd Machine Learning for Health Symposium. Hegselmann S., Parziale A., Shanmugam D., et al., editors. vol. 225. PMLR; 2023. LymphoML: an interpretable artificial intelligence-based method identifies morphologic features that correlate with lymphoma subtype; pp. 528–558. [Google Scholar]
  • 31.Hannig J., Schäfer H., Ackermann J., et al. Bioinformatics analysis of whole slide images reveals significant neighborhood preferences of tumour cells in Hodgkin lymphoma. PLoS Comput Biol. 2020;16 doi: 10.1371/journal.pcbi.1007516. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Ferrández M.C., Golla S.S.V., Eertink J.J., et al. An artificial intelligence method using FDG PET to predict treatment outcome in diffuse large B cell lymphoma patients. Sci Rep. 2023;13 doi: 10.1038/s41598-023-40218-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Duminuco A., Scarso S., Fabro V.D., et al. Diffuse large B-cell lymphoma in the new era: prognostic tools for mapping risk. Ann Hematol. 2025;104:4897–4911. doi: 10.1007/s00277-025-06686-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Sikkandar M.Y., Sundaram S.G., Almeshari M.N., et al. A novel hybrid convolutional and transformer network for lymphoma classification. Sci Rep. 2025;15 doi: 10.1038/s41598-025-11277-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Guetarni B., Windal F., Benhabiles H., et al. A vision transformer-based framework for knowledge transfer from multi-modal to mono-modal lymphoma subtyping models. IEEE J Biomed Health Inform. 2024;28:5562–5572. doi: 10.1109/JBHI.2024.3407878. [DOI] [PubMed] [Google Scholar]
  • 36.Glaser S.L., Swartz W.G. Time trends in Hodgkin’s disease incidence. The role of diagnostic accuracy. Cancer. 1990;66:2196–2204. doi: 10.1002/1097-0142(19901115)66:10<2196::aid-cncr2820661026>3.0.co;2-r. [DOI] [PubMed] [Google Scholar]
  • 37.Jarrett R.F., Krajewski A.S., Angus B., et al. The Scotland and Newcastle epidemiological study of Hodgkin’s disease: impact of histopathological review and EBV status on incidence estimates. J Clin Pathol. 2003;56:811–816. doi: 10.1136/jcp.56.11.811. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Glaser S.L., Gulley M.L., Borowitz M.J., et al. Inter- and intra-observer reliability of Epstein-Barr virus detection in Hodgkin lymphoma using histochemical procedures. Leukem Lymph. 2004;45:489–497. doi: 10.1080/1042819032000141310. [DOI] [PubMed] [Google Scholar]
  • 39.Chen R.J., Chen C., Li Y., et al. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) 2022. Scaling vision transformers to gigapixel images via hierarchical self-supervised learning; pp. 16144–16155. [Google Scholar]
  • 40.Rostgaard K., Hamilton-Dutoit S., Lauridsen K.L., et al. Epidemiological evidence for the role of puberty and immune senescence in Hodgkin lymphoma aetiology from 1992 Danish cases. Int J Cancer. 2026;158:2629–2640. doi: 10.1002/ijc.70305. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.Ilse M., Tomczak J., Welling M. In: Proceedings of the 35th International Conference on Machine Learning. Dy J., Krause A., editors. Vol. 80. PMLR; 2018. Attention-based deep multiple instance learning; pp. 2127–2136. [Google Scholar]
  • 42.Campanella G., Hanna M.G., Geneslaw L., et al. 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. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Lu M.Y., Williamson D.F., Chen T.Y., et al. Data-efficient and weakly supervised computational pathology on whole-slide images. Nat Biomed Eng. 2021;5:555–570. doi: 10.1038/s41551-020-00682-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Chen S., Campanella G., Elmas A., et al. In: Proceedings of the MICCAI Workshop on Computational Pathology. Ciompi F., Khalili N., Studer L., et al., editors. Vol. 254. PMLR; 2024. Benchmarking embedding aggregation methods in computational pathology: a clinical data perspective; pp. 38–50. [Google Scholar]
  • 45.Guo Z., Liu H., Ni H., et al. A fast and refined cancer regions segmentation framework in whole-slide breast pathological images. Sci Rep. 2019;9:882. doi: 10.1038/s41598-018-37492-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Chan L., Hosseini M.S., Rowsell C., et al. Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) 2019. HistoSegNet: semantic segmentation of histological tissue type in whole slide images. [Google Scholar]
  • 47.Wölflein G., Ferber D., Meneghetti A.R., et al. 2024. Benchmarking Pathology Feature Extractors for Whole Slide Image Classification. [Google Scholar]
  • 48.Chen R.J., Ding T., Lu M.Y., et al. Towards a general-purpose foundation model for computational pathology. Nat Med. 2024;30:850–862. doi: 10.1038/s41591-024-02857-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Caron M., Touvron H., Misra I., et al. Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) 2021. Emerging properties in self-supervised vision transformers; pp. 9650–9660. [Google Scholar]
  • 50.Loshchilov I., Hutter F. 2019. Decoupled Weight Decay Regularization. [Google Scholar]
  • 51.Akiba T., Sano S., Yanase T., et al. The 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. 2019. Optuna: a next-generation hyperparameter optimization framework; pp. 2623–2631. [Google Scholar]
  • 52.Dimitriou N., Arandjelović O., Caie P.D. Deep learning for whole slide image analysis: an overview. Front Med. 2019;6:264. doi: 10.3389/fmed.2019.00264. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53.Eloy C., Fraggetta F., Diest P.J. van, et al. Digital transformation of pathology - the European Society of Pathology expert opinion paper. Virchows Arch. 2025 doi: 10.1007/s00428-025-04090-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Michielli N., Caputo A., Scotto M., et al. Stain normalization in digital pathology: clinical multi-center evaluation of image quality. J Pathol Inform. 2022;13 doi: 10.1016/j.jpi.2022.100145. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Hjalgrim H., Rostgaard K. Clinical significance of aetiological heterogeneity in classical Hodgkin lymphoma. J Translat Genet Genomics. 2022;6:134–146. [Google Scholar]
  • 56.Alig S.K., Shahrokh Esfahani M., Garofalo A., et al. Distinct Hodgkin lymphoma subtypes defined by noninvasive genomic profiling. Nature. 2024;625:778–787. doi: 10.1038/s41586-023-06903-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Heger J.-M., Mammadova L., Mattlener J., et al. Circulating tumour DNA sequencing for biologic classification and individualized risk stratification in patients with Hodgkin lymphoma. J Clin Oncol. 2024;42:4218–4230. doi: 10.1200/JCO.23.01867. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

According to Danish legislation, electronic health data may not be shared publicly. The data may be shared on a collaborative basis based on a data processing agreement.

The source code for this study is available from the authors upon request.


Articles from Journal of Pathology Informatics are provided here courtesy of Elsevier

RESOURCES