Papers
Topics
Authors
Recent
Search
2000 character limit reached

AudioProtoPNet: Prototype-Based Audio Models

Updated 6 July 2026
  • AudioProtoPNet are prototype-based audio models that use learned representations to mediate classification through explicit, audible comparisons.
  • They operate in both spectrogram and embedding domains, applying reconstruction error and cosine similarity to facilitate interpretable, case-based reasoning.
  • The models integrate adversarial training and robust optimization to maintain reliability and clear evidence paths under distribution shifts.

AudioProtoPNet denotes a line of prototype-based audio models in which prediction is mediated by explicit comparisons to learned prototypes rather than by an opaque terminal classifier. In the original formulation, AudioProtoPNet is an audio identification model based on learnable spectral prototypes and prototype-specific transformation networks that reconstruct a log-Mel spectrogram and classify by minimum reconstruction error (Loiseau et al., 2022). Later work reused the name for an adaptation of ProtoPNet to multi-label bird sound classification, combining a ConvNeXt backbone with a prototype learning classifier trained on spectrogram embeddings and yielding prototype-based explanations at inference time (Heinrich et al., 2024). A subsequent study examined the same bird-sound formulation under adversarial training and out-of-distribution evaluation (Heinrich et al., 18 Jul 2025). Related work on controllable music recommendation employs an audio prototypical network over audio embeddings, but this system is presented as APRON rather than AudioProtoPNet (Öncel et al., 31 Jul 2025).

1. Conceptual scope and defining characteristics

The unifying idea across AudioProtoPNet variants is that a model decision should be expressible as a relation between an input audio representation and a finite set of learned prototypes. This makes the model intrinsically interpretable in the sense that the prototypes are part of the forward computation rather than an auxiliary explanation layer. In the 2022 formulation, the prototypes are themselves spectrogram templates and can be inverted to audio and “played” (Loiseau et al., 2022). In the bird-sound formulations, the prototypes live in embedding space and correspond to representative spectro-temporal patches from the training set, supporting “this looks like that” explanations (Heinrich et al., 2024).

A common misconception is that AudioProtoPNet refers to a single fixed architecture. The literature instead uses the name for at least two distinct instantiations. One operates directly in the spectrogram domain with prototype-specific transformation networks and a reconstruction-based distance (Loiseau et al., 2022). Another adapts ProtoPNet to bird sound classification with a ConvNeXt backbone and prototype matching in latent space (Heinrich et al., 2024, Heinrich et al., 18 Jul 2025). The shared commitment is not a particular metric or backbone, but prototype-mediated inference and case-based reasoning.

Another common misconception is that interpretability is purely post-hoc. In all of these formulations, the prototypes directly determine the output: either the input is assigned to the prototype with minimum reconstruction error, or class scores are aggregated from prototype activations. The explanation is therefore structurally coupled to the prediction rather than retrofitted afterward.

2. Original spectrogram-domain formulation

In "A Model You Can Hear: Audio Identification with Playable Prototypes" (Loiseau et al., 2022), the input is a log-Mel spectrogram

xRF×T,x \in \mathbb{R}^{F \times T},

and the model learns KK spectral prototypes

pkRF×T.p_k \in \mathbb{R}^{F \times T}.

In practice each pkp_k is implemented as a learned parameter of dimension F×1F \times 1, broadcast to all TT frames. For each prototype kk, a small U-Net style network Tk(;θk)T_k(\cdot;\theta_k) predicts four per-time-step transformation parameter sets: gain Gk(x)RTG_k(x)\in\mathbb{R}^T, pitch-shift Sk(x)RTS_k(x)\in\mathbb{R}^T, low-frequency filter KK0, and high-frequency filter KK1 (Loiseau et al., 2022).

These transformations are applied in sequence to reconstruct the input from the prototype. The full reconstruction for prototype KK2 is

KK3

with the elementary spectral transforms defined as gain, pitch-shift, low-frequency filter, and high-frequency filter operations in the spectrogram domain. The reconstruction error is the average frame-wise KK4 distance: KK5

Classification can then proceed either by minimum reconstruction error,

KK6

or by a softmax over negative reconstruction errors,

KK7

with inverse-temperature KK8. The model supports both unsupervised clustering and supervised classification. The unsupervised objective is

KK9

and the supervised objective combines correct-prototype reconstruction loss with a cross-entropy term on the softmax of negative reconstruction errors: pkRF×T.p_k \in \mathbb{R}^{F \times T}.0 with pkRF×T.p_k \in \mathbb{R}^{F \times T}.1, learned pkRF×T.p_k \in \mathbb{R}^{F \times T}.2, and no additional triplet or contrastive terms.

The decisive architectural feature is that each prototype is itself a log-Mel spectrogram. Because it can be inverted to audio, the model’s internal reference points are not merely vectors in latent space but audible exemplars. This grounds the term “playable prototypes” in a literal sense.

3. ProtoPNet-style bird sound classification variants

