Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

28 February 2026

17 Pages

Optimising Convolutional Neural Network Architectures for Fin Whale Pulse Detection in Spectrograms

and
Center for Automation and Robotics, Universidad Politecnica de Madrid—CSIC, 28006 Madrid, Spain
*
Author to whom correspondence should be addressed.

Abstract

Deep neural networks are widely used for image classification in different fields, although selecting an appropriate architecture often remains a trial-and-error process. The purpose of this work is to investigate a convolutional neural network architecture used to detect whale pulses in spectrograms in order to better understand the causes of its underperformance. By examining the behaviour of its internal layers, we show that the early convolutional blocks capture the most informative acoustic features, while deeper layers provide limited additional benefit and, under the considered training conditions, may even degrade classification accuracy. Based on these observations, we derive a simplified architecture consisting of only the first two convolutional layers followed by a lightweight classifier. This network achieves near-optimal performance, improving accuracy from 87% to 98%, and exhibits substantially lower variability between repetitions compared to the original model.

1. Introduction

Deep Learning has become widely used in modern data analysis, with applications that span an increasingly wide range of scientific and engineering disciplines. Deep Neural Networks (DNNs) operate through a succession of non-linear transformations distributed across multiple layers, each designed to extract progressively more abstract representations from the input data, and typically require large annotated datasets for effective training [1].
Among the architectures commonly used in Deep Learning, the Convolutional Neural Network (CNN) is the most prevalent. Its primary benefit lies in the ability to autonomously detect important features without requiring human supervision, and it is often used for image recognition tasks [2]. A classical configuration consists of a multilayered structure composed of three different units: the convolutional layer, the rectified linear unit (ReLU) layer, and the pooling layer. This structure usually repeats between two and four times. This architecture appears in several studies [2,3,4].
In practice, network design often relies on a trial-and-error approach. Starting from an existing architecture, practitioners iteratively add, remove, or modify layers in early experimentation to obtain satisfactory performance on preliminary datasets. However, the underlying rationale behind such architectural choices is rarely discussed in the literature and the specific contribution of each layer to the final performance often remains unclear.
In previous work, ref. [5] developed a deep neural network to detect fin whale (Balaenoptera physalus) pulses from underwater acoustic recordings obtained in their natural habitat. This species, distributed in most of the world’s oceans [6], exhibits seasonal movements in the Mediterranean Sea that generate massive acoustic datasets—too large to be processed manually. The recordings were collected using passive Ecological Acoustic Recorders (EARs) operating at a sampling rate of 2000 Hz. The technical specifications of these instruments are described in [7]. They were deployed in the Columbretes Island Marine Reserve (Mediterranean Sea) between 21 September and 22 December 2011 as part of a long-term monitoring programme [8].
Detection was based on the transformation of the recordings into spectrograms (example in Figure 1) to detect 20 Hz fin whale pulses, which come in specific shapes. The proposed architecture used consisted of a three-layer structure repeated four times, resulting in a total of 26 layers (due to the addition of different layers for fast R-CNN training) (Figure 2) [5]. For its training, we used a database of 518 different images with 1722 labels. This network showed an accuracy of 81.37%, with a precision of 75.00%, and a recall of 26.09%.
Figure 1. Spectrogram detections of fin whale 20 Hz and VFP notes (X-BAT (BRP, Cornell)) 2.5 min window, FFT = 512 points, Hanning window, 75% overlap [9].
Figure 2. Whale pulse classification network [5].
For the same dataset, a classical computer-vision approach exploiting the rounded morphology of fin whale pulses, based on image denoising, morphological erosion and the Hough transform, achieved higher performance, with an accuracy of 87.30%, precision of 80.00% and recall of 82.40% [10,11]. Its performance surpassed that of the deep neural network proposed in earlier work, suggesting that the previously adopted architecture was not well suited to the specific characteristics of this dataset.
The present work builds on this previous system by conducting a detailed analysis of its network architecture to better understand the sources of its limited performance. Rather than proposing an entirely new model, this study examines the behaviour of individual CNN layers through controlled ablation experiments, evaluating how each architectural component contributes to detection accuracy and identifying those that may lead to performance degradation under the considered training conditions. This layer-wise analysis enables the derivation of a simplified and practically efficient architecture, while isolating the influence of specific components on the overall network behaviour.

Related Work

