Surface Vision Transformers: Flexible Attention-Based Modelling of Biomedical Surfaces

Simon Dahan, Hao Xu, Logan Z. J. Williams, Abdulah Fawaz, Chunhui Yang, Timothy S. Coalson, Michelle C. Williams, David E. Newby, A. David Edwards, Matthew F. Glasser, Alistair A. Young, Daniel Rueckert, Emma C. RobinsonarXiv 2022

Abstract

Recent state-of-the-art performances of Vision Transformers (ViT) in computer vision tasks demonstrate that a general-purpose architecture, which implements long-range self-attention, could replace the local feature learning operations of convolutional neural networks. In this paper, we extend ViTs to surfaces by reformulating the task of surface learning as a sequence-to-sequence learning problem, by proposing patching mechanisms for general surface meshes. Sequences of patches are then processed by a transformer encoder and used for classification or regression. We validate our method on a range of different biomedical surface domains and tasks: brain age prediction in the developing Human Connectome Project (dHCP), fluid intelligence prediction in the Human Connectome Project (HCP), and coronary artery calcium score classification using surfaces from the Scottish Computed Tomography of the Heart (SCOT-HEART) dataset, and investigate the impact of pretraining and data augmentation on model performance. Results suggest that Surface Vision Transformers (SiT) demonstrate consistent improvement over geometric deep learning methods for brain age and fluid intelligence prediction and achieve comparable performance on calcium score classification to standard metrics used in clinical practice. Furthermore, analysis of transformer attention maps offers clear and individualised predictions of the features driving each task.

Introduction

In medical imaging, many vital structures—such as the folded surface of the human brain or the chambers of the heart—are best represented as 3D meshes (surfaces) rather than 3D volumes (voxels). Analyzing these surfaces is the domain of Geometric Deep Learning (gDL). However, current gDL methods, such as Graph Convolutional Networks (GCNs), primarily rely on local operations. Much like standard CNNs, they excel at learning local patterns but struggle to capture long-range spatial relationships across the entire surface. Furthermore, many gDL models are highly specialized for specific geometries (like spheres), making them difficult to apply across different organs.

The authors of "Surface Vision Transformers" sought a unified, flexible architecture that could handle diverse biomedical surfaces and model global dependencies through self-attention. They introduce Surface Vision Transformers (SiT), a novel framework that adapts the Vision Transformer (ViT) architecture to process complex 3D biomedical surfaces.

Methodology

The core innovation of SiT is the patching mechanism for general surface meshes. To utilize a Transformer, the 3D surface must be converted into a sequence of tokens.

Surface Patching

The patching strategy varies depending on the mesh type:

  • Brain Surfaces: The authors resample the mesh onto a regular icosahedron and divide it into triangular patches.
  • Cardiac Surfaces: For non-closed cardiac surfaces, they use a subdivision surface model (Catmull-Clark) to create patches.

Embedding and Architecture

Each patch is flattened into a feature vector and projected into a latent space. A positional embedding is added to provide the model with spatial context for each patch on the 3D structure. The sequence is then fed into a standard Transformer architecture (based on the DeiT variant). It utilizes Multi-Head Self-Attention (MHSA) to allow every patch to "attend" to every other patch, regardless of their distance on the mesh.

Self-Supervised Pre-training

To address the "small data" challenge common in medical imaging, the researchers employed Masked Patch Prediction (MPP). The model is trained to reconstruct missing (masked) patches of the surface, allowing it to learn the underlying "grammar" of biomedical surfaces before being fine-tuned on specific clinical tasks.

Experimental Setup

The authors validated SiT across three distinct biomedical domains:

  • dHCP (Developing Human Connectome Project): 588 neonatal brain scans used to predict postmenstrual age at scan and gestational age at birth.
  • HCP (Human Connectome Project): 446 healthy adult scans used to predict "fluid intelligence" (problem-solving ability).
  • SCOT-HEART: 615 cardiac meshes used to classify patients with high vs. low coronary artery calcium scores, a major risk factor for heart disease.

Results and Discussion

SiT demonstrated strong performance across all tasks, often outperforming established geometric deep learning models.

Performance Metrics

  • Brain Age Prediction: On the dHCP dataset, SiT achieved a Mean Absolute Error (MAE) of 0.89 weeks, outperforming MoNet (1.05) and Spherical UNet (1.11).
  • Fluid Intelligence: SiT achieved a Pearson correlation of 0.35, significantly higher than the state-of-the-art spatio-temporal graph network (MS-G3D), which scored 0.26.
  • Cardiac Classification: SiT achieved an AUC of 0.742 for calcium score classification, performing on par with standard clinical metrics (logistic regression using volume and mass) while using raw mesh geometry directly.

Key Insights

  • Global Context: Unlike CNNs with limited receptive fields, SiT can relate features across the entire surface (e.g., frontal to parietal lobes). This is crucial for complex cognitive tasks like fluid intelligence.
  • Robustness to Alignment: SiT performs significantly better than spherical CNNs on "native" (unregistered) data. Its attention mechanism is more flexible regarding spatial orientation compared to models requiring perfect template alignment.
  • Interpretability: Visualizing attention maps allows researchers to identify which anatomical regions drive predictions. For intelligence tasks, the model focused on association areas in the frontal and parietal lobes, regions known to be critical for cognition.

Conclusion

SiT brings the power of long-range self-attention to biomedical surface analysis. While the model shows great promise, the authors note that Transformers are data-hungry, showing signs of overfitting on smaller datasets even with pre-training. Future work may explore multi-modal SiT (combining surface and volumetric data), dynamic 4D surface analysis for beating hearts, and hybrid architectures that reintroduce local inductive biases to improve efficiency on small datasets.

Code is available on Github: https://github.com/metrics-lab/surface-vision-transformers

Summary updated

BibTeX
@misc{dahan2022surface,
  author = {Simon Dahan and Hao Xu and Logan Z. J. Williams and Abdulah Fawaz and Chunhui Yang and Timothy S. Coalson and Michelle C. Williams and David E. Newby and A. David Edwards and Matthew F. Glasser and Alistair A. Young and Daniel Rueckert and Emma C. Robinson},
  title = {{Surface Vision Transformers: Flexible Attention-Based Modelling of Biomedical Surfaces}},
  year = {2022},
  eprint = {2204.03408},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.03408},
}
Figure