The 2024 bird-sound adaptation, "AudioProtoPNet: An interpretable deep learning model for bird sound classification" (Heinrich et al., 2024), places the prototype mechanism on top of a ConvNeXt embedding network. The model is structured as

pkRF×T.p_k \in \mathbb{R}^{F \times T}.3

where pkRF×T.p_k \in \mathbb{R}^{F \times T}.4 maps an input spectrogram pkRF×T.p_k \in \mathbb{R}^{F \times T}.5 to an embedding tensor pkRF×T.p_k \in \mathbb{R}^{F \times T}.6, pkRF×T.p_k \in \mathbb{R}^{F \times T}.7 is a prototype-matching layer with pkRF×T.p_k \in \mathbb{R}^{F \times T}.8 learned prototypes, and pkRF×T.p_k \in \mathbb{R}^{F \times T}.9 is a final fully-connected classification layer. Each prototype pkp_k0 is associated with class pkp_k1, and in practice pkp_k2, so each prototype is a pkp_k3-dimensional vector.

Similarity is computed by cosine matching between pkp_k4-normalized embedding patches and pkp_k5-normalized prototypes: pkp_k6 The final layer uses a fixed weight matrix so that each prototype votes only for its own class: pkp_k7 Training uses a weighted sum of asymmetric classification loss, prototype clustering loss, prototype separation loss, and an orthogonality loss: pkp_k8 The training schedule is two-phase: first the ConvNeXt backbone is frozen and only the prototypes are trained; then the backbone and prototypes are jointly fine-tuned.

The 2025 robustness study adopts a related AudioProtoPNet for bird-sound recognition with a ConvNeXt-B backbone pre-trained on ImageNet and fine-tuned on spectrogram inputs (Heinrich et al., 18 Jul 2025). Here the embedding extractor outputs

pkp_k9

with F×1F \times 10, F×1F \times 11, and F×1F \times 12. The prototype layer contains F×1F \times 13 learnable prototype vectors F×1F \times 14, with F×1F \times 15 prototypes per class. Distances are computed patchwise,

F×1F \times 16

and converted into similarity activations by negative patch-max-pool,

F×1F \times 17

A fully-connected matrix F×1F \times 18 then maps prototype activations to logits,

F×1F \times 19

The coexistence of cosine-similarity and squared-distance instantiations should not be read as a contradiction. It indicates that the AudioProtoPNet label spans multiple prototype-based realizations of inherently interpretable audio classification, unified by prototype matching, class-linked activations, and inspectable evidence paths.

4. Training objectives and optimization regimes

The optimization strategy depends on the variant. In the original spectrogram-domain model, learning is reconstruction-centric. Unsupervised learning minimizes the best achievable reconstruction across prototypes, which is formally analogous to a k-means style objective in the spectrogram domain. Supervised learning augments that reconstruction term with cross-entropy on the softmax of negative reconstruction errors, while still keeping the reconstruction pathway central to classification (Loiseau et al., 2022).

In the 2024 bird-sound model, the objective is explicitly multi-label and prototype-structuring. The asymmetric loss handles label imbalance, the clustering loss encourages at least one active prototype for a positive class, the separation loss pushes embeddings away from prototypes of negative classes, and the orthogonality loss decorrelates prototypes within each class (Heinrich et al., 2024). This means that prototype learning is not merely a representational convenience; it is directly regularized to produce distinct, class-informative evidence.

In the 2025 robustness study, ordinary training minimizes a composite loss comprising asymmetric multi-label classification loss TT0, prototype projection losses TT1, and weight decay regularization: TT2 with TT3 and TT4 (Heinrich et al., 18 Jul 2025). Training alternates between a prototype projection step, which re-assigns each prototype to its closest latent patch of its class in the current mini-batch, and a joint fine-tuning step that backpropagates the full loss with respect to TT5, TT6, TT7, and TT8.

That same study further extends TRADES–AWP to AudioProtoPNet through two adversarial training procedures. Output-space adversarial training (AT-O) uses FGSM on the classification loss to generate TT9, whereas embedding-space adversarial training (AT-E) uses FGSM on average spatial cosine distance in the embedding extractor to generate kk0. The reported hyperparameters are kk1, kk2, AWP budget kk3, and warm-up of 8 epochs (Heinrich et al., 18 Jul 2025). This is important because it shows that prototype-based interpretability and adversarial training are not treated as mutually exclusive design goals.

5. Interpretability and explanation semantics

Interpretability in AudioProtoPNet is implemented through prototypes as explicit evidence carriers. In the original model, each kk4 is a log-Mel spectrogram that can be inverted to audio, and the explanation for a decision reduces to which prototype best reconstructs the input and which learned gain, pitch, and spectral-envelope transformations were required (Loiseau et al., 2022). The model therefore exposes both a reference exemplar and a deformation pathway.

In the bird-sound formulations, prototypes correspond to representative spectro-temporal patches from the training data rather than directly playable spectrogram templates. For the 2024 model, one can identify the prototypes with highest activation for a predicted class, visualize the training spectrogram patch onto which each prototype was projected, and overlay an up-sampled activation map on the test spectrogram to show which time-frequency region triggered the match (Heinrich et al., 2024). This yields a case-based rationale of the form “this time-frequency patch looks like that prototype.”