The use of convolutional neural networks (CNNs) is widespread in image classification across multiple fields, and numerous studies compare the performance of different architectural configurations. For example, Mohammed et al. [12] and Kumar et al. [13] provide comprehensive reviews of CNN-based methods for medical image classification. In environmental monitoring, deep neural networks (DNNs) have been applied to image-based flood detection [14] and weather-related prediction tasks [15,16].
Within marine bioacoustics—the domain most closely related to our study—several works investigate the detection and classification of underwater animal vocalisations [17,18,19]. Particularly notable is the research by Bergler et al. [20,21], who used deep learning for both sound detection and denoising in killer whale monitoring, illustrating the potential of data-driven methods for passive acoustic observations.
More recent studies have significantly advanced deep learning applications for underwater bioacoustics, providing an essential context for our work. Schall et al. [22] introduced one of the first benchmark frameworks for the detection of whales, offering a standardised evaluation of neural architectures for large-scale passive acoustic datasets. Hamard et al. [23] demonstrated that convolution-based models can generalise across species and recording conditions, reinforcing the strength of spectrogram-based and CNN-based approaches. Cheng et al. [24] extended this direction by proposing hybrid temporal-convolutional models designed to better capture long-range temporal patterns in marine mammal vocalisations. These works collectively show that deep learning is becoming a central tool for passive acoustic monitoring, further motivating studies focused on improving and analysing CNN-based fin whale pulse detectors.
Additional recent contributions emphasise the relevance of deep learning for broader underwater acoustic monitoring. Nappi et al. [25] proposed a smart monitoring system for underwater sound classification, highlighting the role of machine-learning-driven acoustic sensing in large-scale marine observation. Jithina and Manikandan [26] analysed 1D CNNs using Fourier magnitude spectra, showing the impact of activation functions and layer choices on classification accuracy—directly related to our layer-focused investigation. Wang et al. [27] introduced a multi-scale residual architecture with attention mechanisms for underwater acoustic target recognition, illustrating how modern design elements can significantly enhance model performance. Together, these studies underscore the importance of understanding CNN behaviour in acoustic contexts and support our motivation to perform a detailed layer-wise analysis.
From an architectural perspective, only a limited number of works analyse the influence of individual layers within a CNN. Zhao et al. [28], for example, investigated the role of pooling layers by comparing different pooling strategies, whereas Zafar et al. [29] examined alternative pooling configurations to assess their effects on network accuracy. Other studies focus on designing new operators or evaluating the impact of single architectural elements on overall performance [30,31]. These efforts provide valuable insights into network optimisation and justify the relevance of analysing each component of our own CNN architecture.

2. Materials and Methods

2.1. Theoretical Framework

Before analysing the architecture of the neural network at hand, it is important to understand the role and function of each fundamental layer of a deep neural network.

2.1.1. The Convolutional Layer

For the algorithm, an image is a matrix and each number represents the light intensity of a pixel. The convolutional layer applies a kernel filter to the input images, extracting essential features. The filter mask moves across the input image in steps, computing the product of the kernel filter weights and the corresponding pixel values at each location. This process produces a 2D activation map, allowing the CNN to learn the visual features of the image. This process is represented in Figure 3 [32].
Figure 3. Convolutional layer example [32].
Neurons in the next layer are connected to the neurons in the previous layer, with this local correlation known as the receptive field. The receptive field helps to extract local features from the input image, forming a weight vector that remains consistent throughout the entire plane of neurons in the next layer. As all neurons in the plane share the same weights, this allows the network to detect similar features at different locations within the input data [33]. This weight-sharing strategy also reduces the number of parameters, improving the speed and efficiency of training [34].
A CNN offers several customisation options to tailor the process to the input data:
  • Stride: The stride determines the step size at which the filter moves across the input image. A lower stride increases the overlap between the filter and the image, resulting in a larger output size. In contrast, a larger stride reduces overlap, leading to a smaller output.
  • Padding: To prevent loss of detail at the edges of the image, zero padding adds a border of zeros around the input. This ensures that the filter can process edge information and helps to manage the output size [34].

2.1.2. The Pooling Layer

The primary benefit of employing the pooling technique lies in its ability to significantly decrease the number of trainable parameters while also providing translation invariance [33].
The pooling layer can output either a maximum (Figure 4) or an average value. A combination of maximizations is often used for an optimal function. The pooling layer is helpful for reducing the overfitting, computational cost, and sensitivity to small spatial variations [32].
Figure 4. Max pooling filter example [32].

2.1.3. The Rectified Linear Unit (ReLU)

In the context of CNNs, ReLU is the most widely used activation function, as it sets all negative input values to zero, allowing only positive values to pass through. The main advantage of using ReLU compared to other functions is its efficiency in saving time and computational resources [34], since the computational demands of ReLU are comparatively lower than those of alternative non-linear functions [32]. A graphical representation of the ReLU function is shown in Figure 5.
Figure 5. ReLU function of activation [34].

2.1.4. The Batch Normalization Layer

Batch normalisation is a technique that normalises the activations of a layer within a mini-batch during deep neural network training, aiming to improve learning stability and speed. During training, activation distributions change constantly, which can slow down learning and destabilise the network. Using this layer may enable higher learning rates and faster training, reduce overfitting, improve stability, and make the network less sensitive to weight initialisation [35]. Even though the previous network architecture does not have a batch normalisation layer, its inclusion in this study allows us to assess its potential benefits in this particular task.
For each mini-batch and neuron, the batch statistics are computed, namely the mean ( μ ) and variance ( σ 2 ) of the activations. The activations are then normalised according to Equation (1). Subsequently, a linear transformation parameterized by γ and β is applied (Equation (2)), where γ and β are learning parameters optimised during training.
In batch normalisation, the parameters γ (scale) and β (shift) control how the normalised activations are re-scaled before being propagated to the next layer. Although these parameters are not manually tuned in our experiments, because MATLAB automatically initialises and optimises them during training, they still influence how spectral information is preserved or attenuated across layers, which is relevant in the context of fin whale pulse detection.
x ^ i = x i − μ σ 2 + ϵ
y i = γ x ^ i + β

2.2. Methods for Experiments

