Locally orderless tensor networks for classifying two- and three-dimensional medical images

Raghavendra Selvan, Silas Ørting, Erik B Dam

TL;DR

This paper introduces LoTeNet, a novel tensor network architecture for classifying 2D and 3D medical images. By treating small image regions as "locally orderless" and processing them hierarchically with Matrix Product States (MPS), LoTeNet achieves competitive performance with significantly reduced computational resources and GPU memory usage compared to state-of-the-art deep learning methods.

What Problem Does This Paper Address?

Traditional machine learning methods like Support Vector Machines (SVMs) struggle with high-dimensional data, especially large medical images, due to their quadratic space complexity. While deep learning methods have shown promise, they often require substantial computational resources. Tensor networks offer a way to handle high-dimensional data more efficiently by factorizing large tensors into smaller ones. However, existing tensor network approaches for image classification typically flatten images into vectors, losing crucial spatial information and limiting them to small image sizes. This paper aims to bridge this gap by developing a tensor network model that can effectively process high-resolution 2D and 3D medical images while preserving spatial context and maintaining computational efficiency.

Methods

The core of LoTeNet lies in its "locally orderless" approach. Instead of flattening entire images, the method first processes small image patches. A "squeeze operation" is applied to these patches, which reshapes them and increases their feature dimensions, effectively encoding spatial information into features. These squeezed patches are then treated as "locally orderless," meaning their internal spatial arrangement within the patch is less critical than the features they represent.

These locally orderless representations are then processed hierarchically using Matrix Product State (MPS) tensor networks. MPS are a type of tensor network well-suited for approximating high-rank tensors by factorizing them into a chain of lower-rank tensors. In LoTeNet, MPS blocks are applied to these local representations at multiple layers. Each layer consists of squeeze operations followed by MPS blocks, which contract the feature vectors to produce a summarized representation. This hierarchical aggregation allows the model to retain global structure while processing local information efficiently. The model is trained end-to-end using backpropagation to optimize the MPS parameters.

Datasets

The proposed LoTeNet model was evaluated on three public medical imaging datasets:

  • PCam Dataset: A binary histopathology image classification dataset for detecting tumor tissue in image patches.
  • LIDC Dataset: A dataset of thoracic CT images with lesion annotations, used for binary classification of tumors.
  • OASIS Dataset: A dataset of T1-weighted MRI scans used for classifying Alzheimer's disease based on clinical dementia rating scores.

Key Insights and Ideas

  • "Locally Orderless" Processing: Treating small image regions as orderless and encoding their spatial information into feature dimensions is a key innovation. This allows tensor networks, which typically operate on vectors, to effectively process image data without losing critical spatial context.
  • Hierarchical Aggregation with MPS: The hierarchical application of MPS blocks to processed image patches allows for efficient learning of global image structure from local features. This is analogous to how CNNs use pooling layers but achieved through tensor network operations.
  • Computational Efficiency: LoTeNet demonstrates a significant reduction in GPU memory utilization and computational cost compared to existing methods, making it suitable for high-resolution medical images. This is a major advantage for practical deployment.
  • Fixed Architecture Robustness: The ability of a single, fixed LoTeNet architecture (with a specific bond dimension) to perform well across diverse datasets suggests a robust and generalizable approach, reducing the need for extensive dataset-specific architecture tuning.

Key Results

  • Competitive Performance: LoTeNet achieved performance comparable to or superior to state-of-the-art methods on all three datasets. For example, on the PCam dataset, LoTeNet achieved an AUC of 0.943, comparable to Rotation Eq. CNN (0.963) and Densenet (0.962). On the LIDC dataset, LoTeNet achieved an AUC of 0.874, outperforming Densenet (0.829) and Tensor Net-X (0.847).
  • Reduced GPU Memory: LoTeNet required significantly less GPU memory. For instance, on the PCam dataset, it used only 0.8 GB, compared to 11 GB for Rotation Eq. CNN and 10.5 GB for Densenet. Similarly, on LIDC, it used 0.7 GB compared to 10.5 GB for Densenet.
  • 3D Image Classification: LoTeNet demonstrated strong performance on 3D medical images (OASIS dataset), achieving a balanced accuracy of 0.71 ± 0.09, outperforming a subject-level 3D CNN (0.67 ± 0.08).
  • Parameter Efficiency: While not always having the fewest parameters, LoTeNet's approach to handling high-dimensional data leads to more efficient use of parameters for achieving good performance.

Limitations and Future Work

  • Computational Time: The current implementation of LoTeNet exhibits higher computation time compared to CNN and MLP baselines, attributed to the lack of native support for efficient tensor contraction in current deep learning frameworks. Ongoing efforts to improve tensor network implementations are expected to mitigate this.
  • Hyperparameter Control: The reliance on a single hyperparameter (bond dimension, β) for controlling model capacity can lead to discrete jumps in parameter count, potentially making it harder to find optimal capacity and leading to over/under-fitting on small datasets.
  • Weight Sharing: The current model does not share weights between MPS blocks acting on different patches within a layer. Introducing weight-sharing could further reduce the number of parameters and potentially improve generalization.
  • Extending to Other Tasks: The authors suggest future work in extending LoTeNet to more diverse medical imaging tasks such as segmentation and registration.
  • Equivariance: Investigating whether equivariance to translation can be induced in tensor network models through weight-sharing is another promising future direction.

Summary updated

BibTeX
@article{selvan2021locally,
  author = {Raghavendra Selvan and Silas Ørting and Erik B Dam},
  title = {{Locally orderless tensor networks for classifying two- and three-dimensional medical images}},
  journal = {The Journal of Machine Learning for Biomedical Imaging},
  year = {2021},
  doi = {10.59275/j.melba.2021-g65b},
}
Figure