All models

HisToGene

A modified Vision Transformer that predicts spot-level gene expression from histology image patches.

Molecules, proteins and genomics · 227 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (16 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
106.6M
Operations
227
Framework
PyTorch
Recurrent
No
Published
2021, bioRxiv
Cited by
129 (as of 28 October 2026)
Authors
Minxing Pang, Kenong Su, Mingyao Li
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m17366
Graph hash
e86eb519823bfdd1747a003e8f5732e86133551f3862d338ef87cd8f1402cae5
Skeleton hash
ac0bd07ad0284bd64b694c54bcdf34031caedd1b3dfb3a37e7452693c7bd07b8
Architecture hash
61d0e45d746b07e8161b42f176a196abe305522346c608851a32c7f2472d6938
Diagram SHA-256
79135fe928a1cede208463daa79493f1bf6d2988ac9e3dc60a6dad1c2bb0a947
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

HisToGene is a deep learning model that predicts gene expression from histology images. It learns from spatial transcriptomics (ST) data, and the aim is to predict expression for tissue sections where only a histology image is available.

To account for the spatial dependency between measured spots, it uses a modified Vision Transformer, which models the positional relationship between spots through a positional embedding. Patches are extracted from the histology image according to the coordinates and size of each spot. The number of spots that cover a tissue area is not fixed, unlike the fixed number of patches in the standard Vision Transformer, so the authors redesigned the encoding part. The paper's implementation has 8 multi-head attention layers with 16 attention heads.

With a dense patch sampling strategy, the trained model can also predict gene expression at 4 times the original spot-level resolution. On 32 HER2+ breast cancer samples with 9,612 spots and 785 genes, the paper reports that HisToGene outperforms ST-Net both in gene expression prediction and in clustering tissue regions from the predicted expression.

Key idea. The paper adapts the Vision Transformer to spatial transcriptomics, treating each tissue section as a sequence of spot patches with positional embeddings, to predict gene expression from histology images.

  • HisToGene
  • gene expression prediction from histology
  • spatial transcriptomics
  • histology image
  • H&E image gene expression
  • super-resolution gene expression
  • virtual transcriptomics
  • HER2+ breast cancer

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Pang_2021, title={Leveraging information in spatial transcriptomics to predict super-resolution gene expression from histology images in tumors}, url={http://dx.doi.org/10.1101/2021.11.28.470212}, DOI={10.1101/2021.11.28.470212}, publisher={openRxiv}, author={Pang, Minxing and Su, Kenong and Li, Mingyao}, year={2021}, month=Nov }