All software used in this study was implemented in MATLAB R2024a, using of the following toolboxes: Signal Processing, Image Processing, Deep Learning, and Statistics and Machine Learning. To ensure reproducibility, all experiments were initialised with a fixed random seed. This seed controls both weight initialisation and the internal random processes used during training. By using a fixed seed, each training run produces identical initialisation and shuffling sequences, ensuring that variations in the results are due solely to architectural or parameter changes.
In order to assess the contribution of different network layers, two complementary experiments were conducted. In the first, the outputs of individual layers were analysed to evaluate how each stage improves or degrades feature representations, as well as how its removal affects the final network output. In the second, we investigated the effect of varying the number of repeated Convolution-ReLU-MaxPooling blocks (four in the original architecture) in order to assess and optimise network depth.
Other training-related factors, such as batch size, weight initialisation, and labeling strategy, were kept constant across experiments to isolate the effect of architectural design choices.

2.2.1. Baseline CNN Architecture

Among the layers shown in Figure 2, four layers are typically included in a binary classification task, such as detecting the presence or absence of a fin whale pulse: the image input layer, the fully connected layer, the output activation layer and the classification layer. The goal is to create another network that operates with greater accuracy or, at the very least, maintains the same accuracy while being more efficient. Therefore, the other experiment was to build a simplified network to optimise performance. For this, a basic schema was built and different configuration parameters of each layer were tested to obtain the best performance.
  • Single convolutional layer (filter size and number of filters optimised)
  • Batch normalisation (if beneficial)
  • ReLU activation (if beneficial)
  • Pooling layer (filter size optimized)
For each of the following experiments, we set a common configuration so that the results can be compared. This setup includes a dataset for training, validation, and testing, as well as a unified training configuration.
The training database consisted of a total of 1232 positive tags and 1428 negative tags, and the test database with 286 positives and 294 negatives (ratio 80 to 20). For the training dataset, a data augmentation process was applied in MATLAB to increase the variability and robustness of the model. Specifically, random rotations between 15° and 15°, horizontal and vertical translations within ±3 pixels, random horizontal and vertical reflections, and random scaling between 90% and 110% of the original size were performed, this process was applied after data splitting in training and test. The data augmentation strategies employed in this study are generic image-based transformations and are not specifically designed to preserve the physical interpretation of spectrogram axes, where time and frequency have explicit meanings. However, the goal of these augmentations is not to generate physically realistic acoustic scenarios, but to increase data variability and act as a regularisation mechanism during training.
Since the proposed CNN operates as a pattern classifier rather than a physical signal model, preserving strict time-frequency causality is not required. Importantly, empirical results show that these augmentations do not degrade performance and instead contribute to improved generalisation, indicating that the introduced distortions do not hinder the learning of relevant features.
All trainings and tests conducted in this study were performed using the configuration shown in Table 1. The Adam optimiser was selected because it combines the advantages of Momentum and RMSprop, enabling fast convergence while adaptively adjusting the learning rate for each parameter, which has been shown to promote stable and efficient training in deep learning applications. The network was trained using categorical cross-entropy loss, chosen for its suitability for binary classification tasks and its probabilistic interpretation under the softmax output layer. A mini-batch size of 16 was chosen as a trade-off between computational efficiency and gradient noise. The initial learning rate was set to 1 × 10−3, a widely used default for the Adam algorithm. The piecewise learning rate schedule was used to gradually decrease the learning rate as training progresses, allowing fast learning at the beginning while allowing finer weight adjustments in later stages to improve generalisation. The validation frequency of 5 ensures frequent monitoring of model performance in the validation set without introducing significant computational overhead. In addition, a validation patience of 5 enables early stopping if no improvement is observed, preventing overfitting. Finally, the maximum number of epochs was limited to 10, as preliminary tests showed that this number was sufficient for convergence when combined with early stopping.
Table 1. Training parameters used for the experiments.

2.2.2. Layer-Wise Architectural Variations

As previously described, the neural network under study is made up of a three-layered structure (Convolution-ReLU-Pooling) repeated four times (Figure 2). Before analysing the importance of each of these elements in a single repetition, let us see the output of each layer to report how it affects the image flux.
With MATLAB’s activations function [36], we could print the result of the activation of each filter of each layer so we can see the effect this step has on our input. In the resulting image, the white pixels represent strong positive activations, and the black pixels represent strong negative activations. For this test, we used as input a positive image and it was classified as positive, so we will examine a true positive case.
Figure 6 illustrates the output of each layer of the proposed CNN detector. The output size varies across layers due to the different numbers of filters used in their configuration. As the network depth increases, particularly after the second repetition of the convolutional block, the pooling operation progressively reduces fine-grained spectral details, such that the outline of the pulse becomes less clearly preserved. As a result, subsequent layers increasingly rely on more abstract representations produced by earlier stages of the network.
Figure 6. Outputs of the four repetitions of the three-layered structure.
Furthermore, given that the inputs are grayscale spectrogram images, the additional filters introduced in the third and fourth repetitions appear to provide limited enrichment of the feature space. Their activations show a high degree of similarity, suggesting a degree of redundancy and a reduced contribution of new discriminative information, which is typically the motivation for increasing the number of filters.

3. Results

