Visual classification tasks involving subtle, sparse, or spatially scattered points of interest present a persistent challenge for computer vision systems. In domains ranging from dermatological screening to agricultural crop pathology, diagnostic markers frequently appear as tiny spots, blisters, or isolated pustules rather than uniform transformations across an entire image. Conventional deep learning models trained solely on full images often fail to adequately isolate these minute features from broad background structures. Conversely, standard region-of-interest methods that segment and evaluate isolated lesions can discard surrounding context, including tissue patterns, overall organ boundaries, and background textures that provide critical diagnostic cues. To bridge this divide, researchers have developed an attention-guided architecture that simultaneously extracts full-image contextual representations and focused local cues, dynamically weighting their contributions through an adaptive gating network to achieve superior diagnostic accuracy across diverse image modalities.
The fundamental difficulty in lesion-centric visual evaluation stems from the delicate balance between contextual understanding and localized precision. Relying exclusively on global feature representations risks diluting the influence of small, fine-grained abnormalities when background areas dominate the pixel space. However, existing targeted strategies—such as threshold-based segmentation, entropy-weighted moments, and deep instance segmentation—suffer from distinct vulnerabilities. Because downstream classification depends entirely on the accuracy of the extracted boundary, any localization error or segmentation artifact propagates directly into the classifier. Furthermore, completely stripping away the surrounding image prevents the network from leveraging wider contextual clues, such as overall leaf anatomy or normal skin morphology. To resolve these opposing constraints, the newly designed framework operates via three coordinated stages: a global feature extraction branch, an attention-guided masking module, and a local feature branch enhanced by convolutional attention mechanisms, all brought together by a dynamic fusion pathway.
In the first phase of the pipeline, the global branch processes the complete, normalized input image scaled to a standard resolution of 224 by 224 pixels. Using a DenseNet-121 convolutional architecture initialized with ImageNet weights, the network unfreezes its final 50 layers to capture high-level semantic abstractions alongside structural background context. Once global feature extraction takes place, the model generates an initial class probability distribution. Rather than using post-hoc interpretability tools merely to explain decisions after the fact, the framework deploys Gradient-weighted Class Activation Mapping directly into the active learning workflow. By calculating the gradient of the predicted class score relative to the feature maps of the backbone’s final convolutional layer—conv5_block16_concat—the attention module highlights the spatial regions that drove the preliminary classification. A normalized threshold value of 0.5 is then applied to these activation heatmaps, generating a precise binary mask that suppresses irrelevant background pixels while strictly preserving the discriminative lesion cues.
The masked image serves as the direct input to the local branch, which shares the identical DenseNet-121 structure but is trained under an independent initialization strategy to prevent bias toward global image statistics. Within this branch, localized feature maps pass through a Convolutional Block Attention Module before reaching the global average pooling layer. This module applies sequential channel and spatial attention mechanisms: channel attention models the cross-channel interdependencies by pooling feature maps through combined average and max-pooling operations into a shared multi-layer perceptron, while spatial attention applies a 7 by 7 convolutional kernel across pooled channel dimensions to highlight salient lesion coordinates. By explicitly refining the masked inputs with dual attention, the local branch isolates fine-grained pathogen manifestations and blister textures without being distracted by extraneous peripheral details.
Rather than combining the resulting vectors through standard mathematical concatenation or assigning static equal weights, the framework incorporates an adaptive weighted fusion module. Global feature vectors and local feature vectors, each extracted from their respective branches, are concatenated into a joint vector and fed into a lightweight gating network containing fully connected layers of 256 and 128 units. A two-unit softmax operation normalizes the gating outputs into dynamic importance weights, designated alpha-g for the global pathway and alpha-l for the local pathway, which strictly sum to one. This sample-wise formulation allows the network to adaptively shift its reliance depending on the visual characteristics of each image. When lesions are faint, diffuse, or heavily contextualized by leaf shape, the gating network increases the global weighting. When concentrated, highly distinct lesion pustules dominate, the network shifts preference toward the local representations.
To rigorously assess versatility, the authors tested the framework across four distinct benchmarks representing synthetic geometric patterns, clinical dermatology, and agricultural field conditions. The synthetic spot pattern dataset evaluated four geometric classes—filled circular bulbs, hollow rings, elliptical filament bulbs, and diagonal string formations—specifically designed to model scattered localized cues. The clinical skin lesion dataset comprised 2,000 images representing chickenpox, measles, monkeypox, and healthy skin, sourced from public archives and balanced through structured augmentation. Agricultural validation was conducted on two separate datasets: a 10,000-image guava leaf disease benchmark containing canker, dot, mummification, rust, and healthy classes, alongside a 3,600-image grape leaf disease dataset categorizing bacterial leaf spot, downy mildew, powdery mildew, and healthy tissue. To prevent data leakage, exact duplicate images were eliminated using MD5 hashing, while visually similar duplicates were filtered across training and testing partitions using perceptual hashing at a Hamming distance threshold of five.
Empirical evaluations demonstrated consistent performance advantages for the adaptive fusion model over both individual processing pathways across all four benchmarks. On the synthetic dataset, fusion attained an overall accuracy of 98.75 percent, gaining 1.25 percentage points over the global branch and 5.00 percentage points over the local branch. For the skin lesion dataset, fusion achieved 97.75 percent accuracy, an improvement of 3.00 percentage points over the global baseline and 3.50 percentage points over the local branch. On the guava leaf disease benchmark, fusion reached 99.64 percent accuracy compared to 98.76 percent for the global network and 95.84 percent for the local network. Similarly, on the grape leaf disease images, fusion delivered 96.52 percent accuracy, representing a 2.36 percentage point increase over global evaluation and a 7.08 percentage point increase over local classification. Area under the curve metrics mirrored this trend, reaching 99.91 percent on synthetic spots, 99.67 percent on skin lesions, 99.99 percent on guava leaves, and 98.65 percent on grape foliage.
In-depth error analyses revealed why the standalone local branch frequently exhibited lower accuracy than the global branch despite its specialized attention layers. By strictly suppressing unhighlighted image regions with Grad-CAM masks, the local network lost contextual structural indicators—such as overall leaf silhouette, macro-texture, and broad chromatic distribution—that assist in separating ambiguous classes. For example, in the guava dataset, the local branch misclassified 36 canker samples and 14 dot samples as rust due to the loss of surrounding leaf context. However, the adaptive fusion framework successfully compensated for these omissions by drawing upon the global stream, reducing total classification errors to nine cases. A paired exact McNemar test conducted on the guava predictions demonstrated that fusion corrected 26 errors committed by the global model while introducing only four new misclassifications, yielding a statistically significant improvement with a p-value of 5.95 times 10 to the negative fifth power.
A critical test of clinical and field viability involved evaluating transferability under cross-source distribution shifts. In a dedicated source-held-out experiment, the model was trained exclusively on the MSLD v2.0 skin lesion dataset with training-only augmentation and evaluated without augmentation on the raw, independent MSID dataset. Under these challenging conditions, the global branch achieved 79.11 percent accuracy, whereas the local branch reached 82.55 percent, reversing their within-dataset hierarchy. This inversion indicates that while broad background patterns and image acquisition conditions vary considerably across different clinical sources, localized lesion representations remain comparatively invariant and transferable. The adaptive fusion branch successfully leveraged both properties, achieving the highest overall cross-source accuracy at 83.83 percent and confirming its robustness when encountering unfamiliar clinical environments.
Despite its high accuracy, the framework exhibits specific operational constraints that define clear avenues for future refinement. Sensitivity analyses demonstrated that the architecture performs optimally when visual backgrounds remain relatively uncluttered. When artificial Gaussian noise with a standard deviation of 70 was injected into background regions, the classification performance of all three branches declined, demonstrating that degraded global representations impair the precision of Grad-CAM heatmaps and propagate noise into local masking. Furthermore, the local branch remains inherently constrained by the fidelity of the attention maps derived from the final convolutional activations. To address these vulnerabilities, ongoing investigations aim to introduce noise-aware spatial attention mechanisms, refine automated masking boundaries, and validate the three-branch paradigm across broader, independent diagnostic imaging archives.
Subject of Research: Attention-guided global and local feature fusion for lesion-centric image classification
Article Title: An attention-guided global and local fusion framework for lesion-focused image classification
Article References: Tasnim, M. S., Elahee, M. S., Aurpa, T. T., & Anwar, M. M. (2026). An attention-guided global and local fusion framework for lesion-focused image classification. Healthcare Analytics, 10, Article 100495. https://doi.org/10.1016/j.health.2026.100495
Image Credits: AI Generated
DOI: 10.1016/j.health.2026.100495
Keywords: deep learning, image classification, feature fusion, Grad-CAM, attention mechanisms, CBAM, DenseNet-121, skin lesions, plant pathology, guava leaf disease, grape leaf disease, computer vision, medical imaging, adaptive weighting, convolutional neural networks, interpretability
News Source: Blake Davidson. (November 26, 2026). Three-Branch Deep Learning Framework Dynamically Fuses Global and Local Lesion Representations. Scienmag.



