Multimodal survival analysis of glioblastoma using whole-slide histopathology, gene expression, clinical variables and language-model-derived mutation features.
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 237 lines · 8.1 KB · no license
- import torch
- import torch.nn as nn
- import torch.nn.functional as F
- ##IMAGE
- class ImgCNNWithAttention(nn.Module):
- def __init__(self,input_dim, num_classes):
- super(ImgCNNWithAttention, self).__init__()
- self.block1 = nn.Sequential(
- nn.Conv2d(input_dim, 16, kernel_size=5, stride=1),
- nn.MaxPool2d(kernel_size=5, stride=5, padding=0),
- nn.BatchNorm2d(16),
- nn.ReLU(),
- nn.Conv2d(16, 32, kernel_size=5, stride=1),
- nn.MaxPool2d(kernel_size=3, stride=3, padding=0),
- nn.BatchNorm2d(32),
- nn.ReLU(),
- nn.Conv2d(32, 64, kernel_size=5, stride=1),
- nn.MaxPool2d(kernel_size=3, stride=3, padding=0),
- nn.BatchNorm2d(64),
- nn.ReLU()
- )
- self.attention = nn.Sequential(
- nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1),
- nn.BatchNorm2d(64),
- nn.Sigmoid()
- )
- self.block2=nn.Sequential(
- nn.Conv2d(64, 128, kernel_size=5, stride=1),
- nn.MaxPool2d(kernel_size=3, stride=3, padding=0),
- nn.BatchNorm2d(128))
- self.block3=nn.Sequential(
- nn.Linear(128 * 20 * 20, 32),
- nn.BatchNorm1d(32),
- nn.ReLU(),
- nn.Dropout(0.3),
- nn.Linear(32, num_classes)
- )
- def forward(self, x):
- x = self.block1(x)
- attention = self.attention(x)
- x = x * attention
- x = self.block2(x)
- x1 = x.view(x.size(0), -1)
- x = self.block3(x1)
- return x,x1,attention
- ##SEQ
- class AddNormBlock1(nn.Module):
- def __init__(self, input_size, output_size, dropout_rate):
- super(AddNormBlock1, self).__init__()
- self.linear = nn.Linear(input_size, output_size)
- self.norm = nn.BatchNorm1d(output_size)
- self.dropout = nn.Dropout(dropout_rate)
- def forward(self, x):
- x=self.linear(x)
- y = F.relu(x)
- y = self.norm(y)
- y = self.dropout(y)
- # Add & Norm: Add input x to output y and apply layer normalization
- return y
- # return self.norm(x + y)
- class AddNormBlock(nn.Module):
- def __init__(self, input_size, output_size, dropout_rate):
- super(AddNormBlock, self).__init__()
- self.linear = nn.Linear(input_size, output_size)
- self.norm = nn.LayerNorm(output_size)
- self.dropout = nn.Dropout(dropout_rate)
- def forward(self, x):
- x=self.linear(x)
- y = F.relu(x)
- y = self.norm(y)
- # y = self.dropout(y)
- # Add & Norm: Add input x to output y and apply layer normalization
- return y
- # return self.norm(x + y)
- class DeepSeq(nn.Module):
- def __init__(self, hidden_sizes_phi=None, hidden_sizes_rho=None,num_intervals=None, dropout_rate=0.3):
- super(DeepSeq, self).__init__()
- if hidden_sizes_phi is None:
- hidden_sizes_phi = [768, 512, 256, 128, 64]
- if hidden_sizes_rho is None:
- hidden_sizes_rho = [64, 32, 16]
- if num_intervals is None:
- num_intervals = 1
- # Phi function: Transform each element of the set
- self.blocks1 = self.create_blocks(hidden_sizes_phi, dropout_rate=0.5)
- self.blocks2 = self.create_blocks(hidden_sizes_rho, dropout_rate=0.2)
- # Attention mechanism
- self.attention = nn.Sequential(
- nn.Linear(hidden_sizes_phi[-1], hidden_sizes_phi[-1]),
- nn.ReLU(),
- nn.Dropout(dropout_rate),
- nn.Linear(hidden_sizes_phi[-1], 1),
- )
- self.blocks1_ = nn.ModuleList([AddNormBlock(hidden_sizes_phi[i], hidden_sizes_phi[i+1], dropout_rate) for i in range(len(hidden_sizes_phi)-1)])
- self.blocks2_ = nn.ModuleList([AddNormBlock1(hidden_sizes_rho[i], hidden_sizes_rho[i+1], dropout_rate=0.1) for i in range(len(hidden_sizes_rho)-1)])
- self.final_layer = nn.Linear(hidden_sizes_rho[-1], num_intervals)
- def forward_blocks(self, blocks, x):
- for block in blocks:
- x = block(x)
- return x
- def create_blocks(self, hidden_sizes, dropout_rate):
- layers = []
- for idx, hidden_size in enumerate(hidden_sizes):
- if idx == 0:
- input_size = hidden_sizes[0]
- else:
- input_size = hidden_sizes[idx - 1]
- layers.extend([
- nn.Linear(input_size, hidden_size),
- nn.LayerNorm(hidden_size),
- nn.ReLU(),
- nn.Dropout(dropout_rate)
- ])
- return nn.Sequential(*layers)
- def attention_block(self, x, mask=None):
- attention_weights = self.attention(x).squeeze(-1)
- if mask is not None:
- attention_weights = attention_weights.masked_fill(mask == 0, -1e9)
- attention_weights = torch.softmax(attention_weights, dim=1)
- # Apply attention weights without changing set size
- x_weighted = x * attention_weights.unsqueeze(-1)
- return x_weighted,[x,attention_weights]
- def forward(self, x, mask=None):
- original_shape = x.shape
- x = x.view(-1, x.size(-1))
- # Phi function
- # x = self.blocks1(x)
- x = self.forward_blocks(self.blocks1_, x)
- x = x.view(original_shape[0], original_shape[1], -1)
- # Attention and aggregation
- x ,attention_weights= self.attention_block(x, mask)
- x1 = x.sum(dim=1) # Summing over the set elements
- # Rho function
- x = self.blocks2(x1)
- # x = self.forward_blocks(self.blocks2_, x)
- # Final output
- x = self.final_layer(x)
- return x,x1,attention_weights
- ##TABULAR
- class AttentionSurvivalNet(nn.Module):
- def __init__(self,input_dim,output_dim):
- super(AttentionSurvivalNet,self).__init__()
- self.block1 = nn.Sequential(
- nn.Linear(input_dim, 2000),
- nn.BatchNorm1d(2000),
- nn.ReLU(),
- nn.Dropout(0.3),
- nn.Linear(2000, 800),
- nn.BatchNorm1d(800),
- nn.ReLU(),
- nn.Dropout(0.3))
- self.block2=nn.Sequential(
- nn.Linear(800, 100),
- nn.BatchNorm1d(100),
- nn.ReLU(),
- nn.Dropout(0.1),
- nn.Linear(100, output_dim))
- self.attention= nn.Sequential(
- nn.Linear(input_dim, input_dim),
- nn.ReLU(),
- nn.Dropout(0.3),
- nn.Linear(input_dim, 1),
- )
- # self.attention=AttentionLayer(input_dim)
- def forward(self, x):
- x1 = self.block1(x)
- x = self.block2(x1)
- return x,x1
- ##MULTIMODAL
- class MultimodalNet(nn.Module):
- def __init__(self, num_classes, input_sizes):
- super(MultimodalNet, self).__init__()
- self.block1 = nn.Sequential(
- nn.Linear(input_sizes[0], 200), # size_x1
- nn.BatchNorm1d(200),
- nn.ReLU(),
- nn.Dropout(0.1)
- )
- if len(input_sizes) > 1:
- self.block2 = nn.Sequential(
- nn.Linear(input_sizes[1], 200), # size_x2
- nn.BatchNorm1d(200),
- nn.ReLU(),
- nn.Dropout(0.1)
- )
- else:
- self.block2 = None
- self.block3_input_size = 200 + (200 if self.block2 else 0) + (input_sizes[2] if len(input_sizes) > 2 else 0)
- self.block3 = nn.Sequential(
- nn.Linear(self.block3_input_size, 256),
- nn.BatchNorm1d(256),
- nn.ReLU(),
- nn.Dropout(0.1),
- nn.Linear(256, 128),
- nn.BatchNorm1d(128),
- nn.ReLU(),
- nn.Dropout(0.1)
- )
- self.out = nn.Sequential(
- nn.Linear(128, 64),
- nn.BatchNorm1d(64),
- nn.ReLU(),
- nn.Dropout(0.1),
- nn.Linear(64, num_classes)
- )
- def forward(self, x1, x2=None, x3=None):
- x1 = self.block1(x1)
- inputs = [x1] # Start with x1 as the mandatory input
- if self.block2 and x2 is not None:
- x2 = self.block2(x2)
- inputs.append(x2)
- if x3 is not None:
- inputs.append(x3)
- x = torch.cat(inputs, dim=1) # Concatenate only the provided inputs
- x = self.block3(x)
- x = self.out(x)
- return x
Net.py at commit 644bbb0, no license · at the source
Overview
- School of Informatics, University of Edinburgh, Edinburgh, EH8 9AB United Kingdom
- Cancer Research UK Scotland Centre (Edinburgh), Institute of Genetics and Cancer, University of Edinburgh, Edinburgh, EH4 2XU United Kingdom
- Department for Clinical Neuroscience, NHS Lothian, Royal Infirmary Edinburgh, Edinburgh, United Kingdom
- Translational Neurosurgery, Centre for Clinical Brain Sciences, University of Edinburgh, Edinburgh, EH16 4SB United Kingdom
Abstract
Glioblastoma (GBM) is a highly aggressive brain tumor with poor prognosis, motivating the development of more accurate survival prediction models that can integrate complementary clinical and molecular information. However, existing multimodal survival frameworks often rely on simplified genomic summaries, underuse sequence-context information from mutations, or discard global spatial structure in whole-slide histopathology. In this study, we present MUSA , a multimodal survival framework that integrates three data sources: whole-slide H&
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
tongjie-w/MUSA
644bbb073d78b460986824f357dd5e2ed3edfd2f, 14 April 2025Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
13 files
- Net.py, Python, 237 lines
- Preprocess.py, Python, 121 lines
- Seg_test.ipynb, Jupyter, 922 lines
- image_extract_cnn.py, Python, 118 lines
- image_train.py, Python, 195 lines
- loss.py, Python, 38 lines
- multimodal_model.py, Python, 81 lines
- sequence_extract.py, Python, 104 lines
- sequence_train.py, Python, 166 lines
- tabular_extract.py, Python, 90 lines
- tabular_train.py, Python, 145 lines
- train.py, Python, 124 lines
- README.md, Text, 85 lines
Code availability
Code is available from our MUSA Github repository: https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 12 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
The MoNuSeg dataset used for image segmentation study is available in MoNuSeg challenge repository, https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 29 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 6 keywords, 7 MeSH terms, 1 funder, 15 references.
Cite
This paper
Wang, T., Alfaro, J., Brennan, P. M., & Rajan, A. (2026). Multimodal survival analysis of glioblastoma using whole-slide histopathology, gene expression, clinical variables and language-model-derived mutation features. Scientific reports, 16(1), 18546. https://
BibTeX
@article{wang2026multimo
author = {Wang, Tongjie and Alfaro, Javier and Brennan, Paul M and Rajan, Ajitha},
title = {{Multimodal survival analysis of glioblastoma using whole-slide histopathology, gene expression, clinical variables and language-model-derived mutation features}},
journal = {Scientific reports},
year = {2026},
month = apr,
volume = {16},
number = {1},
pages = {18546},
publisher = {Nature Publishing Group},
issn = {2045-2322},
doi = {10.1038/
url = {https://
pmid = {42014603},
pmcid = {PMC13269476}
}
RIS
TY - JOUR
AU - Wang, Tongjie
AU - Alfaro, Javier
AU - Brennan, Paul M
AU - Rajan, Ajitha
TI - Multimodal survival analysis of glioblastoma using whole-slide histopathology, gene expression, clinical variables and language-model-derived mutation features
T2 - Scientific reports
J2 - Sci Rep
PY - 2026
DA - 2026/
VL - 16
IS - 1
SP - 18546
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Multimodal survival analysis of glioblastoma using whole-slide histopathology, gene expression, clinical variables and language-model-derived mutation features",
"container-title": "Scientific reports",
"author": [
{
"family": "Wang",
"given": "Tongjie"
},
{
"family": "Alfaro",
"given": "Javier"
},
{
"family": "Brennan",
"given": "Paul M"
},
{
"family": "Rajan",
"given": "Ajitha"
}
],
"container-title-short":
"volume": "16",
"issue": "1",
"page": "18546",
"DOI": "10.1038/
"PMID": "42014603",
"PMCID": "PMC13269476",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
21
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.xcrm.2026.102766 [code]
- A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.Journal: Cell reports. MedicineIn common: Keras, TensorFlow, OpenCV, 5 other tools, other condition, 1 reference
- [2] doi:10.1093/jnen/nlaf152 [code]
- Clinical and pathologic correlations of machine learning quantification of Aβ deposits across 3 brain regions of decedents with Alzheimer disease.Journal: Journal of neuropathology and experimental neurologyIn common: Keras, TensorFlow, OpenCV, 6 other tools, clinical / translational
- [3] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: Keras, TensorFlow, OpenCV, 6 other tools
- [4] doi:10.1371/journal.pcbi.1014571 [code]
- SynAPSeg: A novel dataset and image analysis framework for deep learning-based synapse detection and quantification.Journal: PLoS computational biologyIn common: Keras, TensorFlow, OpenCV, 6 other tools
- [5] doi:10.1126/sciadv.aed3650 [code]
- Truthful visualizations for mass spectrometry imaging enable high-spatial-resolution interactive &
lt;i& gt;m/ z& lt;/ i& gt; mapping and exploration. Journal: Science advancesIn common: Keras, TensorFlow, OpenCV, 6 other tools - [6] doi:10.1364/boe.605322 [code]
- Generalized plaque digitization framework for multi-dimensional mesoscopic images.Journal: Biomedical optics expressIn common: Keras, TensorFlow, OpenCV, 6 other tools
- [7] doi:10.1038/s41467-026-72057-9 [code]
- Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.Journal: Nature communicationsIn common: Keras, TensorFlow, OpenCV, 6 other tools
- [8] doi:10.1002/epi.70296 [code]
- Fully automated three-dimensional deep learning-based magnetic resonance imaging segmentation of brain cavities in epilepsy surgery.Journal: EpilepsiaIn common: Keras, TensorFlow, OpenCV, 5 other tools, clinical / translational
- [9] doi:10.1186/s12880-026-02481-2 [code]
- Deep learning-based neuroanatomical profiling reveals population-specific brain changes in multiple sclerosis: a large-scale Middle Eastern study.Journal: BMC medical imagingIn common: Keras, TensorFlow, OpenCV, 5 other tools, clinical / translational
- [10] doi:10.1038/s41586-026-10348-3 [code]
- An enteric neuron ionotropic receptor regulates salt stress resistance.Journal: NatureIn common: Keras, OpenCV, scikit-image, 5 other tools, 1 reference
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 12 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:a1e5074112d6c4b7…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