3.1. Individual Layer Performance

3.1.1. Convolutional Layer Performance

Firstly, we tested a network with only a convolutional layer apart from the basic ones. For this layer, we set two different variables: filter size and number of filters. The other parameters remained constant throughout this training session, characterised by a stride of [1, 1] and a padding that is calculated by the software so that the output has the same size as the input when the stride equals 1 [37]. The performance of the convolutional layer was evaluated considering different filter sizes (2 × 2 to 10 × 10) and numbers of filters (8, 16, 32, and 64).
The results are summarised in Figure 7 and Table 2, Table 3, Table 4 and Table 5, which report the average accuracy, precision, recall and the F1 score in 10 independent iterations.
Figure 7. Deep Neural Network: convolutional layer.
Table 2. Accuracy metrics for different filter sizes and repetitions of the convolutional layer (mean ± std).
Table 3. Precision metrics for different filter sizes and repetitions of the convolutional layer (mean ± std).
Table 4. Recall metrics for different filter sizes and repetitions of the convolutional layer (mean ± std).
Table 5. F1 score metrics for different filter sizes and repetitions of the convolutional layer (mean ± std).
As can be seen, the performance of the model exhibited a complex interaction between filter size and number of filters. In general, small filter sizes tended to underperform when the number of filters was low, whereas larger sizes did not lead to systematic improvements. Although the configuration with 64 filters of size 5 × 5 yielded the highest mean performance across all evaluated metrics, the two-way ANOVA revealed no statistically significant effect of either kernel size or number of filters, nor of their interaction. This indicates that the performance of the convolutional layer is largely robust to these hyperparameter choices within the tested range.
To formally assess these observations, a two-way ANOVA was conducted to evaluate whether different configurations of the convolutional layer—defined by the number of filters and kernel size—produced significant differences in detection accuracy. The results show that neither the number of filters (p = 0.4118) nor the kernel size (p = 0.9047) had a statistically significant effect on performance, and that the interaction between both factors was also non-significant (p = 0.9003). These findings confirm that the CNN behaves consistently across all tested configurations and suggest that performance limitations are unlikely to stem from the initial feature-extraction block, motivating further analysis of deeper architectural components.
Across all configurations, the mean accuracy was 0.685 (95% CI: 0.673–0.696), with largely overlapping confidence intervals between configurations. This consistency further supports the observed robustness of the convolutional layer to these hyperparameter choices, while also indicating that the convolutional layer alone is insufficient for robust fin whale pulse detection. Consequently, additional architectural components are required to capture more complex patterns in the data. The narrow bootstrap confidence intervals suggest that the reported averages are reliable despite the limited number of training repetitions.

3.1.2. Pooling Layer Performance

With the best configuration for the convolutional layer established, the next step was to explore the impact of adding a pooling layer to the network to increase its variability. The pooling layer test focused on determining the best filter size. In this layer, similar to the previous one, certain parameters remained fixed: a stride of [1, 1], with padding determined by the software as before [38]. The effect of the max-pooling layer on the performance of the model was evaluated using different pooling filter sizes (1 × 1 to 6 × 6). The results are presented in Figure 8 and Table 6, showing the average performance metrics (accuracy, precision, recall, and F1 score) in 10 training iterations.
Figure 8. Deep Neural Network: best convolutional layer with maxPooling.
Table 6. Performance metrics for different maxPooling filter size (mean ± std).
As illustrated in Table 6, small pooling sizes (e.g., 1 × 1) led to suboptimal results, while increasing the pool size improved performance, reaching a peak at 4 × 4.
A one-way ANOVA was conducted to evaluate whether different max-pooling configurations (from 1 × 1 to 6 × 6) produced significant changes in detection accuracy. The results revealed a statistically significant effect of pool size on model performance (p = 5.32 × 10−4), confirming that the choice of pooling size plays a critical role in preserving acoustic features in spectrograms. Excessive downsampling can remove or distort the low-frequency patterns characteristic of fin whale pulses. A Tukey HSD post-hoc analysis further showed that the 1 × 1 pooling configuration performed significantly worse than all other sizes (p < 0.05), whereas no significant differences were observed between the remaining configurations (2 × 2 to 6 × 6, p ≥ 0.95). These results support the selection of pooling sizes larger than 1 × 1, consistent with our choice of a 4 × 4 configuration.
Across all pooling configurations, the mean accuracy was 0.856 (95% CI: 0.830–0.879). The largely overlapping bootstrap confidence intervals indicate limited sensitivity to this hyperparameter, while the relatively narrow interval suggests that the reported mean performance is reliable despite the limited number of training repetitions.

3.1.3. ReLU and Batch Normalization Effects

After selecting the best configurations for both the convolutional and pooling layers, the next step was to evaluate the effect of incorporating a ReLU activation. Using a convolutional layer (5 × 5 size, 64 filters) followed by a max-pooling layer (4 × 4 size), we initially obtained an accuracy of 86.8.
As shown in Table 7, adding a ReLU activation increased accuracy by more than 10%, demonstrating the benefit of introducing non-linearities to the network.
Table 7. Comparison between all tried configurations (mean ± std).
We also examined the inclusion of a batch normalization layer to stabilise training. As reported in Table 7, adding batch normalization produced accuracy values close to 98%, similar to those obtained without it. However, no statistically meaningful improvement in mean performance was observed, suggesting that while batch normalization may affect stability or variance, it does not significantly enhance average accuracy in this configuration.
A summary of the optimised configuration can be seen in Figure 9. In the Figure, batch normalization is included, although it could be removed without significantly affecting performance.
Figure 9. Optimised CNN configuration used in the experiments.

