APEX: Audio Prototype EXplanations for Classification Tasks

Piotr Kawa, Kornel Howil, Piotr Borycki, Miłosz Adamczyk, Przemysław Spurek, Piotr SygaarXiv 2026

TL;DR

APEX (Audio Prototype EXplanations) is a novel post-hoc interpretability framework that provides clear, example-based explanations for pre-trained audio classifiers. By inserting a clever, invertible disentanglement module, APEX extracts meaningful acoustic prototypes across four distinct dimensions (time, frequency, square, and hybrid) while strictly preserving the original model's accuracy.

What Problem Does This Paper Address?

Explainable AI (XAI) has made massive strides in computer vision, but the audio domain has largely been left playing catch-up. Currently, researchers typically apply vision-based attribution methods (like Grad-CAM or LIME) directly to audio spectrograms.

However, this treats audio as a static image, completely ignoring a fundamental truth: spectrogram axes are asymmetric. The horizontal axis encodes time (how sound evolves), while the vertical axis encodes frequency (pitch and timbre). Treating them as equivalent spatial coordinates leads to blurry, unconstrained, and semantically confusing explanations.

On the flip side, inherently interpretable audio models (ante-hoc methods) do exist, but they require training specialized architectures from scratch. This forces practitioners to choose between a high-performing "black-box" model and a weaker, but interpretable, custom model. APEX solves this dilemma by providing post-hoc, prototype-based explanations for arbitrary, pre-trained audio classifiers without changing their outputs.

Methods

The core innovation of APEX is its Disentanglement Module, which is inserted between a pre-trained model's convolutional backbone and its pooling layer.

Overview of the APEX architecture and the effect of purity optimization on the latent space.

1. Guaranteeing Output Invariance

Standard latent spaces are highly entangled—multiple acoustic concepts are mashed together across the same channels. APEX applies a learnable, invertible linear transformation $U$ (parameterized as a matrix exponential $U = \exp(A)$) to reorganize this space. To ensure the model's final predictions remain completely unchanged, APEX applies the inverse transformation $U^{-1}$ to the classification head. This mathematical trick guarantees absolute output invariance.

2. Scheme-Dependent Purity Optimization

APEX trains this transformation matrix $U$ to maximize a "purity score," forcing individual channels to focus exclusively on a single acoustic concept. Because audio features vary wildly, APEX introduces four distinct prototype extraction schemes:

  • Square-based: Isolates localized activation peaks to capture transient events (e.g., a bird's chirp or a click).
  • Time-based: Averages out frequency to identify when a temporal or rhythmic pattern occurs, regardless of pitch.
  • Frequency-based: Averages out time to isolate stable spectral bands, capturing constant hums or instrumental timbre.
  • Time-Frequency-based: A hybrid approach that balances both "when" and "what" for complex acoustic events.

Finally, APEX builds a global prototype bank by scanning the training data to find the samples that most strongly activate each disentangled channel.

Datasets

The authors evaluated APEX across two distinct audio classification tasks:

  1. WaveFake: An audio deepfake detection benchmark. The authors focused on the LJSpeech subset (13,100 real utterances) and fake counterparts generated by seven different vocoders (e.g., HiFi-GAN, WaveGlow, MelGAN).
  2. BirdSet: A large-scale bioacoustic dataset for multi-label bird sound classification. They trained on the XCL subset and evaluated performance across multiple geographical test sets (including SNE).

Key Insights and Ideas

  • Acoustic Priors Matter: Reorganizing a model's latent space using structured, audio-specific priors yields far better explanations than treating spectrograms like images.
  • Interpretability is Free (Mathematically): You do not need to sacrifice accuracy for interpretability. The matrix exponential parameterization ensures that the disentanglement process is a zero-sum game for model logits—the accuracy remains identical before and after APEX optimization.
  • From Noise to Meaning: Prior to optimization, extracted prototypes look like random noise. Optimizing for channel purity forces the network to align its internal representations with human-interpretable acoustic concepts.
Explanations for a Golden-crowned Kinglet before and after APEX optimization, showing how prototypes transition from random noise to semantically meaningful features.

Key Results

Quantitative Evaluation

  • Perfect Fidelity: APEX perfectly matched the baseline ConvNeXt-Base model's performance across all datasets (e.g., an identical average Equal Error Rate of 1.8% on WaveFake). Meanwhile, the ante-hoc baseline, AudioProtoPNet, suffered from noticeable performance trade-offs.
  • Ablation via Masking: To prove APEX highlights truly essential features, the authors masked the regions identified by the framework. On the BirdSet SNE dataset, masking the APEX Time-Frequency regions caused the class-mean average precision (cmAP) to plummet from 0.32 to 0.17, whereas random masking only dropped it to 0.27. This confirms APEX accurately localizes the features driving the model's decisions.

Qualitative Evaluation

Compared to standard vision-based attribution methods, APEX provides significantly cleaner boundaries. While Grad-CAM produces diffuse, unconstrained heatmaps and LIME yields fragmented regions, APEX cleanly bounds the relevant acoustic events.

Qualitative comparison of APEX against Grad-CAM and LIME, demonstrating APEX's highly localized and clear time-frequency explanations.

Limitations and Future Work

While powerful, APEX currently has a structural limitation: it is only applicable to architectures whose classification head consists of a pooling layer directly above the backbone, followed by a single-layer classifier operating on spectrogram inputs.

For future work, the authors plan to extend APEX to self-supervised foundation models (like Wav2Vec2.0 and HuBERT) that utilize contextualized waveform embeddings and exhibit hierarchical, layer-dependent latent structures. They also aim to adapt the framework to transformer encoders and test its robustness under common audio transformations like pitch shifting and time stretching.

Summary updated

BibTeX
@misc{kawa2026apex,
  author = {Piotr Kawa and Kornel Howil and Piotr Borycki and Miłosz Adamczyk and Przemysław Spurek and Piotr Syga},
  title = {{APEX: Audio Prototype EXplanations for Classification Tasks}},
  year = {2026},
  eprint = {2605.10153},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.10153},
}
Figure