1. Introduction
Because electromagnetic waves attenuate rapidly in aquatic environments, acoustic signals serve as the primary information carrier for underwater surveillance and communication [
1,
2]. Consequently, Underwater Acoustic Target Recognition (UATR) has emerged as a critical technology for maritime security and threat assessment [
3]. While UATR encompasses various sound sources, ship-radiated noise represents a particularly significant category, containing rich acoustic fingerprints that reflect a target’s mechanical structure and operating status [
4]. Achieving robust recognition, however, remains difficult due to complex multipath propagation, time-varying channel conditions, and high ambient noise levels inherent to the underwater acoustic environment.
Analyzing non-stationary underwater signals amidst complex ocean interference is challenging. Transforming 1D raw acoustic signals into 2D time–frequency distributions has become a prevalent strategy to address this [
5,
6]. Classical techniques, including the Short-Time Fourier Transform (STFT), Mel-frequency Cepstral Coefficients (MFCCs), Constant-Q Transform (CQT), and Wavelet Scattering Transform (WST), highlight useful signal components in complementary ways. Using ship-radiated noise as a representative example,
Figure 1 demonstrates how the Mel spectrogram visualizes the distinct physical attributes of different targets. The Passengership (
Figure 1a) exhibits a stable, steady-state distribution with continuous horizontal harmonic lines. For the Tug sample recorded under an active maneuvering or working condition (
Figure 1b), intermittent mechanical impacts and rapid operating-state changes generate transient broadband components that appear as localized vertical impulses or discrete spots [
7]. These informative 2D feature maps have thus become standard inputs for deep-learning-based recognition models.
From an acoustic perspective, ship-radiated noise contains structures with markedly different time–frequency extents. Periodic excitation from propulsion and rotating machinery produces relatively stable harmonic components that persist over longer temporal intervals, whereas intermittent mechanical impacts and rapid operating-state changes generate localized broadband transients. These coexisting global rhythmic and local impulsive patterns imply that a single fixed receptive field may not represent all discriminative structures effectively [
4,
7]. This observation provides the physical motivation for the heterogeneous receptive fields used in LHK-Net.
Deep learning has largely superseded traditional machine learning methods to become the dominant paradigm in UATR [
8,
9]. Convolutional Neural Networks (CNNs) serve as the backbone for most state-of-the-art systems due to their strong local feature extraction capabilities, with early research primarily adapting standard architectures like ResNet [
10,
11]. Recent advancements generally follow two main trajectories to enhance feature discriminability. The first involves multi-stream feature fusion, where distinct inputs such as MFCC, CQT, and Low-Frequency Analysis and Recording (LOFAR) spectrograms are merged to provide complementary acoustic information [
11,
12]. The second integrates attention mechanisms, embedding modules like Efficient Channel Attention [
13] or Coordinate Attention [
14] to adaptively reweight informative spectral channels.
Although CNNs excel at extracting local patterns, their limited receptive fields hinder the modeling of long-range global dependencies [
15,
16]. Transformers address this issue through self-attention mechanisms, capturing global semantic contexts across the entire time–frequency spectrum [
17,
18]. However, because pure Transformers often lack the inductive bias needed for fine-grained local details, the field has shifted toward hybrid CNN–Transformer architectures. Leading models such as the underwater acoustics CNN–Transformer cooperation network (UACTC) [
19] and the multi-path parallel CNN–Transformer network (MPCT-Net) [
15] utilize convolutional layers for local feature extraction and Transformer blocks for global dependency modeling. Other innovations incorporate cross-attention for multi-view fusion [
20] or differential attention for low Signal-to-Noise Ratio (SNR) robustness [
21]. While these hybrid models achieve superior accuracy, their high parameter counts and computational latency [
22] make them less suitable for real-time applications on resource-constrained underwater platforms.
To facilitate deployment on edge devices like Unmanned Surface Vehicles (USVs) and buoys, researchers have focused on developing lightweight architectures. A common strategy optimizes classic backbones with efficient operators, as seen in LW-SEResNet10 [
23] and DLA-ResNet [
24], which significantly reduce model size via Depthwise Separable Convolutions (DSCs). Specialized designs have also emerged: MA-CNN-A [
25] utilizes asymmetric convolutions to extract fine-grained features with minimal parameters, while UATFSN [
26] recently decoupled time and frequency modeling with anisotropic kernels to reduce parameters to 0.05 M. Similarly, LTFSD-Net [
27] proposed a dual-stream lightweight network for active sonar recognition.
Despite these advances in efficiency, a critical limitation persists: most lightweight architectures rely on structural homogeneity, utilizing static kernel sizes or fixed patch tokens. This rigid scale design restricts their ability to simultaneously capture diverse acoustic patterns, such as macroscopic harmonic lines and localized transient impulses. To address this scale mismatch problem, we propose the Lightweight Heterogeneous Kernel Network (LHK-Net), explicitly designed to adaptively match the heterogeneous physical scales of diverse underwater targets. We construct a Heterogeneous Kernel Pyramid (HKP) containing parallel branches with Macro (), Meso (5 × 5), and Micro () branches, explicitly decoupling global rhythmic patterns from local transient impulses. To ensure extreme efficiency for edge deployment, we introduce a Residual Depthwise Separable Convolution (Res-DSConv) block with an optimized expansion ratio, reducing the model complexity to 0.82 M parameters and 0.38 G FLOPs. Additionally, a Time–Frequency Attention (TFA) module and an Adaptive Selective Kernel Fusion (ASKF) mechanism are introduced to suppress background noise and dynamically weight multi-scale features. Extensive experiments on the DeepShip dataset with a rigorous file-level split demonstrate that LHK-Net achieves state-of-the-art accuracy at real-time inference speeds. Furthermore, detailed visual analyses confirm the strong physical interpretability of our proposed architecture.
To the best of our knowledge, LHK-Net is the first UATR architecture to organize a single time–frequency representation into three lightweight, scale-specialized heterogeneous-kernel branches and adaptively fuse them according to the acoustic pattern of each input. Unlike generic multi-scale feature aggregation, the proposed design couples scale-specific feature extraction, branch-level attention, diversity supervision, and adaptive fusion in a unified lightweight network, thereby jointly preserving recognition performance and computational efficiency.
3. Experiments
3.1. Dataset and Feature Extraction
LHK-Net is evaluated on the DeepShip benchmark dataset, comprising real-world underwater recordings collected in the Strait of Georgia delta. We focus on four common vessel categories: Cargo, Passengership, Tanker, and Tug. These categories represent diverse acoustic characteristics, covering both large-tonnage steady-state noise and smaller, high-maneuverability transient noise.
To prevent data leakage, we adopt a rigorous file-level splitting strategy instead of a random frame-level shuffle. Segments extracted from the same continuous recording share identical channel responses and background conditions; randomly distributing these between training and testing sets inflates performance metrics without reflecting true generalization ability. Therefore, the dataset is strictly partitioned by audio files, ensuring all segments from a specific recording ID are assigned exclusively to either the training or the test set.
The partitioning procedure contains two stages. First, the original audio files are divided into a training-file pool and an independent test-file pool before segmentation; consequently, segments derived from a test file are never used for model optimization, hyperparameter selection, or checkpoint selection. After segmentation, 85% of the segments generated from the training-file pool are used for optimization and the remaining 15% form a development validation set for monitoring convergence and selecting checkpoints. The validation set therefore represents within-training-file development performance, whereas the test set evaluates generalization to previously unseen recordings. All compared models use the same files, segmentation parameters, and train/validation/test configuration.
Because the validation segments remain within the training-file pool while the test clips are derived from completely unseen audio files, the two sets represent different levels of difficulty. The best validation accuracy of 99.06% and the test OA of 72.27% therefore differ by 26.79 percentage points; this gap is consistent with recording-level domain shift and should not be interpreted as an inconsistent metric calculation. A conventional segment-level random split can assign clips from the same recording to both training and testing, allowing shared channel, background, and operating-condition cues to inflate the test score. The lower result under the present unseen-file protocol is consequently a more conservative and deployment-relevant estimate of generalization.
For every compared method, validation and testing use the same fixed data protocol: checkpoint selection is based only on the 15% development split from the training-file pool, and final reporting uses the independent test-file pool exactly once. OA, Macro-F1, class-wise F1 scores, and confusion matrices provide complementary aggregate and class-level validation. Because the current study uses one predefined file-level partition, the reported differences are descriptive paired comparisons under a common independent test set rather than claims of inferential significance across repeated partitions. Repeated grouped splits or recording-level bootstrap confidence intervals are reserved for future work and are not inferred from correlated clips.
For data preprocessing, the raw audio signals are resampled to 16 kHz and segmented into 6-s clips using a non-overlapping policy to maximize sample diversity. This yields 22,263 samples for training and 5760 samples for testing. The 1D time-domain segments are then transformed into 2D Mel spectrograms via the STFT, utilizing a Hanning window with an FFT size of 1024, a hop length of 752 samples, and a filter bank of 128 Mel bands. This generates a 128 × 128 feature map, providing a compact yet informative representation for LHK-Net.
Mel spectrograms were selected because they are a widely used and compact time–frequency representation in UATR [
5,
6] and provide a consistent input for fair architectural comparison. The focus of this study is the design of a lightweight, scale-adaptive classifier rather than a comparison of acoustic front ends; accordingly, the same Mel representation is used for all evaluated models.
3.2. Ablation Studies
Comprehensive ablation studies were conducted on the DeepShip dataset to validate the contribution of each LHK-Net component.
Table 1 summarizes the impact of the HKP, the functional modules (TFA and ASKF), and the multi-task optimization strategy, while
Figure 5 visualizes the training dynamics of the proposed loss functions.
The kernel specifications were selected as three nested odd sizes (
, and
), which preserve a centered receptive field while providing local, intermediate, and wider context without the cost of very large kernels. Their usefulness is quantitatively supported by
Table 1: the
,
, and
single-branch models obtain OAs of 67.74%, 67.47%, and 66.11%, respectively, whereas their heterogeneous combination reaches 72.27%. The corresponding gains are 4.53, 4.80, and 6.16 percentage points over the individual branches, showing that the chosen scales contribute complementary information rather than representing arbitrary kernel settings. The complete model also improves class-wise F1 scores to 0.63, 0.76, 0.72, and 0.76 for Cargo, Passengership, Tanker, and Tug, respectively.
Finally, the multi-task loss ablation shows that relying solely on the final classification loss (
) produces a suboptimal OA of 70.62%.
Figure 5 should be read together with the three-phase schedule described in
Section 2.5.2. The apparent abrupt rise in the main and auxiliary losses around step 35 (
Figure 5a) marks the planned transition from branch specialization to joint fusion optimization. At this boundary, ASKF, the fused classifier, and the three specialized branches begin joint end-to-end adaptation, which redistributes the gradients and temporarily raises
and
. Consequently, the loss values on the two sides of the boundary should not be interpreted as consecutive points from one stationary optimization phase. After a short adaptation interval, both losses resume decreasing and converge, while
continues its downward trend (
Figure 5b). Validation accuracy does not collapse at the transition; it remains stable and subsequently improves to the best value of 99.06% during the final fusion stage (
Figure 5c). Thus, stopping at the transition would select an intermediate checkpoint before fusion convergence. The reported confusion matrices use the final checkpoint selected by the best validation performance after completion of the progressive schedule.
3.3. Comparison with State-of-the-Art Methods
LHK-Net was benchmarked against representative convolutional, lightweight, multi-scale, and Transformer-based architectures under a common data protocol.
The comparison set was selected to cover complementary architecture families: conventional residual CNN baselines (DeepShip baseline and AM-ResNet), a lightweight attention CNN (LW-SE-ResNet10), a multi-scale CNN (AMSCNet), a lightweight local-global Transformer (MobileViT-XS), and a domain-specific CNN–Transformer cooperation model (UACTC). It therefore includes both established convolutional baselines and more recent lightweight Transformer designs. All methods receive the same 6-s audio clips transformed into Mel spectrograms and use the identical file-level train/validation/test partition and evaluation metrics; no model is given an alternative acoustic front end or access to test-file segments during training. Architecture-specific internal blocks are retained so that the comparison isolates the effect of the classifier architecture under a common data configuration.
3.3.1. Accuracy and Complexity Trade-Off
Figure 6 illustrates the trade-off between recognition accuracy and model complexity. UACTC contains approximately 8 M parameters in our implementation and achieves reasonable accuracy, but remains substantially larger than the 0.82 M-parameter LHK-Net. LW-SE-ResNet10 is also lightweight, although its accuracy is lower under the common file-level protocol. Here, the Pareto frontier denotes the set of non-dominated models for which recognition accuracy cannot be improved without increasing parameter count, or parameter count cannot be reduced without decreasing accuracy. LHK-Net occupies the favorable upper-left region, achieving 72.27% accuracy with only 0.82 M parameters. It also outperforms AMSCNet while being approximately
faster in inference, indicating that heterogeneous kernels capture discriminative features without massive over-parameterization.
Computational complexity was evaluated in FLOPs using a Mel spectrogram ( as input. LHK-Net contains 0.82 M parameters and requires approximately 0.38 GFLOPs for a single forward pass. Considering forward and backward propagation, the training cost is approximately 1.14 GFLOPs per clip per epoch, while Mel-spectrogram extraction contributes approximately 0.023 GFLOPs per clip, resulting in a complete test-time cost of approximately 0.403 GFLOPs per clip. These results demonstrate the low computational burden of LHK-Net during both training and inference.
3.3.2. Visual Analysis of Learned Representations
To investigate why LHK-Net outperforms heavier models, the learned feature spaces are visualized using t-distributed stochastic neighbor embedding (t-SNE) in
Figure 7. The baseline AM-ResNet (
Figure 7a) fails to form distinct clusters, with categories remaining intertwined, explaining its poor generalization. Interestingly, while the state-of-the-art UACTC model (
Figure 7c) appears to form well-separated islands, closer inspection reveals highly impure clusters. For instance, the top-right cluster contains a chaotic mixture of
Tug and
Cargo samples, suggesting the Transformer model overfits to nuisance features rather than learning intrinsic acoustic signatures. In contrast, LHK-Net (
Figure 7b) forms coherent and dense clusters. Despite
Tug and
Cargo sharing similar broadband noise characteristics, our model effectively structures the feature space based on actual semantic content, achieving significantly higher class purity.
3.3.3. Quantitative Verification via Confusion Matrices
Figure 8 presents a quantitative comparison of class-level performance. In the confusion matrix of UACTC (
Figure 8c), the largest off-diagonal error occurs when Cargo samples are misclassified as Tanker, accounting for 35%, whereas only 4% of Cargo samples are misclassified as Tug. Compared with UACTC, LHK-Net (
Figure 8b) reduces the misclassification rate of Cargo samples as Tanker from 35% to 33%, representing a modest improvement of 2 percentage points rather than the substantial reduction stated previously. More notable gains are observed in the class-specific recalls. Specifically, LHK-Net increases the recall from 50% to 57% for Cargo, from 77% to 79% for Passengership, from 76% to 84% for Tanker, and from 66% to 69% for Tug. These corrected results provide a more balanced account of the improvements achieved by LHK-Net and the remaining inter-class confusion.
3.4. Interpretability Analysis
Beyond achieving state-of-the-art accuracy, elucidating the underlying mechanisms of LHK-Net is crucial for its real-world reliability. To verify the reliability of our proposed method, a comprehensive interpretability analysis was conducted, demonstrating that the network’s internal decisions align effectively with the physical characteristics of ship-radiated noise.
Gradient-weighted class activation mapping (Grad-CAM) provides sample-level visual evidence for scale-specialized perception. For the Passengership example, the Macro branch (
Figure 9a) forms stronger and more coherent responses along persistent harmonic trajectories than the Micro branch (
Figure 9c), whose response is weaker and more localized. For the Tug example under the illustrated active operating condition, the Macro branch (
Figure 9b) produces broader, more diffuse responses, whereas the Micro branch (
Figure 9d) produces sharper localized peaks aligned with transient components.
Figure 9a,c therefore compare the two branch scales on the same Passengership sample, while
Figure 9b,d provide the corresponding comparison on the same Tug sample.
Examining the internal attention weights of the ASKF module quantitatively verifies this adaptive switching mechanism. As shown in
Figure 10, the network assigns significantly higher weights to the Macro (7 × 7) branch (red heatmap regions) across multiple discriminative channels for the steady-state Passengership signal, prioritizing larger receptive fields for temporal consistencies. Conversely, the network shifts preference to the Micro (3 × 3) branch for the transient Tug signal, localizing impacts. This alignment between Grad-CAM and internal weights provides compelling evidence that LHK-Net dynamically matches the kernel scale to intrinsic acoustic properties.
The visual interpretation is cross-checked quantitatively using the ablation and confusion-matrix results. Relative to the three single-branch variants, heterogeneous fusion increases OA by 4.53–6.16 percentage points; removing TFA lowers OA by 0.83 points, and replacing ASKF with non-adaptive concatenation lowers OA by 1.40 points. At the class level,
Figure 8 shows that LHK-Net improves the Cargo, Tanker, and Tug diagonal recalls over UACTC by 7, 8, and 3 percentage points, respectively, although the Cargo→Tanker error decreases by only 2 points. Thus, Grad-CAM and attention maps are used as mechanism visualizations, while
Table 1 and
Figure 8 provide the quantitative performance evidence supporting the same interpretation.
To demonstrate how LHK-Net mitigates pervasive environmental noise, the attention maps generated by the TFA module are visualized in
Figure 11. Functioning as an adaptive band-pass filter, the frequency attention maps (
Figure 11 top) assign high weights to specific frequency bins corresponding to the target’s harmonics while suppressing noise-dominated bands. Simultaneously, the time attention maps (
Figure 11 bottom) act as a temporal gate, synchronizing high weights with transient occurrences while attenuating background segments. By integrating these spectral and temporal mechanisms, LHK-Net achieves robust dual-domain denoising.
4. Conclusions
A primary bottleneck in current UATR models is the scale mismatch between static receptive fields and the diverse physical characteristics of underwater targets. To address this issue, we proposed LHK-Net, which employs an HKP with parallel Macro (), Meso (), and Micro () branches to represent persistent harmonic patterns, intermediate-scale structures, and localized transient events, respectively. The TFA and ASKF modules further suppress ambient interference and dynamically aggregate the scale-specific features. Grad-CAM visualizations, fusion-weight analysis, and quantitative ablation experiments clarify the contributions of these components. Under the rigorous file-level evaluation protocol on DeepShip, LHK-Net achieves an OA of 72.27% with only 0.82 M parameters and 0.38 GFLOPs, providing a favorable balance between generalization to unseen recordings and computational efficiency.
The principal innovation of LHK-Net lies in treating heterogeneous kernel branches as the core representation mechanism for UATR. The three lightweight branches are specialized for complementary time–frequency scales and are adaptively coordinated rather than statically aggregated. This design preserves the recognition benefits of multi-scale modeling while maintaining a compact computational footprint. Moreover, the use of real marine recordings and an unseen-file test protocol provides a more realistic assessment of generalization than a random segment-level split. Although the model size and forward-pass complexity indicate potential suitability for resource-constrained platforms, the current evaluation remains an offline benchmark experiment rather than an on-board sea trial. The reported results should therefore be interpreted as evidence of deployment potential rather than direct validation of field performance.
Future work will extend the proposed scale-adaptive framework to few-shot learning scenarios to address the limited availability of labeled underwater acoustic data. Beyond acoustic-only representation learning, we will investigate metadata-assisted modeling that explicitly incorporates vessel-geometry descriptors and motion-related parameters, such as speed and operating state, when such annotations are available. We will also examine the transferability of the learned representations from shallow coastal waters to deep-sea environments. Finally, on-board evaluations will be conducted using a USV or buoy across multiple vessels and under controlled variations in operating state, range, channel condition, and signal-to-noise ratio, with recording-level uncertainty quantified across repeated field trials.