Attention based deep feature fusion for hyperspectral target detection Authors: Masoud Amiri, Maryam Imani, Hassan Ghassemian Published: 2025 ABSTRACT Hyperspectral target detection yet remains a fundamental challenging task in remote sensing due to high spectral dimensionality, significant background variability, scarcity of target samples, and severe class imbalance. To address these issues, we propose a novel framework named Self and Cross Attention Feature Fusion (SCAFF). The model follows a patch-based design and integrates two complementary branches: (i) an attention-driven branch that captures both intra-patch and inter-patch dependencies, and (ii) a convolutional branch that extracts local spatial–spectral patterns. By combining global contextual modeling with fine-grained local representation, the proposed architecture establishes a balance between global and local feature analysis. The key novelty lies in the joint use of Self-Attention and Cross-Attention to adaptively guide the network’s focus toward potential target regions, mitigating class imbalance and enhancing discriminability. Furthermore, an enhanced version of the guided filter is suggested to refine spatial consistency of detection maps in the post-processing. Extensive experiments on four widely used benchmark datasets demonstrate that SCAFF achieves superior accuracy and stability compared to state-of-the-art methods, with up to 15% performance improvement in some cases. These results confirm effectiveness and robustness of the proposed method for practical hyperspectral target detection. Introduction Hyperspectral imaging (HSI) has become one of the most powerful tools for analyzing and identifying materials in both natural and man-made scenes. Unlike conventional imaging, hyperspectral sensors capture data across hundreds of contiguous and narrow spectral bands, covering a wide portion of the electromagnetic spectrum1. This rich spectral information provides unique and highly discriminative signatures of materials, enabling accurate detection, identification, and characterization of objects and anomalies2. Each pixel in an HSI image contains a spectral vector composed of reflectance values across multiple wavelengths, offering detailed insights into the physical and chemical properties of the observed surface. These characteristics make hyperspectral imagery particularly valuable for a wide range of applications such as environmental monitoring, precision agriculture, geological exploration, and defense3. However, the inherent complexity of hyperspectral data poses significant challenges for effective processing. The high dimensionality of spectral vectors leads to redundancy and increases computational demands, while the presence of noise and spectral variability complicates feature extraction4. Furthermore, hyperspectral target detection (HTD) is typically formulated as a binary classification problem, where the aim is to distinguish target pixels from a vast background. In most cases, target pixels represent only a very small fraction of the image, resulting in severe class imbalance that makes detection both difficult and sensitive5. Beyond this imbalance, spectral mixing—where a single pixel contains contributions from multiple materials—further obscures clear separability. Consequently, effective HTD methods must be capable of extracting meaningful features from large-scale, noisy, and imbalanced data while simultaneously capturing both spectral details and spatial dependencies6. Early efforts in hyperspectral target detection were largely based on statistical, pixel-wise analysis of spectral signatures7. Foundational surveys summarized HSI data characteristics, signal modeling, and classical detection algorithms that operate on per-pixel spectra8. Prominent classical detectors include Constrained Energy Minimization (CEM)9, Matched Subspace Detector (MSD)10, Adaptive Subspace Detector (ASD)11, Orthogonal Subspace Projection (OSP)12 and the Adaptive Matched Filter detector13. CEM seeks to maximize the response to a target spectral signature while suppressing background contributions. MSD and ASD arise from generalized likelihood-ratio test formulations that model target and background as separate (possibly scaled) subspaces. Also, OSP removes background subspace components before applying a matched filter to enhance target SNR. To handle nonlinearities and more complex statistics, kernelized variants of the above detectors (e.g., Kernel-MSD, Kernel-ASD) map spectra into higher-dimensional feature spaces, improving discrimination in non-Gaussian or highly structured data. Fusion-based strategies, such as continuum fusion, combine outputs from multiple detectors to form more stable decision boundaries under spectral variability and environmental changes. Comprehensive reviews also highlight persistent challenges: target spectral variability in realistic conditions, difficulty of reliable covariance estimation in high-dimensional settings with few labeled samples, atmospheric and sensor-induced distortions, and the need for effective preprocessing and synthetic-signature models (e.g., physics-based simulators) to construct better target/background subspaces. While these classical approaches remain foundational and computationally attractive, their limitations in noisy, mixed-pixel, and severely imbalanced scenarios motivated the transition toward machine learning and, more recently, deep learning approaches that exploit both spectral and spatial cues. With the advent of deep learning, hyperspectral target detection methods have shifted toward architectures capable of extracting high-level spectral–spatial features even under limited labeled data conditions. One representative approach explored transferred deep learning, where convolutional neural networks (CNNs) are trained on augmented pixel-pair differences derived from reference datasets to compensate for scarce labeled samples14. This framework demonstrated notable improvements over classical detectors by leveraging deep nonlinear representations. Among more specialized models, the Background Learning based on Target Suppression Constraint (BLTSC)15 introduced a background-driven learning scheme, in which the model is trained exclusively on background samples. To alleviate contamination from potential targets, a suppression constraint is imposed during training, ensuring that the reconstructed background highlights discrepancies caused by target pixels. Extensive experiments showed that BLTSC yields higher accuracy and lower false-alarm rates compared to several state-of-the-art baselines. Another important contribution is HTD-Net16, a deep convolutional network explicitly designed for hyperspectral target detection under limited sample availability. HTD-Net employs an autoencoder to generate target signatures and utilizes linear prediction to identify distinct background samples. By constructing pixel-pairs of targets and background spectra, the model learns discriminative similarity through a tailored two-branch network. During testing, detection scores are produced by averaging similarity measures across pixel-pairs, resulting in robust performance improvements over traditional and shallow methods. Recent advances in deep learning have introduced increasingly sophisticated models for hyperspectral target detection, aiming to overcome the challenges of nonlinear data structures, spectral variability, and limited labeled samples. An interpretable representation network17 was proposed to bridge physical interpretability with nonlinear feature learning. This method leverages a subspace representation to disentangle background and target components, while a lightweight multiscale Transformer captures long-range spectral dependencies. By incorporating a constrained energy minimization loss, the model enhances the separation between background and targets, achieving superior detection performance across benchmark datasets. In another direction, the Robust Signature-Based Dual Network (RSB-DN)18 was introduced to address the extreme case of limited target samples. This approach constructs an approximate training set through pre-detection and clustering, and then employs two complementary networks: a generative adversarial network (GAN) focusing on spectral information and a CNN capturing spatial features. The fused outputs yield reliable detection even when only a single target signature is available, highlighting the robustness of dual-network architectures. Efforts have also been made to incorporate semantic priors for target detection. A semantic transferred priori method with spatial–spectral association19 exploits the relative stability of spatial textures compared to spectral features. By employing a semantic segmentation network, reliable target spectra are adaptively extracted from the scene, which are then combined with constrained energy minimization and deep stacked feature fusion modules. This design reduces false alarms while maintaining strong detection performance, further demonstrating the value of transferring semantic knowledge into hyperspectral analysis. Another notable contribution is GAN-based data augmentation (GAN-DA)20, proposed to mitigate the scarcity of labeled target samples. In this framework, three-dimensional spectral–spatial cubes centered on each pixel are used as inputs to a GAN, which generates realistic synthetic target patches. These augmented samples are then combined with real data to train a CNN detector. By expanding the training set and preserving full spectral information without dimensionality reduction, GAN-DA significantly enhances both the accuracy and stability of target detection. Graph-based approaches have also emerged as a promising direction for hyperspectral target detection. A Local Graph Convolutional Network (LGCN)21 was proposed to explicitly model spectral–spatial dependencies by constructing a local graph for each pixel and its neighborhood. Through multiple layers of graph convolutions, the method captures latent spectral relations and irregular decision boundaries, thereby improving discrimination between targets and background. Experimental evaluations demonstrated that LGCN outperforms conventional CNN-based detectors, particularly in scenarios with complex spatial structures. Recent advances have also explored novel strategies for enhancing spectral–spatial feature extraction and improving discrimination between targets and background. A multi-feature joint weighted detection approach based on an optimized three-dimensional Gabor filter22 proposed adaptive enhancement of target responses by employing spectral angle similarity and combining both amplitude and phase information. By applying a weighted fusion of multiple preliminary detection maps refined through fuzzy Otsu optimization, this method effectively reduces spectral redundancy and improves feature representation, leading to superior accuracy and robustness across diverse hyperspectral datasets. Complementarily, a deep spectral metric learning framework using a Siamese network23 introduced a metric-based learning strategy that leverages both labeled and unlabeled data to address the scarcity of target samples. Through spectral data augmentation and dual-phase training—comprising pre-training and spectral metric learning—the model minimizes intra-class distances while maximizing inter-class separability. Additionally, the integration of a guided image filter enhances spatial consistency, resulting in improved detection reliability and computational efficiency compared to other state-of-the-art techniques. To extract important features and long-distant dependencies from image, the attention mechanism is applied in different applications of remote sensing filed. For example, integration of attention with graph theory, and with wavelet feature enhancement is suggested in24,25, respectively for remote sensing change detection. More recently, a discriminant analysis-based attention network (DAAN)26 has been introduced to address the challenges of class imbalance and insufficient labeled targets. DAAN integrates two autoencoder-based data augmentation strategies—pixel-level and patch-level—to enrich the training set. It employs discriminant analysis to maximize between-class separability while minimizing within-class variance, and generates an attention feature map to enhance target-related features relative to the background. By combining low-level attended features with hierarchically extracted high-level features, DAAN achieves superior detection accuracy across diverse hyperspectral datasets without the need for dataset-specific parameter tuning. An adaptive background latent space adversarial learning model is proposed for HTD in27, which selects pseudo samples from both background and target datasets to address complicated background information and insufficient prior target information. Moreover, it utilizes an adversarial autoencoder based backbone network for extraction of background latent spatial information. Several recent studies have proposed advanced deep and hybrid frameworks to further enhance hyperspectral target detection performance under complex and imbalanced conditions. A joint spatial–spectral method based on sparse representation and adaptive clustering28 integrates a k-means adaptive two-dimensional singular spectrum analysis (2DSSA) with a dictionary construction strategy to reduce reconstruction residuals and exploit spatial features effectively. By combining spectral and spatial information, this approach mitigates spectral variability and false alarms, leading to more robust detection in heterogeneous backgrounds. Another noteworthy development is the Phase Space Deep Neural Network with Saliency-based Attention (PSDNN-SA)29, which models hyperspectral data as a dynamic system in phase space. Through saliency-driven attention and multi-branch feature extraction, the network highlights target regions while suppressing background interference, achieving superior visual and quantitative performance across diverse datasets. Building on this progress, an unbalanced episode meta-learning framework with a Bi-Sparse contrastive network30 introduces a meta-learning paradigm tailored for the inherent class imbalance in HTD. By simulating unbalanced training episodes, enforcing elastic sparsity constraints, and employing contrastive learning, the method improves generalization and robustness while maintaining high computational efficiency. Collectively, these approaches demonstrate the growing trend toward integrating adaptive feature modeling, attention mechanisms, and meta-learning to overcome the limitations of traditional deep learning-based detectors in hyperspectral analysis. In some scenarios, HTD is implemented unsupervised where spectrum of the interested target is unknown. The unsupervised HTD is known as anomaly detection. In31, the original spectrums are mapped to the fractional Fourier domain where the restoration errors are used to separate anomaly from background through designing a frequency to spectrum mapping generative adversarial network. In32, the receptive field is extended by the shuffle downsampling operation and the channel attention with dilated convolution is exploited to explore global contextual information in the hyperspectral anomaly detection task. A dual-branch architecture is suggested for anomaly detection in [33] where the first branch implements local feature extraction with utilizing centrally masked and dilated convolutions, and the second branch implements non-local feature extraction with incorporating a simplified self-attention module. Although there is no need to a prior knowledge of targets in an anomaly detection task, the interpretation of a specialist is often required to explain the output anomaly detection map. Despite the significant progress achieved by classical statistical detectors and recent deep learning–based methods, hyperspectral target detection remains a highly challenging task. The intrinsic imbalance between the scarce target pixels and the overwhelming background, coupled with the spectral variability of targets and the high dimensionality of the data, often hinders existing algorithms from achieving reliable performance across diverse scenarios. Moreover, many prior works either rely solely on spectral similarity measures, which ignore spatial context; or focus exclusively on local convolutional features, which may overlook long-range dependencies crucial for discriminating subtle targets. These limitations motivate development of a more balanced framework that can simultaneously exploit both spectral-spatial correlations and attention-driven global relations. To address these challenges, this work introduces a novel framework termed Self & Cross Attention Feature Fusion (SCAFF). The main idea is to guide the model’s focus toward informative regions of the hyperspectral cube while maintaining a robust balance between global and local representations. The design leverages the self-attention to capture intra-patch dependencies; and the cross-attention to model inter-patch interactions, thereby enhancing sensitivity to subtle target signatures. In parallel, a complementary convolutional branch is incorporated to strengthen extraction of local spectral–spatial structures, ensuring that fine-grained neighborhood information is not lost. Finally, a lightweight guided filter is applied in post-processing to refine detection maps and improve spatial coherence. The main contributions of this work can be summarized as follows: Introduction of a new feature fusion architecture that integrates self- and cross-attention mechanisms with multi-scale convolutional processing to achieve a balanced representation of global and local features.Development of a patch-based learning strategy that improves the ability to detect targets even when they appear as small, sparse, or highly imbalanced samples in complex backgrounds.Incorporation of a guided filtering step as a post-processing technique to enhance the spatial smoothness of detection outputs while preserving spectral details. Introduction of a new feature fusion architecture that integrates self- and cross-attention mechanisms with multi-scale convolutional processing to achieve a balanced representation of global and local features. Introduction of a new feature fusion architecture that integrates self- and cross-attention mechanisms with multi-scale convolutional processing to achieve a balanced representation of global and local features. Development of a patch-based learning strategy that improves the ability to detect targets even when they appear as small, sparse, or highly imbalanced samples in complex backgrounds. Development of a patch-based learning strategy that improves the ability to detect targets even when they appear as small, sparse, or highly imbalanced samples in complex backgrounds. Incorporation of a guided filtering step as a post-processing technique to enhance the spatial smoothness of detection outputs while preserving spectral details. Incorporation of a guided filtering step as a post-processing technique to enhance the spatial smoothness of detection outputs while preserving spectral details. The remainder of this paper is organized as follows. “Proposed method” describes the proposed SCAFF method in detail, including its attention-based feature fusion and post-processing strategies. “Experimental evaluation and results” presents the experimental evaluation and results, covering qualitative analyses, patch size sensitivity, ablation studies, and comparisons with state-of-the-art approaches. “Conclusion” concludes the paper with final remarks and potential directions for future research. Proposed method In this section, we describe the proposed method, Self & Cross Attention Feature Fusion (SCAFF) for hyperspectral target detection. The design of SCAFF aims to overcome several well-known challenges in hyperspectral data analysis by leveraging deep learning structures and combining multiple attention and feature-extraction mechanisms to substantially improve detection accuracy. A first major difficulty arises from the intrinsic complexity and high dimensionality of hyperspectral data: each pixel is represented by a high dimensional spectral vector, which introduces redundancy, noise, and a heavy computational burden for conventional models. Furthermore, the heterogeneous distribution of background pixels across the scene increases variability and complicates the discrimination of target and non-target classes. One of the most critical obstacles is the severe class imbalance. In typical scenarios, target pixels account for only a tiny fraction of the image, while the vast majority belongs to spectrally diverse background regions. Standard learning models, which tend to follow the dominant data distribution, often fail to capture the subtle discriminative patterns of small targets, resulting in reduced sensitivity and a higher rate of missed detections. A promising solution to these challenges is the adoption of attention mechanisms. Inspired by human perception, attention enables the network to focus more on regions with higher likelihood of containing targets, amplifying target-relevant signals while suppressing background noise. By assigning different weights to different parts of the input, the model can highlight the most informative cues, thereby enhancing detection performance. Building on this principle, SCAFF employs a patch-based deep architecture that integrates both self-attention and cross-attention modules. This design allows the model to simultaneously capture internal relationships within each patch and cross-relations between patch features and target cubes, guiding the network to automatically identify and emphasize important regions of the image. In doing so, SCAFF establishes a more reliable and effective framework for hyperspectral target detection. SCAFF architecture In the proposed SCAFF model, we employ attention-based structures to steer the network toward informative regions of the scene. The core idea is that by combining self-attention and cross-attention mechanisms, the network can learn both internal relationships within local observations and relations between those observations and representative target patterns, thereby automatically identifying and emphasizing image regions that are most relevant for detection. The primary input to the network is a set of local patches extracted around each image pixel. Patches play a central role because each one carries both the spectral signature and the local spatial context of its central pixel. The network’s task is therefore to predict the class (target vs. background) of that central pixel from the surrounding patch. To support this design, we define two patch types used throughout training and inference: the Data Patch, extracted from arbitrary image locations and the Target Patch, a representative patch derived from target labeled samples. For each pixel, we extract a local patch with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:n$$\end{document} centered on the pixel where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n$$\end{document} is the patch size and it is an important hyperparameter typically chosen from values such as 5, 7, or 9. The patch includes all spectral bands. So, each Data Patch is a three-dimensional cube with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:n\:\times\:B$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:B$$\end{document} denotes the number of spectral bands. In practice, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n$$\end{document} is chosen odd and not smaller than 5 given the network design; extremely large patch sizes are also generally unnecessary for the proposed patch-based pipeline. When patches overlap image borders, reflect (mirror) padding is applied to avoid information truncation and to preserve statistical consistency. Corresponding to each Data Patch in input, there is a binary label in the output. To reinforce the network’s attention toward actual target patterns, we construct a Target Patch as a prototype of real target appearances. A set of labeled target pixels are randomly selected. A Patch cube is extracted around each selected target pixel. Then, the target patches are averaged to produce a single Target Patch. This averaged patch captures the mean statistical pattern of targets in the scene and serves as a representative exemplar in subsequent attention processing. To extract and emphasize discriminative cues, a Self-Attention block is applied to each Data Patch so that the model can learn pairwise interactions among pixels within the local neighborhood and assign larger weights to more informative elements. The Target Patch is likewise processed with Self-Attention to reveal recurring, salient target features. Applying Self-Attention to both patch types enables the model to analyze local contextual and target prototypes separately before combining that information in later stages. In order to determine the class of each central pixel, it is essential to evaluate the relationship between its Data Patch and the representative Target Patch. Intuitively, the higher the similarity between these two, the more likely the central pixel belongs to the target class. To model this relationship, SCAFF employs a Cross-Attention mechanism, which explicitly measures the correlation between features of the Data Patch and those of the Target Patch. This design allows the network to capture not only spectral dependencies but also joint spatial–spectral correlations that reflect how local observations align with representative target characteristics. To compute the Self-Attention of Data Patch \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left({SA}_{D}\right)$$\end{document}, the data Query (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Q}_{D}$$\end{document}), data Key (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{K}_{D}$$\end{document}), and data Value (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{V}_{D}$$\end{document}) are computed. The self-attention outputs a weighted combination of the values, where the weights are determined by the similarity between the query and the corresponding keys. In SCAFF, the query, key and value components are extracted using lightweight convolutional layers with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:1\:\times\:1$$\end{document} kernels. This design compresses and projects features channel-wise without altering the spatial structure of the patches. The Data Patch self-attention is formulated by:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{SA}_{D}\:={V}_{D}\odot\:softmax\left(\frac{{Q}_{D}\odot\:{K}_{D}}{\sqrt{b}}\right)$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:b$$\end{document} is the feature dimensionality and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\odot\:$$\end{document} is the elementwise multiplication, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:softmax$$\end{document} is the softmax function to convert similarities into normalized attention weights34. Similarly, the self-attention of Target Patch \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left({SA}_{T}\right)$$\end{document} is computed by using the target Query (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Q}_{T}$$\end{document}), target Key (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{K}_{T}$$\end{document}), and target Value (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{V}_{T}$$\end{document}) as follows:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{SA}_{T}\:={V}_{T}\odot\:softmax\left(\frac{{Q}_{T}\odot\:{K}_{T}}{\sqrt{b}}\right)$$\end{document} In self-attention, all three components, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Q$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:K$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:V$$\end{document} are derived from the same source patch, enabling the network to discover intra-patch dependencies and assign different importance to elements within a single patch. In contrast, in Cross-Attention, the queries originate from one source (e.g., the Data Patch), while keys and values come from another (e.g., the Target Patch). So, the Cross-Attention between Data and Target Patches \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left({CA}_{D,T}\right)$$\end{document} is computed by:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{CA}_{D,T}\:={V}_{T}\odot\:softmax\left(\frac{{Q}_{D}\odot\:{K}_{T}}{\sqrt{b}}\right)$$\end{document} As a result, the network obtains three complementary information sources: (i) weighted features of the Data Patch obtained by applying Self-Attention to it, (ii) weighted features of the Target Patch obtained likewise, and (iii) correlation weights from Cross-Attention that capture the degree of alignment between the two. Before combining these sources, cross-channel normalization is applied to map them into a shared scale, ensuring stable and coherent fusion. The normalized outputs are then aggregated to produce a unified representation that encodes spatial–spectral dependencies as well as target-specific correlations. The attention based fused features \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left({F}_{A}\right)$$\end{document} is obtained by addition of normalized versions of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{SA}_{D}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{SA}_{T}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{CA}_{D,T}$$\end{document}:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{F}_{A}\:={SA}_{D}^{N}+{SA}_{T}^{N}+{CA}_{D,T}^{N}$$\end{document} where the upper-index \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:N$$\end{document} denotes the normalized version. Finally, to handle the variability in spatial extent of hyperspectral targets—ranging from very small, pixel-level objects to more extended regions—SCAFF integrates a multi-scale processing strategy. Specifically, the fused representation is passed through parallel convolutional layers with kernel sizes \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:1\:\times\:1$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:3\:\times\:3$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:5\:\times\:5$$\end{document}. The \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:1\:\times\:1$$\end{document} convolution emphasizes purely spectral information, while the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:3\:\times\:3$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:5\:\times\:5$$\end{document} kernels capture increasingly broader spatial dependencies. The outputs of these convolutions are combined to form the representation of the Attention Branch, providing rich, scale-aware features for subsequent stages of the network. An important aspect of this attention block is its global nature. The resulting features encode long-range dependencies. Consequently, the output of the attention module captures globally enriched spectral–spatial cues that strengthen the detection of subtle targets. Fig. 1Schematic of the proposed SCAFF model. Schematic of the proposed SCAFF model. While global contextual cues are essential, relying solely on them is not sufficient for accurate target detection, since many discriminative features in hyperspectral data manifest at local spatial scales. To enrich the model with fine-grained local analysis, SCAFF introduces a dedicated Convolutional Branch. This branch, composed of four sequential convolutional blocks, is designed to capture local structures and enhance spatial feature extraction, thereby complementing the Attention Branch. Each block follows a repeated structure of Conv → BatchNorm → ReLU → Conv → BatchNorm → ReLU, enabling progressive refinement of local features while ensuring stable training. With this design, the network acquires deeper and more expressive local representations that may be overlooked by purely attention-based pathways. After extracting global features through the Attention Branch and local features through the Convolutional Branch, the two complementary outputs are integrated. Because both branches are designed to produce outputs of the same spatial size and channel dimension, their fusion can be performed directly via element-wise addition. Ensuring dimensional alignment is critical here, as it allows the combination to preserve information without distortion. The fused representation therefore incorporates both global dependencies and local discriminative cues, resulting in a richer description of each input patch. The final prediction stage applies Global Average Pooling (GAP) followed by a single-unit fully connected layer with a Sigmoid activation, producing a continuous score \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:s\:\in\:[0,\:\:1]$$\end{document}, for the central pixel of each Data Patch. By construction, values near 1 indicate a high likelihood that the pixel belongs to the target class, while values near 0 indicate a high likelihood of background. In other words, the network outputs a soft, probabilistic estimate of target-presence for the central pixel rather than a hard binary decision. The continuous nature of the output makes it straightforward to use the score map for visualization, aggregation across overlapping patches, and any subsequent post-processing designed to refine spatial consistency (e.g., smoothing or guided filtering). With this prediction head the model completes its patch-wise inference and yields per-pixel likelihoods ready for downstream refinement as summarized in the schematic of the proposed SCAFF architecture (see Fig. 1) and its internal Attention Block design (see Fig. 2). Implementation of both training and prediction phases of the proposed SCAFF are represented in Algorithm 1. Algorithm 1 SCAFF training and prediction phases: Training phase. Select 20% of labeled samples from ground truth map for each class of target and background as training pixels.Consider a patch with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:\:n\:\times\:\:B$$\end{document} centered on each training pixel as a training patch where the label of central pixel is assigned to the patch.Average the target training patches and use it as the representative Target Patch.Give the training patches as Data Patches in the input and their labels as the output for training the network. Select 20% of labeled samples from ground truth map for each class of target and background as training pixels. Select 20% of labeled samples from ground truth map for each class of target and background as training pixels. Consider a patch with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:\:n\:\times\:\:B$$\end{document} centered on each training pixel as a training patch where the label of central pixel is assigned to the patch. Consider a patch with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:\:n\:\times\:\:B$$\end{document} centered on each training pixel as a training patch where the label of central pixel is assigned to the patch. Average the target training patches and use it as the representative Target Patch. Average the target training patches and use it as the representative Target Patch. Give the training patches as Data Patches in the input and their labels as the output for training the network. Give the training patches as Data Patches in the input and their labels as the output for training the network. Prediction phase. Consider a Data Patch with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:\:n\:\times\:\:B$$\end{document} centered on the pixel under test.Inject the Data Patch to the trained network. Note that the representative Target Patch constructed in the step 3 of the training phase is also used here.Predict the class label of the central pixel of the input Data Patch in the output. Consider a Data Patch with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:\:n\:\times\:\:B$$\end{document} centered on the pixel under test. Consider a Data Patch with size of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:\:n\:\times\:\:B$$\end{document} centered on the pixel under test. Inject the Data Patch to the trained network. Note that the representative Target Patch constructed in the step 3 of the training phase is also used here. Inject the Data Patch to the trained network. Note that the representative Target Patch constructed in the step 3 of the training phase is also used here. Predict the class label of the central pixel of the input Data Patch in the output. Predict the class label of the central pixel of the input Data Patch in the output. Fig. 2Illustration of the attention block in the proposed SCAFF model. Illustration of the attention block in the proposed SCAFF model. A developed guided filtering for Post-Processing A new version of guided filter is proposed here to further enhance the quality of target detection results, as a post-processing stage. The guided filter, first introduced in Kang et al.35 is an edge-preserving smoothing operator that leverages a guidance image to suppress noise and spurious fluctuations while maintaining important structural information such as class boundaries and edges. Its local linear model ensures that fine details aligned with the guidance signal are retained, making it particularly suitable for refining probability maps produced by deep networks. Formally, the guided filter assumes that within each local window \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\omega\:}_{j}$$\end{document}, the filtered output \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{O}_{i}$$\end{document} can be expressed as a linear transform of the guidance image \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{I}_{i}$$\end{document}:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{O}_{i}=\:{a}_{j}{I}_{i}+\:{b}_{j}\:,\:\:\:\:\:\:\:\forall\:i\in\:\:{\omega\:}_{j}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{a}_{j}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{j}$$\end{document} denote the slope and intercept of the linear model in window \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\omega\:}_{j}$$\end{document}. The key assumption is that the gradient of the output, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\nabla\:O$$\end{document}, remains approximately proportional to the gradient of the guidance image, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\nabla\:I$$\end{document}. This property ensures that only edges present in the guidance image are preserved in the filtered result. The coefficients \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{a}_{j}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{j}$$\end{document} are estimated by minimizing the following energy function:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{E}_{({a}_{j},\:\:{b}_{j}\:)}=\:\sum\:_{i\in\:{\omega\:}_{j}}({\left({a}_{j}{I}_{i}+\:{b}_{j}-{P}_{i}\right)}^{2}+\:\epsilon{{a}_{j}}^{2})\:$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{i}$$\end{document} denotes the input to be filtered (here, the probability map predicted by the network), and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\epsilon$$\end{document} is a regularization parameter that controls the degree of smoothing. Larger values of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\epsilon$$\end{document} enforce stronger smoothing by suppressing rapid fluctuations, whereas smaller values preserve fine details and edge sharpness. The radius \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:r$$\end{document} of the local window is another critical parameter that governs the spatial extent of smoothing. In this work, instead of using a single spectral band as the guidance image, all hyperspectral bands are employed simultaneously. The guided filter is applied independently to each band, and the filtered results are averaged to obtain the final output. This multi-band approach takes advantage of the full spectral richness of the hyperspectral data, leading to improved edge preservation and reduced spectral distortion in the refined detection maps. To balance the preservation of structural details and the suppression of noise, the filtered output is linearly combined with the raw network prediction according to the following formulation:7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Output}_{final}=\:\lambda\:.{Output}_{Filtered}+\:\:\left(1-\lambda\:\right).{Output}_{Original\:}$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\lambda\:\: \in \:[0,\:\:1]$$\end{document} denotes the fusion coefficient that balances the contributions of the filtered and original outputs. To achieve the most effective balance between smoothing and detail preservation, this coefficient is not assigned manually but is instead adaptively estimated through a data-driven optimization process. In this process, a range of candidate values for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\lambda\:$$\end{document} is evaluated, and the one that maximizes a composite performance metric—mainly emphasizing the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} criterion—is selected as the optimal fusion weight. This adaptive selection allows the filtering process to automatically adjust its degree of influence based on the spectral and spatial properties of each dataset, rather than relying on a fixed parameter. During optimization, a secondary weighting factor (set close to 0.95–0.99 across all experiments) is employed within the composite metric to prioritize accurate target detection over false-alarm suppression. As a result, the optimized \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\lambda\:$$\end{document} typically converges to values around 0.95–0.99, indicating that the filtered component dominates the final fused output while still retaining essential structural details from the original probability map. Overall, this adaptive fusion mechanism enhances the robustness and interpretability of the detection results by combining the noise-reduction benefits of guided filtering with the fine structural fidelity of the raw network predictions. The approach provides a principled balance between smoothness and sharpness, making it a reliable and effective post-processing step for hyperspectral target detection. Experimental evaluation and results Datasets and evaluation metrics To evaluate the proposed SCAFF model, four benchmark hyperspectral datasets acquired by Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) were employed: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. These datasets cover diverse spatial environments and spectral characteristics, providing a comprehensive basis for testing model generalization. Table 1 summarizes characteristics of the datasets. For visualization, RGB composite images of each dataset along with their corresponding ground-truth target maps are presented (see Fig. 3). Table 1Specifications of the utilized datasets.DatasetSpatial sizeSpatial resolutionBands# \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:100\:\times\:\:100\:$$\end{document} 3.5 m \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:189$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:80\:\times\:\:80$$\end{document} 3.5 m \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:189$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:100\:\times\:\:100$$\end{document} 17.2 m \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:207$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:100\:\times\:\:100$$\end{document} 7.1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:m$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:205$$\end{document} Table 1Specifications of the utilized datasets.DatasetSpatial sizeSpatial resolutionBands# \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:100\:\times\:\:100\:$$\end{document} 3.5 m \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:189$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:80\:\times\:\:80$$\end{document} 3.5 m \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:189$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:100\:\times\:\:100$$\end{document} 17.2 m \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:207$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:100\:\times\:\:100$$\end{document} 7.1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:m$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:205$$\end{document} Specifications of the utilized datasets. To quantitatively assess detection performance, two standard measures are computed. In this setting, each pixel belongs to one of four statistical categories: True Positive (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:TP$$\end{document}) if a target pixel is correctly detected, False Negative (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:FN$$\end{document}) if a target pixel is missed, False Positive (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:FP$$\end{document}) if a background pixel is incorrectly labeled as a target, and True Negative (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:TN$$\end{document}) if a background pixel is correctly identified. Based on these definitions, the probability of detection, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{d}$$\end{document}, quantifies the fraction of true targets correctly identified:8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{d}=\:\frac{TP}{TP+FN}\:$$\end{document} while the false alarm rate, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{f}$$\end{document}, measures the fraction of background pixels incorrectly classified as targets:9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{f}=\:\frac{FP}{FP+TN}\:\:$$\end{document} By varying the decision threshold \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\tau\:$$\end{document} on the network’s probabilistic outputs, a Receiver Operating Characteristic (ROC) curve is obtained, plotting \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{d}$$\end{document} against \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{f}$$\end{document}. The Area Under the ROC Curve (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document}) provides a scalar measure of overall separability, with values closer to 1 indicating better discrimination between target and background. In addition, two complementary curves are also considered: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{d}$$\end{document} versus \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\tau\:$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{P}_{f}$$\end{document} versus \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\tau\:$$\end{document}. The corresponding AUC values offer additional insight: a higher \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{d})}$$\end{document} reflects strong detection capability across thresholds, whereas a lower \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{f})}$$\end{document} indicates effective suppression of false alarms. Together, these three measures form a comprehensive and balanced evaluation framework for hyperspectral target detection. Implementation details Training the proposed SCAFF network follows a supervised learning setup. The benchmark hyperspectral target detection datasets are used for doing experiments where their ground truth maps are available. From each hyperspectral image, Data Patches centered on randomly selected pixels are extracted as training samples, while their labels are obtained directly from the ground-truth target maps (1 for target, 0 for background). A subset of the data is used for training: 20% of target pixels and 20% of background pixels are randomly chosen, with shuffling applied to prevent sampling bias. A patch is considered around each training sample from target or background class. In the training phase, the pair of input data patches and their associated labels are used to train the network. In the test phase, the given Data Patch is fed into the network as the input and its label is predicted in the output. Note that, there is a fixed Target Patch as the representative of target class used in both training and test phases where it is the average of patches corresponding to target labeled samples. Fig. 3RGB image and ground truth for four datasets. RGB image and ground truth for four datasets. For each selected training pixel, a patch with size of\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\times\:\:n\:\times\:\:B$$\end{document} is extracted, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:B$$\end{document} is the number of spectral bands and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n\:\in \:\left\{5,\:7,\:9\right\}$$\end{document} is the spatial patch size. This design balances spatial–spectral context against computational efficiency. The network is implemented in PyTorch and trained using the Adam optimizer with a learning rate of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:5\:\times\:\:{10}^{-6}$$\end{document}, batch size of 32, and up to 200 epochs. The Binary Cross-Entropy (BCE) loss is employed to measure the discrepancy between predicted probabilities and ground-truth labels, making it a natural choice for the binary target-versus-background task. Regular shuffling of the training data at each epoch further improves generalization and mitigates overfitting. Within the architecture, the number of attention heads is fixed to 32 and each convolutional branch employs 128 filters, offering a strong capacity for spectral–spatial feature extraction without excessive parameter growth. Training can be accelerated using GPUs, though the model is also compatible with CPU execution when necessary. Early stopping is adopted to avoid overfitting once the validation performance stabilizes. Ablation study To assess contribution of different components in the proposed SCAFF architecture, a series of ablation studies were conducted. Several simplified variants of the model were designed, each omitting or modifying specific modules, in order to isolate and analyze their individual impacts on target detection performance. The first variant, SA_SS (Self-Attention, Single Scale), retained only the self-attention mechanism applied to the data patch. Neither self-attention on the target patch nor cross-attention between data and target patches was included, meaning that no interaction between data and target was modeled. Moreover, the convolutional processing within the attention branch was simplified to a single 3 × 3 convolution, and the independent convolutional branch present in SCAFF was entirely removed (see Fig. 4). Fig. 4Structure of the SA_SS model. Structure of the SA_SS model. The second variant, CA_SS (Cross-Attention, Single Scale), focused solely on cross-attention between data and target patches. In this structure, the data patch acted as the query while the target patch served as both key and value, allowing target information to guide the feature extraction process. Similar to SA_SS, convolutional processing was restricted to a single 3 × 3 kernel, and no independent CNN branch was used (see Fig. 5). Fig. 5Structure of the CA_SS model. Structure of the CA_SS model. The third variant, SCA_SS (Self & Cross Attention, Single Scale), preserved both self-attention and cross-attention modules but reduced the convolutional complexity. Self-attention was applied independently to the data and target patches, followed by cross-attention to integrate their information. However, only a single 3 × 3 convolution was applied to the combined attention outputs, and the standalone CNN branch was omitted (see Fig. 6). Fig. 6Structure of the SCA_SS model. Structure of the SCA_SS model. The fourth variant, SCA_MS (Self & Cross Attention, Multi-Scale), implemented the full attention branch of SCAFF. It included self-attention on both data and target patches as well as cross-attention between them, followed by multi-scale convolution with three parallel kernels of different sizes. This configuration allowed extraction of spatial features at multiple levels of granularity. The only missing component compared to the full SCAFF was the independent CNN branch, making this model a strong intermediate baseline (see Fig. 7). Fig. 7Structure of the SCA_MS model. Structure of the SCA_MS model. Finally, the CNN-only variant excluded all attention mechanisms and relied exclusively on convolutional processing. It consisted of four sequential convolutional blocks, each with two convolution layers followed by batch normalization and ReLU activation. The input was limited to the data patch, and no interaction with the target patch was modeled. This design served to evaluate the sole contribution of convolutional layers without the benefit of attention mechanisms (see Fig. 8). Fig. 8Structure of the CNN model. Structure of the CNN model. All ablation models were trained under identical conditions with a patch size of 7, ensuring a fair comparison. Their quantitative results across four benchmark datasets are reported in Tables 2, 3, 4 and 5. As shown in these tables, the complete SCAFF model achieved the best overall performance, particularly in the key metric \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document}, where values approached unity across all datasets. Among the ablation variants, SCA_MS obtained the best results within its group, outperforming the CNN-only model and highlighting the critical role of the attention branch in improving detection accuracy. SCA_SS also demonstrated relatively high performance, indicating that combining self- and cross-attention—even without multi-scale convolution—enhances the model’s representational capability. In contrast, models restricted to a single attention mechanism (SA_SS or CA_SS) exhibited noticeably weaker results, confirming that self- and cross-attention mechanisms are complementary and achieve their maximum effectiveness when jointly employed. Overall, the ablation study confirms that the superior performance of SCAFF arises from the synergy of its design: integrating self- and cross-attention with multi-scale convolutions and an auxiliary CNN branch yields a richer and more discriminative representation of hyperspectral patches, enabling more accurate and robust target detection. Table 2Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.85770.0449 0.0007 CA_SS0.80830.02050.0082SCA_SS0.97430.22740.0042SCA_MS0.97090.05230.0027CNN0.92850.08370.0148SCAFF 0.9986 0.5117 0.1152 Table 2Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.85770.0449 0.0007 CA_SS0.80830.02050.0082SCA_SS0.97430.22740.0042SCA_MS0.97090.05230.0027CNN0.92850.08370.0148SCAFF 0.9986 0.5117 0.1152 Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. The best result in each column is shown in bold. Table 3Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.84500.0506 0.0137 CA_SS0.73630.08440.0327SCA_SS0.84140.07300.0464SCA_MS0.8792 0.3826 0.0388CNN0.78010.04860.0212SCAFF 0.9937 0.35700.0559 Table 3Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.84500.0506 0.0137 CA_SS0.73630.08440.0327SCA_SS0.84140.07300.0464SCA_MS0.8792 0.3826 0.0388CNN0.78010.04860.0212SCAFF 0.9937 0.35700.0559 Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. The best result in each column is shown in bold. Table 4Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. The best result in each column is shown in bold.Model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.9252 0.5913 0.0103CA_SS0.85640.13830.0116SCA_SS0.96780.0183 0.0039 SCA_MS0.98370.38100.3810CNN0.88960.02780.0087SCAFF 0.9993 0.55690.0152 Table 4Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. The best result in each column is shown in bold.Model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.9252 0.5913 0.0103CA_SS0.85640.13830.0116SCA_SS0.96780.0183 0.0039 SCA_MS0.98370.38100.3810CNN0.88960.02780.0087SCAFF 0.9993 0.55690.0152 Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. The best result in each column is shown in bold. Table 5Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.86970.25500.0200CA_SS0.69790.1737 0.0187 SCA_SS0.83600.06540.0247SCA_MS0.9114 0.7914 0.0279CNN0.86870.22350.0221SCAFF 0.9972 0.50720.0882 Table 5Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} SA_SS0.86970.25500.0200CA_SS0.69790.1737 0.0187 SCA_SS0.83600.06540.0247SCA_MS0.9114 0.7914 0.0279CNN0.86870.22350.0221SCAFF 0.9972 0.50720.0882 Comparison of the performance of the proposed SCAFF model with ablation versions for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. The best result in each column is shown in bold. Effect of guided filtering To assess the impact of guided filtering, we compared the model performance before and after applying the filter across four datasets and three patch sizes. As discussed earlier, the guided filter leverages spectral bands as guidance to smooth noisy predictions while preserving structural edges. Quantitative results, summarized in Tables 6, 7, 8 and 9, show that guided filtering generally improves the discriminative capability of SCAFF. In most cases, the primary detection metric \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} increases after filtering, often approaching values close to 1. Similarly, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{d})}$$\end{document}, which reflects the stability of detection rates under varying thresholds, exhibits substantial gains, indicating enhanced robustness of target detection. On the other hand, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{f})}$$\end{document}—where lower values are preferable—sometimes increases after filtering, suggesting a degree of sensitivity in false-alarm rates under threshold variation. Nevertheless, the overall improvements in target detection and spatial coherence outweigh this drawback, confirming that guided filtering is an effective post-processing step for refining probability maps and enhancing interpretability. Table 6Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}.Patch sizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.98740.12140.0012After0.99740.28720.04067Before0.98870.05300.0007After0.99860.51170.11529Before0.96710.07360.0015After0.99470.30940.0900 Table 6Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}.Patch sizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.98740.12140.0012After0.99740.28720.04067Before0.98870.05300.0007After0.99860.51170.11529Before0.96710.07360.0015After0.99470.30940.0900 Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. Table 7Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}.Patch sizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.95790.05000.0012After0.99370.35700.05597Before0.94630.10920.0007After0.98280.40860.07799Before0.92110.01490.0012After0.92180.38770.1246 Table 7Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}.Patch sizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.95790.05000.0012After0.99370.35700.05597Before0.94630.10920.0007After0.98280.40860.07799Before0.92110.01490.0012After0.92180.38770.1246 Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. Table 8Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}.Patch SizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.99900.56510.0016After0.99930.55690.01527Before0.99800.20180.0012After0.99820.24460.00779Before0.97950.13450.0065After0.99130.53300.0391 Table 8Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}.Patch SizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.99900.56510.0016After0.99930.55690.01527Before0.99800.20180.0012After0.99820.24460.00779Before0.97950.13450.0065After0.99130.53300.0391 Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. Table 9Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}.Patch sizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.94440.64250.0077After0.99720.50720.08827Before0.92050.44680.0074After0.98350.33720.07809Before0.91110.08850.0011After0.93500.16000.0209 Table 9Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}.Patch sizeBefore or after applying the filter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} 5Before0.94440.64250.0077After0.99720.50720.08827Before0.92050.44680.0074After0.98350.33720.07809Before0.91110.08850.0011After0.93500.16000.0209 Numerical comparison of the proposed model’s performance before and after applying the guided filter for different patch sizes on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. Impact of patch size Patch size is a crucial parameter in hyperspectral target detection, as it determines the spatial–spectral context captured around each pixel. To evaluate its effect, the SCAFF model was trained and tested using three window sizes—5 × 5, 7 × 7, and 9 × 9—across all four benchmark datasets. After guided filtering, the ROC curves for different patch sizes (see Figs. 9, 10, 11 and 12) and the corresponding \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document}comparisons (see Fig. 13) were analyzed. The ROC curves clearly illustrate how detection performance varies with patch size: smaller patches generally yield sharper separation between target and background, whereas larger ones result in degraded discrimination. The bar plots of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} values provide a concise quantitative summary, confirming that patch size 5 consistently achieves the highest accuracy, patch size 7 performs comparably with minor differences, and patch size 9 produces the weakest results across datasets. The only exception occurs in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}, where patch size 7 slightly outperforms 5, though the difference remains negligible. Fig. 9ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document} with patch sizes 5, 7, and 9. ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document} with patch sizes 5, 7, and 9. Fig. 10ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document} with patch sizes 5, 7, and 9. ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document} with patch sizes 5, 7, and 9. Fig. 11ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document} with patch sizes 5, 7, and 9. ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document} with patch sizes 5, 7, and 9. Fig. 12ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document} with patch sizes 5, 7, and 9. ROC curves of the SCAFF model for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document} with patch sizes 5, 7, and 9. Fig. 13Comparison of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} values of the SCAFF model Across Datasets and Patch Sizes. Comparison of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} values of the SCAFF model Across Datasets and Patch Sizes. Qualitative results Fig. 14Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. Fig. 15Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. Fig. 16Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. The ablation variants allow direct observation of the contributions of individual architectural components. Models relying solely on self-attention or cross-attention (SA_SS and CA_SS) show limited ability to localize target regions, often producing incomplete or noisy detections. Incorporating both mechanisms in SCA_SS improves the coherence of detection maps, while the multi-scale attention variant (SCA_MS) captures more fine-grained spectral–spatial cues, yielding noticeably clearer target regions. The CNN baseline, despite extracting local spatial features, struggles to suppress background clutter and typically results in higher false alarms compared to attention-based designs. The complete SCAFF model demonstrates superior localization and robustness across diverse backgrounds, producing detection maps that closely match ground-truth targets. Nevertheless, the raw outputs occasionally exhibit local noise and blurred object boundaries. The application of guided filtering effectively addresses these issues by enforcing spatial consistency, sharpening object edges, and reducing spurious background responses. This refinement leads to visually cleaner and more interpretable detection maps, confirming the benefit of guided filtering as a lightweight yet powerful post-processing step. Taken together, these qualitative results (see Figs. 14, 15, 16 and 17) validate both the architectural choices in SCAFF and the use of guided filtering for post-processing, highlighting the model’s capability to achieve precise and spatially coherent hyperspectral target detection. Fig. 17Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. Qualitative comparison of detection maps on the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. Rows show the outputs of SA_SS, CA_SS, SCA_SS, SCA_MS, CNN, SCAFF (before guided filter), SCAFF (after guided filter), and the ground truth. Impact of target training sample size To assess impact of the target training sample size, an experiment is done on \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document} dataset. To this end, instead of selecting 20% of labeled samples of target class as target training set, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n$$\end{document} labeled target samples are selected as the target training samples. The obtained \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} values for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n=1$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:n=\left[\text{5,50}\right]$$\end{document} with step size of 5 are plotted in Fig. 18. As seen, with using 1 target sample, a relatively low \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} value close to 0.53 is obtained, and after that, the AUC values are increased greatly such that with using 5 target training samples, a \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} value larger than 0.96, and with using 10 target training samples, the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} value of 99.77 is achieved. It can be found that for more than 10 samples, the variations of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} is low, and approximately a flat curve is provided. It means low sensitivity of the proposed SCAFF method to the training set size. Fig. 18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} versus the number of target training samples. \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} versus the number of target training samples. Comparison with State-of-the-Art methods To provide a comprehensive evaluation of the proposed SCAFF model, its performance was compared with several representative state-of-the-art approaches reported in the hyperspectral target detection literature. These competing methods cover a wide spectrum of techniques, ranging from classical detectors such as CEM to more recent deep learning-based architectures, including GAN-based and domain adaptation frameworks. The comparison was conducted across four benchmark datasets using three quantitative evaluation metrics: \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{d})}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{f})}$$\end{document}. These metrics collectively capture the trade-off between detection probability, false alarm rate, and threshold sensitivity, thereby offering a thorough perspective on detection effectiveness. The quantitative results are summarized in Tables 10, 11, 12 and 13, each corresponding to one dataset. For the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document} dataset (see Table 10), SCAFF achieved the highest \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document} value, surpassing CEM, BLTSC, HTD-Net, and DAAN. Similarly, for the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document} dataset (see Table 12), SCAFF recorded a near-perfect score of 0.9992, outperforming advanced models such as RSB-DN, GAN-DA, and DAAN. On the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document} dataset (see Table 13), where challenging urban environments often degrade detector performance, SCAFF again delivered superior results compared with HTD-Net and DAAN, while achieving a significant margin over traditional baselines like CEM and BLTSC. In the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document} dataset (see Table 11), the proposed model performed on par with the strongest competitor (DAAN), with only a negligible difference, confirming its competitiveness even in scenarios where alternative deep models excel. Table 10Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} CEM0.99680.52770.2996BLTSC0.9975 0.5326 0.0176 HTD-Net0.98230.17730.0396DAAN0.9982Not reportedNot reportedSCAFF 0.9986 0.51170.1152 Table 10Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} CEM0.99680.52770.2996BLTSC0.9975 0.5326 0.0176 HTD-Net0.98230.17730.0396DAAN0.9982Not reportedNot reportedSCAFF 0.9986 0.51170.1152 Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document}. The best result in each column is shown in bold. It is worth noting that while some competing methods reported higher values in the complementary metrics \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{d})}$$\end{document} or \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{(\tau\:,{P}_{f})}$$\end{document} in certain datasets, such comparisons should be interpreted with caution since not all methods consistently reported results across all three metrics. Nonetheless, the overall performance trend strongly favors SCAFF, which consistently demonstrated robust and reliable detection capability across all evaluation criteria. Another key observation is the generalization strength of SCAFF across diverse datasets. The four benchmarks used in this study differ substantially in terms of spectral resolution, spatial size, target distribution, and target-to-background ratio. Despite these challenges, SCAFF maintained high accuracy and stable performance, highlighting its adaptability and resilience to variations in hyperspectral data. In summary, the comparative evaluation confirms that the proposed SCAFF model establishes a new competitive benchmark in hyperspectral target detection. By integrating self- and cross-attention mechanisms with multi-scale convolutional processing, SCAFF not only introduces conceptual novelty but also delivers tangible improvements over widely recognized state-of-the-art methods, making it a promising framework for hyperspectral target detection. However, due to implementation of self-attention and cross-attention mechanisms, and multi-scale convolutional filtering in their fused output, the SCAFF has a relatively more computational burden with respect to some detectors. For example, in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego1$$\end{document} dataset, the running time is 7.30 s for CEM, while the prediction time is 42.21 s for DAAN and 103 s for SCAFF. Table 11Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} GAN-DA0.9819Not reportedNot reportedDAAN 0.9989 Not reportedNot reportedSCAFF0.99370.35700.0559 Table 11Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} GAN-DA0.9819Not reportedNot reportedDAAN 0.9989 Not reportedNot reportedSCAFF0.99370.35700.0559 Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Sandiego2$$\end{document}. The best result in each column is shown in bold. Table 12Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} CEM0.80580.40810.2314RSB-DN0.9957 0.5669 0.0317GAN-DA0.9978Not reportedNot reportedDAAN0.9985Not reportedNot reportedSCAFF 0.9993 0.5569 0.0152 Table 12Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} CEM0.80580.40810.2314RSB-DN0.9957 0.5669 0.0317GAN-DA0.9978Not reportedNot reportedDAAN0.9985Not reportedNot reportedSCAFF 0.9993 0.5569 0.0152 Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Texas\_Coast$$\end{document}. The best result in each column is shown in bold. Table 13Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} CEM0.58570.19950.1673BLTSC0.80870.53500.3929HTD-Net0.9964 0.8189 0.0797 DAAN0.9940Not reportedNot reportedSCAFF 0.9972 0.50720.0882 Table 13Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. The best result in each column is shown in bold.model \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({{P}}_{{f}},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{d}})}$$\end{document} \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{A}{U}{C}}_{({\tau\:},{{P}}_{{f}})}$$\end{document} CEM0.58570.19950.1673BLTSC0.80870.53500.3929HTD-Net0.9964 0.8189 0.0797 DAAN0.9940Not reportedNot reportedSCAFF 0.9972 0.50720.0882 Comparison of the performance of the proposed SCAFF model with other existing methods for \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Los\_Angeles$$\end{document}. The best result in each column is shown in bold. Conclusion In this work, we proposed the Self- and Cross-Attention Feature Fusion (SCAFF) for hyperspectral target detection. SCAFF integrates self- and cross-attention mechanisms with multi-scale convolutional feature extraction. This design enables the model to effectively capture both spectral–spatial dependencies within the local patches and the cross interactions between data and target patches, thereby enhancing its ability to discriminate targets from background. Extensive experiments conducted on four benchmark hyperspectral datasets showed that SCAFF consistently achieved superior values of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{AUC}_{({P}_{f},{P}_{d})}$$\end{document}, while also maintaining competitive results in threshold-based evaluation criteria. Applying the enhanced guided filtering as a post-processing step reduces noise while preserves fine structural boundaries. A comprehensive ablation study validated the contribution of each component of the architecture. Models lacking certain modules, such as self-attention, cross-attention, or multi-scale convolution, showed a clear performance degradation compared to the full SCAFF model. This underscores importance of the integrated design, where attention mechanisms play a central role in boosting detection performance. Finally, comparative evaluations against several state-of-the-art methods confirmed that SCAFF achieves competitive or superior performance across diverse datasets, highlighting its strong generalization. There are some limitations in the proposed SCAFF model. Applying the self-attention mechanism to explore important spectral and spatial features from the target patch and data patch; and applying the cross-attention mechanism to explore cross-dependencies among the input data patch and the target patch increase the computational burden. In addition, implementation of multi-scale convolutional filtering to the fused attention features leads to more computations. The Target Patch, which is average of target training samples, has variations with respect to different target samples due to possible intraclass variability. From one hand, these variations may lead to enhancement of the generalization ability of the network. From the other hand, the averaged Target Patch may not be a sufficiently appropriate representative of the target samples since the spectral scattering among target patches is not considered. Due to varied size of targets in different hyperspectral images, designing a network with adaptive patch size is suggested for future studies. By employing inputs with adaptive patch size, applying the multi-scale convolutional processing can be removed, which leads to reduction of computations, and also, the detection performance can be improved. Designing a more appropriate representative of target patches can be also studied in future works.