The computation of generalized embeddings for underwater acoustic target recognition using contrastive learning

Hilde I. Hummel, Arwin Gansekoele, Sandjai Bhulai, Rob van der Mei

Abstract

Monitoring underwater acoustic environments is critical for marine biology and maritime security, yet the field faces a significant "label bottleneck." High-quality, expert-labeled underwater audio is scarce, while raw, unlabeled data is abundant. This paper presents an unsupervised contrastive learning framework designed to generate generalized audio embeddings from massive unlabeled datasets. By utilizing a Conformer-based architecture and the VICReg (Variance-Invariance-Covariance Regularization) loss function, the proposed method learns robust features that outperform traditional supervised models in cross-dataset generalization and label-scarce scenarios. Our results demonstrate that unsupervised pre-training on 30GB of raw hydrophone data provides a superior foundation for Underwater Acoustic Target Recognition (UATR) tasks.

Introduction

The underwater acoustic environment is a complex, chaotic symphony of low-frequency ship noise, biological vocalizations, and environmental sounds. Parsing this data is vital for mapping noise pollution and protecting marine life. However, the current state-of-the-art in Underwater Acoustic Target Recognition (UATR) relies heavily on supervised learning, which requires thousands of hours of precisely tagged audio—a resource that is both expensive and rare.

Furthermore, supervised models often suffer from poor generalization. A model trained on ship recordings from one geographic region frequently fails when deployed in another due to differences in hydrophone depth, water temperature, and local acoustic conditions. To address these challenges, we propose a shift toward unsupervised contrastive learning, leveraging the vast amounts of unlabeled data recorded by permanent hydrophone installations to create a "foundation" model for underwater sound.

Methodology

Contrastive Learning Framework

The core of our approach is a pipeline based on Contrastive Learning (CL). The objective is to teach the model to map different "views" of the same acoustic signal to similar points in a mathematical embedding space, while ensuring that unrelated sounds are distinct.

Model Architecture

We utilize a Conformer-based encoder. Unlike standard Convolutional Neural Networks (CNNs), the Conformer integrates self-attention mechanisms to capture both local and global temporal patterns in the audio signal. This architecture is particularly suited for audio, where long-range dependencies are crucial for identifying specific vessel types or marine mammal calls.

To stabilize training at scale, we employed the LARS (Layerwise Adaptive Rate Scaling) optimizer, allowing for a massive batch size of 2,048. This ensures that the model encounters a diverse range of acoustic samples in every training step.

VICReg Loss Function

We implemented VICReg (Variance-Invariance-Covariance Regularization) as our loss function. Unlike earlier contrastive methods such as SimCLR, VICReg does not require explicit "negative samples." This is a significant advantage when dealing with continuous, unlabeled underwater streams where defining what constitutes a "different" sound can be ambiguous. The covariance component of VICReg is especially critical for audio spectrograms, which often lack the high contrast found in natural images, preventing the model from falling into "informational collapse."

Data Augmentation and Mixup

To generate the necessary "views" for contrastive learning, we applied several transformations:

  1. Gaussian Noise: To simulate varying environmental conditions.
  2. Low-pass Filtering: To focus the model on frequency bands most relevant to mechanical ship noise.
  3. Novel Mixup Strategy: We combined a low-pass filtered version of one signal with a high-pass filtered version of a different signal from a nearby time window, forcing the model to extract more nuanced features.

Experimental Setup

Datasets

  • Unlabeled Training Data: 30GB of raw audio from a single hydrophone in the Ocean Network Canada (ONC) dataset, located near Vancouver.
  • Labeled Evaluation Data:
    • Deepship: 47 hours of ship recordings across four classes.
  • ShipsEar: A dataset from a different geographic region containing five ship classes.
  • The Best of Watkin’s: A dataset of 45 different marine mammal vocalization classes.

Results and Discussion

Superior Generalization

The most significant finding of this research is that the unsupervised model generalized better than its supervised counterparts. When tested on the ShipsEar dataset, the unsupervised Conformer achieved an accuracy of 57.42%, compared to only 48.47% for the supervised Conformer. This suggests that supervised models often overfit to the specific acoustic quirks of their training data, whereas unsupervised contrastive learning captures the fundamental underlying structure of underwater sound.

Efficiency in Label-Scarce Scenarios

The unsupervised framework proved highly robust when labeled data was limited. When the available labeled training data was reduced to just 25%, the unsupervised method maintained significantly higher accuracy than supervised baselines. This demonstrates that pre-training on unlabeled data provides a much more efficient starting point for downstream tasks where expert labels are hard to come by.

Real-Time Deployment

Despite the complexity of the Conformer architecture (over 100 million parameters), the model achieved an inference time of 5.268 ms per 2-second sample. This performance confirms that the model is suitable for real-time deployment on edge devices, such as autonomous underwater vehicles (AUVs) or remote monitoring stations.

Conclusion and Future Work

This study demonstrates that unsupervised contrastive learning can effectively bypass the label bottleneck in underwater acoustics. By learning generalized embeddings from raw data, we can create models that are more robust, more efficient, and better suited for global ocean monitoring.

Future research will focus on moving beyond AIS (Automatic Identification System) categories, which often group ships by purpose rather than acoustic signature. We aim to develop new classification categories based on actual engine types and propeller characteristics. Additionally, we plan to expand our training set to include a more diverse array of global hydrophones to move toward a truly universal foundation model for underwater audio.

Summary updated

Abstract

The increasing level of sound pollution in marine environments poses an increased threat to ocean health, making it crucial to monitor underwater noise. By monitoring this noise, the sources responsible for this pollution can be mapped. Monitoring is performed by passively listening to these sounds. This generates a large amount of data records, capturing a mix of sound sources such as ship activities and marine mammal vocalizations. Although machine learning offers a promising solution for automatic sound classification, current state-of-the-art methods implement supervised learning. This requires a large amount of high-quality labeled data that is not publicly available. In contrast, a massive amount of lower-quality unlabeled data is publicly available, offering the opportunity to explore unsupervised learning techniques. This research explores this possibility by implementing an unsupervised Contrastive Learning approach. Here, a Conformer-based encoder is optimized by the so-called Variance-Invariance-Covariance Regularization loss function on these lower-quality unlabeled data and the translation to the labeled data is made. Through classification tasks involving recognizing ship types and marine mammal vocalizations, our method demonstrates the ability to produce robust and generalized embeddings. This shows the potential of unsupervised methods for various automatic underwater acoustic analysis tasks. • An application of unsupervised contrastive learning (CL) on unlabeled underwater acoustic dataset for Underwater Acoustic Target Recognition. It demonstrates a novel implementation on abundantly available unlabeled data collected from a single hydrophone for the first time. • This novel framework effectively translates unstructured acoustic data into generalized embeddings which can be used for various downstream classification tasks. • The proposed unsupervised CL framework produces robust and generalized embeddings. This creates the potential for this framework to translate to other underwater acoustic analysis tasks, such as climate change monitoring and nuclear bomb test detection.
BibTeX
@inproceedings{hummel2025computation,
  author = {Hilde I. Hummel and Arwin Gansekoele and Sandjai Bhulai and Rob van der Mei},
  title = {{The computation of generalized embeddings for underwater acoustic target recognition using contrastive learning}},
  booktitle = {Applied Acoustics},
  year = {2025},
  doi = {10.1016/j.apacoust.2025.111103},
}
Figure