The 2025 study makes the explanation structure explicit by distinguishing local and global explanations. Local explanations are of the form “This 5s spectrogram patch activates prototype kk5,” whereas global explanations are given by the linear weights kk6, which indicate how much each prototype votes for class kk7 (Heinrich et al., 18 Jul 2025). Because each prototype is anchored to an actual training spectrogram patch, the explanation remains human-readable at the level of training exemplars.

A further misconception is that prototype models are automatically stable under perturbation. The robustness study specifically evaluates prototype stability under targeted embedding-space attacks and finds that stability depends strongly on training regime (Heinrich et al., 18 Jul 2025). This indicates that interpretability in the prototype sense does not, by itself, guarantee robustness; it must be supported by the optimization procedure.

The original AudioProtoPNet was evaluated on SOL, with 33 instruments and 24 450 single-note spectrograms, and on LibriSpeech, with 128 speakers (Loiseau et al., 2022). In unsupervised clustering, AudioProtoPNet achieved OA kk8 and AA kk9 on SOL, and OA Tk(;θk)T_k(\cdot;\theta_k)0 and AA Tk(;θk)T_k(\cdot;\theta_k)1 on LibriSpeech. In supervised classification, the reported results were OA Tk(;θk)T_k(\cdot;\theta_k)2 and AA Tk(;θk)T_k(\cdot;\theta_k)3 on SOL, and OA Tk(;θk)T_k(\cdot;\theta_k)4 and AA Tk(;θk)T_k(\cdot;\theta_k)5 on LibriSpeech, exceeding both direct CNN classification and APNet in those experiments.

In bird sound classification, the 2024 AudioProtoPNet was trained on the BirdSet training dataset, described as consisting of 9,734 bird species and over 6,800 hours of recordings, and evaluated on the seven test datasets of BirdSet, covering different geographical regions (Heinrich et al., 2024). It outperformed Perch, achieving an average AUROC of 0.90 and a cmAP of 0.42, with relative improvements of 7.1% and 16.7%, respectively. These figures situate prototype-based interpretability within a high-capacity, large-scale multi-label setting rather than a narrowly constrained benchmark.

The 2025 robustness study reports clean-data cmAP on one validation plus seven OOD soundscape datasets (Heinrich et al., 18 Jul 2025). For AudioProtoPNet, ordinary training (OT) yielded 0.49 on POW and 0.38 mean over 7 test sets; AT-E yielded 0.57 Tk(;θk)T_k(\cdot;\theta_k)6 and 0.41 Tk(;θk)T_k(\cdot;\theta_k)7; and AT-O yielded 0.59 Tk(;θk)T_k(\cdot;\theta_k)8 and 0.42 Tk(;θk)T_k(\cdot;\theta_k)9. Against embedding-space PGD at Gk(x)RTG_k(x)\in\mathbb{R}^T0, the reported PRS values were approximately 0.00 for OT, 0.01 for AT-E, and 0.35 for AT-O. Against output-space PGD at Gk(x)RTG_k(x)\in\mathbb{R}^T1, the corresponding PRS values were approximately 0.03, 0.09, and 0.15. Under targeted attacks that align Gk(x)RTG_k(x)\in\mathbb{R}^T2 with a random target prototype, TARS at Gk(x)RTG_k(x)\in\mathbb{R}^T3 was 0.27 for OT, 0.37 for AT-E, and 0.65 for AT-O. This indicates that adversarial training, particularly output-space adversarial training, can simultaneously improve clean-data generalization under distribution shift and stabilize prototype-based explanations.

A neighboring but distinct development is APRON, the "Audio Prototypical Network For Controllable Music Recommendation" (Öncel et al., 31 Jul 2025). APRON relies on MERT-v1-330M as a fixed front-end, uses 1024-dimensional audio embeddings, selects Gk(x)RTG_k(x)\in\mathbb{R}^T4 common song-level Last.fm tags as prototypes, and constructs a scrutable user profile

Gk(x)RTG_k(x)\in\mathbb{R}^T5

It is trained with recommendation, controllability, and prototype-separability losses, and supports direct editing of prototype weights to steer recommendations. On the Million Song Dataset, APRON with Gk(x)RTG_k(x)\in\mathbb{R}^T6 heads achieved Recall@20 Gk(x)RTG_k(x)\in\mathbb{R}^T7, Recall@50 Gk(x)RTG_k(x)\in\mathbb{R}^T8, NDCG@100 Gk(x)RTG_k(x)\in\mathbb{R}^T9, and average Sk(x)RTS_k(x)\in\mathbb{R}^T0 for controllability. Its stated limitations are that it requires access to all audio, relies on the quality and coverage of the chosen tags, has no user study yet, and uses a fixed set of 80 prototypes. This suggests that prototype-based audio modeling has broadened from interpretable classification toward controllable user-facing systems, while retaining the central idea that semantically inspectable prototypes should mediate prediction.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to AudioProtoPNet.