
HeartSpot: Privatized and Explainable Data
Compression for Cardiomegaly Detection
Elvin Johnson∗, Shreshta Mohan∗, Alex Gaudio∗†‡ , Asim Smailagic∗, Christos Faloutsos∗, Aur´
elio Campilho†‡
∗Carnegie Mellon University, Pittsburgh, PA, USA
†Faculty of Engineering of the University of Porto, Porto, Portugal
‡INESC TEC, Porto, Portugal
Abstract—Advances in data-driven deep learning for chest
X-ray image analysis underscore the need for explainability,
privacy, large datasets and significant computational resources.
We frame privacy and explainability as a lossy single-image
compression problem to reduce both computational and data
requirements without training. For Cardiomegaly detection in
chest X-ray images, we propose HeartSpot and four spatial bias
priors. HeartSpot priors define how to sample pixels based on
domain knowledge from medical literature and from machines.
HeartSpot privatizes chest X-ray images by discarding up to 97%
of pixels, such as those that reveal the shape of the thoracic cage,
bones, small lesions and other sensitive features. HeartSpot priors
are ante-hoc explainable and give a human-interpretable image
of the preserved spatial features that clearly outlines the heart.
HeartSpot offers strong compression, with up to 32xfewer pixels
and 11xsmaller filesize. Cardiomegaly detectors using HeartSpot
are up to 9xfaster to train or at least as accurate (up to +.01
AUC ROC) when compared to a baseline DenseNet121. HeartSpot
is post-hoc explainable by re-using existing attribution methods
without requiring access to the original non-privatized image.
In summary, HeartSpot improves speed and accuracy, reduces
image size, improves privacy and ensures explainability.
Index Terms—Explainability, Privacy, Compression, Domain
Knowledge, Chest X-ray, Medical Image Analysis, Deep Learning
I. INTRODUCTION
Cardiomegaly is a medical condition describing an enlarged
heart. It can indicate underlying or life-threatening heart prob-
lems. Medical domain knowledge of Cardiomegaly describes
its detection from chest X-ray images as a relation between the
volume of the heart to the volume of the thoracic cage. The
cardio-thoracic ratio in a two-dimensional image, for instance,
compares the transverse diameter of the heart in pixels to that
of the thoracic cage. A variation compares the area of the heart
to the lungs [1]. Our approach, based on sampling of lines of
pixels, encompasses the main idea of both techniques.
Existing literature on Cardiomegaly detection from chest X-
ray considers the problem via classification or segmentation
[2]. For classification on the CheXpert [3] dataset of chest
X-ray images, several standard deep networks were evaluated
The TAMI project is funded by the European Regional Development
Fund (ERDF) through the Programa Operacional Regional do Norte (NORTE
2020) and by National Funds through the Portuguese Foundation for Science
and Technology (FCT). I.P. within the scope of the CMU Portugal Pro-
gram LA/P/0063/2020 and NORTE-01-0247-FEDER-045905. Alex Gaudio
is funded by the FCT, SFRH/BD/143114/2018.
(a) Good Compression (b) Fast and Accurate
(c) Privatized and Explainable (d) Post-hoc Explainable
Fig. 1: HeartSpot compresses with no learning (1a) to give a
fast and accurate (1b) model. HeartSpot image compression
is ante-hoc explainable and privatized (1c) with useful post-
hoc saliency map explanations obtained without access to the
original chest X-ray image (1d).
to offer an expected benchmark [4]. The work of [5] trains a
U-Net to segment the heart and thorax, and then computes
the thoracic ratio from image segmentation. Segmentation
improves performance over classification, but requires pixel-
wise labels. The existing literature does not consider privacy
or compression. Our approach improves both efficiency and
privacy through single-image compression and is compatible
with any of these classification or segmentation approaches.
As in Figure 1, the main contributions of HeartSpot are:
•Compression of single images with no learning, giving
up to to 11xsmaller filesize and 32xfewer pixels.
•Speed and Accuracy Gains up to +0.01 area under ROC
curve or 9xfaster training throughput.
•Privatized and Ante-hoc explainable compression via a
spatial bias prior. Up to 97% of pixels are removed while
preserved pixels clearly visualize the heart.
•Post-Hoc Attribution Explanations without requiring
the original image and improved via a quantile filter.
arXiv:2210.02241v1 [eess.IV] 5 Oct 2022