An Effective Transformer-based Solution for RSNA Intracranial Hemorrhage Detection Competition

Fangxin Shang, Siqi Wang, Xiaorong Wang, Yehui YangarXiv 2022

TL;DR

Researchers from Baidu have developed a Transformer-based end-to-end model for detecting intracranial hemorrhage (IHD) that outperforms the 2019 RSNA competition winner. Remarkably, their solution achieves superior accuracy while using 75% fewer parameters and 90% fewer FLOPs, demonstrating that architectural efficiency and semi-supervised learning can replace massive, computationally expensive model ensembles.

What Problem Does This Paper Address?

Intracranial hemorrhage (bleeding inside the skull) is a critical medical emergency where rapid, accurate detection is vital. In 2019, the Radiological Society of North America (RSNA) held a competition to automate IHD detection from CT scans.

The challenge is two-fold: models must identify features within a single 2D slice (intra-slice) and understand the spatial relationship between adjacent slices (inter-slice). Most top-tier solutions at the time used a decoupled approach: a 2D CNN for slice features followed by an RNN (like a Bi-GRU or LSTM) for the sequence.

However, this approach has two major drawbacks:

  1. Decoupled Training: Because of massive memory requirements, the two stages were often trained separately. This "truncates" the gradient, meaning errors from the first stage accumulate and cannot be corrected by the second.
  2. Ensemble Overload: To win, teams used massive ensembles of 7 to 31 different models. This is computationally prohibitive for real-world clinical deployment.

Methods

The authors propose a unified, end-to-end architecture that leverages the memory efficiency of Transformers to overcome these hurdles.

1. The Architecture

As shown in Figure 1, the model processes a CT scan as a batch of 2D images:

  • Intra-slice Extractor: They use a Swin-Transformer (specifically Swin-B). Unlike standard CNNs that focus on local features, the Swin-Transformer uses attention weights to establish relationships between different patches of the image. They optimized this with a "post-norm" approach (inspired by Swin-v2) to stabilize training.
  • Inter-slice Extractor: A two-layer Sequential Transformer fuses the features from different slices.
  • End-to-End Training: Because Transformers are more memory-efficient for this task, the entire pipeline fits on a single modern GPU, allowing gradients to flow back from the final classification head all the way to the input pixels.
Figure 1: Workflow of our end-to-end model. One CT scan is transformed into a batch of 2D images with 3 channels. The intra-slice features are extracted by the swin-transformer model and transformed into inter-slice features by the sequential transformer. The auxiliary classifier is introduced to speed up the convergence speed.

2. Pre-processing

CT scans contain a wide range of Hounsfield Unit (HU) values. To help the model, the authors convert each grayscale CT slice into a 3-channel "pseudo-color" image by applying three different windows: one optimized for brain tissue, one for blood, and one for soft tissue (see Figure 3).

Figure 3: The conversion from CT slice to the 3-channel image. The slice is intraparenchymal hemor- rhage positive and one can easily see the blood in the brain tissue and blood windows.

3. Semi-Supervised Learning (SSL)

To boost performance without adding inference complexity, they employed a FixMatch-inspired workflow. They used an initial ensemble to generate "pseudo-labels" for the unlabeled test set. The model was then fine-tuned using these pseudo-labels on strongly augmented versions of the images, effectively allowing the model to learn from the test distribution itself.

Figure 2: Semi-supervised learning procedure to reduce the number of the ensemble models. Inspired by FixMatch[14], the ensemble result can be seen as the pseudo-label of the unlabeled samples(test set), the model is optimized by Lu with strong-aug unlabeled samples and L1+L2 with labeled samples simultaneously.

Datasets

  • RSNA-IHD Dataset (2019): The primary dataset, consisting of over 750,000 slices across training and validation sets. It includes five specific hemorrhage types (epidural, intraparenchymal, intraventricular, subarachnoid, subdural) and an "any" indicator.
  • CQ500: An external dataset used for experimentation, though the authors found it did not improve performance due to its coarse, series-level annotations compared to the slice-level labels of RSNA-IHD.

Key Insights and Ideas

  • Efficiency is King: The transition from CNN+RNN to a pure Transformer stack allowed for end-to-end training, which eliminated the "accumulated error" problem of decoupled stages.
  • Stability via Post-Norm: Moving the layer normalization in the residual blocks (post-norm) was critical for stable convergence when training the Swin-Transformer on this specific medical task.
  • SSL as an Ensemble-Killer: By using semi-supervised learning, a single model could outperform the winner's 20-model ensemble. This suggests that "learning from the data distribution" is more effective than simply "averaging more models."
  • Implicit Logic: The authors tried to explicitly force the model to follow the logic that "any" = max(other categories), but found the model learned this relationship naturally, and explicit constraints provided no significant gain.

Key Results

The results, summarized in Table 1 (Figure 5), are striking:

  • Performance: The authors' single model achieved a log-loss of 0.04368, beating the competition winner's 20-model ensemble (0.04383). Their 3-model ensemble further improved this to 0.04345.
  • Computational Cost: Their intra-slice extractor requires only 86M parameters and 15G FLOPs, compared to the winner's ~330M parameters and 180G FLOPs per slice.
  • Ablation Study: Table 3 (Figure 6) highlights that while the Transformer architecture is the foundation, the addition of FixMatch (FM) and the post-norm (PN) were the final "tricks" that pushed the model past the state-of-the-art.
Comparison of top solutions

Limitations and Future Work

The authors noted that external data (CQ500) did not help, likely because the labels were not granular enough (series-level vs. slice-level). They also mentioned that while the model is highly effective at classification, there is still room to improve the precision of hemorrhage localization. Future work could involve extending this end-to-end Transformer approach to other slice-wise medical imaging tasks, such as tumor segmentation or organ detection.

Summary updated

BibTeX
@misc{shang2022effective,
  author = {Fangxin Shang and Siqi Wang and Xiaorong Wang and Yehui Yang},
  title = {{An Effective Transformer-based Solution for RSNA Intracranial Hemorrhage Detection Competition}},
  year = {2022},
  eprint = {2205.07556},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.07556},
}

Loading related content...

Figure