arXiv(opens in a new tab)cs.CVAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.30467

Beyond Accuracy: Quantifying Pulmonary Attribution in Anatomy-Guided Chest X-Ray Classification Under Domain Shift

Abdullah Al Mamun, Md. Nasif Osman Khansur, Md Ashraful Hossen Akash, Md. Kishor Morol, Tze Hui Liew

Abstract

Deep-learning models can achieve strong chest X-ray (CXR) classification performance without establishing whether their predictions predominantly rely on pulmonary image content. This study evaluates pulmonary attribution containment as an anatomy-related reliability property distinct from diagnostic performance. We propose DBCA-SegNet-MGAP, a multi-task anatomy-guided CNN-Transformer framework that combines complementary feature representations through bidirectional cross-backbone attention, predicts a soft lung mask, and incorporates this anatomical prior directly into classification through Mask-Guided Adaptive Global Average Pooling (MGAP). Pulmonary attribution containment is quantified using the Anatomical Local Energy Ratio (ALR) and high-intensity cumulative ALR (cALR@0.9). Experiments were repeated across three training seeds using the COVID-19 Radiography Database for four-class internal testing and a locked Shenzhen-to-Montgomery protocol for zero-shot external tuberculosis testing. On COVID-19, the proposed model achieved a weighted F1 of 0.9615±0.00150.9615 \pm 0.0015 and macro ROC-AUC of 0.9906±0.00070.9906 \pm 0.0007. In an architecture-matched dual-bridge comparison, replacing conventional GAP with MGAP

∗^{*}Corresponding author.

Email address: thliew@mmu.edu.my (Tze Hui Liew) increased ALR from 0.3878±0.00980.3878 \pm 0.0098 to 0.7086±0.01040.7086 \pm 0.0104 and cALR@0.9 from 0.5265±0.01010.5265 \pm 0.0101 to 0.9905±0.00180.9905 \pm 0.0018, while weighted F1 remained essentially unchanged ( 0.9618±0.00150.9618 \pm 0.0015 vs. 0.9615±0.00150.9615 \pm 0.0015). Under locked external transfer to Montgomery, ROC-AUC remained 0.9080±0.00430.9080 \pm 0.0043 and pulmonary ALR remained 0.6466±0.00810.6466 \pm 0.0081, whereas weighted F1 decreased to 0.7528±0.00800.7528 \pm 0.0080 and ECE increased to 0.1683±0.00550.1683 \pm 0.0055. These findings show that diagnostic discrimination, calibration, and pulmonary attribution containment are distinct model properties and support their joint evaluation under internal testing and external domain shift.

Keywords: Chest X-ray, pulmonary attribution, anatomy-guided classification, mask-guided pooling, explainable AI, domain shift

1. Introduction

Chest radiography is a widely used imaging modality for the assessment of pulmonary and thoracic abnormalities because it is rapid, comparatively inexpensive, and broadly accessible. Deep-learning methods have consequently been investigated extensively for automated chest X-ray (CXR) classification, including pneumonia, tuberculosis (TB), COVID-19, pulmonary opacity, and other thoracic conditions. CNN-based, Transformer-based, and more recent hybrid architectures have achieved strong diagnostic performance on public CXR datasets [1–3]. However, predictive performance alone does not establish whether a model has learned a diagnostically meaningful decision strategy.

This distinction is particularly important in chest radiography because a CXR contains substantial information outside the pulmonary field. Image borders, embedded text, acquisition protocol, positioning, scanner characteristics, preprocessing patterns, and dataset-specific signatures may correlate with diagnostic labels. A classifier optimized only for label prediction is not required to distinguish pulmonary evidence from such correlations. Previous work has shown that radiographic classifiers can exploit non-clinical shortcuts while maintaining apparently strong internal performance [4]. Consequently, high accuracy or ROC-AUC cannot by itself establish that a model's decision-related attribution is concentrated within clinically relevant pulmonary anatomy.

Anatomical guidance provides one approach to reducing this disconnect. Existing studies have incorporated lung or anatomical part information through cropping, auxiliary segmentation, part-aware representation learning, mask-guided attention, and feature refinement [1, 5, 6]. These approaches demonstrate that anatomical priors can influence thoracic image classification, but they also expose an important distinction: learning pulmonary anatomy is not necessarily equivalent to using pulmonary anatomy during classification. An auxiliary network may predict the lung field accurately while the classification head remains free to aggregate discriminative information from non-pulmonary regions. Establishing anatomical prediction alone is therefore insufficient to demonstrate anatomically concentrated classification behavior.

The feature-aggregation stage provides a direct point at which this distinction can be investigated. Conventional Global Average Pooling (GAP) aggregates spatial features uniformly and does not explicitly distinguish pulmonary from extrapulmonary locations. A learned pulmonary prior can instead be incorporated directly into the aggregation rule. In this study, Mask-Guided Adaptive Global Average Pooling (MGAP) uses a jointly predicted soft lung mask to continuously weight the final spatial representation before classification. Unlike hard lung cropping, the complete radiograph remains available to the feature encoders; the predicted pulmonary probability modifies the relative contribution of spatial features during normalized pooling rather than removing image regions outright.

