Magnifying Networks for Images with Billions of Pixels

Neofytos Dimitriou, Ognjen ArandjelovicarXiv 2021

Abstract

The shift towards end-to-end deep learning has brought unprecedented advances in many areas of computer vision. However, deep neural networks are trained on images with resolutions that rarely exceed $1,000 \times 1,000$ pixels. The growing use of scanners that create images with extremely high resolutions (average can be $100,000 \times 100,000$ pixels) thereby presents novel challenges to the field. Most of the published methods preprocess high-resolution images into a set of smaller patches, imposing an a priori belief on the best properties of the extracted patches (magnification, field of view, location, etc.). Herein, we introduce Magnifying Networks (MagNets) as an alternative deep learning solution for gigapixel image analysis that does not rely on a preprocessing stage nor requires the processing of billions of pixels. MagNets can learn to dynamically retrieve any part of a gigapixel image, at any magnification level and field of view, in an end-to-end fashion with minimal ground truth (a single global, slide-level label). Our results on the publicly available Camelyon16 and Camelyon17 datasets corroborate to the effectiveness and efficiency of MagNets and the proposed optimization framework for whole slide image classification. Importantly, MagNets process far less patches from each slide than any of the existing approaches ($10$ to $300$ times less).

Introduction

In computer vision, standard datasets typically feature resolutions around $1,000 \times 1,000$ pixels. However, specialized fields such as digital pathology utilize Whole Slide Images (WSIs) that can exceed $100,000 \times 100,000$ pixels, totaling billions of pixels. Processing these images directly is computationally infeasible for modern hardware.

The conventional solution involves "patching"—dividing the image into thousands of small tiles. This approach suffers from significant drawbacks: it is computationally wasteful as it processes irrelevant background areas, it loses global context by fixing magnification and field of view, and it relies on heuristic-based patch selection rather than learned importance.

Magnifying Networks (MagNets)

MagNets address these challenges by mimicking the workflow of a pathologist. Instead of an exhaustive search, the network starts at a low magnification to identify suspicious regions and recursively "zooms in" on areas of interest.

Architecture and Mechanism

A MagNet consists of $N$ stacked magnifying layers. Each layer identifies Regions of Interest (ROIs) at its current resolution. To infer the necessary affine transformation parameters (scaling and translation) without the memory overhead of traditional localization networks, MagNets employ a Spatial Sparsemax operation on the final convolutional feature maps.

Overview of the MagNet architecture showing the recursive zooming process and the interaction with the image dataloader to retrieve high-resolution patches.

Once an ROI is identified, the system performs differentiable upsampling, retrieving a higher-resolution version of that specific area from the underlying image pyramid. The final patches at the highest magnification are processed by an InceptionNet-v3 feature extractor and a Gated Recurrent Unit (GRU) for slide-level classification. Crucially, the entire pipeline is trained end-to-end using only weak supervision (global slide-level labels).

Experimental Evaluation

The model was evaluated on the Camelyon16 and Camelyon17 datasets, which focus on breast cancer metastasis detection in lymph nodes. These datasets present varying levels of difficulty, from macro-metastases to Isolated Tumor Cells (ITC).

Performance and Efficiency

MagNets demonstrated state-of-the-art performance while being significantly more efficient than traditional methods. On Camelyon17, a 3-layer MagNet achieved a 95% AUROC for macro-metastasis detection. For the more challenging ITC detection, a 4-layer MagNet achieved a 63% AUROC, outperforming shallower versions and baselines.

Efficiency is a standout feature: MagNets process 10 to 300 times fewer patches per slide than existing tiling methods. Furthermore, the model showed strong generalization across different hospital scanning profiles without requiring extensive color normalization.

Visualization of the hierarchical patch selection process. The model identifies and magnifies specific regions, providing an interpretable audit trail for clinical decision-making.

Discussion and Conclusion

The "learning to zoom" paradigm allows MagNets to access high-fidelity data only where needed, ensuring both efficiency and accuracy. The model's innate interpretability is a key advantage for clinical applications, as it provides a clear visualization of the regions used for classification.

However, some limitations remain. The number of patches grows exponentially with the number of layers ($P^L$), which can strain GPU memory. Training stability also required specific initialization strategies, such as "freezing" the initial patch of the second layer to ensure the network begins by surveying the entire tissue area. Future work may explore optimizing the sparsemax mechanism to support more patches per layer and extending the architecture to other gigapixel domains like satellite imagery.

Summary updated

BibTeX
@misc{dimitriou2021magnifying,
  author = {Neofytos Dimitriou and Ognjen Arandjelovic},
  title = {{Magnifying Networks for Images with Billions of Pixels}},
  year = {2021},
  eprint = {2112.06121},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.06121},
}
Figure