CheXT: Knowledge-Guided Cross-Attention Transformer for Abnormality Classification and Localization in Chest X-rays

1 INTRODUCTION . In medical study , handcrafted radiomics ( Zwanenburg et al. , 2016 ) refers to the process of extracting several quantitative and semiquantitative features from medical images for improved decision support . It has the potential to uncover disease characteristics that are difficult to identify by viewing raw images alone . Given their advantages , researchers have explored the performance of radiomic features for chest X-ray analysis . For example , ( Shi et al . ; Saygılı , 2021 ) extracted a set of radiomic features to diagnose different types of pneumonia . ( Bai et al. , 2020 ) proposed a hybrid model to encode the combination of radiomic features and clinical information . ( Ghosh et al. , 2020 ) presented a new handcrafted feature to distinguish between severe and nonsevere patients . However , all the above methods rely on accurate pathology localization annotations to extract radiomic features from the correct “ region of interest ” ( aka bounding boxes ) but not other irrelevant parts ( Van Griethuysen et al. , 2017 ) . Such bounding boxes are usually expensive and time-consuming to acquire by humans and , if inaccurate , will tremendously degrade the reliability of radiomic features . There is thus an unmet need to automatically localize pathologies on chest X-rays to facilitate radiomic features extraction . Under the rapid development of deep learning , many researchers have made their efforts to utilize the Convolutional Neural Networks ( CNNs ) in building automated systems of chest X-ray abnormality classification and localization ( Rajpurkar et al. , 2017 ; Wang et al. , 2017 ; Li et al. , 2018 ; Liu et al. , 2019b ; Rozenberg et al. , 2020 ; Wang et al. , 2021 ) . However , CNN methods witness several limitations . First , chest X-rays own valuable domain knowledge and domain-specific features , such as radiomic features . Thus , they could have blessed better recognition but are unfortunately overlooked by most CNNs . Second , chest X-rays have more subtle discriminative features compared to natural images , making their recognition more challenging . Finally , CNNs are often criticized for being non-transparent and their predictions not traceable by humans , hence hinders their acceptance and adoption by clinicians . Why Transformers for Chest X-rays ? The latest surge of transformers provides a promising alternative to model chest X-rays . Transformer was first prevailing to Natural Language Processing ( Vaswani et al. , 2017 ; Devlin et al. , 2018 ; Brown et al. , 2020 ) , followed by its recent success in computer vision ( Dosovitskiy et al. , 2020 ; Carion et al. , 2020 ; Zhu et al. , 2020 ) and multi-modal learning ( Ying et al. , 2021 ) . It is an “ universal modeling tool ” that can unify the feature extraction and fusion from different input modalities within one model , without domainspecific model tweaks . For example , ( Akbari et al. , 2021 ) demonstrated to learn powerful multi-modal representations from unlabeled video , audio , and text data , using one Transformer architecture . Bringing that into the context of chest X-rays , we see the tantalizing potential that a Transformer could organically and jointly learn from two views of chest X-rays : ( i ) raw X-ray images that contain the richest details , hence benefiting from the data-driven learning capacity ; and ( ii ) radiomic features that encode critical domain prior knowledge , hence effectively guiding and regularizing the learning process . The appeal of Transformers is , however , blocked by a “ chicken-and-egg ” problem : as aforementioned , the extraction of reliable radiomic features hinge on the pathology localization , but then the pathology localization is often absent in images and also needs to be learned first . This paper presents a holistic framework of Knowledge-Guided Cross-Attention Transformer for Chest X-ray analysis , named CheXT ( Figure 1 ) . CheXT consists of two Transformer-based branches that learn from two data formats characterizing the same patient : the image and radiomics branches . Both are deeply fused and interacted by cross-attention layers ( Chen et al. , 2021a ) . Notably , the radiomic features need be extracted from the learned pathology localizations , which are not readily available . The key enabling technology to resolve this hurdle , is to construct a “ feedback loop ” during training : the image branch leverages its learned attention to estimating pathology localization , which is then utilized to extract radiomic features from images in the radiomics branch . Training under a unified contrastive loss , such an end-to-end optimization loop can bootstrap accurate pathology localization from image data , with no bounding boxes used for training . Our contributions are outlined as follows : • We leverage the radiomic feature as an “ auxiliary input modality ” correlated with the raw image modality and encoded with domain knowledge . We then propose a novel knowledgeguided cross-attention Transformer , CheXT , to jointly extract and fuse image and radiomic feature representations for chest X-ray analysis . • To resolve the key “ chicken-and-egg ” problem of extracting radiomic features without available pathology localization , we construct an innovative optimization loop with the image and radiomic branches deeply interacting via attention . Such end-to-end loop can bootstrap accurate pathology localization from images without using human-annotated bounding boxes . • Our approach achieve superior classification and localization results against several competitive baselines , on the NIH chest X-ray benchmark . Notably , compared to existing approaches , CheXT generates more accurate disease localization for extracting radiomic features , by a significant average margin of 3.6 % over different IoU thresholds . 2 RELATED WORK . Radiomics in Medical Diagnosis . The design of radiomics involves biological and medical data and prior knowledge . Thus , radiomics vastly enriches images and expands the horizons of the image toward in-vivo biologic information extraction ( Gillies et al. , 2016 ) . In image-based biomarkers for cancer staging and prognostication , radiomics had shown promising power ( Nasief et al. , 2019 ) . Radiomics extracts quantitative data from medical images to represent tumor phenotypes , such as spatial heterogeneity of a tumor and spatial response variations . ( Eilaghi et al. , 2017 ) demonstrated that radiomic of CT texture features are associated with the overall survival rate of pancreatic cancer . ( Chen et al. , 2017 ) revealed that the first-order radiomic features ( e.g. , mean , skewness , and kurtosis ) are correlated with pathological responses to cancer treatment . ( Huang et al. , 2018 ) showed that radiomics could increase the positive predictive value and reduce the false-positive rate in lung cancer screening for small nodules compared with radiologists . ( Zhang et al. , 2018 ) found that multiparametric MRI-based radiomics nomograms provided improved prognostic ability in advanced nasopharyngeal carcinoma . In comparison , deep learning is often criticized for being a “ black box ” and lacks interpretability despite high predictive accuracy . This limitation has motivated many interpretable learning techniques including activation maximization ( Erhan et al. , 2009 ) , network inversion ( Mahendran & Vedaldi , 2015 ) , GradCAM ( Selvaraju et al. , 2016 ) , and network dissection ( Bau et al. , 2017 ) . We believe that the joint utilization of radiomics and interpretable learning techniques in our framework can further advance accurate yet interpretable learning in the medical image domain . Transformers for Medical Images . Recently , Vision Transformer ( ViT ) ( Dosovitskiy et al. , 2020 ) achieved state-of-the-art classification on ImageNet by directly applying Transformers with global self-attention to full-sized images . Inspired by the promising performance of ViT , researchers have recently applied the idea to medical images . For example , ( Oktay et al. , 2018 ; Wang et al. , 2019 ; Chen et al. , 2021b ) used the attention mechanism to boost the performance of medical image segmentation . ( Valanarasu et al. , 2021 ) proposed a gated axial-attention model to introduce an additional control mechanism in the self-attention module . ( Park et al. , 2021 ) utilized a hybrid framework of CNN and Transformer for Covid-19 prediction . However , those methods did not consider any domain prior knowledge . ( Han et al. , 2021 ) applied pre-extracted radiomic features to guide pneumonia detection from chest X-ray images . However , they adopted a convolutional backbone for image encoder , while using a another specifically crafted radiomic features encoder . Therefore , the method involves no joint interaction between image and radiomic features , and need to use accurate bounding boxes during training in order to extract radiomic features . Hence , their method dramatically limits usability in clinical practice . 3 METHOD . An overview of CheXT is illustrated in Figure 2 . In the following subsections , we will first present Cross-attention Vision Transformer ( CrossViT ) , a recent two-branch ViT backbone on which CheXT is built , and then describe our many unique improvements customized for Chest X-ray analysis . 3.1 PRELIMINARY : VIT AND CROSS-ATTENTION . ViT first converts an image into a sequence of patch tokens by dividing the image with certain patch size and linearly projecting each patch into tokens . A special token ( CLS ) is added in front of the sequence , as in the original BERT ( Devlin et al. , 2018 ) . Then , all tokens are passed through stacked Transformer encoders . Finally , the hidden state corresponding to the CLS token is used as the aggregate sequence representation for image classification . A Transformer encoder is composed of a sequence of blocks where each block contains multiheaded self-attention with a feed-forward network . Layer normalization and residual shortcuts are applied before and after every block , respectively . The granularity of the patch size affects the accuracy and complexity of ViT . Therefore , ViT can perform better with fine-grained patch size but with higher FLOPS and memory consumption ( Chen et al. , 2021a ) . To relieve this problem , CrossViT ( Chen et al. , 2021a ) was proposed with a dual-branch ViT where either branch operates at a different patch size , as its own “ view ” of the image . The cross-attention module is then used to fuse information between the branches to balance the patch sizes and complexity . Similar to ViT , the final hidden vector of CLS from two branches are used for image classification . 3.2 OUR PROPOSED CHEXT MODEL . CrossViT supplies a graceful framework to simultaneously tackle and fuse two different “ views ” from the same input data , e.g. , different-size image patches in ( Chen et al. , 2021a ) . In CheXT , we extend their idea by treating image itself as one “ view ” and the radiomic feature extracted from the same image as another “ view ” ( Figure 2 ) . The two views are then jointly learned by interacting through cross-attention . Transformer serves as the modality-agnostic backbone for both . Specifically , we introduce a dual-branch cross-attention Transformer where the first ( primary ) branch operates the image part , while the second ( complementary ) branch handles the radiomic features . To resolve the “ chicken-and-egg ” dilemma in extracting reliable radiomic features without bounding boxes , we have designed a novel Bootstrap Your Own Attention ( BYOA ) module , using feedbacks to learn region localization for extracting radiomic features . A simple yet effective module is also utilized to fuse information between the branches . In the subsequent sections , we will describe the two branches , the BOYA module , and the fusion module . Image Branch . The primary image branch uses a Progress-Sampling ViT ( PS-ViT ) ( Yue et al. , 2021 ) as its backbone . Unlike the vanilla ViT that splits images into fixed-size tokens , PS-ViT utilizes an iterative and progressive sampling strategy to locate discriminative regions and avoid over-partition object structures . We experimentally observed PS-ViT outperforms ViT and other variants in our framework because it generates higher-quality and more structure-aware attention maps , which are crucial for estimating the pathology localization during training . Radiomics Branch . The complementary radiomics branch is for processing radiomic features . Handcrafted features usually cover a wide range of categories , such as first-order ( basic intensity and shaped-based features ) , second-order ( texture features extracted from various matrices ) , and more advanced features including those calculated from Fourier and wavelet transforms . Specifically , the radiomic features are composed of the following categories : • First-Order statistics features to measure the distribution of voxel intensities within the bounding boxes . The features include energy ( the measurement of the magnitude of voxel values ) , entropy ( the measurement of uncertainty in the image values ) , and max/mean/median gray level intensity within the region of interest . • Shape-based features , such as Mesh Surface , Pixel Surface , and Perimeter . • Gray-level features , such as Gray Level Co-occurrence Matrix ( GLCM ) , Gray Level Size Zone ( GLSZM ) , Gray Level Run Length Matrix ( GLRLM ) , Neighboring Gray Tone Difference Matrix ( NGTDM ) , and Gray Level Dependence Matrix ( GLDM ) features . In short , radiomic features are a set of quantitative features that can describe the characteristics of medical images . In our framework , we aim to make the hidden features of the CLS similar to the radiomic features to learn the localization of pathologies in the chest X-rays . For this branch , we use the vanilla Transformer ( Liu et al. , 2017 ) as the radiomic features encoder . Please note that the only difference is that the positional encoding module is discarded , since there does not exist any positional relationship between the radiomic features . Bootstrap Your Own Attention ( BYOA ) : A Feedback Loop Module . Our main roadblock is how to generate robust radiomic features without pathology localization . On one hand , radiomic features are dependent on and highly sensitive to the local image regions of interest , for which we have no bounding box annotation . On the other hand , image features would benefit from the guidance from radiomic features that encode important domain knowledge . The learning of image and radiomic features are fully entangled , forming a challenging “ chicken-and-egg ” loop . To address this issue , we design BYOA to constitute an end-to-end feedback loop that can bootstrap accurate pathology localization from image data , without any bounding box used for training ( Figure 3 ) . BYOA contains two components : attention map generation and radiomic feature extraction . • Attention Map Generation . Similar to the approach in ( Caron et al. , 2021 ) , we look at the self-attention of the CLS token on the heads of the last layer . Here , we have two CLS tokens from two branches , but the attention maps only come from the Image branch . Then we apply a threshold on the self-attention maps to generate bounding boxes for the extraction of radiomic features . The choice of the threshold will influence the quality of the radiomic features . Specifically , the threshold is designed as how much active pixels to keep in the generated attention map . The more active pixels we keep , the larger the generated bounding box is . Please see 4.3.3 for more details . • Radiomic Features Extraction . Given the original images and generated bounding boxes , we used the Pyradiomic tool to extract radiomic features ( Van Griethuysen et al. , 2017 ) . Cross-Attention Fusion Module . This fusion involves the CLS token of one branch and patch tokens of the other branch . As the CLS token is the aggregate representation of the branch , this interaction helps include information at different scale . Please refer to ( Chen et al. , 2021a ) for more details about the cross-attention mechanism .

Summary: This paper presents a Transformer-based model CheXT for abnormality classification and localization from chest X-rays with auxiliary modality of radiomic features via a feedback loop module. The output tokens from image and radiomics branches are fused by a cross-attention module for the localization and the disease classification is performed from the output of two CLS tokens. The model is trained by jointly optimizing supervised classification focal loss and unsupervised cross-view contrastive loss. The evaluation on the NIH chest X-ray dataset for 8 cardiopulmonary diseases shows improved performance for disease classification and localization.