Skip to main content
QUICK REVIEW

[Paper Review] Fast Threshold Optimization For Multi-Label Audio Tagging Using Surrogate Gradient Learning

Thomas Pellegrini, Timothée Masquelier|arXiv (Cornell University)|Mar 1, 2021
Music and Audio ProcessingComputer Science11 references1 citations
TL;DR

This paper proposes SGL-Thresh, a fast and scalable method for optimizing decision thresholds in multi-label audio tagging using surrogate gradient learning to maximize F1 score. By approximating non-differentiable thresholding via sigmoid gradients, it outperforms baseline methods, achieving 54.9% micro-F1 on AudioSet eval compared to 50.7% with default thresholds.

ABSTRACT

Multi-label audio tagging consists of assigning sets of tags to audio recordings. At inference time, thresholds are applied on the confidence scores outputted by a probabilistic classifier, in order to decide which classes are detected active. In this work, we consider having at disposal a trained classifier and we seek to automatically optimize the decision thresholds according to a performance metric of interest, in our case F-measure (micro-F1). We propose a new method, called SGL-Thresh for Surrogate Gradient Learning of Thresholds, that makes use of gradient descent. Since F1 is not differentiable, we propose to approximate the thresholding operation gradients with the gradients of a sigmoid function. We report experiments on three datasets, using state-of-the-art pre-trained deep neural networks. In all cases, SGL-Thresh outperformed three other approaches: a default threshold value (defThresh), an heuristic search algorithm and a method estimating F1 gradients numerically. It reached 54.9\% F1 on AudioSet eval, compared to 50.7% with defThresh. SGL-Thresh is very fast and scalable to a large number of tags. To facilitate reproducibility, data and source code in Pytorch are available online: https://github.com/topel/SGL-Thresh

Motivation & Objective

  • To automatically optimize decision thresholds in multi-label audio tagging for improved F1 score.
  • To address the non-differentiability of the F1 metric during threshold optimization.
  • To develop a scalable and efficient method suitable for large-scale audio tagging with many tags.
  • To outperform existing threshold optimization approaches, including heuristic and numerical gradient methods.
  • To enable reproducibility through open-sourced PyTorch code and datasets.

Proposed method

  • Uses a differentiable sigmoid approximation to estimate gradients of the non-differentiable thresholding operation.
  • Applies gradient descent to optimize thresholds by backpropagating through the sigmoid-approximated thresholding function.
  • Treats the threshold optimization as a learnable parameter update within a differentiable inference pipeline.
  • Employs a surrogate loss based on F1 score, with gradients computed via the sigmoid approximation of the thresholding step.
  • Integrates seamlessly with pre-trained deep neural networks for end-to-end fine-tuning of thresholds.
  • Scales efficiently to large numbers of tags due to the differentiable and gradient-based optimization approach.

Experimental results

Research questions

  • RQ1Can surrogate gradient learning effectively optimize decision thresholds in multi-label audio tagging despite the non-differentiability of F1?
  • RQ2How does SGL-Thresh compare to default thresholding, heuristic search, and numerical gradient estimation in terms of F1 performance?
  • RQ3To what extent is the proposed method scalable and efficient when applied to audio tagging with a large number of tags?
  • RQ4Does the use of sigmoid-based gradient approximation yield consistent and measurable improvements in F1 over standard thresholding strategies?
  • RQ5Can the method be effectively applied to real-world datasets like AudioSet with state-of-the-art pre-trained models?

Key findings

  • SGL-Thresh achieved 54.9% micro-F1 on the AudioSet evaluation set, significantly outperforming the default threshold method (50.7%).
  • The method consistently outperformed both heuristic search and numerical gradient estimation across all three evaluated datasets.
  • SGL-Thresh demonstrated fast convergence and high scalability, making it suitable for large-scale audio tagging with many labels.
  • The use of sigmoid-based surrogate gradients enabled effective backpropagation through the thresholding operation, overcoming F1's non-differentiability.
  • The method is robust and generalizable, showing consistent improvements across diverse audio tagging benchmarks.
  • The open-sourced PyTorch implementation enables full reproducibility and integration into existing audio tagging pipelines.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.