3.2. Comparison of Blocks Repetitions

As described in Section 2.2.2, the second experiment focused on determining the best number of Convolution-ReLU-Pooling block repetitions. To evaluate this, we trained the neural network shown in Figure 2 ten times and recorded its performance.
The average accuracy of the original network on the dataset used in this study was 87.0% (Figure 8). This is slightly lower than some results obtained during the iterative process, since the inclusion of the max-pooling layer simplified the network compared to the full architecture shown in Figure 2.
As illustrated in Figure 6, the output of the layers degrades noticeably after the third block. Based on this observation, we removed the third and fourth blocks to experimentally confirm the insights suggested by the qualitative analysis of each block’s output.
Table 8 summarises these results. Eliminating the last block maintains the same accuracy while reducing variability, whereas removing the last two blocks leads to a clear drop in performance. For reference, Hough transform-based detection results are also included; as a deterministic method, it exhibits no variability, but is presented to match the format of the table.
Table 8. Comparison between original network and several ablations (mean ± std).

4. Discussion

The experiments presented in this work highlight several important aspects concerning the design and optimisation of convolutional neural networks (CNNs) for the detection of fin whale pulses in spectrogram images.
The original 26-layer architecture follows a standard convolution-ReLU-pooling design commonly used in image classification tasks and was trained using widely adopted hyperparameter values. While exhaustive hyperparameter optimisation of deep architectures was beyond the scope of this study, all configurations were trained under identical optimisation settings. Our goal was therefore not to establish a globally best-performing deep model, but to analyse how architectural depth affects performance under controlled and comparable conditions.
Unlike object recognition or complex acoustic scene analysis, fin whale pulse detection relies on the identification of well-defined low-frequency, short-duration spectro-temporal patterns with limited intra-class variability. The discriminative information is largely contained in local time-frequency structures rather than in higher-level semantic abstractions. Consequently, early convolutional layers are sufficient to capture the relevant features, and deeper layers tend to over-abstract these patterns, leading to information loss rather than improved discrimination.
The proposed CNN architecture is optimised with respect to the specific characteristics of the fin whale pulse detection task and the available dataset. While the architectural principles identified are likely applicable to similar bioacoustic classification problems, the exact configuration should not be interpreted as universally optimal.
Although this study focused on a single dataset, a specific vocalisation type, and a relatively simple CNN architecture, these constraints were intentional, allowing us to isolate and understand the contribution of individual layers under controlled conditions. This approach provides methodological insights into how different architectural components influence performance in bioacoustic detection tasks, knowledge often hidden in deeper or pre-trained models. The optimised network was validated exclusively on the Columbretes Islands dataset for fin whale 20 Hz pulses; therefore, the observed behaviour—particularly regarding pooling, convolutional filters, and activations—may vary with other datasets, recording setups, or species.
First, the results confirm that the original 26-layer deep network did not improve performance compared to simpler configurations. Analysis of intermediate layer outputs revealed that the third and fourth repetitions of the convolution-ReLU-pooling block progressively removed fine-grained details of the pulses without introducing new discriminative features. This redundancy in the deeper layers contributed to reduced performance and efficiency while adding unnecessary computational cost during training.
The ablation experiments further validated this observation: removing one or both of the last convolution-ReLU-pooling blocks did not deteriorate the results; on the contrary, it simplified the network while preserving its ability to capture relevant features. This shows that additional depth in this context does not provide meaningful improvements and may even introduce redundancy (Table 8).
Further analysis of individual layer outputs provided additional insight into this behaviour. An architecture composed of a convolutional layer with 64 filters of size 5 × 5 , followed by a 4 × 4 max-pooling layer, ReLU activation, and batch normalisation, achieved high accuracy (≈98%) with substantially lower complexity than the original design. However, the inclusion of the batch normalisation layer did not produce a statistically meaningful improvement in mean performance and slightly increased variability across repetitions. This indicates that, for this relatively shallow and well-conditioned architecture, batch normalisation is not a critical component. In general, these findings confirm that careful selection and configuration of fundamental layers is more beneficial than simply increasing network depth or adding additional operations (Table 7). The absence of statistically significant differences across kernel sizes and numbers of filters further suggests that the initial convolutional block is not a limiting factor for performance; instead, performance degradation in the original architecture arises from deeper layers rather than from suboptimal low-level feature extraction.
An additional relevant outcome is the comparison with traditional computer vision techniques. The Hough transform-based approach achieved a strong baseline accuracy (87.3%), with balanced precision and recall. The optimised CNN surpassed this performance, but the improvement was moderate. This highlights that, for specific tasks such as fin whale pulse detection, classical algorithms can remain competitive while being computationally cheaper. Deep learning offers advantages in scalability, robustness to data variability, and potential for transfer learning, but these benefits should be weighed against the added complexity (Table 8).
Given the large design space of CNN architectures, guaranteeing a globally optimal configuration is infeasible. Instead, the architectures evaluated in this study were designed through a systematic and controlled exploration of key hyperparameters, including kernel size, number of filters, pooling size, and layer composition. Statistical analyses and bootstrap confidence intervals indicate that performance is largely robust across the tested configurations. Consequently, the selected architecture should be interpreted as a stable and computationally efficient design rather than as a uniquely optimal solution. The objective of this work is therefore to assess the sensitivity of model performance to architectural choices and to identify robust design principles.
The lack of performance improvement with increased network depth may be related to the size and diversity of the available dataset. Deeper architectures typically require substantially larger training sets to avoid overfitting and to fully exploit their representational capacity. In this study, the robustness of performance across shallow configurations and the degradation observed when adding deeper layers suggest that model capacity exceeds the information content of the dataset. A systematic analysis of the relationship between dataset scale and network depth would be a valuable direction for future work, but falls beyond the scope of the present study. This observation is consistent with previous findings in bioacoustic classification, where shallow or moderately deep CNNs often outperform deeper architectures when training data are limited.
By examining the behaviour of internal layers, we show that early convolutional blocks capture the most informative acoustic features. Under the considered training regime and dataset size, deeper layers contribute minimally and may even lead to performance degradation, likely due to excessive feature abstraction rather than insufficient representational capacity.
Finally, the study emphasises the importance of layer-specific analysis for understanding network behaviour. Examining the outputs of individual layers makes it possible to identify when information is preserved, degraded, or unnecessarily abstracted. Such interpretability is crucial for environmental monitoring applications, where robustness and computational efficiency are as important as accuracy.