The representation supplied to such an aggregation mechanism may also influence its effect. CNNs provide strong inductive biases for local texture and morphology, whereas hierarchical vision Transformers offer complementary contextual modeling. Hybrid CNN–Transformer systems have therefore become increasingly common, including approaches based on direct feature interaction, multiscale cross-attention, and lesion-aware Transformer representations [2, 7–9]. Accordingly, CNN–Transformer fusion or cross-attention alone is not treated here as the central novelty. Instead, the present study uses Bidirectional Cross-Backbone Attention Blocks (BCABs) to construct controlled local–global representation states and asks whether the effect of anatomical pooling changes with the preceding feature representation.

A second challenge concerns how anatomical behavior should be evaluated. Grad-CAM [10], Layer-CAM [11], and related methods are widely used to visualize class-associated image regions, but selected heatmaps provide limited evidence about model behavior across an entire test cohort. Moreover, visually plausible saliency does not necessarily imply accurate localization or faithful explanation [3]. The present study therefore separates qualitative visualization from quantitative pulmonary attribution containment. The Anatomical Local Energy Ratio (ALR) measures the fraction of total predicted-class attribution mass contained within the lung field, whereas cumulative ALR at a high attribution threshold (cALR@0.9) evaluates whether the strongest retained attribution is also pulmonary. These measures are deliberately interpreted as attribution containment rather than lesion localization, causal explanation, or diagnostic correctness.

Reliability must additionally be examined beyond the development distribution. Deep-learning systems that perform strongly during internal testing often deteriorate when evaluated on external cohorts because patient populations, acquisition equipment, disease prevalence, imaging protocols, and other data characteristics may differ [12]. Furthermore, different reliability properties need not deteriorate equally. ROC-AUC reflects discrimination or case ranking, whereas fixed-threshold metrics depend on the selected operating point, and probability calibration describes whether predicted confidence remains numerically meaningful [13]. A model may therefore retain useful external discrimination while showing poorer calibration or threshold-dependent classification performance. Current reporting guidance for medical-imaging AI consequently emphasizes explicit separation of internal and external testing and transparent description of data partitions and reference standards [14].

Figure 1 summarizes the reliability gap motivating the study. The potential non-pulmonary cues shown in the diagram are conceptual shortcut risks rather than confirmed features used by the trained models.

These considerations motivate a beyond-accuracy perspective in which diagnostic competence, pulmonary attribution containment, calibration, and external robustness are treated as related but non-equivalent model properties. To investigate these relationships, we develop DBCA-SegNet-MGAP, a multi-task anatomy-guided CNN-Transformer framework. ResNet-50 and Swin-Tiny provide complementary convolutional and hierarchical Transformer representations, while BCABs permit reciprocal feature exchange at intermediate resolutions. A progressive decoder jointly predicts a continuous lung probability map, which is used both for auxiliary anatomical supervision and as the spatial prior for MGAP.

The experimental design is structured to isolate these effects. Conventional CNN and Transformer classifiers provide diagnostic reference baselines, while a lightweight architecture serves as a capacity control. For the full-capacity framework, late-fusion, single-bridge, and dual-bridge representations are each evaluated with GAP and MGAP, enabling architecture-matched GAP→MGAP comparisons without changing the preceding representation. Lung segmentation and classifier attribution are evaluated separately, and principal comparisons are repeated across three independent training seeds.

Figure

Figure 1: Reliability gap in chest X-ray classification: diagnostic performance versus pulmonary attribution containment and external robustness. Strong internal diagnostic performance does not establish whether class-related attribution is concentrated within the pulmonary field or whether diagnostic behavior is preserved under external cohort shift. The pulmonary anatomical prior represents the target anatomical region used for anatomy-guided feature aggregation. Potential non-pulmonary cues are shown as conceptual examples and are not presented as confirmed shortcuts used by the trained models.

External reliability is evaluated through a locked Shenzhen-to-Montgomery TB protocol. Model development and checkpoint selection are performed using Shenzhen only. The selected checkpoint is then applied to Montgomery without target-domain fine-tuning, recalibration, checkpoint reselection, or threshold optimization. This permits discrimination, fixed-threshold performance, calibration, and pulmonary attribution to be examined independently under cohort shift.

The study makes four connected contributions:

  1. a jointly predicted soft pulmonary prior is incorporated directly into normalized feature aggregation through MGAP rather than remaining solely an auxiliary segmentation output or being converted into a hard crop;

  2. quantitative pulmonary-attribution metrics and architecture-matched GAP/MGAP comparisons isolate the anatomical aggregation intervention from changes in the preceding representation;

  3. lung-segmentation quality is explicitly separated from pulmonary classifier attribution, testing whether learning pulmonary anatomy and using it for classification are equivalent properties; and

  4. diagnostic performance, calibration, and pulmonary attribution are evaluated separately under a locked external domain shift, with a lightweight capacity-control configuration testing whether strong pulmonary containment alone is sufficient for robust transfer.

Accordingly, the study addresses the following research questions:

RQ1. Can classifiers with comparable diagnostic performance exhibit substantially different pulmonary-attribution distributions?

RQ2. Can mask-guided feature aggregation increase pulmonary attribution containment without materially compromising diagnostic competence, and does this effect depend on the preceding feature representation?

RQ3. Are diagnostic discrimination, probability calibration, and pulmonary attribution containment preserved to the same extent under external cohort shift?

The objective is not to establish universal superiority of a particular backbone, attention block, or pooling architecture. Instead, the study examines whether diagnostic competence, pulmonary attribution containment, calibration, and external robustness can vary independently, and whether explicit anatomical feature aggregation can make pulmonary attribution more directly measurable and controllable.

References (31)