Acoustic Identification of Individual Animals with Hierarchical Contrastive Learning

Inês Nolasco, Ilyass Moummad, Dan Stowell, Emmanouil Benetos

Bioacoustics has come a long way in identifying what species is calling, but identifying who is calling is a much steeper challenge. In a new paper titled "Acoustic identification of individual animals with hierarchical contrastive learning," researchers from Queen Mary University of London and partner institutions propose a way to make individual identification more robust by teaching AI to respect the "family tree" of animal sounds.

TL;DR

The authors apply hierarchical contrastive learning to the task of identifying individual animals (AIID) across multiple species. By forcing the model to learn embeddings that respect biological taxonomy (Taxon → Species → Individual), they significantly improve identification accuracy and the model's ability to recognize "unseen" individuals in open-set scenarios.

What Problem Does This Paper Address?

Acoustic Identification of Individual Animals (AIID) is the "fingerprinting" of the natural world. While species classification is common, AIID is harder because the differences between two birds of the same species are much subtler than the differences between a bird and a wolf.

Most current AIID systems suffer from two main flaws:

  1. The "Flat" Label Problem: They treat every individual as an independent category, ignoring the fact that individuals of the same species share vocal traits.
  2. The "Closed-Set" Limitation: They are usually trained on a fixed group of individuals. In the wild, new individuals constantly enter the scene. Standard models struggle to represent these "novel" voices effectively.

The authors argue that by leveraging the hierarchical structure of animal taxonomy, we can guide a model to learn more meaningful features that generalize better to new individuals.

Methods

The core innovation is the use of Hierarchical Multi-label Contrastive Learning.

The Architecture

The researchers used a "frozen" OpenL3 model (a powerful pre-trained audio feature extractor) as a backbone. They then added a shared Multi-Layer Perceptron (MLP) to adapt these features specifically for bioacoustics. Finally, they used multiple "projectors" to calculate losses at three levels: Taxon (Bird vs. Mammal), Species, and Individual ID.

The Loss Functions

Instead of standard cross-entropy, they used contrastive losses:

  • SupCon (Supervised Contrastive): Pulls examples of the same class together in the embedding space and pushes different classes apart.
  • HiMulCon: A hierarchical version that applies this logic at every level of the taxonomy simultaneously.
  • HiMulConE: An "enforced" version that ensures the loss at a deeper level (like Individual) doesn't drop below the loss of a higher level (like Species), maintaining the integrity of the hierarchy.

Datasets

The study utilized a diverse dataset of 14,295 recordings covering seven species across two taxa:

  • Birds: Chiffchaffs, Tree pipits, Little Owls, and Eurasia eagle owls.
  • Mammals: Spotted hyenas, Rock hyraxes, and Grey wolves.

The data was split to include a "test set" of known individuals and an "unseen ID set" containing 21 novel individuals (3 per species) to test open-set performance.

Key Insights and Ideas

  • Taxonomy as a Structural Prior: The biological relationship between animals isn't just a label; it's a roadmap for the embedding space. By teaching the model that "Individual A" is a subset of "Species X," the model learns to cluster sounds more logically.
  • Eliminating Hierarchical Inconsistency: In standard models, a system might predict an individual ID that doesn't actually belong to the predicted species. The hierarchical loss functions used here resulted in zero such errors, meaning the model's internal logic remained consistent.
  • Better "One-Shot" Learning: The most striking insight is that learning a hierarchy makes the model better at identifying individuals it has never seen before. Because the model understands where a species "lives" in the embedding space, it can better categorize a new individual of that species based on just a single example.

Key Results

The hierarchical approach outperformed the non-hierarchical baseline across the board:

  • Individual Identification (Known IDs): The hierarchical model (HC) achieved a balanced accuracy of 73.2%, compared to 61.0% for the standard non-hierarchical baseline (SC).
  • Open-Set (Unseen IDs): When tasked with "one-shot" classification (identifying a new individual from a single reference call), the hierarchical model (HCλ) reached 15.3% accuracy. While this sounds low, it is a massive improvement over the baseline's 6.0%.
  • Species/Taxon Accuracy: Even at the highest levels, the hierarchical models were superior, often hitting 100% accuracy for species classification in several bird and mammal categories.

Limitations and Future Work

  • Frozen Backbones: The authors used a frozen OpenL3 model. They suggest that "unfreezing" the model and performing end-to-end feature adaptation could further boost performance.
  • The One-Shot Gap: While 15% is a significant step up from 6%, it highlights how difficult open-set individual identification remains. Future work will likely focus on better "few-shot" adaptation techniques.
  • Scaling Up: This study looked at seven species. Real-world ecosystems contain hundreds. Testing how this hierarchical approach scales to massive, high-diversity datasets is the next logical step.

Summary updated

Abstract

Acoustic identification of individual animals (AIID) is closely related to audio-based species classification but requires a finer level of detail to distinguish between individual animals within the same species. In this work, we frame AIID as a hierarchical multi-label classification task and propose the use of hierarchy-aware loss functions to learn robust representations of individual identities that maintain the hierarchical relationships among species and taxa. Our results demonstrate that hierarchical embeddings enhance identification accuracy at both individual and higher taxonomic levels, effectively preserving the hierarchical structure in the learned representations. By comparing our approach with non-hierarchical models, we highlight the advantage of enforcing this structure in the embedding space. Additionally, we extend the evaluation to the classification of novel individual classes, demonstrating the potential of our method in open-set classification scenarios.
BibTeX
@inproceedings{nolasco2025acoustic,
  author = {Inês Nolasco and Ilyass Moummad and Dan Stowell and Emmanouil Benetos},
  title = {{Acoustic Identification of Individual Animals with Hierarchical Contrastive Learning}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=2LNakXRKxm},
}

Loading related content...

Figure