5. Conclusions

This study analysed and optimised a deep neural network to detect fin whale pulses in acoustic recordings. The results showed that the complexity of the original 26-layer architecture did not provide additional performance. By contrast, a simplified architecture consisting of a single convolutional block (convolution-ReLU-pooling) achieved an average accuracy of 98% (±0.01), improving performance from 87% obtained with the original network when trained with the same dataset, while simultaneously reducing variability and computational complexity.
The findings confirm that greater depth is not always beneficial; in this case, a shallow configuration was sufficient to capture the relevant spectro-temporal features. Removing redundant convolutional blocks reduced architectural complexity without degrading performance, demonstrating that excessive abstraction may be detrimental in low-variability bioacoustic detection tasks.
Comparison with a Hough transform-based method showed that classical approaches remain competitive (87% accuracy), although the optimised CNN provided higher accuracy and improved robustness across repetitions.
Based on these results, several general guidelines can be outlined: (i) shallow CNN architectures may outperform deeper designs when training data are limited; (ii) performance is often robust to moderate variations in kernel size and number of filters; (iii) increasing network depth or adding auxiliary layers does not necessarily improve accuracy; and (iv) architectural simplicity can yield competitive performance with reduced computational cost.
Finally, this study underscores the value of layer-specific analysis for improving interpretability and guiding efficient model design in ecological monitoring applications.

Author Contributions

M.R.-R. conceived the study, designed and performed all experiments, analyzed the data, and wrote the manuscript. C.R. supervised the work and reviewed and edited the manuscript.All authors have read and agreed to the published version of the manuscript.

Funding

The authors acknowledge the funding of the TRIDENT project (Grant Agreement No. 101091959) of the HE Framework Programme.

Data Availability Statement

The code used to generate the results is available as software developed by the authors (version 1.0) at the following GitHub repository: https://github.com/MRomanRuiz/finwhale-cnn-optimization (accessed on 21 January 2026). The dataset used for training and testing belongs to Parques Reunidos Valencia, Oceanogràfic, Ciudad de las Artes y las Ciencias.

Acknowledgments

The authors acknowledge the use of a dataset obtained under an agreement between the Oceanogràfic Park (Parques Reunidos, Valencia, Spain) and the UPM.

Conflicts of Interest

The authors declare that the research was conducted in the absence of commercial or financial relationships that could be construed as a potential conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ANOVAAnalysis of Variance
CIConfidence Interval
CNNConvolutional Neural Network
DNNDeep Neural Network
EAREcological Acoustic Recorder
FFTFast Fourier Transform
HSDHonestly Significant Difference
MATLABMatrix Laboratory
R-CNNRegion-based Convolutional Neural Network
ReLURectified Linear Unit

References

  1. Vargas, R.; Mosavi, A.; Ruiz, L. Deep Learning: A review. Adv. Intell. Syst. Comput. 2017, 548, 1–11. [Google Scholar]
  2. Alzubaidi, L.; Zhang, J.; Humaidi, A.J.; Al-Dujaili, A.; Duan, Y.; Al-Shamma, O.; Santamaría, J.; Fadhel, M.A.; Al-Amidie, M.; Farhan, L. Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. J. Big Data 2021, 8, 53. [Google Scholar] [CrossRef] [Scilit]
  3. Albawi, S.; Mohammed, T.A.; Al-Zawi, S. Understanding of a convolutional neural network. In Proceedings of the 2017 International Conference on Engineering and Technology, ICET 2017, Antalya, Turkey, 21–23 August 2017; pp. 1–6. [Google Scholar]
  4. Sudhakar, S. Convolution Neural Network. Towards Data Science (Medium), 10 July 2017. Available online: https://medium.com/data-science/convolution-neural-network-e9b864ac1e6c (accessed on 21 January 2022).
  5. Román, M.; Rossi, C.; Esteban, J. Fin whale pulse detection with deep neural networks. Ecol. Inform. 2023, 77, 102243. [Google Scholar] [CrossRef] [Scilit]
  6. Hsu, T.C.; Benirschke, K. Balaenoptera physalus (Fin whale). Atlas Mamm. Chromosom. 1971, 8235, 157–159. [Google Scholar] [CrossRef] [Scilit]
  7. Lammers, M.O.; Brainard, R.E.; Au, W.W.L.; Mooney, T.A.; Wong, K.B. An ecological acoustic recorder (EAR) for long-term monitoring of biological and anthropogenic sounds on coral reefs and other marine habitats. J. Acoust. Soc. Am. 2008, 123, 1720. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  8. Esteban, J.; Gozalves, P.; Tomás, J.; Sánchez, A.; Alonso, P.; Ramos, B.; Tamayo, L.; Eymar, J.; Lammers, M. Seasonal distribution of the fin whale (Balaenoptera physalus) around the Columbretes islands natural park: Mismatch beetween data collected through sightings and acoustic detections. In Proceedings of the ECS14 Conference Abstracts 28th Conference, St. Julian’s Bay, Malta, 23–25 March 2014. [Google Scholar]
  9. Esteban, J.; Sánchez, S.; Alonso, P.; Ramos-López, B.; Lammers, M. New Mediterranean fin whale sounds found. How important is it to include them when monitoring during acoustic surveys? In Proceedings of the Abstracts, 99th Annual Conference of the European Cetacean Society, St. Julian’s Bay, Malta, 23–25 March 2014. [Google Scholar]
  10. Román, M.; Rossi, C.; Esteban, J. Automated Detection of Cetaceans in Their Natural Habitats via R-CNN and Computer Vision Techniques. In Proceedings of the 7th Iberian Robotics Conference (ROBOT), Madrid, Comunidad de Madrid, Spain; IEEE: Piscataway, NJ, USA, 2024; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  11. Román-Ruiz, M.; Rossi, C. Automated detection of 20 Hz fin whale calls using computer vision techniques. Ecol. Inform. 2025, 92, 103499. [Google Scholar] [CrossRef] [Scilit]
  12. Mohammed, F.A.; Tune, K.K.; Assefa, B.G.; Jett, M.; Muhie, S. Medical Image Classifications Using Convolutional Neural Networks: A Survey of Current Methods and Statistical Modeling of the Literature. Mach. Learn. Knowl. Extr. 2024, 6, 699–735. [Google Scholar] [CrossRef] [Scilit]
  13. Kumar, R.; Kumbharkar, P.; Vanam, S.; Sharma, S. Medical images classification using deep learning: A survey. Multimed. Tools Appl. 2024, 83, 19683–19728. [Google Scholar] [CrossRef] [Scilit]
  14. Pally, R.; Samadi, S. Application of image processing and convolutional neural networks for flood image classification and semantic segmentation. Environ. Model. Softw. 2022, 148, 105285. [Google Scholar] [CrossRef] [Scilit]
  15. Marusov, A.; Grabar, V.; Maximov, Y.; Sotiriadi, N.; Bulkin, A.; Zaytsev, A. Long-term drought prediction using deep neural networks based on geospatial weather data. Environ. Model. Softw. 2024, 179, 106127. [Google Scholar] [CrossRef] [Scilit]
  16. Qin, X.; Zhu, Q.; Shen, J.; Chen, H.; Gao, X. Real-time Rainfall Estimation Using Deep Learning: Influence of Background and Rainfall Intensity. Environ. Model. Softw. 2025, 191, 106496. [Google Scholar] [CrossRef] [Scilit]
  17. Bergler, C.; Schröter, H.; Cheng, R.X.; Barth, V.; Weber, M.; Nöth, E.; Hofer, H.; Maier, A. ORCA-SPOT: An Automatic Killer Whale Sound Detection Toolkit Using Deep Learning. Sci. Rep. 2019, 9, 10997. [Google Scholar] [CrossRef] [Scilit]
  18. Schröter, H.; Nöth, E.; Maier, A.; Cheng, R.; Barth, V.; Bergler, C. Segmentation, clasification and visualization of orca calls using deep learning. In Proceedings of the ICASSP 2019—2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP); IEEE: Piscataway, NJ, USA, 2019; pp. 8231–8235. [Google Scholar]
  19. Bermant, P.C.; Bronstein, M.M.; Wood, R.J.; Gero, S.; Gruber, D.F. Deep Machine Learning Techniques for the Detection and Classification of Sperm Whale Bioacoustics. Sci. Rep. 2019, 9, 12588. [Google Scholar] [CrossRef] [Scilit]
  20. Bergler, C.; Smeele, S.Q.; Tyndel, S.A.; Barnhill, A.; Ortiz, S.T.; Kalan, A.K.; Cheng, R.X.; Brinkløv, S.; Osiecka, A.N.; Tougaard, J.; et al. ANIMAL-SPOT enables animal-independent signal detection and classification using deep learning. Sci. Rep. 2022, 12, 21966. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  21. Bergler, C.; Schmitt, M.; Maier, A.; Cheng, R.X.; Barth, V.; Nöth, E. Orca-Party: An Automatic Killer Whale Sound Type Separation Toolkit Using Deep Learning. In Proceedings of the ICASSP, IEEE International Conference on Acoustics, Speech and Signal Processing—Proceedings; IEEE: Piscataway, NJ, USA, 2022; pp. 1046–1050. [Google Scholar] [CrossRef] [Scilit]
  22. Schall, E.; Kaya, I.I.; Debusschere, E.; Devos, P.; Parcerisas, C. Deep learning in marine bioacoustics: A benchmark for baleen whale detection. Remote Sens. Ecol. Conserv. 2024, 10, 642–654. [Google Scholar] [CrossRef] [Scilit]
  23. Hamard, Q.; Pham, M.T.; Cazau, D.; Heerah, K. A deep learning model for detecting and classifying multiple marine mammal species from passive acoustic data. Ecol. Inform. 2024, 84, 102906. [Google Scholar] [CrossRef] [Scilit]
  24. Cheng, W.; Chen, H.; Jiang, J.; Li, S.; Wang, J.; Zhou, Y. Recognition and classification techniques of marine mammal calls based on LSTM and expanded causal convolution. Front. Mar. Sci. 2025, 12, 1603090. [Google Scholar] [CrossRef] [Scilit]
  25. Nappi, M.; Narducci, F.; Simone, B. Underwater Sounds Classification for Effective Smart Marine Monitoring Systems. IEEE Access 2025, 13, 111237–111248. [Google Scholar] [CrossRef] [Scilit]
  26. Jithina, T.S.; Manikandan, M.S. Marine Sound Classification Using One Dimensional CNN and Fourier Magnitude Spectrum with Optimal Activation Function and Layers. In Proceedings of the 2nd International Conference on Machine Learning and Autonomous Systems, ICMLAS 2025—Proceedings; IEEE: Piscataway, NJ, USA, 2025; pp. 779–785. [Google Scholar] [CrossRef] [Scilit]
  27. Wang, J.; Qian, P.; Chen, Y.; Zhou, S.; Li, Z.; Xiao, P. Adaptive underwater acoustic target recognition based on multi-scale residual and attention mechanism. Digit. Signal Process. 2025, 163, 105193. [Google Scholar] [CrossRef] [Scilit]
  28. Zhao, L.; Zhang, Z. A improved pooling method for convolutional neural networks. Sci. Rep. 2024, 14, 1589. [Google Scholar] [CrossRef] [Scilit]
  29. Zafar, A.; Aamir, M.; Nawi, N.M.; Arshad, A.; Riaz, S.; Alruban, A.; Dutta, A.K.; Almotairi, S. A Comparison of Pooling Methods for Convolutional Neural Networks. Appl. Sci. 2022, 12, 8643. [Google Scholar] [CrossRef] [Scilit]
  30. Gürkahraman, K.; Karakis, R. Optimization of Mixed Pooling Using Genetic Algorithm for Convolutional Neural Networks. In Proceedings of the 2024 32nd Signal Processing and Communications Applications Conference (SIU); IEEE: Piscataway, NJ, USA, 2024; pp. 1–4. [Google Scholar]
  31. Maitra, S.; Ojha, R.K.; Ghosh, K. Impact of Convolutional Neural Network Input Parameters on Classification Performance. In Proceedings of the 2018 4th International Conference for Convergence in Technology (I2CT); IEEE: Piscataway, NJ, USA, 2018; pp. 1–5. [Google Scholar] [CrossRef] [Scilit]
  32. Purwono; Ma’arif, A.; Rahmaniar, W.; Fathurrahman, H.I.K.; Frisky, A.Z.K.; Haq, Q.M.U. Understanding of Convolutional Neural Network (CNN): A Review. Int. J. Robot. Control Syst. 2022, 2, 739–748. [Google Scholar] [CrossRef] [Scilit]
  33. Indolia, S.; Goswami, A.K.; Mishra, S.P.; Asopa, P. Conceptual Understanding of Convolutional Neural Network—A Deep Learning Approach. Procedia Comput. Sci. 2018, 132, 679–688. [Google Scholar] [CrossRef] [Scilit]
  34. Taye, M.M. Theoretical Understanding of Convolutional Neural Network: Concepts, Architectures, Applications, Future Directions. Computation 2023, 11, 52. [Google Scholar] [CrossRef] [Scilit]
  35. Ioffe, S.; Szegedy, C. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015; JMLR: Cambridge, MA, USA, 2015; Volume 1, pp. 448–456. [Google Scholar]
  36. MathWorks. Compute Deep Learning Network Layer Activations—MATLAB Activations. 2024. Available online: https://www.mathworks.com/help/deeplearning/ref/seriesnetwork.activations.html (accessed on 21 January 2026).
  37. MathWorks. 2-D Convolutional Layer—MATLAB convolution2dLayer. 2025. Available online: https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.convolution2dlayer.html (accessed on 21 January 2026).
  38. MathWorks. Max Pooling Layer—MATLAB maxPooling2dLayer. 2025. Available online: https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.maxpooling2dlayer.html (accessed on 21 January 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.